markdown-text-editor 1.9.1 → 1.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/markdown-text-editor.es.js +689 -647
- package/dist/markdown-text-editor.es.js.map +1 -1
- package/dist/markdown-text-editor.min.js +54 -56
- package/dist/markdown-text-editor.min.js.map +1 -1
- package/dist/markdown-text-editor.umd.js +54 -56
- package/dist/markdown-text-editor.umd.js.map +1 -1
- package/package.json +2 -2
- package/types/index.d.ts +10 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "markdown-text-editor",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A markdown editor that enhances your textarea instead of replacing it, so form submission, validation and required fields keep working. WYSIWYG hybrid mode, live preview, find and replace, RTL, TypeScript types. Works with any backend.",
|
|
6
6
|
"funding": "https://ko-fi.com/nezanuha",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"url": "https://github.com/nezanuha/markdown-text-editor/issues"
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"dompurify": "^3.4.
|
|
78
|
+
"dompurify": "^3.4.17",
|
|
79
79
|
"marked": "~18.0.14"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
package/types/index.d.ts
CHANGED
|
@@ -208,6 +208,16 @@ export declare class Tool {
|
|
|
208
208
|
createButton(iconHtml?: string): HTMLElement | null;
|
|
209
209
|
/** Called when the button is clicked, or its shortcut is pressed. */
|
|
210
210
|
applySyntax(event?: Event): void;
|
|
211
|
+
/**
|
|
212
|
+
* Shrinks the selection so it holds no leading or trailing whitespace.
|
|
213
|
+
* Call it first in `applySyntax` if your tool wraps the selection inline,
|
|
214
|
+
* since double-clicking a word selects the space after it and the closing
|
|
215
|
+
* marker would otherwise land on the wrong side of it.
|
|
216
|
+
*
|
|
217
|
+
* Line based tools should not call it: a trailing newline is what tells
|
|
218
|
+
* them which lines the selection covers.
|
|
219
|
+
*/
|
|
220
|
+
trimSelection(): void;
|
|
211
221
|
/** Set to e.g. `'Ctrl+Shift+K'` to bind a shortcut. */
|
|
212
222
|
shortcut?: string;
|
|
213
223
|
/** Implement to release anything the tool registered. Called by `destroy()`. */
|