codemirror autocomplete after any keyup?

前端 未结 11 1482
忘了有多久
忘了有多久 2020-12-29 04:06

I\'m working on trying to add a custom autocomplete, that I want to trigger whenever the user is typing (configurable of course). I\'ve found a couple examples of autocomple

11条回答
  •  自闭症患者
    2020-12-29 04:55

    editor.on("inputRead",function(cm,changeObj){
       // hinting logic
    })
    

    As far I've seen, "inputRead" is the best event to show "auto completions" in "codemirror". The only drawback is that you can't show hints on backspace or delete.

提交回复
热议问题