Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在删除标记或撤消删除时捕获事件。文档说有“隐藏”和“取消隐藏”事件,但我不知道如何捕获这些事件。任何人都可以提供代码片段吗?
谢谢。
终于想通了:
// Create a marker var myMark = cm.markText(...) // Add the listener directly on the marker CodeMirror.on(myMark, "hide", function(){ // do stuff });