Revision 3980:df625feec28c,
635 bytes
checked in by franck <carnet.franck.paul@…>, 6 years ago
(diff) |
Switching from inline JS variables to JSON script, theme editor plugin
|
Line | |
---|
1 | /*global CodeMirror, getData */ |
---|
2 | 'use strict'; |
---|
3 | |
---|
4 | window.CodeMirror.defineMode("dotclear", function(config) { |
---|
5 | const mode = getData('theme_editor_mode'); |
---|
6 | |
---|
7 | return CodeMirror.multiplexingMode( |
---|
8 | CodeMirror.getMode(config, mode.mode), { |
---|
9 | open: "{{tpl:", |
---|
10 | close: "}}", |
---|
11 | mode: CodeMirror.getMode(config, "text/plain"), |
---|
12 | delimStyle: "delimit" |
---|
13 | }, { |
---|
14 | open: "<tpl:", |
---|
15 | close: ">", |
---|
16 | mode: CodeMirror.getMode(config, "text/plain"), |
---|
17 | delimStyle: "delimit" |
---|
18 | }, { |
---|
19 | open: "</tpl:", |
---|
20 | close: ">", |
---|
21 | mode: CodeMirror.getMode(config, "text/plain"), |
---|
22 | delimStyle: "delimit" |
---|
23 | } |
---|
24 | ); |
---|
25 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.