diff --git a/editions/codemirrordemo/tiddlers/HelloThere.tid b/editions/codemirrordemo/tiddlers/HelloThere.tid index 78c25c64f..19bec8381 100644 --- a/editions/codemirrordemo/tiddlers/HelloThere.tid +++ b/editions/codemirrordemo/tiddlers/HelloThere.tid @@ -7,3 +7,5 @@ Try editing the tiddler LoremIpsum to try out the editor. To add the plugin to your own TiddlyWiki5, just drag this link to the browser window: [[$:/plugins/tiddlywiki/codemirror]] + +{{$:/plugins/tiddlywiki/codemirror/instructions}} diff --git a/plugins/tiddlywiki/codemirror/instructions.tid b/plugins/tiddlywiki/codemirror/instructions.tid new file mode 100644 index 000000000..92ce863df --- /dev/null +++ b/plugins/tiddlywiki/codemirror/instructions.tid @@ -0,0 +1,20 @@ +title: $:/plugins/tiddlywiki/codemirror/instructions + +! Configuration + +You can configure the CodeMirror plugin by creating a tiddler called [[$:/config/CodeMirror]] containing a JSON configuration object. For example: + +``` +{ + "require": [ + "$:/plugins/tiddlywiki/codemirror/addon/dialog.js", + "$:/plugins/tiddlywiki/codemirror/addon/searchcursor.js", + "$:/plugins/tiddlywiki/codemirror/keymap/vim.js", + "$:/plugins/tiddlywiki/codemirror/keymap/emacs.js" + ], + "configuration": { + "keyMap": "vim", + "showCursorWhenSelecting": true + } +} +```