overtype 2.3.10 → 2.4.0
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/README.md +103 -11
- package/dist/overtype-webcomponent.esm.js +454 -96
- package/dist/overtype-webcomponent.esm.js.map +3 -3
- package/dist/overtype-webcomponent.js +454 -96
- package/dist/overtype-webcomponent.js.map +3 -3
- package/dist/overtype-webcomponent.min.js +57 -56
- package/dist/overtype.cjs +454 -96
- package/dist/overtype.cjs.map +3 -3
- package/dist/overtype.d.ts +12 -0
- package/dist/overtype.esm.js +454 -96
- package/dist/overtype.esm.js.map +3 -3
- package/dist/overtype.js +454 -96
- package/dist/overtype.js.map +3 -3
- package/dist/overtype.min.js +53 -52
- package/package.json +3 -3
- package/src/link-tooltip.js +18 -2
- package/src/overtype.d.ts +12 -0
- package/src/overtype.js +196 -70
- package/src/shortcuts.js +12 -0
- package/src/toolbar-buttons.js +10 -0
- package/src/toolbar.js +308 -49
package/dist/overtype.d.ts
CHANGED
|
@@ -84,6 +84,15 @@ export interface ToolbarButton {
|
|
|
84
84
|
setValue: (value: string) => void;
|
|
85
85
|
event: MouseEvent;
|
|
86
86
|
}) => void | Promise<void>;
|
|
87
|
+
|
|
88
|
+
/** Canonical action identifier used by shortcuts and performAction */
|
|
89
|
+
actionId?: string;
|
|
90
|
+
|
|
91
|
+
/** Return true when this button should be announced as pressed */
|
|
92
|
+
isActive?: (context: {
|
|
93
|
+
editor: OverType;
|
|
94
|
+
activeFormats: string[];
|
|
95
|
+
}) => boolean;
|
|
87
96
|
}
|
|
88
97
|
|
|
89
98
|
export interface MobileOptions {
|
|
@@ -122,6 +131,7 @@ export interface Options {
|
|
|
122
131
|
spellcheck?: boolean; // Browser spellcheck (default: false)
|
|
123
132
|
statsFormatter?: (stats: Stats) => string;
|
|
124
133
|
codeHighlighter?: ((code: string, language: string) => string) | null; // Per-instance code highlighter
|
|
134
|
+
transformLinkUrl?: ((url: string) => string) | null; // Transform URLs shown/opened in the link tooltip
|
|
125
135
|
|
|
126
136
|
// Theme (deprecated in favor of global theme)
|
|
127
137
|
theme?: string | Theme;
|
|
@@ -208,6 +218,8 @@ export interface OverTypeInstance {
|
|
|
208
218
|
showToolbar(): void;
|
|
209
219
|
hideToolbar(): void;
|
|
210
220
|
insertAtCursor(text: string): void;
|
|
221
|
+
indentSelection(): void;
|
|
222
|
+
outdentSelection(): void;
|
|
211
223
|
|
|
212
224
|
// HTML output methods
|
|
213
225
|
getRenderedHTML(options?: RenderOptions): string;
|