code mirror autocomplete in tw5

72 views
Skip to first unread message

peuhpeuh singe

unread,
Apr 4, 2016, 4:11:45 AM4/4/16
to TiddlyWiki
Hi,

I am very new to TW and enjoy a lot is functionalities in my work for about 2 weeks.I will be very interesting in using the completion functionality of codemirror https://codemirror.net/demo/complete.html. I tried to inspire myself on previous thread about codemirror  but did not manage to make it works... Maybe someone has already tried and could help me.

What I did as for now is copying the content of https://codemirror.net/demo/complete.html into a tiddler called $:/plugins/tiddlywiki/codemirror/addon/edit/autoComplete.js and labeled it as a application/javascript with field library and value module-type.
Then complete  $:/config/CodeMirror so that it reads:
{
  "require": [
      "$:/plugins/tiddlywiki/codemirror/mode/javascript/javascript.js",
      "$:/plugins/tiddlywiki/codemirror/addon/dialog/dialog.js",
      "$:/plugins/tiddlywiki/codemirror/addon/search/searchcursor.js",
    "$:/plugins/tiddlywiki/codemirror/addon/edit/autoComplete.js"
  ],

  "configuration": {
      "showCursorWhenSelecting": true
  }
}

Thanks in advance for any hints...


Reply all
Reply to author
Forward
0 new messages