@mdaemon/html-editor-react 1.3.0 → 1.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.
Files changed (2) hide show
  1. package/README.md +30 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -236,7 +236,18 @@ The `config` prop (or `useEditor`'s `config` option) accepts an `EditorConfig` o
236
236
  | `toolbar` | `string` | *(preset)* | Custom toolbar layout string. |
237
237
  | `toolbar_mode` | `'sliding' \| 'floating' \| 'wrap'` | `'wrap'` | Toolbar overflow behavior. |
238
238
  | `toolbar_sticky` | `boolean` | `true` | Pin toolbar at top when scrolling. |
239
+ | `toolbar_narrow_breakpoint` | `number` | — | Pixel width below which the toolbar collapses into the overflow toggle. |
240
+ | `toolbar_priority` | `Record<string, number>` | &mdash; | Per-button overflow priority &mdash; higher values stay visible longer as the toolbar narrows. |
241
+ | `menubar` | `boolean` | `false` | Show a TinyMCE-style menu bar above the toolbar. |
242
+ | `contextmenu` | `boolean \| string` | `''` | Enable a right-click context menu. Pass a button-list string to customize its contents. |
243
+ | `quickbars_selection_toolbar` | `string` | `'bold italic \| quicklink blockquote'` | Inline floating toolbar shown over a text selection. |
244
+ | `quickbars_image_toolbar` | `boolean` | `false` | Inline floating toolbar shown when an image is selected. |
245
+ | `quickbars_insert_toolbar` | `boolean` | `false` | Inline floating toolbar shown on empty lines for quick insertion. |
246
+ | `elementpath` | `boolean` | `false` | Show a breadcrumb of the node path at the cursor in the status bar. |
247
+ | `valid_children` | `string` | &mdash; | TinyMCE-style rules controlling which child elements are allowed. |
239
248
  | `auto_focus` | `string` | &mdash; | Auto-focus on init. |
249
+ | `setFocus` | `string` | &mdash; | CSS selector for the element to focus on init (used when `auto_focus` is not set). |
250
+ | `plugins` | `string` | &mdash; | Accepted for TinyMCE compatibility and ignored &mdash; all features are built in. |
240
251
  | `browser_spellcheck` | `boolean` | `true` | Enable browser spell check. |
241
252
  | `entity_encoding` | `'raw' \| 'named' \| 'numeric'` | `'raw'` | HTML entity encoding mode. |
242
253
  | `paste_from_office` | `boolean` | `true` | Clean and preserve formatting when pasting from Microsoft Word/Excel. |
@@ -290,6 +301,25 @@ The `confab` / `confab-dark` skins integrate with the WorldClient theming system
290
301
  />
291
302
  ```
292
303
 
304
+ ### Menu Bar, Context Menu & Quick Toolbars
305
+
306
+ Opt into the additional editing surfaces exposed by `@mdaemon/html-editor` 1.6.0:
307
+
308
+ ```tsx
309
+ <Editor
310
+ config={{
311
+ menubar: true, // menu bar above the toolbar
312
+ contextmenu: true, // right-click context menu
313
+ quickbars_selection_toolbar: 'bold italic | quicklink blockquote',
314
+ quickbars_image_toolbar: true, // floating toolbar when an image is selected
315
+ elementpath: true, // breadcrumb status bar at the cursor
316
+ }}
317
+ />
318
+ ```
319
+
320
+ `contextmenu` also accepts a button-list string to customize its contents, and
321
+ `quickbars_insert_toolbar` shows a floating insert toolbar on empty lines.
322
+
293
323
  ### Read-Only Mode
294
324
 
295
325
  Start the editor read-only with `readonly: true`, or toggle it at runtime through the underlying editor instance:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mdaemon/html-editor-react",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "React wrapper for MDHTMLEditor",
5
5
  "homepage": "https://github.com/mdaemon-technologies/MDHTMLEditor-react",
6
6
  "repository": {
@@ -53,7 +53,7 @@
53
53
  "react-dom": "^19.0.0 || ^18.0.0"
54
54
  },
55
55
  "dependencies": {
56
- "@mdaemon/html-editor": "^1.5.0",
56
+ "@mdaemon/html-editor": "^1.6.0",
57
57
  "@tiptap/react": "^3.23.4"
58
58
  },
59
59
  "devDependencies": {