Model: CustomCodeEditorMixin

Mixin for Custom Code Editor

Methods

innerchangeMode(e) → {null} mixins/CustomCodeEditorMixin.jsline 379

Change Mode event when mode dropdown is clicked

Parameters:
Name Type Description
e Event

Event Listener

Returns:
null

Return nothing because it will automatically assign Mode to editor

innerclipboardEvents(clipboard) mixins/CustomCodeEditorMixin.jsline 87

Register Clipboard events

Parameters:
Name Type Description
clipboard ClipboardJS

innerconfigDropdown() mixins/CustomCodeEditorMixin.jsline 207

CSS Config for Dropdown. Only accept this config object:

ace: {
   config: {
     dropdown: {
         enable: <Boolean>,
         height: <Number or String>,
         borderRadius: <Number or String>,
         fontFamily: <String>,
         fontSize: <Number or String>,
         backgroundColor: <String>,
         textColor: <String>,
         position: {
             top: <Number or String>,
             bottom: <Number or String>,
             right: <Number or String>,
             left: <Number or String>
         },
         arrowColor: <String (HEX or RGB or RGBA)>
   }
}

innerconfigEditor() mixins/CustomCodeEditorMixin.jsline 324

CSS Config for AceJS Editor. Only accept this config object:

ace: {
   config: {
       editorHeight: <Number or String>,
       fontSize: <Number or String>
   }
}

innerdestroyClipboard() mixins/CustomCodeEditorMixin.jsline 125

Destroy Clipboard event

innereditor(element) → {aceEditor} mixins/CustomCodeEditorMixin.jsline 454

Initialize editor

Parameters:
Name Type Description
element HTMLElement
Returns:
aceEditor

Return initialized AceJS Editor from Element

innereditorEvents(editor) mixins/CustomCodeEditorMixin.jsline 531

(DON'T OVERRIDE THIS) To register blur & focus Ace Editor Events

Parameters:
Name Type Description
editor aceEditor

innererrorClipboard(e) mixins/CustomCodeEditorMixin.jsline 111

Error Clipboard Event

Parameters:
Name Type Description
e ClipboardJS.Event

innerfilterModesList(e) mixins/CustomCodeEditorMixin.jsline 351

Filter Modes by Search Input Event

Parameters:
Name Type Description
e Event

innergetEditor() → {aceEditor} mixins/CustomCodeEditorMixin.jsline 441

Get Editor

Returns:
aceEditor

Get Editor or Null

innergetName(name) → {String} mixins/CustomCodeEditorMixin.jsline 464

To convert any 'camelCase' name to 'Camel Case'

Parameters:
Name Type Description
name String
Returns:
String

String that has been trimmed and modified

innerinit(element) → {aceEditor} mixins/CustomCodeEditorMixin.jsline 11

Init Custom Code Editor

Parameters:
Name Type Description
element HTMLElement
Returns:
aceEditor

Return editor intialized from ACE JS

innerinitCopyClipboard(copyButton) mixins/CustomCodeEditorMixin.jsline 77

Init ClipboardJS

Parameters:
Name Type Description
copyButton HTMLElement

innermergeConfig() mixins/CustomCodeEditorMixin.jsline 276

to merge any this.field specific schema options to merge with project level module options

innersetDefaultSubmitValue() mixins/CustomCodeEditorMixin.jsline 481

To set default Submit value for this.next that will contains:

 this.next = {
   code: '',
   type: ''
 }

innersetDropdown() mixins/CustomCodeEditorMixin.jsline 137

To Set Dropdown if dropdown enable

innersetEditor(editor) mixins/CustomCodeEditorMixin.jsline 430

Set Editor

Parameters:
Name Type Description
editor aceEditor

innersetEditorValue() mixins/CustomCodeEditorMixin.jsline 503

Set editor value on mounted function.

innersetSubmitValue(editor) mixins/CustomCodeEditorMixin.jsline 515

To set submit value whenever editor is blur

Parameters:
Name Type Description
editor aceEditor

innersuccessClipboard(e) mixins/CustomCodeEditorMixin.jsline 97

Success Clipboard Event

Parameters:
Name Type Description
e ClipboardJS.Event