Optional
options: HTMLCodeMirrorOptions = {}Protected
_internalsAttached ElementInternals which provides form handling functionality.
Protected
_primaryThe primary input (if any). Used to determine what element should receive focus when an associated label is clicked on.
Protected
_valueThe underlying value of the element.
Static
formDeclare that this custom element provides form element functionality.
Static
observedAttributes requiring change notifications
Static
tagAn AbortSignal that can be passed to event listeners registered in subclasses. The signal will ensure that the listener is removed when the element is disconnected from the DOM. Not available in the constructor.
The position of the cursor.
Is this element disabled?
Is this field editable? The field can be neither disabled nor readonly.
The form this element belongs to.
This element's indent attribute, which determines the number of spaces added upon pressing the TAB key. A value of 0 disables this feature entirely.
Set this element's indent attribute.
This element's language attribute or its default if no value is set
Whether the editor is externally managed by some other process that takes responsibility for its contents and for firing events. If not set, the editor will fire its own events.
Set the editor's managed attribute.
The input element name.
The element's nowrap attribute, which if present disables line-wrapping
Set this element's nowrap attribute.
The value of the input element.
Internal
Apply key attributes on the containing custom HTML element to input elements contained within it.
Initialize the custom element, constructing its HTML.
Call for garbage collection upon this element being removed from the DOM.
Given screen co-ordinates, returns the position in the editor's text content at those co-ordinates.
The screen co-ordinates.
Protected
_activateProtected
Activate event listeners which add dynamic behavior to the custom element.
Protected
_disconnectProtected
A method provided for subclasses to perform tear-down workflows as an alternative to overriding disconnectedCallback.
Protected
_onProtected
Special handling when the custom element is clicked. This should be implemented to transfer focus to an appropriate internal element.
Protected
_refreshProtected
Refresh the active state of the custom element.
Protected
_toggleProtected
Static
createCreate an HTMLCodeMirrorElement element for a StringField (typically a JSONField or JavascriptField).
A custom HTML element responsible for displaying a CodeMirror rich text editor.