File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,10 @@ The `MarkEdit` object provides these interfaces:
3434
3535``` ts
3636interface MarkEdit {
37+ // Configuration of the current editor.
38+ editorConfig: Record <string , unknown >;
39+ // User-defined settings loaded from the settings.json file.
40+ userSettings: JSONObject ;
3741 // CodeMirror EditorView instance of the current editor.
3842 editorView: EditorView ;
3943 // Convenient text editing interfaces.
Original file line number Diff line number Diff line change @@ -31,6 +31,13 @@ export interface MarkEdit {
3131 */
3232 editorConfig : Record < string , unknown > ;
3333
34+ /**
35+ * User-defined settings loaded from the [settings.json](https://github.com/MarkEdit-app/MarkEdit/wiki/Customization#advanced-settings) file.
36+ *
37+ * For example, user-defined scripts can use this to provide additional configurations.
38+ */
39+ userSettings : JSONObject ;
40+
3441 /**
3542 * CodeMirror EditorView instance of the current editor.
3643 */
@@ -385,3 +392,21 @@ export type SavePanelOptions = {
385392 */
386393 fileName ?: string ;
387394} ;
395+
396+ /**
397+ * Typed JSON value.
398+ */
399+ type JSONValue =
400+ | string
401+ | number
402+ | boolean
403+ | null
404+ | JSONObject
405+ | JSONValue [ ] ;
406+
407+ /**
408+ * Typed JSON Object.
409+ */
410+ type JSONObject = {
411+ [ key : string ] : JSONValue ;
412+ } ;
You can’t perform that action at this time.
0 commit comments