2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

codemirror: New codemirrorParam 'jumpToLine_extraKey'. Forum #54112

git-svn-id: https://svn.fhem.de/fhem/trunk@11596 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rapster 2016-06-02 16:37:20 +00:00
parent 30479b1c23
commit 8f2a57c665

View File

@ -3,22 +3,23 @@
var cm_loaded = 0;
var cm_active = 0;
var cm_attr = {
matchBrackets: true,
autoRefresh: true,
search: true,
comment: true,
autocomplete: true,
autocompleteAlways: false,
autoCloseBrackets: true,
indentUnit: 4,
type: "fhem",
theme: "blackboard",
indentWithTabs: true,
autofocus: true,
lineNumbers: true,
jumpToLine: false,
smartIndent: false,
height: false,
matchBrackets: true,
autoRefresh: true,
search: true,
comment: true,
autocomplete: true,
autocompleteAlways: false,
autoCloseBrackets: true,
indentUnit: 4,
type: "fhem",
theme: "blackboard",
indentWithTabs: true,
autofocus: true,
lineNumbers: true,
jumpToLine: false,
jumpToLine_extraKey: false,
smartIndent: false,
height: false,
extraKeys: {
'Tab': function(cm) {
if (cm.somethingSelected()) {
@ -98,6 +99,9 @@ function AddCodeMirror(e, cb) {
}
if (cm_attr.jumpToLine) {
cm_active++; loadScript("codemirror/jump-to-line.js", function(){cm_loaded++;} );
if (cm_attr.jumpToLine_extraKey) {
cm_attr.extraKeys[cm_attr.jumpToLine_extraKey] = 'jumpToLine';
}
}
// editor user preferences