sunsonliu
sunsonliu
当输入`/`时联想出相关功能

vue组件多次创建Cherry实例怎么办? Cherry没有destroy()方法 _Originally posted by @power721 in https://github.com/Tencent/cherry-markdown/issues/70#issuecomment-1022870117_
### Prerequisites - [ ] There isn't an existing issue that requests the same feature, to avoid duplicates. ### Clear and concise description of the problem 部分业务只用cherry.engine,在获取html后,他们也需要引入对应的样式文件 ### Suggested solution...
## view https://marketplace.visualstudio.com/items?itemName=cherryMarkdownPublisher.cherry-markdown ## install ## use
### Prerequisites - [ ] There isn't an existing issue that requests the same feature, to avoid duplicates. ### Clear and concise description of the problem - 把支持单元格合并的表格语法放出来 - 支持预览区域表格编辑...
支持标题折叠
假设有md内容如下: ``` # head1 内容1 ## head1.2 内容1.2 ## head1.3 内容1.3 ``` 1. 增加配置开关,打开后支持按标题折叠 2. 打开开关后,在右侧预览区和左侧编辑区鼠标hover到标题时在标题前均出现展开收起的icon 3. 当点击`## head1.2`收起内容后,编辑区域展示如下内容: ``` # head1 内容1 ## head1.2 ## head1.3 内容1.3 ``` 同时预览区域也会隐藏`内容1.2`...
### Clear and concise description of the problem 当某个语法hook出现性能问题或者报错时,会导致编辑器直接无法正常渲染markdown内容 ### Suggested solution 希望支持一套降级策略: - 监控每个语法hook的耗时,当超时时直接终止并跳过该语法 - 捕获每个语法hook的报错,当有报错时直接跳过该语法 - 当语法hook被跳过时,需要根据配置(1、抛出异常;2、回调;3、输出到控制台;4、do nothing)来做出相应操作 ### Additional context _No response_ ### Validations - [ ]...
有点麻烦,懒的描述了 主要思想是: - 利用关键字定位对应的md源码 - 利用`contenteditable="true"`实现编辑能力 - 利用`engine.makeMarkdown(html:string)`将右侧预览区域输入的内容转义成md源码并更新到左侧编辑区 - 监听enter键,enter时会插入新行(li) - 监听tab/shift+tab键,实现行的缩进和逆向缩进 - 当用户输入`**xx**`时,需要自动渲染成`xx`(该功能应该是默认支持的)
 由于快捷键配置比较属于个人偏好设置,所以希望提供快捷键配置能力,配置信息默认保存到localstorage里,也可以提供回调函数,支持业务方处理保存信息