tw5-typed / modules/widgets/edit / EditWidget
Class: EditWidget
modules/widgets/edit.EditWidget
Link
https://tiddlywiki.com/dev/#Widgets
Create a widget object for a parse tree node
- parseTreeNode: reference to the parse tree node to be rendered
- options: see below
Options include:
- wiki: mandatory reference to wiki associated with this render tree
- parentWidget: optional reference to a parent renderer node for the context chain
- document: optional document object to use instead of global document
Hierarchy
-
↳
EditWidget
Table of contents
Constructors
Properties
- ancestorCount
- attributes
- children
- document
- domNodes
- editAutoComplete
- editCancelPopups
- editClass
- editField
- editFocus
- editIndex
- editInputActions
- editPlaceholder
- editRefreshTitle
- editTabIndex
- editTitle
- editorType
- eventListeners
- parentDomNode
- parentWidget
- parseTreeNode
- qualifiers
- variables
- widgetClasses
- wiki
Methods
- addEventListener
- addEventListeners
- allowActionPropagation
- assignAttributes
- computeAttribute
- computeAttributes
- dispatchEvent
- evaluateMacroModule
- execute
- findFirstDomNode
- findNextSiblingDomNode
- getAncestorCount
- getAttribute
- getStateQualifier
- getVariable
- getVariableInfo
- hasAttribute
- hasParseTreeNodeAttribute
- hasVariable
- initialise
- invokeAction
- invokeActionString
- invokeActions
- makeChildWidget
- makeChildWidgets
- nextSibling
- previousSibling
- refresh
- refreshChildren
- refreshSelf
- removeChildDomNodes
- removeLocalDomNodes
- render
- renderChildren
- resolveVariableParameters
- setVariable
- substituteVariableReferences
Constructors
constructor
• new EditWidget(parseTreeNode
, options?
): EditWidget
Parameters
Name | Type |
---|---|
parseTreeNode | IParseTreeNode |
options? | IWidgetInitialiseOptions |
Returns
Inherited from
Defined in
src/modules/widgets/index.d.ts:117
Properties
ancestorCount
• Optional
ancestorCount: number
Inherited from
Defined in
src/modules/widgets/index.d.ts:106
attributes
• attributes: Record
<string
, string
>
Inherited from
Defined in
src/modules/widgets/index.d.ts:86
children
• children: widget
[]
Inherited from
Defined in
src/modules/widgets/index.d.ts:102
document
• document: IFakeDocument
Inherited from
Defined in
src/modules/widgets/index.d.ts:82
domNodes
• domNodes: Element
[]
Inherited from
Defined in
src/modules/widgets/index.d.ts:88
editAutoComplete
• editAutoComplete: string
Defined in
src/modules/widgets/edit.d.ts:13
editCancelPopups
• editCancelPopups: string
Defined in
src/modules/widgets/edit.d.ts:10
editClass
• editClass: string
Defined in
src/modules/widgets/edit.d.ts:6
editField
• editField: string
Defined in
src/modules/widgets/edit.d.ts:4
editFocus
• editFocus: string
Defined in
src/modules/widgets/edit.d.ts:9
editIndex
• editIndex: string
Defined in
src/modules/widgets/edit.d.ts:5
editInputActions
• editInputActions: string
Defined in
src/modules/widgets/edit.d.ts:11
editPlaceholder
• editPlaceholder: string
Defined in
src/modules/widgets/edit.d.ts:7
editRefreshTitle
• editRefreshTitle: string
Defined in
src/modules/widgets/edit.d.ts:12
editTabIndex
• editTabIndex: string
Defined in
src/modules/widgets/edit.d.ts:8
editTitle
• editTitle: string
Defined in
src/modules/widgets/edit.d.ts:3
editorType
• editorType: string
Defined in
src/modules/widgets/edit.d.ts:14
eventListeners
• eventListeners: Record
<string
, Function
>
Inherited from
Defined in
src/modules/widgets/index.d.ts:93
parentDomNode
• parentDomNode: Element
Inherited from
Defined in
src/modules/widgets/index.d.ts:90
parentWidget
• Optional
parentWidget: widget
Inherited from
Defined in
src/modules/widgets/index.d.ts:84
parseTreeNode
• parseTreeNode: IParseTreeNode
Inherited from
Defined in
src/modules/widgets/index.d.ts:78
qualifiers
• Optional
qualifiers: Record
<string
, string
>
Inherited from
Defined in
src/modules/widgets/index.d.ts:104
variables
• variables: Record
<string
, IWidgetVariable
>
Set the value of a context variable
- name: name of the variable
- value: value of the variable
- params: array of
{name: string, default: string}
for each parameter - isMacroDefinition: true if the variable is set via a \define macro pragma (and hence should have variable substitution performed)
Inherited from
Defined in
src/modules/widgets/index.d.ts:115
widgetClasses
• widgetClasses: Record
<string
, typeof widget
>
we can use $tw.rootWidget.widgetClasses.xxx to new a widget
This is a set of all widgets defined in tiddlywiki.
Inherited from
Defined in
src/modules/widgets/index.d.ts:100
wiki
• wiki: Wiki
Inherited from
Defined in
src/modules/widgets/index.d.ts:80
Methods
addEventListener
▸ addEventListener(type
, handler
): void
Add an event listener.
If the handler is sync, then should return a boolean, false
means the event is handled and don't propagate, and true
will be dispatched to the parent widget.
If the handler is async, then it is always propagate to the parent widget.
Parameters
Name | Type |
---|---|
type | string |
handler | (event : IWidgetEvent ) => boolean | void | Promise <void > |
Returns
void
should propagate to parent widget
Inherited from
Defined in
src/modules/widgets/index.d.ts:390
addEventListeners
▸ addEventListeners(listeners
): void
Add a list of event listeners from an array [{type:,handler:},...]
See also addEventListener
.
Parameters
Name | Type |
---|---|
listeners | { handler : (event : IWidgetEvent ) => boolean | void | Promise <void > ; type : string }[] |
Returns
void
Inherited from
Defined in
src/modules/widgets/index.d.ts:377