You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a range of available events that are emitted as part of a public & supported API for accessing or extending JavaScript libraries and components used in the system.
161
+
There are a range of available events that are emitted as part of a public & supported API for accessing or extending JavaScript libraries & components used in the system.
162
162
163
163
Details on these events can be found in the [JavaScript Public Events file](javascript-public-events.md).
Copy file name to clipboardExpand all lines: dev/docs/javascript-public-events.md
+11-12Lines changed: 11 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# JavaScript Public Events
2
2
3
-
There are a range of available events that are emitted as part of a public & supported API for accessing or extending JavaScript libraries and components used in the system.
4
-
These are emitted via standard DOM events so can be listened to using standard APIs like so:
3
+
There are a range of available events emitted as part of a public & [supported](#support) API for accessing or extending JavaScript libraries and components used in the system.
4
+
These are emitted via standard DOM events so can be consumed using standard DOM APIs like so:
5
5
6
6
```javascript
7
7
window.addEventListener('event-name', event=> {
@@ -15,8 +15,8 @@ For most use-cases you can probably just listen on the `window` as shown above.
15
15
## Support
16
16
17
17
This event system, and the events emitted, are considered semi-supported.
18
-
Breaking changes of the event API, event names or event properties, will be documented in update notes but may change.
19
-
Upon that, the detail provided within the events, and the libraries made accessible, are not considered supported nor stable, and changes to these won't be clearly documented within changelogs.
18
+
Breaking changes of the event API, event names, or event properties, are possible but will be documented in update notes.
19
+
The detail provided within the events, and the libraries made accessible, are not considered supported nor stable, and changes to these won't be clearly documented changelogs.
20
20
21
21
## Event Naming Scheme
22
22
@@ -30,9 +30,9 @@ editor-tinymce::setup
30
30
library-cm6::configure-theme
31
31
```
32
32
33
-
If the event is generic in use but specific to a library, the name `<context>` will start with `library-` followed by the library name. Otherwise `<context>` may reflect the UI context/component.
33
+
If the event is generic in use but specific to a library, the `<context>` will start with `library-` followed by the library name. Otherwise `<context>` may reflect the UI context/component.
34
34
35
-
The `<action/lifecycle>` reflects the lifecycle stage of the context, or a specific action to perform if the event is very specific to a certain use-case.
35
+
The `<action/lifecycle>` reflects the lifecycle stage of the context, or a specific action to perform if the event is specific to a certain use-case.
36
36
37
37
## Event Listing
38
38
@@ -61,7 +61,7 @@ This event is called when the markdown editor loads, post configuration but befo
61
61
#### Event Data
62
62
63
63
-`markdownIt` - A references to the [MarkdownIt](https://markdown-it.github.io/markdown-it/#MarkdownIt) instance used to render markdown to HTML (Just for the preview).
64
-
-`displayEl` - The DOM Element that wraps the HTML preview display.
64
+
-`displayEl` - The IFrame Element that wraps the HTML preview display.
65
65
-`cmEditorView` - The CodeMirror [EditorView](https://codemirror.net/docs/ref/#view.EditorView) instance used for the markdown input editor.
66
66
67
67
##### Example
@@ -70,14 +70,13 @@ This event is called when the markdown editor loads, post configuration but befo
70
70
// Set all text in the display to be red by default.
This event is called as the embedded diagrams.net drawing editor loads, as a means to allow configuration of the diagrams.net interface.
80
-
79
+
This event is called as the embedded diagrams.net drawing editor loads, to allow configuration of the diagrams.net interface.
81
80
See [this diagrams.net page](https://www.diagrams.net/doc/faq/configure-diagram-editor) for details on the available options for the configure event.
82
81
83
82
If using a custom diagrams.net instance, via the `DRAWIO` option, you will need to ensure your DRAWIO option URL has the `configure=1` query parameter.
@@ -93,7 +92,7 @@ If using a custom diagrams.net instance, via the `DRAWIO` option, you will need
93
92
// Set only the "general" and "android" libraries to show by default
This event is called during the `setup` lifecycle stage of the TinyMCE editor used as the BookStack WYSIWYG editor. This is post configuration, but before the editor is typically visible.
119
+
This event is called during the `setup` lifecycle stage of the TinyMCE editor used as the BookStack WYSIWYG editor. This is after configuration, but before the editor is fully loaded and ready to use.
0 commit comments