From b5629ccc82fcc3c277c3dcf150194c708cc18e1e Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sat, 25 Jan 2014 19:34:32 +0000 Subject: [PATCH] Update codemirror plugin docs @pmario and @jbolila - could you kindly check whether the docs cover everything? --- .../codemirrordemo/tiddlers/HelloThere.tid | 2 ++ .../tiddlywiki/codemirror/instructions.tid | 20 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 plugins/tiddlywiki/codemirror/instructions.tid 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 + } +} +```