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
While you can certainly build user interfaces with JavaScript and CSS, leveraging native UI components might be a better option.
128
67
129
-
To create UI entries for your features, you can use the [addMainMenuItem](https://github.com/search?q=repo%3AMarkEdit-app%2FMarkEdit-api+addMainMenuItem&type=code) function, which adds an item to the "Extensions" submenu of the main menu, with keyboard shortcuts support.
68
+
To create UI entries for your features, use `addMainMenuItem`, which adds an item to the "Extensions" submenu of the main menu, with keyboard shortcuts support.
130
69
131
-
To request user input, try using [showContextMenu](https://github.com/search?q=repo%3AMarkEdit-app%2FMarkEdit-api+showContextMenu&type=code), [showAlert](https://github.com/search?q=repo%3AMarkEdit-app%2FMarkEdit-api+showAlert&type=code), and [showTextBox](https://github.com/search?q=repo%3AMarkEdit-app%2FMarkEdit-api+showTextBox&type=code).
70
+
To request user input, try using `showContextMenu`, `showAlert`, and `showTextBox`.
132
71
133
72
## Building
134
73
@@ -189,15 +128,11 @@ Ensure the build system produces a single JavaScript file. If the build generate
189
128
190
129
## Using JavaScript
191
130
192
-
If you just want to quickly prototype with JavaScript, you can directly access CodeMirror and MarkEdit interfaces through objects assigned to the `MarkEdit` object. For example:
131
+
You can directly access CodeMirror and MarkEdit interfaces through objects assigned to the `MarkEdit` object. For example:
193
132
194
133
```js
195
134
constkeymap=MarkEdit.codemirror.view.keymap;
196
135
consteditorAPI=MarkEdit.editorAPI;
197
136
```
198
137
199
-
----
200
-
201
-
For complete examples, refer to [Example: Markdown Table Editor](https://github.com/MarkEdit-app/MarkEdit-mte), [Example: Text Highlight](https://github.com/MarkEdit-app/MarkEdit-highlight) and [Example: Vue Language Package](https://github.com/MarkEdit-app/MarkEdit-lang-vue).
202
-
203
-
Also, [index.d.ts](./index.d.ts) is fully typed and documented, use it as the API reference.
138
+
This is useful when you simply want to prototype something quickly.
0 commit comments