Extends
Members
hoistedNoteId
- Overrides:
- Source:
note
- Overrides:
- Source:
noteContext :NoteContext
Type:
- NoteContext
- Overrides:
- Source:
noteId
- Overrides:
- Source:
notePath
- Overrides:
- Source:
widgetTitle
Title to show in the panel.
- Source:
Methods
css(name, value)
Sets the CSS attribute of the given name to the given value.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | the name of the CSS attribute to set (e.g. `padding-left`). |
value |
string | the value of the CSS attribute to set (e.g. `12px`). |
- Overrides:
- Source:
Returns:
self for chaining.
cssBlock(block) → {this}
Accepts a string of CSS to add with the widget.
Parameters:
Name | Type | Description |
---|---|---|
block |
string |
- Overrides:
- Source:
Returns:
for chaining
- Type
- this
doRender()
Do not override this method unless you know what you're doing.
Do not override this method unless you know what you're doing.
- Overrides:
- Source:
(async) doRenderBody() → {Promise|undefined}
Method used for rendering the body of the widget (via existing this.$body)
Your class should override this method.
- Source:
Returns:
if widget needs async operation to initialize, it can return a Promise
- Type
- Promise | undefined
isEnabled() → {boolean}
Indicates if the widget is enabled. Widgets are enabled by default. Generally setting this to `false` will cause the widget not to be displayed, however it will still be available on the DOM but hidden.
If the widget is not enabled, it will not receive `refreshWithNote` updates.
- Overrides:
- Source:
Returns:
true when an active note exists
- Type
- boolean
optChild(condition, …components)
Conditionally adds the given components as children to this component.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
condition |
boolean | whether to add the components. | |
components |
any |
<repeatable> |
the components to be added as children to this component provided the condition is truthy. |
- Overrides:
- Source:
Returns:
self for chaining.
optCss(condition, name, value)
Sets the CSS attribute of the given name to the given value, but only if the condition provided is truthy.
Parameters:
Name | Type | Description |
---|---|---|
condition |
boolean | `true` in order to apply the CSS, `false` to ignore it. |
name |
string | the name of the CSS attribute to set (e.g. `padding-left`). |
value |
string | the value of the CSS attribute to set (e.g. `12px`). |
- Overrides:
- Source:
Returns:
self for chaining.
(async) refreshWithNote(note) → {Promise.<void>}
Override this method to be able to refresh your
widget with each note.
Parameters:
Name | Type | Description |
---|---|---|
note |
FNote |
- Overrides:
- Source:
Returns:
- Type
- Promise.<void>