Backend\FormWidgets\CodeEditor

Overview

CodeEditor renders a field for editing code

Extends

Public Properties

public string $language

Code language to display (php, twig)

public boolean $showGutter

Determines whether the gutter is visible.

public boolean $wordWrap

Indicates whether the the word wrapping is enabled.

public string $codeFolding

Cold folding mode: manual, markbegin, markbeginend.

public boolean $autoClosing

Automatically close tags and special characters, like quotation marks, parenthesis, or brackets.

public boolean $useSoftTabs

Indicates whether the the editor uses spaces for indentation.

public boolean $tabSize

Sets the size of the indentation.

public integer $fontSize

Sets the font size.

public integer $margin

Sets the editor margin size.

public string $theme

Ace Editor theme to use.

public bool $showInvisibles

Show invisible characters.

public bool $highlightActiveLine

Highlight the active line.

public boolean $readOnly

If true, the editor is set to read-only mode

public string $autocompletion

Autocomplete mode: manual, basic, live.

public boolean $enableSnippets

If true, the editor activate use Snippets

public boolean $displayIndentGuides

If true, the editor show Indent Guides

public boolean $showPrintMargin

If true, the editor show Print Margin

Show inherited public properties

Inherited Public Properties

Protected Properties

protected $defaultAlias

defaultAlias to identify this widget.

Show inherited protected properties

Inherited Protected Properties


Public Methods

public init()

public init(): void

init the widget, called by the constructor and free from its parameters.

public prepareVars()

public prepareVars(): void

prepareVars for display

public render()

public render(): void

render the widget's primary contents.

Show inherited public methods

Inherited Public Methods

Protected Methods

protected applyEditorPreferences()

protected applyEditorPreferences(): void 

Looks at the user preferences and overrides any set values.

protected loadAssets()

protected loadAssets(): void

loadAssets adds widget specific asset files. Use $this->addJs() and $this->addCss() to register new assets to include on the page.

Show inherited protected methods

Inherited Protected Methods