overtype 2.3.9 → 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.
@@ -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;
@@ -135,6 +145,7 @@ export interface Options {
135
145
  mimeTypes?: string[];
136
146
  batch?: boolean;
137
147
  onInsertFile: (file: File | File[]) => Promise<string | string[]>;
148
+ onRemoveFile?: (info: { url: string; filename: string; file: File }) => void;
138
149
  };
139
150
 
140
151
  // Callbacks
@@ -207,6 +218,8 @@ export interface OverTypeInstance {
207
218
  showToolbar(): void;
208
219
  hideToolbar(): void;
209
220
  insertAtCursor(text: string): void;
221
+ indentSelection(): void;
222
+ outdentSelection(): void;
210
223
 
211
224
  // HTML output methods
212
225
  getRenderedHTML(options?: RenderOptions): string;