@mdaemon/html-editor 1.0.13 → 1.2.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 CHANGED
@@ -103,6 +103,7 @@ const editor = new HTMLEditor(container, {
103
103
  | `entity_encoding` | 'raw' \| 'named' \| 'numeric' | 'raw' | HTML entity encoding mode |
104
104
  | `convert_unsafe_embeds` | boolean | true | Sanitize embedded content |
105
105
  | `format_empty_lines` | boolean | true | Format empty lines |
106
+ | `paste_from_office` | boolean | true | Clean and preserve formatting when pasting from Microsoft Word and Excel |
106
107
  | `setup` | (editor) => void | - | Callback invoked before init — use to register custom buttons |
107
108
 
108
109
  ### Toolbar Toggle
package/dist/index.d.ts CHANGED
@@ -131,11 +131,14 @@ export declare interface EditorConfig {
131
131
  toolbar?: string;
132
132
  toolbar_mode?: 'sliding' | 'floating' | 'wrap';
133
133
  toolbar_sticky?: boolean;
134
+ toolbar_narrow_breakpoint?: number;
135
+ toolbar_priority?: Record<string, number>;
134
136
  menubar?: boolean;
135
137
  contextmenu?: boolean | string;
136
138
  quickbars_selection_toolbar?: string;
137
139
  quickbars_image_toolbar?: boolean;
138
140
  quickbars_insert_toolbar?: boolean;
141
+ paste_from_office?: boolean;
139
142
  browser_spellcheck?: boolean;
140
143
  elementpath?: boolean;
141
144
  entity_encoding?: 'raw' | 'named' | 'numeric';
@@ -371,6 +374,16 @@ export declare interface MDHTMLEditor {
371
374
 
372
375
  export declare const Mention: Node_2<any, any>;
373
376
 
377
+ export declare const PasteFromOffice: Extension<PasteFromOfficeOptions, any>;
378
+
379
+ export declare interface PasteFromOfficeOptions {
380
+ /**
381
+ * Enable/disable paste-from-office cleaning.
382
+ * When false, pasted content passes through unchanged.
383
+ */
384
+ enabled: boolean;
385
+ }
386
+
374
387
  /**
375
388
  * Reset the global translation function to the default identity function.
376
389
  * This also clears the customized flag so that the next editor created
@@ -492,6 +505,11 @@ export declare class Toolbar {
492
505
  private icon;
493
506
  private render;
494
507
  private observeOverflow;
508
+ private scrollHandler;
509
+ private bindScrollIndicators;
510
+ private unbindScrollIndicators;
511
+ private updateScrollIndicators;
512
+ private getButtonPriority;
495
513
  private renderGroups;
496
514
  private createToggleButton;
497
515
  private toggleOverflow;
@@ -554,6 +572,8 @@ declare interface ToolbarOptions {
554
572
  customButtons: Map<string, ToolbarButtonSpec>;
555
573
  config: EditorConfig;
556
574
  iconSet: IconSet;
575
+ narrowBreakpoint: number;
576
+ priorityOverrides: Record<string, number>;
557
577
  }
558
578
 
559
579
  /**