Git Product home page Git Product logo

Comments (7)

gspgsp avatar gspgsp commented on April 30, 2024 1

@sunsonliu 还没实现这个api,如果急用,可以先 cherry.wrapperDom.remove();。。。

这个确实有用,我是在nuxt下使用的,希望有个destroy方法

from cherry-markdown.

sunsonliu avatar sunsonliu commented on April 30, 2024

有道理,我们给setMarkdown和setValue增加第二个参数吧,autoRestoreCursor = true 会尝试保持之前的光标位置。
这里逻辑比较复杂,尤其是在光标之前变动内容的时候,盲目按照偏移量恢复光标不符合预期,比如原始内容是 ABC光标DEF,当内容变成AABCDEF的时候,光标会出现在AAB光标CDEF,这是不符合预期的,所以需要对setValue前后的内容进行一次diff,然后计算出光标变更偏移量,最终实现光标出现在AABC光标DEF,这块有些开发工作量,我们排期搞下哈

from cherry-markdown.

power721 avatar power721 commented on April 30, 2024

vue组件多次创建Cherry实例怎么办?
Cherry没有destroy()方法

from cherry-markdown.

sunsonliu avatar sunsonliu commented on April 30, 2024

vue组件多次创建Cherry实例怎么办? Cherry没有destroy()方法

我新建了一个issue #140 来跟进没有destory的问题哈

from cherry-markdown.

sunsonliu avatar sunsonliu commented on April 30, 2024

https://github.com/Tencent/cherry-markdown/releases/tag/v0.6.6

from cherry-markdown.

SKHon avatar SKHon commented on April 30, 2024

@sunsonliu 如何destroy啊?有办法吗

from cherry-markdown.

sunsonliu avatar sunsonliu commented on April 30, 2024

@sunsonliu 如何destroy啊?有办法吗

还没实现这个api,如果急用,可以先 cherry.wrapperDom.remove();。。。

from cherry-markdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.