Contents

Backend\FormWidgets\CodeEditor

Overview

CodeEditor renders a field for editing code

Extends
Implements
  • Larajax\Contracts\ViewComponentInterface

Public Properties

public string $language

language code to display (php, twig)

public bool $showGutter

showGutter determines whether the gutter is visible.

public string $wordWrap

wordWrap mode: off, fluid, 40, 80.

public string $codeFolding

codeFolding mode: manual, markbegin, markbeginend.

public bool $autoClosing

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

public bool $useSoftTabs

useSoftTabs indicates whether the the editor uses spaces for indentation.

public bool $tabSize

tabSize sets the size of the indentation.

public int $fontSize

fontSize sets the font size.

public int $margin

margin sets the editor margin size.

public string $theme

theme to use.

public bool $showInvisibles

showInvisibles characters.

public bool $highlightActiveLine

highlightActiveLine highlights the active line.

public bool $readOnly

readOnly if true, the editor is set to read-only mode

public string $autocompletion

autocompletion mode: manual, basic, live.

public bool $enableSnippets

enableSnippets ,if true, the editor activate use Snippets

public bool $displayIndentGuides

displayIndentGuides if true, the editor show Indent Guides

public bool $showPrintMargin

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