Difference between revisions of "Widget:CodeEditor"

From Coder Merlin
Line 5: Line 5:
;theme: string: name of theme (which must be loaded via css)
;theme: string: name of theme (which must be loaded via css)
;readOnly: boolean: true if editing should be disabled
;readOnly: boolean: true if editing should be disabled
;mode: string: language for highlighting
;initialCode: string: initial code to place in editor
;initialCode: string: initial code to place in editor
</noinclude>
</noinclude>
Line 19: Line 20:
           lineNumbers: "<!--{$lineNumbers|validate:boolean}-->",
           lineNumbers: "<!--{$lineNumbers|validate:boolean}-->",
           theme: "<!--{$theme}-->",
           theme: "<!--{$theme}-->",
           readOnly: "<!--{$readOnly}-->"
           readOnly: "<!--{$readOnly}-->",
          mode: "<!--{$mode}-->"
       }
       }
   );
   );

Revision as of 20:24, 8 June 2021

Parameters:

uniqueID
integer: id for editor, must be unique per page
lineNumbers
boolean: true to display line numbers
theme
string: name of theme (which must be loaded via css)
readOnly
boolean: true if editing should be disabled
mode
string: language for highlighting
initialCode
string: initial code to place in editor