-
texteditor
The texteditor tag is used to load an editor that returns unformatted text. Is supports syntax highlighters for some languages like html, css and python.
Texteditor inherits and can use all settings from guiobject.
{ 'type' :'texteditor', 'name' : 'viewcodepre', 'autofill' : (0,20), 'syntaxhighlighter' : 'python', 'tabisspace' : 4, 'prekey' : { 'key_tab' : { 'no' : '@me.insertindentation()', 'shift' : '@me.removeindentation()', }, }, 'postkey' : { 'key_enter' : '@me.autoindent()', 'key_return' : '@me.autoindent()', }, 'text' : '@loadcodepre()', },<br>
Example of a standalone editor that not is part of a field.
The extra text edit settings for texteditor:
text set the default text in the editor textchanged action called when text is changes getfocus action called when editor gets focus losefocus action called when editor lose focus tabwidth the tab with used to display a tab char in the editor cursorpositionchanged action fired when cursor position changes syntaxhighlighter form
python
css
html
tabisspace set to a integer value for numbers of spaces to use when tab is added All exta key handling methodes
autoindent The auto indent will take the spaces and tabs on the current line and insert them in the next line. Usually used in cunjunction with key_enter and key_return. insertindentation This will insert spaces instead of tabs if tabisspace is set. It will also work as insert all selected text, when text is selected. It will use spaces if tabisspace is set and tab if not. removeindentation This will act on a block to remove indent. If the tabisspace is set, the remove spaces will act on the number of spaces as if it was a tab. If no block selected, it will act on the current line. These can be added to pre and post keymaos by using @me tag in front.