@octane-xplat/tiptap 0.10.0 → 0.11.1
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 +58 -2
- package/dist/macos/browser.js +1 -1
- package/dist/native/index3.js +38 -21
- package/dist/native/octane-client-build.json +1 -1
- package/dist/web/index2.js +13 -3
- package/dist/web/octane-client-build.json +1 -1
- package/package.json +8 -6
- package/src/TiptapEditor.mobile.test.ts +229 -0
- package/src/TiptapEditor.tsrx +52 -20
- package/src/TiptapEditor.web.test.tsrx +129 -0
- package/src/TiptapEditor.web.tsrx +25 -3
- package/src/types.ts +27 -1
- package/types/types.d.ts +26 -1
package/README.md
CHANGED
|
@@ -23,6 +23,62 @@ export function Notes() {
|
|
|
23
23
|
}
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
+
On web the `web` prop configures the underlying tiptap `Editor`: `extensions`
|
|
27
|
+
appends caller `Extension`/`Node`/`Mark` entries after the built-in
|
|
28
|
+
StarterKit, and `starterKit` takes `StarterKit.configure()` options or
|
|
29
|
+
`false` to hand the schema to `extensions` entirely. A caller `starterKit`
|
|
30
|
+
entry replaces the built-in instead of registering it twice. The options are
|
|
31
|
+
web-only. Android and AppKit do not run caller ProseMirror extensions,
|
|
32
|
+
plugins, node views, or browser menus. A passed `web` option has no effect on
|
|
33
|
+
those targets.
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
import { TiptapEditor } from '@octane-xplat/tiptap'
|
|
37
|
+
import { Mark } from '@tiptap/core'
|
|
38
|
+
|
|
39
|
+
const Spoiler = Mark.create({
|
|
40
|
+
name: 'spoiler',
|
|
41
|
+
parseHTML: () => [{ tag: 'span[data-spoiler]' }],
|
|
42
|
+
renderHTML: () => ['span', { 'data-spoiler': '' }, 0],
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
export function Notes() {
|
|
46
|
+
return <TiptapEditor web={{ extensions: [Spoiler] }} />
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Engine and feature boundary
|
|
51
|
+
|
|
52
|
+
| Target | Editing engine | `web` options | Caller extensions, plugins, and browser views |
|
|
53
|
+
| --- | --- | --- | --- |
|
|
54
|
+
| Web | Tiptap `Editor` + `EditorContent` | `extensions` and `starterKit` apply | Supported by the web Tiptap engine |
|
|
55
|
+
| Android | WordPress Aztec `AztecText`; a DOM-free Tiptap bridge converts JSON to and from HTML | Ignored | Unsupported; no live ProseMirror view, plugin, node view, or browser menu runs |
|
|
56
|
+
| iOS | Unsupported placeholder from `@octane-xplat/richtext` | Ignored | Unsupported; `supported` is `false` |
|
|
57
|
+
| macOS AppKit | Bundled Tiptap editor in WKWebView | Ignored by the AppKit host | Unsupported through this facade |
|
|
58
|
+
|
|
59
|
+
On Android, keep HTML as the facade's canonical interchange. Tiptap JSON is a
|
|
60
|
+
best-effort conversion over Aztec HTML, not a live ProseMirror document. The
|
|
61
|
+
2026-10-06 [Aztec nested-tree run](../../.agents/docs/parity/nested-tree-editor.md)
|
|
62
|
+
preserved nested wrappers, attributes, and child order through synthetic text
|
|
63
|
+
edits and save/reopen. It also flattened paragraphs and accumulated `<br>`
|
|
64
|
+
elements on reopen; it did not qualify Tiptap JSON, OS input, or structural
|
|
65
|
+
tree commands. See the [per-row capability record](../../docs/notes/editor-capabilities.md).
|
|
66
|
+
|
|
67
|
+
```tsx
|
|
68
|
+
import { useState } from 'octane'
|
|
69
|
+
import { TiptapEditor, supported } from '@octane-xplat/tiptap'
|
|
70
|
+
import { Text } from '@octane-xplat/ui'
|
|
71
|
+
|
|
72
|
+
export function Notes() {
|
|
73
|
+
const [html, setHTML] = useState('<p>Travel notes</p>')
|
|
74
|
+
return supported ? (
|
|
75
|
+
<TiptapEditor value={html} editable onChange={setHTML} />
|
|
76
|
+
) : (
|
|
77
|
+
<Text>Editing is unavailable on this target</Text>
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
26
82
|
`value`/`onChange` exchange document HTML. `getJSON`/`setJSON` exchange
|
|
27
83
|
tiptap document JSON: synchronous on web, bridged on native after
|
|
28
84
|
`onJSONReady(true)` — the lazy bridge reports `false` (and `getJSON()`
|
|
@@ -64,7 +120,7 @@ export function DocumentCopy() {
|
|
|
64
120
|
}
|
|
65
121
|
```
|
|
66
122
|
|
|
67
|
-
The tiptap family pins to `3.28.0` to match `@octanejs/tiptap@0.0.
|
|
123
|
+
The tiptap family pins to `3.28.0` to match `@octanejs/tiptap@0.0.52` —
|
|
68
124
|
extension `^` ranges float ahead of core and break (`getPreviousBlockSibling`),
|
|
69
125
|
so consumers should keep the workspace override. See
|
|
70
126
|
[`docs/app/rich-text.md`](../../docs/app/rich-text.md) for the shared contract,
|
|
@@ -76,4 +132,4 @@ The macOS export mounts a bundled local editor document in WKWebView.
|
|
|
76
132
|
RichText uses StarterKit; Tiptap and Lexical use their existing web facades.
|
|
77
133
|
Wait for `onReady`; synchronous getters return the latest received snapshot
|
|
78
134
|
and commands cross WebKit asynchronously. The `native` handle is the Swift
|
|
79
|
-
host transport. See [AppKit setup and engine limits](../../docs/rich-text.md#macos-appkit-editing).
|
|
135
|
+
host transport. See [AppKit setup and engine limits](../../docs/app/rich-text.md#macos-appkit-editing).
|