MarkdownControlsTemplate
Extends:
Template for a markdown control list. Default with no actions.
Constructor Summary
Public Constructor | ||
public |
constructor(source: HTMLTextArea, controls: MarkdownControl[]) Creates a markdown control list. |
Method Summary
Public Methods | ||
public |
Adds a control |
|
public |
addControls(controls: MarkdownControl[]) Adds controls |
|
public |
Cuts from the end of selection |
|
public |
Cuts from beginning of selection |
|
public |
insertAtSelectionEnd(string: string) Inserts at a the end of where the user is. |
|
public |
insertAtSelectionStart(string: string) Inserts at a the beginning of where the user is. |
|
public |
insertForSelection(string: string) Replaces selection with a string |
|
public |
Checks if a string leads the selection |
|
public |
isTrailing(string: string): boolean Checks if a string trails the selection |
Inherited Summary
From class Template | ||
public static get |
An empty template |
|
public static |
fromId(id: string, type: TemplateType): Template Performs a |
|
public static |
fromInnerHTML(wrapper: HTMLElement, innerHTML: string, type: TemplateType): Template From innerHTML will wrap in div |
|
public static |
fromText(text: string, type: TemplateType): Template Creates template |
|
public get |
underlyingNode: HTMLElement Returns the underlying element |
|
public |
defineLinkedClass(name: string, className: string, node: HTMLElement) Defines a linked class |
|
public |
defineLinkedInput(name: string, input: HTMLElement) Defines a linked input |
|
public |
defineLinkedText(name: string, defaultValue: string): Text Creates a field w/ updating text |
|
public abstract |
async didInitialLoad() Called when loaded the first time |
|
public abstract |
didLoad() Called when the view has loaded |
|
public |
Called when disappeared |
|
public |
getParent(defaultElement: HTMLElement): HTMLElement Gets the original parent or else a default |
|
public |
loadBeforeContext(elem: HTMLElement): HTMLElement Loads before an element |
|
public |
loadInContext(parent: HTMLElement, allowDupliacte: boolean): HTMLElement Loads the template in a context |
|
public |
loadReplacingContext(source: HTMLElement): HTMLElement Loads and replaces |
|
public |
prependInContext(parent: HTMLElement, allowDupliacte: boolean): HTMLElement Prepends the template in a context |
|
public |
Removes from the context. |
|
public |
unique(): HTMLElement Returns a unique instance of the template as an HTMLElement. |
|
public |
async willInitialLoad() Called before loaded the first time |
|
public |
willLoad() Called right before the view will appear on screen |
|
public |
Called before disappearing |
Public Constructors
public constructor(source: HTMLTextArea, controls: MarkdownControl[]) source
Creates a markdown control list.
Override:
Template#constructorParams:
Name | Type | Attribute | Description |
source | HTMLTextArea | where md is being edited. |
|
controls | MarkdownControl[] |
|
List of control templates. |
Public Methods
public addControls(controls: MarkdownControl[]) source
Adds controls
Params:
Name | Type | Attribute | Description |
controls | MarkdownControl[] |
public cutEnd(count: number) source
Cuts from the end of selection
Params:
Name | Type | Attribute | Description |
count | number | positive, non-zero integer of a size to cut |
public cutStart(count: number) source
Cuts from beginning of selection
Params:
Name | Type | Attribute | Description |
count | number | positive, non-zero integer of a size to cut |
public insertAtSelectionEnd(string: string) source
Inserts at a the end of where the user is.
Params:
Name | Type | Attribute | Description |
string | string |
public insertAtSelectionStart(string: string) source
Inserts at a the beginning of where the user is.
Params:
Name | Type | Attribute | Description |
string | string |
public insertForSelection(string: string) source
Replaces selection with a string
Params:
Name | Type | Attribute | Description |
string | string |