376 lines
222 KiB
JSON
376 lines
222 KiB
JSON
|
|
{
|
||
|
|
"tiddlers": {
|
||
|
|
"$:/config/EditorTypeMappings/application/javascript": {
|
||
|
|
"title": "$:/config/EditorTypeMappings/application/javascript",
|
||
|
|
"text": "codemirror"
|
||
|
|
},
|
||
|
|
"$:/config/EditorTypeMappings/application/json": {
|
||
|
|
"title": "$:/config/EditorTypeMappings/application/json",
|
||
|
|
"text": "codemirror"
|
||
|
|
},
|
||
|
|
"$:/config/EditorTypeMappings/application/x-tiddler-dictionary": {
|
||
|
|
"title": "$:/config/EditorTypeMappings/application/x-tiddler-dictionary",
|
||
|
|
"text": "codemirror"
|
||
|
|
},
|
||
|
|
"$:/config/EditorTypeMappings/text/css": {
|
||
|
|
"title": "$:/config/EditorTypeMappings/text/css",
|
||
|
|
"text": "codemirror"
|
||
|
|
},
|
||
|
|
"$:/config/EditorTypeMappings/text/html": {
|
||
|
|
"title": "$:/config/EditorTypeMappings/text/html",
|
||
|
|
"text": "codemirror"
|
||
|
|
},
|
||
|
|
"$:/config/EditorTypeMappings/text/plain": {
|
||
|
|
"title": "$:/config/EditorTypeMappings/text/plain",
|
||
|
|
"text": "codemirror"
|
||
|
|
},
|
||
|
|
"$:/config/EditorTypeMappings/text/vnd.tiddlywiki": {
|
||
|
|
"title": "$:/config/EditorTypeMappings/text/vnd.tiddlywiki",
|
||
|
|
"text": "codemirror"
|
||
|
|
},
|
||
|
|
"$:/config/EditorTypeMappings/text/x-markdown": {
|
||
|
|
"title": "$:/config/EditorTypeMappings/text/x-markdown",
|
||
|
|
"text": "codemirror"
|
||
|
|
},
|
||
|
|
"$:/config/EditorTypeMappings/text/x-tiddlywiki": {
|
||
|
|
"title": "$:/config/EditorTypeMappings/text/x-tiddlywiki",
|
||
|
|
"text": "codemirror"
|
||
|
|
},
|
||
|
|
"$:/config/codemirror/cursorBlinkRate": {
|
||
|
|
"title": "$:/config/codemirror/cursorBlinkRate",
|
||
|
|
"type": "integer",
|
||
|
|
"text": "530"
|
||
|
|
},
|
||
|
|
"$:/config/codemirror/extraKeysTW": {
|
||
|
|
"title": "$:/config/codemirror/extraKeysTW",
|
||
|
|
"extend": "extraKeys",
|
||
|
|
"type": "json",
|
||
|
|
"text": "{\n\t\"Ctrl-Esc\": \"singleSelection\",\n\t\"Esc\": \"\",\n\t\"Ctrl-S\": \"\",\n\t\"Ctrl-U\": \"\",\n\t\"Ctrl-T\": \"\",\n\t\"Alt-T\": \"transposeChars\",\n\t\"Alt-U\": \"undoSelection\",\n\t\"Shift-Alt-U\": \"redoSelection\",\n\t\"Cmd-U\": \"\",\n\t\"Tab\": \"indentAuto()\",\n\t\"Enter\": \"newLineAndIndent()\"\n}\n"
|
||
|
|
},
|
||
|
|
"$:/config/codemirror/indentUnit": {
|
||
|
|
"title": "$:/config/codemirror/indentUnit",
|
||
|
|
"type": "integer",
|
||
|
|
"text": "2"
|
||
|
|
},
|
||
|
|
"$:/config/codemirror/indentWithTabs": {
|
||
|
|
"title": "$:/config/codemirror/indentWithTabs",
|
||
|
|
"type": "bool",
|
||
|
|
"text": "true"
|
||
|
|
},
|
||
|
|
"$:/config/codemirror/inputStyle": {
|
||
|
|
"title": "$:/config/codemirror/inputStyle",
|
||
|
|
"type": "string",
|
||
|
|
"text": "textarea"
|
||
|
|
},
|
||
|
|
"$:/config/codemirror/keyMap": {
|
||
|
|
"title": "$:/config/codemirror/keyMap",
|
||
|
|
"type": "string",
|
||
|
|
"text": "default"
|
||
|
|
},
|
||
|
|
"$:/config/codemirror/lineNumbers": {
|
||
|
|
"title": "$:/config/codemirror/lineNumbers",
|
||
|
|
"type": "bool",
|
||
|
|
"text": "false"
|
||
|
|
},
|
||
|
|
"$:/config/codemirror/lineWrapping": {
|
||
|
|
"title": "$:/config/codemirror/lineWrapping",
|
||
|
|
"type": "bool",
|
||
|
|
"text": "true"
|
||
|
|
},
|
||
|
|
"$:/config/codemirror/showCursorWhenSelecting": {
|
||
|
|
"title": "$:/config/codemirror/showCursorWhenSelecting",
|
||
|
|
"type": "bool",
|
||
|
|
"text": "true"
|
||
|
|
},
|
||
|
|
"$:/config/codemirror/smartIndent": {
|
||
|
|
"title": "$:/config/codemirror/smartIndent",
|
||
|
|
"type": "bool",
|
||
|
|
"text": "true"
|
||
|
|
},
|
||
|
|
"$:/config/codemirror/styleActiveLine": {
|
||
|
|
"title": "$:/config/codemirror/styleActiveLine",
|
||
|
|
"type": "bool",
|
||
|
|
"text": "false"
|
||
|
|
},
|
||
|
|
"$:/config/codemirror/tabSize": {
|
||
|
|
"title": "$:/config/codemirror/tabSize",
|
||
|
|
"type": "integer",
|
||
|
|
"text": "2"
|
||
|
|
},
|
||
|
|
"$:/config/codemirror/theme": {
|
||
|
|
"title": "$:/config/codemirror/theme",
|
||
|
|
"type": "string",
|
||
|
|
"text": "tiddlywiki"
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/homeUrl": {
|
||
|
|
"title": "$:/language/codemirror/homeUrl",
|
||
|
|
"text": "http://codemirror.net"
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/addOnUrl": {
|
||
|
|
"title": "$:/language/codemirror/addOnUrl",
|
||
|
|
"text": "http://codemirror.net/doc/manual.html#addons"
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/configUrl": {
|
||
|
|
"title": "$:/language/codemirror/configUrl",
|
||
|
|
"text": "http://codemirror.net/doc/manual.html#config"
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/controlPanel/hint": {
|
||
|
|
"title": "$:/language/codemirror/controlPanel/hint",
|
||
|
|
"text": "These settings let you customise the behaviour of [[CodeMirror|$:/plugins/tiddlywiki/codemirror]]."
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/controlPanel/keyboard": {
|
||
|
|
"title": "$:/language/codemirror/controlPanel/keyboard",
|
||
|
|
"text": "Keyboard shortcuts"
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/controlPanel/usage": {
|
||
|
|
"title": "$:/language/codemirror/controlPanel/usage",
|
||
|
|
"text": "Usage information"
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/cursorBlinkRate/hint": {
|
||
|
|
"title": "$:/language/codemirror/cursorBlinkRate/hint",
|
||
|
|
"text": "Cursor blink rate"
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/editorFont/hint": {
|
||
|
|
"title": "$:/language/codemirror/editorFont/hint",
|
||
|
|
"text": "Editor font family"
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/editorFont/info": {
|
||
|
|
"title": "$:/language/codemirror/editorFont/info",
|
||
|
|
"text": "Set the font family for the ~CodeMirror text-editor"
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/indentUnit/hint": {
|
||
|
|
"title": "$:/language/codemirror/indentUnit/hint",
|
||
|
|
"text": "How many spaces a block should be indented"
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/indentWithTabs/hint": {
|
||
|
|
"title": "$:/language/codemirror/indentWithTabs/hint",
|
||
|
|
"text": "Enable indenting with tabs"
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/indentWithTabs/info": {
|
||
|
|
"title": "$:/language/codemirror/indentWithTabs/info",
|
||
|
|
"text": "Whether, when indenting, the first N*`tabSize` spaces should be replaced by N tabs."
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/keyMap/hint": {
|
||
|
|
"title": "$:/language/codemirror/keyMap/hint",
|
||
|
|
"text": "~CodeMirror keymap"
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/keyMap/info": {
|
||
|
|
"title": "$:/language/codemirror/keyMap/info",
|
||
|
|
"text": "~The Keyboard KeyMap used within the ~CodeMirror text-editor"
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/lineNumbers/hint": {
|
||
|
|
"title": "$:/language/codemirror/lineNumbers/hint",
|
||
|
|
"text": "Enable line numbers"
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/lineNumbers/info": {
|
||
|
|
"title": "$:/language/codemirror/lineNumbers/info",
|
||
|
|
"text": "Whether to show line numbers to the left of the editor."
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/lineWrapping/hint": {
|
||
|
|
"title": "$:/language/codemirror/lineWrapping/hint",
|
||
|
|
"text": "Enable line wrapping"
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/lineWrapping/info": {
|
||
|
|
"title": "$:/language/codemirror/lineWrapping/info",
|
||
|
|
"text": "Whether CodeMirror should scroll or wrap for long lines. Defaults to `false` (scroll)."
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/showCursorWhenSelecting/hint": {
|
||
|
|
"title": "$:/language/codemirror/showCursorWhenSelecting/hint",
|
||
|
|
"text": "Show cursor, when selecting"
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/showCursorWhenSelecting/info": {
|
||
|
|
"title": "$:/language/codemirror/showCursorWhenSelecting/info",
|
||
|
|
"text": "Whether the cursor should be drawn when a selection is active."
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/smartIndent/hint": {
|
||
|
|
"title": "$:/language/codemirror/smartIndent/hint",
|
||
|
|
"text": "Enable smart indent"
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/smartIndent/info": {
|
||
|
|
"title": "$:/language/codemirror/smartIndent/info",
|
||
|
|
"text": "Whether to use the context-sensitive indentation that the mode provides (or just indent the same as the line before). Defaults to `true`."
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/styleActiveLine/hint": {
|
||
|
|
"title": "$:/language/codemirror/styleActiveLine/hint",
|
||
|
|
"text": "Highlight active line"
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/styleActiveLine/info": {
|
||
|
|
"title": "$:/language/codemirror/styleActiveLine/info",
|
||
|
|
"text": "Whether or not to highlight the active text-editor line"
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/tabSize/hint": {
|
||
|
|
"title": "$:/language/codemirror/tabSize/hint",
|
||
|
|
"text": "Width of a tab character"
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/theme/hint": {
|
||
|
|
"title": "$:/language/codemirror/theme/hint",
|
||
|
|
"text": "Select a theme"
|
||
|
|
},
|
||
|
|
"$:/language/codemirror/theme/info": {
|
||
|
|
"title": "$:/language/codemirror/theme/info",
|
||
|
|
"text": "Choose between ~CodeMirror themes"
|
||
|
|
},
|
||
|
|
"$:/plugins/tiddlywiki/codemirror/edit-codemirror.js": {
|
||
|
|
"title": "$:/plugins/tiddlywiki/codemirror/edit-codemirror.js",
|
||
|
|
"text": "/*\\\ntitle: $:/plugins/tiddlywiki/codemirror/edit-codemirror.js\ntype: application/javascript\nmodule-type: widget\n\nEdit-codemirror widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar editTextWidgetFactory = require(\"$:/core/modules/editor/factory.js\").editTextWidgetFactory,\n\tCodeMirrorEngine = require(\"$:/plugins/tiddlywiki/codemirror/engine.js\").CodeMirrorEngine;\n\nexports[\"edit-codemirror\"] = editTextWidgetFactory(CodeMirrorEngine,CodeMirrorEngine);\n\n})();\n",
|
||
|
|
"type": "application/javascript",
|
||
|
|
"module-type": "widget"
|
||
|
|
},
|
||
|
|
"$:/plugins/tiddlywiki/codemirror/engine.js": {
|
||
|
|
"title": "$:/plugins/tiddlywiki/codemirror/engine.js",
|
||
|
|
"text": "/*\\\ntitle: $:/plugins/tiddlywiki/codemirror/engine.js\ntype: application/javascript\nmodule-type: library\n\nText editor engine based on a CodeMirror instance\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar CODEMIRROR_OPTIONS = \"$:/config/CodeMirror\",\nHEIGHT_VALUE_TITLE = \"$:/config/TextEditor/EditorHeight/Height\",\nCONFIG_FILTER = \"[all[shadows+tiddlers]prefix[$:/config/codemirror/]]\"\n\t\n// Install CodeMirror\nif($tw.browser && !window.CodeMirror) {\n\n\tvar modules = $tw.modules.types[\"codemirror\"];\n\tvar req = Object.getOwnPropertyNames(modules);\n\n\twindow.CodeMirror = require(\"$:/plugins/tiddlywiki/codemirror/lib/codemirror.js\");\n\t// Install required CodeMirror plugins\n\tif(req) {\n\t\tif($tw.utils.isArray(req)) {\n\t\t\tfor(var index=0; index<req.length; index++) {\n\t\t\t\trequire(req[index]);\n\t\t\t}\n\t\t} else {\n\t\t\trequire(req);\n\t\t}\n\t}\n}\n\nfunction getCmConfig() {\n\tvar type,\n\t\ttest,\n\t\tvalue,\n\t\telement,\n\t\textend,\n\t\ttiddler,\n\t\tconfig = {},\n\t\tconfigTiddlers = $tw.wiki.filterTiddlers(CONFIG_FILTER);\n\n\tif ($tw.utils.isArray(configTiddlers)) {\n\t\tfor (var i=0; i<configTiddlers.length; i++) {\n\t\t\ttiddler = $tw.wiki.getTiddler(configTiddlers[i]);\n\t\t\t\tif (tiddler) {\n\t\t\t\telement = configTiddlers[i].replace(/\\$:\\/config\\/codemirror\\//ig,\"\");\n\t\t\t\t\ttype = (tiddler.fields.type) ? tiddler.fields.type.trim().toLocaleLowerCase() : \"string\";\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase \"bool\":\n\t\t\t\t\ttest = tiddler.fields.text.trim().toLowerCase();\n\t\t\t\t\tvalue = (test === \"true\") ? true : false;\n\t\t\t\t\tconfig[element] = value;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"string\":\n\t\t\t\t\tvalue = tiddler.fields.text.trim();\n\t\t\t\t\tconfig[element] = value;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"integer\":\n\t\t\t\t\tvalue = parseInt(tiddler.fields.text.trim(), 10);\n\t\t\t\t\tconfig[element] = value;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"json\":\n\t\t\t\t\tvalue = JSON.parse(tiddler.fields.text.trim());\n\t\t\t\t\t\textend = (tiddler.fields.extend) ? tiddler.fields.extend : element;\n\n\t\t\t\t\tif (config[extend]) {\n\t\t\t\t\t\t$tw.utils.extend(config[extend], value);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconfig[extend] = value;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn config;\n}\n\nfunction CodeMirrorEngine(options) {\n\n\t// Save our options\n\tvar self = this;\n\toptions = options || {};\n\tthis.widget = options.widget;\n\tthis.value = options.value;\n\tthis.parentNode = options.parentNode;\n\tthis.nextSibling = options.nextSibling;\n\t// Create the wrapper DIV\n\tthis.domNode = this.widget.document.createElement(\"div\");\n\tif(this.widget.editClass) {\n\t\tthis.domNode.className = this.widget.editClass;\n\t}\n\tthis.domNode.style.display = \"inline-block\";\n\tthis.parentNode.insertBefore(this.domNode,this.nextSibling);\n\tthis.widget.domNodes.push(this.domNode);\n\t\n\t// Set all cm-plugin defaults\n\t// Get the configuration options for the CodeMirror object\n\tvar config = getCmConfig();\n\n\tconfig.mode = options.type;\n\tconfig.value = options.value;\n\tif(this.widget.editTabIndex) {\n\t\tconfig[\"tabindex\"] = this.widget.editTabIndex;\n\t}\n\t// Create the CodeMirror instance\n\tthis.cm = window.CodeMirror(function(cmDomNode) {\n\t\t// Note that this is a synchronous callback that is called before the constructor returns\n\t\tif(!self.widget.document.isTiddlyWikiFakeDom) {\n\t\t\tself.domNode.appendChild(cmDomNode);\n\t\t}\n\t},config);\n\n\t// Set up a change event handler\n\tthis.cm.on(\"change\",function() {\n\t\tself.widget.saveChanges(self.getText());\n\t\tif(self.widget.editInputActions) {\n\t\t\tself.widget.invokeActionString(self.widget.editInputActions);\n\t\t}\n\t});\n\tthis.cm.on(\"drop\",function(cm,event) {\n\t\tevent.stopPropagation(); // Otherwise TW's dropzone widget sees the drop event\n\t\treturn false;\n\t});\n\tthis.cm.on(\"keydown\",function(cm,event) {\n\t\treturn self.widget.handleKeydownEven
|
||
|
|
"type": "application/javascript",
|
||
|
|
"module-type": "library"
|
||
|
|
},
|
||
|
|
"$:/plugins/tiddlywiki/codemirror/lib/codemirror.js": {
|
||
|
|
"text": "!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=e||self).CodeMirror=t()}(this,function(){\"use strict\";var e=navigator.userAgent,t=navigator.platform,d=/gecko\\/\\d/i.test(e),n=/MSIE \\d/.test(e),r=/Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(e),i=/Edge\\/(\\d+)/.exec(e),w=n||r||i,v=w&&(n?document.documentMode||6:+(i||r)[1]),f=!i&&/WebKit\\//.test(e),r=f&&/Qt\\/\\d+\\.\\d+/.test(e),o=!i&&/Chrome\\//.test(e),p=/Opera\\//.test(e),c=/Apple Computer/.test(navigator.vendor),l=/Mac OS X 1\\d\\D([8-9]|\\d\\d)\\D/.test(e),u=/PhantomJS/.test(e),s=!i&&/AppleWebKit/.test(e)&&/Mobile\\/\\w+/.test(e),a=/Android/.test(e),h=s||a||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),g=s||/Mac/.test(t),m=/\\bCrOS\\b/.test(e),y=/win/i.test(t),e=p&&e.match(/Version\\/(\\d*\\.\\d*)/);(e=e&&Number(e[1]))&&15<=e&&(f=!(p=!1));var b=g&&(r||p&&(null==e||e<12.11)),x=d||w&&9<=v;function C(e){return new RegExp(\"(^|\\\\s)\"+e+\"(?:$|\\\\s)\\\\s*\")}var S,L=function(e,t){var n=e.className,r=C(t).exec(n);r&&(t=n.slice(r.index+r[0].length),e.className=n.slice(0,r.index)+(t?r[1]+t:\"\"))};function k(e){for(var t=e.childNodes.length;0<t;--t)e.removeChild(e.firstChild);return e}function T(e,t){return k(e).appendChild(t)}function M(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),\"string\"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function N(e,t,n,r){r=M(e,t,n,r);return r.setAttribute(\"role\",\"presentation\"),r}function A(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function O(){var t;try{t=document.activeElement}catch(e){t=document.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function D(e,t){var n=e.className;C(t).test(n)||(e.className+=(n?\" \":\"\")+t)}function W(e,t){for(var n=e.split(\" \"),r=0;r<n.length;r++)n[r]&&!C(n[r]).test(t)&&(t+=\" \"+n[r]);return t}S=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd(\"character\",n),r.moveStart(\"character\",t),r};var H=function(e){e.select()};function F(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function E(e,t,n){for(var r in t=t||{},e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function P(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\\s\\u00a0]/))&&(t=e.length);for(var o=r||0,l=i||0;;){var s=e.indexOf(\"\\t\",o);if(s<0||t<=s)return l+(t-o);l+=s-o,l+=n-l%n,o=s+1}}s?H=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:w&&(H=function(e){try{e.select()}catch(e){}});var I=function(){this.id=null,this.f=null,this.time=0,this.handler=F(this.onTimeout,this)};function R(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}I.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},I.prototype.set=function(e,t){this.f=t;t=+new Date+e;(!this.id||t<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=t)};var z=50,B={toString:function(){return\"CodeMirror.Pass\"}},G={scroll:!1},U={origin:\"*mouse\"},V={origin:\"+move\"};function K(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(\"\\t\",r);-1==o&&(o=e.length);var l=o-r;if(o==e.length||t<=i+l)return r+Math.min(l,t-i);if(i+=o-r,r=o+1,t<=(i+=n-i%n))return r}}var j=[\"\"];function X(e){for(;j.length<=e;)j.push(Y(j)+\" \");return j[e]}function Y(e){return e[e.length-1]}function _(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function $(){}function q(e,t){e=Object.create?Object.create(e):($.prototype=e,new $);return t&&E(t,e),e}var Z=/[\\u00df\\u0587\\u0590-\\u05f4\\u0600-\\u06ff\\u3040-\\u309f\\u30a0-\\u30ff\\u3400-\\u4db
|
||
|
|
"type": "application/javascript",
|
||
|
|
"title": "$:/plugins/tiddlywiki/codemirror/lib/codemirror.js",
|
||
|
|
"module-type": "library"
|
||
|
|
},
|
||
|
|
"$:/plugins/tiddlywiki/codemirror/lib/codemirror.css": {
|
||
|
|
"text": ".CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20,255,20,0.5);-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:red}.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none;outline:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-l
|
||
|
|
"type": "text/vnd.tiddlywiki",
|
||
|
|
"title": "$:/plugins/tiddlywiki/codemirror/lib/codemirror.css",
|
||
|
|
"tags": "[[$:/tags/Stylesheet]]"
|
||
|
|
},
|
||
|
|
"$:/plugins/tiddlywiki/codemirror/addon/dialog/dialog.css": {
|
||
|
|
"text": ".CodeMirror-dialog {\n position: absolute;\n left: 0; right: 0;\n background: inherit;\n z-index: 15;\n padding: .1em .8em;\n overflow: hidden;\n color: inherit;\n}\n\n.CodeMirror-dialog-top {\n border-bottom: 1px solid #eee;\n top: 0;\n}\n\n.CodeMirror-dialog-bottom {\n border-top: 1px solid #eee;\n bottom: 0;\n}\n\n.CodeMirror-dialog input {\n border: none;\n outline: none;\n background: transparent;\n width: 20em;\n color: inherit;\n font-family: monospace;\n}\n\n.CodeMirror-dialog button {\n font-size: 70%;\n}\n",
|
||
|
|
"type": "text/css",
|
||
|
|
"title": "$:/plugins/tiddlywiki/codemirror/addon/dialog/dialog.css",
|
||
|
|
"tags": "[[$:/tags/Stylesheet]]"
|
||
|
|
},
|
||
|
|
"$:/plugins/tiddlywiki/codemirror/addon/dialog/dialog.js": {
|
||
|
|
"text": "!function(e){\"object\"==typeof exports&&\"object\"==typeof module?e(require(\"../../lib/codemirror\")):\"function\"==typeof define&&define.amd?define([\"../../lib/codemirror\"],e):e(CodeMirror)}(function(s){function f(e,o,n){var t=e.getWrapperElement(),i=t.appendChild(document.createElement(\"div\"));return i.className=n?\"CodeMirror-dialog CodeMirror-dialog-bottom\":\"CodeMirror-dialog CodeMirror-dialog-top\",\"string\"==typeof o?i.innerHTML=o:i.appendChild(o),s.addClass(t,\"dialog-opened\"),i}function p(e,o){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=o}s.defineExtension(\"openDialog\",function(e,o,n){n=n||{},p(this,null);var t=f(this,e,n.bottom),i=!1,r=this;function u(e){if(\"string\"==typeof e)a.value=e;else{if(i)return;i=!0,s.rmClass(t.parentNode,\"dialog-opened\"),t.parentNode.removeChild(t),r.focus(),n.onClose&&n.onClose(t)}}var l,a=t.getElementsByTagName(\"input\")[0];return a?(a.focus(),n.value&&(a.value=n.value,!1!==n.selectValueOnOpen&&a.select()),n.onInput&&s.on(a,\"input\",function(e){n.onInput(e,a.value,u)}),n.onKeyUp&&s.on(a,\"keyup\",function(e){n.onKeyUp(e,a.value,u)}),s.on(a,\"keydown\",function(e){n&&n.onKeyDown&&n.onKeyDown(e,a.value,u)||((27==e.keyCode||!1!==n.closeOnEnter&&13==e.keyCode)&&(a.blur(),s.e_stop(e),u()),13==e.keyCode&&o(a.value,e))}),!1!==n.closeOnBlur&&s.on(t,\"focusout\",function(e){null!==e.relatedTarget&&u()})):(l=t.getElementsByTagName(\"button\")[0])&&(s.on(l,\"click\",function(){u(),r.focus()}),!1!==n.closeOnBlur&&s.on(l,\"blur\",u),l.focus()),u}),s.defineExtension(\"openConfirm\",function(e,o,n){p(this,null);var t=f(this,e,n&&n.bottom),i=t.getElementsByTagName(\"button\"),r=!1,u=this,l=1;function a(){r||(r=!0,s.rmClass(t.parentNode,\"dialog-opened\"),t.parentNode.removeChild(t),u.focus())}i[0].focus();for(var c=0;c<i.length;++c){var d=i[c];!function(o){s.on(d,\"click\",function(e){s.e_preventDefault(e),a(),o&&o(u)})}(o[c]),s.on(d,\"blur\",function(){--l,setTimeout(function(){l<=0&&a()},200)}),s.on(d,\"focus\",function(){++l})}}),s.defineExtension(\"openNotification\",function(e,o){p(this,u);var n,t=f(this,e,o&&o.bottom),i=!1,r=o&&void 0!==o.duration?o.duration:5e3;function u(){i||(i=!0,clearTimeout(n),s.rmClass(t.parentNode,\"dialog-opened\"),t.parentNode.removeChild(t))}return s.on(t,\"click\",function(e){s.e_preventDefault(e),u()}),r&&(n=setTimeout(u,r)),u})});\n",
|
||
|
|
"type": "application/javascript",
|
||
|
|
"title": "$:/plugins/tiddlywiki/codemirror/addon/dialog/dialog.js",
|
||
|
|
"module-type": "codemirror"
|
||
|
|
},
|
||
|
|
"$:/plugins/tiddlywiki/codemirror/addon/selection/activeline.js": {
|
||
|
|
"text": "!function(e){\"object\"==typeof exports&&\"object\"==typeof module?e(require(\"../../lib/codemirror\")):\"function\"==typeof define&&define.amd?define([\"../../lib/codemirror\"],e):e(CodeMirror)}(function(r){\"use strict\";var s=\"CodeMirror-activeline\",c=\"CodeMirror-activeline-background\",l=\"CodeMirror-activeline-gutter\";function f(e){for(var t=0;t<e.state.activeLines.length;t++)e.removeLineClass(e.state.activeLines[t],\"wrap\",s),e.removeLineClass(e.state.activeLines[t],\"background\",c),e.removeLineClass(e.state.activeLines[t],\"gutter\",l)}function o(t,e){for(var n=[],i=0;i<e.length;i++){var r,o=e[i],a=t.getOption(\"styleActiveLine\");(\"object\"==typeof a&&a.nonEmpty?o.anchor.line==o.head.line:o.empty())&&(r=t.getLineHandleVisualStart(o.head.line),n[n.length-1]!=r&&n.push(r))}!function(e,t){if(e.length==t.length){for(var n=0;n<e.length;n++)if(e[n]!=t[n])return;return 1}}(t.state.activeLines,n)&&t.operation(function(){f(t);for(var e=0;e<n.length;e++)t.addLineClass(n[e],\"wrap\",s),t.addLineClass(n[e],\"background\",c),t.addLineClass(n[e],\"gutter\",l);t.state.activeLines=n})}function a(e,t){o(e,t.ranges)}r.defineOption(\"styleActiveLine\",!1,function(e,t,n){var i=n!=r.Init&&n;t!=i&&(i&&(e.off(\"beforeSelectionChange\",a),f(e),delete e.state.activeLines),t&&(e.state.activeLines=[],o(e,e.listSelections()),e.on(\"beforeSelectionChange\",a)))})});\n",
|
||
|
|
"type": "application/javascript",
|
||
|
|
"title": "$:/plugins/tiddlywiki/codemirror/addon/selection/activeline.js",
|
||
|
|
"module-type": "codemirror"
|
||
|
|
},
|
||
|
|
"$:/plugins/tiddlywiki/codemirror/mode/tw-meta.js": {
|
||
|
|
"text": "!function(e){\"object\"==typeof exports&&\"object\"==typeof module?e(require(\"../lib/codemirror\")):\"function\"==typeof define&&define.amd?define([\"../lib/codemirror\"],e):e(CodeMirror)}(function(e){\"use strict\";e.modeInfo=[{name:\"CMake\",mime:\"text/x-cmake\",mode:\"cmake\",ext:[\"cmake\",\"cmake.in\"],file:/^CMakeLists.txt$/},{name:\"Cython\",mime:\"text/x-cython\",mode:\"python\",ext:[\"pyx\",\"pxd\",\"pxi\"]},{name:\"CSS\",mime:\"text/css\",mode:\"css\",ext:[\"css\"]},{name:\"diff\",mime:\"text/x-diff\",mode:\"diff\",ext:[\"diff\",\"patch\"]},{name:\"Embedded Javascript\",mime:\"application/x-ejs\",mode:\"htmlembedded\",ext:[\"ejs\"]},{name:\"Embedded Ruby\",mime:\"application/x-erb\",mode:\"htmlembedded\",ext:[\"erb\"]},{name:\"Erlang\",mime:\"text/x-erlang\",mode:\"erlang\",ext:[\"erl\"]},{name:\"GitHub Flavored Markdown\",mime:\"text/x-gfm\",mode:\"gfm\",file:/^(readme|contributing|history).md$/i},{name:\"Go\",mime:\"text/x-go\",mode:\"go\",ext:[\"go\"]},{name:\"ASP.NET\",mime:\"application/x-aspx\",mode:\"htmlembedded\",ext:[\"aspx\"],alias:[\"asp\",\"aspx\"]},{name:\"HTML\",mime:\"text/html\",mode:\"htmlmixed\",ext:[\"html\",\"htm\",\"handlebars\",\"hbs\"],alias:[\"xhtml\"]},{name:\"HTTP\",mime:\"message/http\",mode:\"http\"},{name:\"JavaScript\",mimes:[\"text/javascript\",\"text/ecmascript\",\"application/javascript\",\"application/x-javascript\",\"application/ecmascript\"],mode:\"javascript\",ext:[\"js\"],alias:[\"ecmascript\",\"js\",\"node\"]},{name:\"JSON\",mimes:[\"application/json\",\"application/x-json\"],mode:\"javascript\",ext:[\"json\",\"map\"],alias:[\"json5\"]},{name:\"JSON-LD\",mime:\"application/ld+json\",mode:\"javascript\",ext:[\"jsonld\"],alias:[\"jsonld\"]},{name:\"Lua\",mime:\"text/x-lua\",mode:\"lua\",ext:[\"lua\"]},{name:\"Markdown\",mime:\"text/x-markdown\",mode:\"markdown\",ext:[\"markdown\",\"md\",\"mkd\"]},{name:\"MySQL\",mime:\"text/x-mysql\",mode:\"sql\"},{name:\"Plain Text\",mime:\"text/plain\",mode:\"null\",ext:[\"txt\",\"text\",\"conf\",\"def\",\"list\",\"log\"]},{name:\"Python\",mime:\"text/x-python\",mode:\"python\",ext:[\"BUILD\",\"bzl\",\"py\",\"pyw\"],file:/^(BUCK|BUILD)$/},{name:\"SCSS\",mime:\"text/x-scss\",mode:\"css\",ext:[\"scss\"]},{name:\"LaTeX\",mime:\"text/x-latex\",mode:\"stex\",ext:[\"text\",\"ltx\",\"tex\"],alias:[\"tex\"]},{name:\"TiddlyWiki \",mime:\"text/x-tiddlywiki\",mode:\"tiddlywiki\"}];for(var t=0;t<e.modeInfo.length;t++){var m=e.modeInfo[t];m.mimes&&(m.mime=m.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var m=0;m<e.modeInfo.length;m++){var i=e.modeInfo[m];if(i.mime==t)return i;if(i.mimes)for(var a=0;a<i.mimes.length;a++)if(i.mimes[a]==t)return i}return/\\+xml$/.test(t)?e.findModeByMIME(\"application/xml\"):/\\+json$/.test(t)?e.findModeByMIME(\"application/json\"):void 0},e.findModeByExtension=function(t){for(var m=0;m<e.modeInfo.length;m++){var i=e.modeInfo[m];if(i.ext)for(var a=0;a<i.ext.length;a++)if(i.ext[a]==t)return i}},e.findModeByFileName=function(t){for(var m=0;m<e.modeInfo.length;m++){var i=e.modeInfo[m];if(i.file&&i.file.test(t))return i}var a=t.lastIndexOf(\".\"),o=a>-1&&t.substring(a+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var m=0;m<e.modeInfo.length;m++){var i=e.modeInfo[m];if(i.name.toLowerCase()==t)return i;if(i.alias)for(var a=0;a<i.alias.length;a++)if(i.alias[a].toLowerCase()==t)return i}}});\n",
|
||
|
|
"type": "application/javascript",
|
||
|
|
"title": "$:/plugins/tiddlywiki/codemirror/mode/tw-meta.js",
|
||
|
|
"module-type": "codemirror"
|
||
|
|
},
|
||
|
|
"$:/plugins/tiddlywiki/codemirror/keyboard": {
|
||
|
|
"title": "$:/plugins/tiddlywiki/codemirror/keyboard",
|
||
|
|
"text": "\n!!Default keyboard shortcuts\n\n!!!Basic shortcuts\n\n|Shortcut |Function |h\n|Left |goCharLeft |\n|Right |goCharRight |\n|Up |goLineUp |\n|Down |goLineDown |\n|End |goLineEnd |\n|Home |goLineStartSmart |\n|~PageUp |goPageUp |\n|~PageDown |goPageDown |\n|Delete |delCharAfter |\n|Backspace |delCharBefore |\n|Shift-Backspace |delCharBefore |\n|Tab |defaultTab |\n|Shift-Tab |indentAuto |\n|Enter |newlineAndIndent |\n|Insert |toggleOverwrite |\n|Ctrl-Esc |singleSelection |\n\n\n!!!Shortcuts on Windows and Linux\n\n|Shortcut |Function |h\n|Ctrl-A |selectAll |\n|Ctrl-D |deleteLine |\n|Ctrl-Z |undo |\n|Shift-Ctrl-Z |redo |\n|Ctrl-Y |redo |\n|Ctrl-Home |goDocStart |\n|Ctrl-End |goDocEnd |\n|Ctrl-Up |goLineUp |\n|Ctrl-Down |goLineDown |\n|Ctrl-Left |goGroupLeft |\n|Ctrl-Right |goGroupRight |\n|Alt-Left |goLineStart |\n|Alt-Right |goLineEnd |\n|Ctrl-Backspace |delGroupBefore |\n|Ctrl-Delete |delGroupAfter |\n|Ctrl-F |find |\n|Ctrl-G |findNext |\n|Shift-Ctrl-G |findPrev |\n|Shift-Ctrl-F |replace |\n|Shift-Ctrl-R |replaceAll |\n|Ctrl-[ |indentLess |\n|Ctrl-] |indentMore |\n|Alt-U |undoSelection |\n|Shift-Ctrl-U |redoSelection |\n|Shift-Alt-U |redoSelection |\n\n\n!!!Shortcuts on ~MacOs\n\n|Shortcut |Function |h\n|Cmd-A |selectAll |\n|Cmd-D |deleteLine |\n|Cmd-Z |undo |\n|Shift-Cmd-Z |redo |\n|Cmd-Y |redo |\n|Cmd-Home |goDocStart |\n|Cmd-Up |goDocStart |\n|Cmd-End |goDocEnd |\n|Cmd-Down |goDocEnd |\n|Alt-Left |goGroupLeft |\n|Alt-Right |goGroupRight |\n|Cmd-Left |goLineLeft |\n|Cmd-Right |goLineRight |\n|Alt-Backspace |delGroupBefore |\n|Ctrl-Alt-Backspace |delGroupAfter |\n|Alt-Delete |delGroupAfter |\n|Cmd-F |find |\n|Cmd-G |findNext |\n|Shift-Cmd-G |findPrev |\n|Cmd-Alt-F |replace |\n|Shift-Cmd-Alt-F |replaceAll |\n|Cmd-[ |indentLess |\n|Cmd-] |indentMore |\n|Cmd-Backspace |delWrappedLineLeft |\n|Cmd-Delete |delWrappedLineRight |\n|Alt-U |undoSelection |\n|Shift-Alt-U |redoSelection |\n|Ctrl-Up |goDocStart |\n|Ctrl-Down |goDocEnd |\n|Ctrl-F |goCharRight |\n|Ctrl-B |goCharLeft |\n|Ctrl-P |goLineUp |\n|Ctrl-N |goLineDown |\n|Alt-F |goWordRight |\n|Alt-B |goWordLeft |\n|Ctrl-A |goLineStart |\n|Ctrl-E |goLineEnd |\n|Ctrl-V |goPageDown |\n|Shift-Ctrl-V |goPageUp |\n|Ctrl-D |delCharAfter |\n|Ctrl-H |delCharBefore |\n|Alt-D |delWordAfter |\n|Alt-Backspace |delWordBefore |\n|Ctrl-K |killLine |\n|Alt-T |transposeChars |\n|Ctrl-O |openLine |\n\n\n"
|
||
|
|
},
|
||
|
|
"$:/plugins/tiddlywiki/codemirror/license": {
|
||
|
|
"title": "$:/plugins/tiddlywiki/codemirror/license",
|
||
|
|
"text": "\"\"\"\n~CodeMirror, copyright (c) by Marijn Haverbeke and others\nDistributed under an MIT license: http://codemirror.net/LICENSE\n\nCopyright (c) 2004-2007, Jeremy Ruston\nCopyright (c) 2007-2018, UnaMesa Association\nDistributed under an BSD license: https://tiddlywiki.com/#License\n\"\"\"\n"
|
||
|
|
},
|
||
|
|
"$:/plugins/tiddlywiki/codemirror/readme": {
|
||
|
|
"title": "$:/plugins/tiddlywiki/codemirror/readme",
|
||
|
|
"text": "This plugin provides an enhanced text editor component based on [[CodeMirror|http://codemirror.net]]. The basic configuration is designed to be as lightweight as possible and is just around 235kb of size. Additional features can be installed with ~CodeMirror ~AddOns from the plugin library.\n\n[[Source code|https://github.com/Jermolene/TiddlyWiki5/blob/master/plugins/tiddlywiki/codemirror]]\n\nBased on ~CodeMirror version 5.58.3\n"
|
||
|
|
},
|
||
|
|
"$:/core/ui/ControlPanel/Settings/codemirror/cursorBlinkRate": {
|
||
|
|
"title": "$:/core/ui/ControlPanel/Settings/codemirror/cursorBlinkRate",
|
||
|
|
"tags": "$:/tags/ControlPanel/Settings/CodeMirror",
|
||
|
|
"caption": "{{$:/language/codemirror/cursorBlinkRate/hint}}",
|
||
|
|
"text": "\\define lingo-base() $:/language/codemirror/cursorBlinkRate/\n\n|<$link to=\"$:/config/codemirror/cursorBlinkRate\"><<lingo hint>></$link> |<$edit-text tiddler=\"$:/config/codemirror/cursorBlinkRate\" default=\"\" placeholder=\"cursorBlinkRate\" tag=\"input\"/> |\n"
|
||
|
|
},
|
||
|
|
"$:/core/ui/ControlPanel/Settings/codemirror/editorFont": {
|
||
|
|
"title": "$:/core/ui/ControlPanel/Settings/codemirror/editorFont",
|
||
|
|
"tags": "$:/tags/ControlPanel/Settings/CodeMirror",
|
||
|
|
"caption": "{{$:/language/codemirror/editorFont/hint}}",
|
||
|
|
"text": "\\define lingo-base() $:/language/ThemeTweaks/\n\n|<$link to=\"$:/themes/tiddlywiki/vanilla/settings/editorfontfamily\"><<lingo Settings/EditorFontFamily>></$link> |<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/settings/editorfontfamily\" default=\"\" tag=\"input\"/> | |\n"
|
||
|
|
},
|
||
|
|
"$:/core/ui/ControlPanel/Settings/codemirror/indentUnit": {
|
||
|
|
"title": "$:/core/ui/ControlPanel/Settings/codemirror/indentUnit",
|
||
|
|
"tags": "$:/tags/ControlPanel/Settings/CodeMirror",
|
||
|
|
"caption": "{{$:/language/codemirror/indentUnit/hint}}",
|
||
|
|
"text": "\\define lingo-base() $:/language/codemirror/indentUnit/\n\n|<$link to=\"$:/config/codemirror/indentUnit\"><<lingo hint>></$link> |<$edit-text tiddler=\"$:/config/codemirror/indentUnit\" default=\"\" placeholder=\"indentUnit\" tag=\"input\"/> |\n"
|
||
|
|
},
|
||
|
|
"$:/core/ui/ControlPanel/Settings/codemirror/indentWithTabs": {
|
||
|
|
"title": "$:/core/ui/ControlPanel/Settings/codemirror/indentWithTabs",
|
||
|
|
"tags": "$:/tags/ControlPanel/Settings/CodeMirror",
|
||
|
|
"caption": "{{$:/language/codemirror/indentWithTabs/hint}}",
|
||
|
|
"text": "\\define lingo-base() $:/language/codemirror/indentWithTabs/\n<<lingo hint>>\n\n<$checkbox tiddler=\"$:/config/codemirror/indentWithTabs\" field=\"text\" checked=\"true\" unchecked=\"false\" default=\"true\"> <$link to=\"$:/config/codemirror/indentWithTabs\"><<lingo info>></$link> </$checkbox>\n"
|
||
|
|
},
|
||
|
|
"$:/core/ui/ControlPanel/Settings/codemirror/keyMap": {
|
||
|
|
"title": "$:/core/ui/ControlPanel/Settings/codemirror/keyMap",
|
||
|
|
"tags": "$:/tags/ControlPanel/Settings/CodeMirror",
|
||
|
|
"caption": "{{$:/language/codemirror/keyMap/hint}}",
|
||
|
|
"text": "\\define lingo-base() $:/language/codemirror/keyMap\n\n<$link to=\"$:/config/codemirror/keyMap\"><<lingo hint>></$link>\n\n<$select tiddler=\"$:/config/codemirror/keyMap\" default=\"default\">\n<option value=\"default\">default</option>\n<$list filter=\"[all[shadows+tiddlers]module-type[codemirror-keymap]!has[draft.of]get[text]]\">\n<option value=<<currentTiddler>>><$transclude><$text text=<<currentTiddler>>/></$transclude></option>\n</$list>\n</$select>\n\n"
|
||
|
|
},
|
||
|
|
"$:/core/ui/ControlPanel/Settings/codemirror/lineNumbers": {
|
||
|
|
"title": "$:/core/ui/ControlPanel/Settings/codemirror/lineNumbers",
|
||
|
|
"tags": "$:/tags/ControlPanel/Settings/CodeMirror",
|
||
|
|
"caption": "{{$:/language/codemirror/lineNumbers/hint}}",
|
||
|
|
"text": "\\define lingo-base() $:/language/codemirror/lineNumbers/\n<<lingo hint>>\n\n<$checkbox tiddler=\"$:/config/codemirror/lineNumbers\" field=\"text\" checked=\"true\" unchecked=\"false\" default=\"false\"> <$link to=\"$:/config/codemirror/lineNumbers\"><<lingo info>></$link> </$checkbox>\n\n"
|
||
|
|
},
|
||
|
|
"$:/core/ui/ControlPanel/Settings/codemirror/lineWrapping": {
|
||
|
|
"title": "$:/core/ui/ControlPanel/Settings/codemirror/lineWrapping",
|
||
|
|
"tags": "$:/tags/ControlPanel/Settings/CodeMirror",
|
||
|
|
"caption": "{{$:/language/codemirror/lineWrapping/hint}}",
|
||
|
|
"text": "\\define lingo-base() $:/language/codemirror/lineWrapping/\n<<lingo hint>>\n\n<$checkbox tiddler=\"$:/config/codemirror/lineWrapping\" field=\"text\" checked=\"true\" unchecked=\"false\" default=\"true\"> <$link to=\"$:/config/codemirror/lineWrapping\"><<lingo info>></$link> </$checkbox>\n\n"
|
||
|
|
},
|
||
|
|
"$:/core/ui/ControlPanel/Settings/codemirror/showCursorWhenSelecting": {
|
||
|
|
"title": "$:/core/ui/ControlPanel/Settings/codemirror/showCursorWhenSelecting",
|
||
|
|
"tags": "$:/tags/ControlPanel/Settings/CodeMirror",
|
||
|
|
"caption": "{{$:/language/codemirror/showCursorWhenSelecting/hint}}",
|
||
|
|
"text": "\\define lingo-base() $:/language/codemirror/showCursorWhenSelecting/\n<<lingo hint>>\n\n<$checkbox tiddler=\"$:/config/codemirror/showCursorWhenSelecting\" field=\"text\" checked=\"true\" unchecked=\"false\" default=\"true\"> <$link to=\"$:/config/codemirror/showCursorWhenSelecting\"><<lingo info>></$link> </$checkbox>\n\n"
|
||
|
|
},
|
||
|
|
"$:/core/ui/ControlPanel/Settings/codemirror/smartIndent": {
|
||
|
|
"title": "$:/core/ui/ControlPanel/Settings/codemirror/smartIndent",
|
||
|
|
"tags": "$:/tags/ControlPanel/Settings/CodeMirror",
|
||
|
|
"caption": "{{$:/language/codemirror/smartIndent/hint}}",
|
||
|
|
"text": "\\define lingo-base() $:/language/codemirror/smartIndent/\n<<lingo hint>>\n\n<$checkbox tiddler=\"$:/config/codemirror/smartIndent\" field=\"text\" checked=\"true\" unchecked=\"false\" default=\"true\"> <$link to=\"$:/config/codemirror/smartIndent\"><<lingo info>></$link> </$checkbox>\n"
|
||
|
|
},
|
||
|
|
"$:/core/ui/ControlPanel/Settings/codemirror/styleActiveLine": {
|
||
|
|
"title": "$:/core/ui/ControlPanel/Settings/codemirror/styleActiveLine",
|
||
|
|
"tags": "$:/tags/ControlPanel/Settings/CodeMirror",
|
||
|
|
"caption": "{{$:/language/codemirror/styleActiveLine/hint}}",
|
||
|
|
"text": "\\define lingo-base() $:/language/codemirror/styleActiveLine/\n<<lingo hint>>\n\n<$checkbox tiddler=\"$:/config/codemirror/styleActiveLine\" field=\"text\" checked=\"true\" unchecked=\"false\" default=\"false\"> <$link to=\"$:/config/codemirror/styleActiveLine\"><<lingo info>></$link> </$checkbox>\n\n"
|
||
|
|
},
|
||
|
|
"$:/core/ui/ControlPanel/Settings/codemirror/tabSize": {
|
||
|
|
"title": "$:/core/ui/ControlPanel/Settings/codemirror/tabSize",
|
||
|
|
"tags": "$:/tags/ControlPanel/Settings/CodeMirror",
|
||
|
|
"caption": "{{$:/language/codemirror/tabSize/hint}}",
|
||
|
|
"text": "\\define lingo-base() $:/language/codemirror/tabSize/\n\n|<$link to=\"$:/config/codemirror/tabSize\"><<lingo hint>></$link> |<$edit-text tiddler=\"$:/config/codemirror/tabSize\" default=\"\" placeholder=\"tabSize\" tag=\"input\"/> |\n"
|
||
|
|
},
|
||
|
|
"$:/core/ui/ControlPanel/Settings/codemirror/theme": {
|
||
|
|
"title": "$:/core/ui/ControlPanel/Settings/codemirror/theme",
|
||
|
|
"tags": "$:/tags/ControlPanel/Settings/CodeMirror",
|
||
|
|
"caption": "{{$:/language/codemirror/theme/hint}}",
|
||
|
|
"text": "\\define lingo-base() $:/language/codemirror/\n\n<$link to=\"$:/config/codemirror/theme\"><<lingo hint>></$link>\n\n<$select tiddler=\"$:/config/codemirror/theme\" default=\"default\">\n<option value=\"default\">default</option>\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/Stylesheet]module-type[codemirror-theme]!has[draft.of]get[name]]\">\n<option value=<<currentTiddler>>><$transclude field=\"name\"><$text text=<<currentTiddler>>/></$transclude></option>\n</$list>\n</$select>\n\n//see the [[CodeMirror Usage|$:/plugins/tiddlywiki/codemirror/usage]] how to add themes//\n"
|
||
|
|
},
|
||
|
|
"$:/plugins/tiddlywiki/codemirror/styles": {
|
||
|
|
"title": "$:/plugins/tiddlywiki/codemirror/styles",
|
||
|
|
"tags": "[[$:/tags/Stylesheet]]",
|
||
|
|
"module-type": "codemirror-theme",
|
||
|
|
"name": "tiddlywiki",
|
||
|
|
"text": "\\define set-fat-cursor-background-css(colour,colourA,colourB)\n<$set name=\"backgroundColour\" value=<<contrastcolour target:\"\"\"$colour$\"\"\" fallbackTarget:\"\"\"\"\"\" colourA:\"\"\"$colourA$\"\"\" colourB:\"\"\"$colourB$\"\"\">>>\n.cm-s-tiddlywiki.cm-fat-cursor .CodeMirror-cursor { background: <<backgroundColour>>; }\n.cm-s-tiddlywiki .cm-animate-fat-cursor { background-color: <<backgroundColour>>; }\n</$set>\n\\end\n\\define set-fat-cursor-background-colours(palette)\n<$macrocall $name=\"set-fat-cursor-background-css\" colour={{$palette$##foreground}} colourA=\"#77ee77\" colourB=\"#586e75\"/>\n\\end\n\\define set-fat-cursor-background()\n<$macrocall $name=\"set-fat-cursor-background-colours\" palette={{$:/palette}}/>\n\\end\n\\define set-selection-background-css(colour,colourA,colourB,tiddlerEditorBackground)\n<$wikify name=\"tiddlerEditorBackground\" text={{{ [[$tiddlerEditorBackground$]lowercase[]] }}}>\n<$set name=\"backgroundColour\" value=<<contrastcolour target:\"\"\"$colour$\"\"\" fallbackTarget:\"\"\"\"\"\" colourA:\"\"\"$colourA$\"\"\" colourB:\"\"\"$colourB$\"\"\">>>\n<$set name=\"backgroundColour\" value={{{ [<backgroundColour>lowercase[]match<tiddlerEditorBackground>then[]] ~[<backgroundColour>] }}}>\n.cm-s-tiddlywiki div.CodeMirror-selected { background: <<backgroundColour>>; color: <<colour foreground>>; }\n.cm-s-tiddlywiki.CodeMirror ::selection { background: <<backgroundColour>>; color: <<colour foreground>>; }\n.cm-s-tiddlywiki .CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: <<backgroundColour>>; color: <<colour foreground>>; }\n.cm-s-tiddlywiki .CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: <<backgroundColour>>; color: <<colour foreground>>; }\n</$set>\n</$set>\n</$wikify>\n\\end\n\\define set-selection-background-colours(palette)\n<$macrocall $name=\"set-selection-background-css\" colour={{$palette$##foreground}} colourA={{{ [{$palette$##selection-background}!match[]!prefix[<<]!suffix[>>]] ~#073642 }}} colourB={{{ [{$palette$##selection-background}!match[]!prefix[<<]!suffix[>>]] ~#eee8d5 }}} tiddlerEditorBackground={{$palette$##tiddler-editor-background}}/>\n\\end\n\\define set-selection-background()\n<$macrocall $name=\"set-selection-background-colours\" palette={{$:/palette}}/>\n\\end\n\n\\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline macrocallblock\n\n/* Make the editor resize to fit its content */\n\n.CodeMirror {\n\theight: auto;\n\tborder: 1px solid <<colour tiddler-editor-border>>;\n\tline-height: 1.5;\n\tfont-family: {{$:/themes/tiddlywiki/vanilla/settings/editorfontfamily}};\n\tfont-size: {{$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize}};\n}\n\n.CodeMirror-scroll {\n\toverflow-x: auto;\n\toverflow-y: hidden;\n}\n\n.cm-s-tiddlywiki {\n color-profile: sRGB;\n rendering-intent: auto;\n}\n\n.cm-s-tiddlywiki.CodeMirror, .cm-s-tiddlywiki .CodeMirror-gutters { background-color: <<colour tiddler-editor-background>>; color: <<colour foreground>>; }\n.cm-s-tiddlywiki .CodeMirror-gutters {background: <<colour tiddler-editor-background>>; border-right: 1px solid <<colour tiddler-editor-border>>;}\n.cm-s-tiddlywiki .CodeMirror-linenumber {color: <<colour foreground>>;}\n.cm-s-tiddlywiki .CodeMirror-cursor { border-left: 2px solid <<colour foreground>>; }\n.cm-s-tiddlywiki span.cm-comment { color: #586e75; font-style:italic; font-weight:normal; }\n.cm-s-tiddlywiki .CodeMirror-activeline-background, .cm-s-tiddlywiki .CodeMirror-activeline-gutter .CodeMirror-linenumber { background: rgba(127,127,127,0.2); }\n.cm-s-tiddlywiki span.cm-matchhighlight { color: <<colour background>>; background-color: <<colour primary>>; font-weight: normal;}\n.cm-s-tiddlywiki .CodeMirror-widget { text-shadow: none; }\n.cm-s-tiddlywiki .CodeMirror-dialog { background: <<colour tiddler-background>>; }\n.cm-s-tiddlywiki .cm-header { color: #586e75; }\n.cm-s-tiddlywiki .cm-quote { color: #93a1a1; }\n.cm
|
||
|
|
},
|
||
|
|
"$:/core/ui/ControlPanel/Settings/CodeMirror": {
|
||
|
|
"title": "$:/core/ui/ControlPanel/Settings/CodeMirror",
|
||
|
|
"tags": "$:/tags/ControlPanel/SettingsTab",
|
||
|
|
"caption": "CodeMirror",
|
||
|
|
"list-after": "$:/core/ui/ControlPanel/Settings/TiddlyWiki",
|
||
|
|
"text": "\\define lingo-base() $:/language/codemirror/controlPanel/\n\n<<lingo hint>>\n\n<$link to=\"$:/plugins/tiddlywiki/codemirror/usage\"><<lingo usage>></$link>\n\n<$link to=\"$:/plugins/tiddlywiki/codemirror/keyboard\"><<lingo keyboard>></$link>\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Settings/CodeMirror]]\">\n\n<div style=\"border-top:1px solid #eee;\">\n\n!! <$link><$transclude field=\"caption\"/></$link>\n\n<$transclude/>\n\n</div>\n\n</$list>\n"
|
||
|
|
},
|
||
|
|
"$:/core/ui/ControlPanel/Settings": {
|
||
|
|
"title": "$:/core/ui/ControlPanel/Settings",
|
||
|
|
"tags": "$:/tags/ControlPanel",
|
||
|
|
"caption": "{{$:/language/ControlPanel/Settings/Caption}}",
|
||
|
|
"text": "<div class=\"tc-control-panel\">\n<$macrocall $name=\"tabs\" tabsList=\"[all[shadows+tiddlers]tag[$:/tags/ControlPanel/SettingsTab]!has[draft.of]]\" default=\"$:/core/ui/ControlPanel/Settings/TiddlyWiki\" explicitState=\"$:/state/tab--697582678\"/>\n</div>\n"
|
||
|
|
},
|
||
|
|
"$:/core/ui/ControlPanel/Settings/TiddlyWiki": {
|
||
|
|
"title": "$:/core/ui/ControlPanel/Settings/TiddlyWiki",
|
||
|
|
"tags": "$:/tags/ControlPanel/SettingsTab",
|
||
|
|
"caption": "TiddlyWiki",
|
||
|
|
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/\n\n<<lingo Hint>>\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Settings]]\">\n\n<div style=\"border-top:1px solid #eee;\">\n\n!! <$link><$transclude field=\"caption\"/></$link>\n\n<$transclude/>\n\n</div>\n\n</$list>\n"
|
||
|
|
},
|
||
|
|
"$:/plugins/tiddlywiki/codemirror/usage": {
|
||
|
|
"title": "$:/plugins/tiddlywiki/codemirror/usage",
|
||
|
|
"text": "! Configuration\n\nConfiguration for the ~CodeMirror text-editor can be done from within the CodeMirror Settings Tab in the [[ControlPanel|$:/ControlPanel]] (Settings - ~CodeMirror)\n\n\n!!Setting a different Theme\n\n~CodeMirror themes are available in the [ext[official GitHub repository|https://github.com/codemirror/CodeMirror/tree/master/theme]]\n\nMore themes can be found at https://github.com/FarhadG/code-mirror-themes/tree/master/themes and previewed [ext[here|http://farhadg.github.io/code-mirror-themes/]]\n\n\nTo add a theme to your wiki, follow these four steps:\n\n* choose one of the CSS files and copy its content to a new tiddler\n* remove all comments from the top and tag the tiddler with <<tag-pill \"$:/tags/Stylesheet\">>\n* add a field \"module-type\" with the value \"codemirror-theme\". add a field \"name\" with the exact ''name'' of the theme as value\n* save the tiddler and go to the Settings tab in $:/ControlPanel - look for the \"theme\" dropdown to select your newly added theme\n\n\n!!Line Numbers\n\nTo show or hide the Line Numbers at the left, go to ~ControlPanel - Settings - ~CodeMirror and look for the \"Line Numbers\" checkbox\n\n\n!!Line Wrapping\n\nControls if long lines get visually wrapped to a new line if they're too long to fit the editor width or if the editor should scroll horizontally\n\nTo change the line-wrapping behaviour, go to ~ControlPanel - Settings - ~CodeMirror and look for the \"Line Wrapping\" checkbox\n\n\n!!Show Cursor when selecting\n\nDefines whether the Mouse cursor should be visually shown or hidden when making a text-selection\n\nTo change the show-cursor-when-selecting behaviour, go to ~ControlPanel - Settings - ~CodeMirror and look for the \"Show cursor when selecting\" checkbox\n\n\n!!~CodeMirror Font Family\n\nThe Font-Family used within the ~CodeMirror text-editor defaults to \"monospace\" which will choose your configured monospace system-font\n\nThat setting can be overridden entering one or more Font-Families in the \"Font Family\" input field at ~ControlPanel - Settings - ~CodeMirror\n\n* The entries must be separated by semicolons ','\n* Font-Family Names that contain spaces must be quoted like \"My Font\"\n* If a list of Font-Families is specified, the last Font-Family found on the user-system gets used, non-existing fonts get ignored\n* If none of the specified Font-Families is available, ~CodeMirror uses the default \"monospace\"\n\n\n!!\"Hidden\" Settings:\n\n!!!Cursor Blink Rate\n\nThe cursor blink-rate defines how fast (in milliseconds) the cursor blinks inside the textarea\n\nYou can change it by editing $:/config/codemirror/cursorBlinkRate\n\"0\" disables blinking\n\n!!!Tabsize\n\nThe Tabsize defines the width of a tab character. Default is 4.\n\nYou can change it by editing $:/config/codemirror/tabSize\n\n!!!Indent Unit\n\nNot enabled for vnd.tiddlywiki and x-tiddlywiki\n\nDefines how many spaces a text-block should be indented. Defaults to 2.\n\nYou can change it by editing $:/config/codemirror/indentUnit\n\n"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|