Open 2450184176 opened 6 years ago
@2450184176
onCmReady(cm) {
cm.on('keypress', () => {
cm.showHint()
})
}
@surmon-china There is also a small problem,codemirror will automatical selecte hint every time.If I want to write 'fua',however what i get is 'functiona'
ok,After scaning the source code,i solved it by adding {completeSingle:false}
onCmReady(cm) {
cm.on('keypress', () => {
cm.showHint({completeSingle:false})
})
}
you both great!!!
https://jsfiddle.net/dzw6zb72/ cm 里面没有 showHint,报 showHint 未定义呀
@wjhcc2018 import some resource with show-hint
@BH-NOTHING nice!
groovy 代码提示不支持吗?
onCmReady(cm) {
console.log('the editor is ready', cm);
cm.on('keypress', () => {
alert(1)
//cm.showHint()
})
},
getting "cm.on is not a function"
console:
the editor is ready Object { state: {…}, view: {…}, container: div#cme.v-codemirror }
onCmReady(cm) { console.log('the editor is ready', cm); cm.on('keypress', () => { alert(1) //cm.showHint() }) },
getting "cm.on is not a function"
console:
the editor is ready Object { state: {…}, view: {…}, container: div#cme.v-codemirror }
import 'codemirror/addon/hint/show-hint'
import 'codemirror/addon/hint/show-hint.css'
import 'codemirror/addon/hint/sql-hint'
one problem happened in my project:
vue.runtime.esm.js?2b0e:587 [Vue warn]: Error in event handler for "changes": "RangeError: Maximum call stack size exceeded"
found in
--->