Comments (7)
@sunsonliu 还没实现这个api,如果急用,可以先 cherry.wrapperDom.remove();。。。
这个确实有用,我是在nuxt下使用的,希望有个destroy方法
from cherry-markdown.
有道理,我们给setMarkdown和setValue增加第二个参数吧,autoRestoreCursor = true 会尝试保持之前的光标位置。
这里逻辑比较复杂,尤其是在光标之前变动内容的时候,盲目按照偏移量恢复光标不符合预期,比如原始内容是 ABC光标DEF
,当内容变成AABCDEF
的时候,光标会出现在AAB光标CDEF
,这是不符合预期的,所以需要对setValue前后的内容进行一次diff,然后计算出光标变更偏移量,最终实现光标出现在AABC光标DEF
,这块有些开发工作量,我们排期搞下哈
from cherry-markdown.
vue组件多次创建Cherry实例怎么办?
Cherry没有destroy()方法
from cherry-markdown.
vue组件多次创建Cherry实例怎么办? Cherry没有destroy()方法
我新建了一个issue #140 来跟进没有destory的问题哈
from cherry-markdown.
https://github.com/Tencent/cherry-markdown/releases/tag/v0.6.6
from cherry-markdown.
@sunsonliu 如何destroy啊?有办法吗
from cherry-markdown.
@sunsonliu 如何destroy啊?有办法吗
还没实现这个api,如果急用,可以先 cherry.wrapperDom.remove();
。。。
from cherry-markdown.
Related Issues (20)
- 克隆仓库到本地问题 HOT 4
- Render Ordered item with Tailwind CSS
- [Client] 发布后的MarkDown文档在前端页面的渲染方法问题, HOT 3
- [Bug Report] showToolbar功能失效 HOT 2
- [Feature Request] Allow registering other locales
- [Bug Report] Toggling between preview only to editor only mode results in an error
- [Bug Report] Firefox 浏览器复制粘贴多个图片时,每次只能粘贴一张
- [Feature Request] 如果父或以上的 dom 有 transform 属性的话就没法全屏了
- [Others] node获取之后的html ,进行css样式引入 HOT 2
- [Others] 如何禁用联想面板? HOT 3
- [VSCode Plugin] 加载本地相对路径图片显示错误
- draw.io 引入问题 HOT 2
- video自定义视频播放器 HOT 2
- [Bug Report] 光标位置报错 HOT 2
- 预览点击事件无效 HOT 1
- [Bug Report] 编辑&预览模式下,a标签有问题 HOT 4
- [Bug Report] 右侧编辑列表过程中, 输入回车后, 再次编辑此列表, 数据会异常 HOT 1
- [Bug Report] 调用cherryInstance.setValue方法的时候,进入页面出现异常
- [Others] 在toolbar中未添加drawIo时, 如何使用api方式调用drawIo HOT 2
- [Bug Report]缩进 4 个空格的代码段没有正常按对应的语法渲染-plantuml
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cherry-markdown.