@delali/web-editor 0.4.3 → 0.4.5
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/CHANGELOG.md +10 -0
- package/README.md +2 -0
- package/dist/components/editor/collaboration/collaboration-starter.d.ts +5 -1
- package/dist/components/editor/create-editor-plugins.js +111 -91
- package/dist/components/editor/editor-base-kit.js +9 -18
- package/dist/components/editor/editor-kit.js +81 -61
- package/dist/components/editor/version-history/index.js +85 -65
- package/dist/components/editor/web-editor.d.ts +1 -1
- package/dist/components/editor/web-editor.js +2422 -2308
- package/dist/context/inspector-text-fields.d.ts +3 -0
- package/dist/context/text-field-attributes.d.ts +5 -0
- package/dist/lib/markdown-utils.js +111 -91
- package/dist/styles.css +54 -20
- package/dist/types/editor.d.ts +2 -0
- package/dist/ui/input.d.ts +1 -0
- package/dist/ui/media-file-display.d.ts +1 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.5 (2026-12-04)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- Pass `textFieldAttributes={{ 'data-dictation-field': '' }}` to `WebEditor` so that your app can find its text inputs and textareas, including media captions and settings fields.
|
|
8
|
+
|
|
9
|
+
### Fixes
|
|
10
|
+
|
|
11
|
+
- Smart links and file URLs use a lighter blue in the editor's dark mode. With `theme="inherit"`, they use the host's `--primary` colour.
|
|
12
|
+
|
|
3
13
|
## 0.4.3 (2026-11-26)
|
|
4
14
|
|
|
5
15
|
### Fixes
|
package/README.md
CHANGED
|
@@ -35,6 +35,8 @@ export const ProductDescriptionEditor = () => {
|
|
|
35
35
|
|
|
36
36
|
`WebEditor` also takes `readOnly`, `features` to switch individual blocks and menus on or off, `toolbar`, `showToc`, `variant`, and the class name props `className`, `containerClassName`, and `editorClassName`. `WebEditorProps` in `@delali/web-editor/types` lists every prop.
|
|
37
37
|
|
|
38
|
+
Pass `textFieldAttributes={{ 'data-dictation-field': '' }}` to mark the text inputs and textareas that your app supports for dictation. You can choose any `data-*` attribute for your integration. The attributes also apply to fields in menus and inspector panels.
|
|
39
|
+
|
|
38
40
|
Set `plainLinks: true` in `features` when you want every link in the text to look the way it does on a published page. The editor then shows the link's own text, underlined in the editor's primary color, on the same line as the words around it. When `plainLinks` is left out, the editor shows each link as a smart link chip, and an author can switch it to its URL or to a card. In both views, a click on a link in the editor opens a toolbar where the author can open, copy, edit, or remove it.
|
|
39
41
|
|
|
40
42
|
Set `todoLists: false` in `features` when writers should get bulleted and numbered lists but no to-do lists, the checklists with a checkbox on each item. The slash menu, the turn-into menus, and the `[] ` and `[x] ` shortcuts then offer no to-do list. A to-do item that arrives through a paste, loaded HTML, loaded markdown, or a saved value becomes a bulleted item with the same text, and its checked state drops. `todoLists` defaults to `true`, and it has no effect when `lists` is off.
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import { type PlateEditor } from 'platejs/react';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
1
3
|
import type { EditorCollabAdapter } from '../../../context/editor-adapter';
|
|
2
4
|
import type { Value } from '../../../types/editor';
|
|
3
5
|
interface CollaborationStarterProps {
|
|
6
|
+
children: ReactNode;
|
|
4
7
|
collab: EditorCollabAdapter;
|
|
5
8
|
initialValue: Value;
|
|
6
9
|
onInitialized: (isInitialized: boolean) => void;
|
|
10
|
+
onEditorReady?: (editor: PlateEditor) => void;
|
|
7
11
|
}
|
|
8
|
-
export declare const CollaborationStarter: ({ collab, initialValue, onInitialized }: CollaborationStarterProps) =>
|
|
12
|
+
export declare const CollaborationStarter: ({ children, collab, initialValue, onInitialized, onEditorReady, }: CollaborationStarterProps) => ReactNode;
|
|
9
13
|
export {};
|