rennzhang / codemirror-editor-vue3

CodeMirror component for Vue3
https://rennzhang.github.io/codemirror-editor-vue3
MIT License
202 stars 41 forks source link

replaceSelection() 插入数据有具体的使用方式吗 #24

Closed nullnwk closed 2 years ago

nullnwk commented 2 years ago

Describe the bug

replaceSelection() 插入数据有具体的使用方式吗

Validations

rennzhang commented 2 years ago

API problem please consult codemirrror website

Provide a case:

      editor.addSelection({ line: 12, ch: 10 });
      editor.replaceSelection("test");
nullnwk commented 2 years ago

<Codemirror v-model:value="cm.code" :options="cm.options" border placeholder="test placeholder" :height="125" @change="change" /> 以这种方式定义的,deitor怎么拿到啊,麻烦帮忙解答一下

rennzhang commented 2 years ago

https://renncheung.github.io/codemirror-editor-vue3/instructions/cminstance.html

nullnwk commented 2 years ago

感谢