@multiplatform.one/rich-text 6.0.4 → 6.3.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 +60 -0
- package/dist/cjs/RichEditor.cjs +84 -9
- package/dist/cjs/RichEditor.native.js +422 -35
- package/dist/cjs/RichEditor.native.js.map +1 -1
- package/dist/cjs/RichTextEditor/index.cjs +18 -2
- package/dist/cjs/RichTextEditor/index.native.js +18 -2
- package/dist/cjs/RichTextEditor/index.native.js.map +1 -1
- package/dist/cjs/constants.cjs +52 -29
- package/dist/cjs/constants.native.js +59 -29
- package/dist/cjs/constants.native.js.map +1 -1
- package/dist/cjs/editor/BlockDragHandle.cjs +22 -7
- package/dist/cjs/editor/BlockDragHandle.native.js +41 -7
- package/dist/cjs/editor/BlockDragHandle.native.js.map +1 -1
- package/dist/cjs/editor/SlashCommands.cjs +249 -293
- package/dist/cjs/editor/SlashCommands.native.js +306 -340
- package/dist/cjs/editor/SlashCommands.native.js.map +1 -1
- package/dist/cjs/editor/TentapEditor.native.js +44 -12
- package/dist/cjs/editor/TentapEditor.native.js.map +1 -1
- package/dist/cjs/editor/TiptapEditor.cjs +140 -33
- package/dist/cjs/editor/TiptapEditor.native.js +153 -33
- package/dist/cjs/editor/TiptapEditor.native.js.map +1 -1
- package/dist/cjs/editor/blockAnchor.cjs +43 -0
- package/dist/cjs/editor/blockAnchor.native.js +68 -0
- package/dist/cjs/editor/blockAnchor.native.js.map +1 -0
- package/dist/cjs/editor/codeBlockPreview.cjs +230 -0
- package/dist/cjs/editor/codeBlockPreview.native.js +265 -0
- package/dist/cjs/editor/codeBlockPreview.native.js.map +1 -0
- package/dist/cjs/editor/editorStyles.cjs +203 -34
- package/dist/cjs/editor/editorStyles.native.js +203 -34
- package/dist/cjs/editor/editorStyles.native.js.map +1 -1
- package/dist/cjs/editor/emoji.cjs +128 -0
- package/dist/cjs/editor/emoji.native.js +184 -0
- package/dist/cjs/editor/emoji.native.js.map +1 -0
- package/dist/cjs/editor/lazyKatex.cjs +78 -0
- package/dist/cjs/editor/lazyKatex.native.js +117 -0
- package/dist/cjs/editor/lazyKatex.native.js.map +1 -0
- package/dist/cjs/editor/markdown.cjs +216 -0
- package/dist/cjs/editor/markdown.native.js +278 -0
- package/dist/cjs/editor/markdown.native.js.map +1 -0
- package/dist/cjs/editor/mathematics.cjs +168 -0
- package/dist/cjs/editor/mathematics.native.js +202 -0
- package/dist/cjs/editor/mathematics.native.js.map +1 -0
- package/dist/cjs/editor/media.cjs +138 -0
- package/dist/cjs/editor/media.native.js +172 -0
- package/dist/cjs/editor/media.native.js.map +1 -0
- package/dist/cjs/editor/mentions.cjs +73 -0
- package/dist/cjs/editor/mentions.native.js +84 -0
- package/dist/cjs/editor/mentions.native.js.map +1 -0
- package/dist/cjs/editor/pasteCleanup.cjs +83 -0
- package/dist/cjs/editor/pasteCleanup.native.js +175 -0
- package/dist/cjs/editor/pasteCleanup.native.js.map +1 -0
- package/dist/cjs/editor/suggestionPopup.cjs +297 -0
- package/dist/cjs/editor/suggestionPopup.native.js +327 -0
- package/dist/cjs/editor/suggestionPopup.native.js.map +1 -0
- package/dist/cjs/preview.cjs +263 -0
- package/dist/cjs/preview.native.js +294 -0
- package/dist/cjs/preview.native.js.map +1 -0
- package/dist/cjs/shared/t.cjs +53 -0
- package/dist/cjs/shared/t.native.js +56 -0
- package/dist/cjs/shared/t.native.js.map +1 -0
- package/dist/cjs/shared/url.cjs +35 -0
- package/dist/cjs/shared/url.native.js +38 -0
- package/dist/cjs/shared/url.native.js.map +1 -0
- package/dist/cjs/styled.cjs +13 -6
- package/dist/cjs/styled.native.js +13 -6
- package/dist/cjs/styled.native.js.map +1 -1
- package/dist/cjs/toolbar/BubbleToolbar.cjs +10 -8
- package/dist/cjs/toolbar/BubbleToolbar.native.js +10 -8
- package/dist/cjs/toolbar/BubbleToolbar.native.js.map +1 -1
- package/dist/cjs/toolbar/CodeBlockBubble.cjs +59 -23
- package/dist/cjs/toolbar/CodeBlockBubble.native.js +71 -25
- package/dist/cjs/toolbar/CodeBlockBubble.native.js.map +1 -1
- package/dist/cjs/toolbar/ColorPicker.cjs +19 -54
- package/dist/cjs/toolbar/ColorPicker.native.js +81 -179
- package/dist/cjs/toolbar/ColorPicker.native.js.map +1 -1
- package/dist/cjs/toolbar/FixedToolbar.cjs +33 -10
- package/dist/cjs/toolbar/FixedToolbar.native.js +46 -54
- package/dist/cjs/toolbar/FixedToolbar.native.js.map +1 -1
- package/dist/cjs/toolbar/HeadingPicker.cjs +32 -39
- package/dist/cjs/toolbar/HeadingPicker.native.js +61 -51
- package/dist/cjs/toolbar/HeadingPicker.native.js.map +1 -1
- package/dist/cjs/toolbar/ImageBubble.cjs +20 -43
- package/dist/cjs/toolbar/ImageBubble.native.js +20 -43
- package/dist/cjs/toolbar/ImageBubble.native.js.map +1 -1
- package/dist/cjs/toolbar/ImageDialog.cjs +5 -4
- package/dist/cjs/toolbar/ImageDialog.native.js +76 -65
- package/dist/cjs/toolbar/ImageDialog.native.js.map +1 -1
- package/dist/cjs/toolbar/LinkBubble.cjs +23 -70
- package/dist/cjs/toolbar/LinkBubble.native.js +23 -70
- package/dist/cjs/toolbar/LinkBubble.native.js.map +1 -1
- package/dist/cjs/toolbar/LinkDialog.cjs +19 -18
- package/dist/cjs/toolbar/LinkDialog.native.js +86 -83
- package/dist/cjs/toolbar/LinkDialog.native.js.map +1 -1
- package/dist/cjs/toolbar/ListPicker.cjs +32 -43
- package/dist/cjs/toolbar/ListPicker.native.js +43 -44
- package/dist/cjs/toolbar/ListPicker.native.js.map +1 -1
- package/dist/cjs/toolbar/MathBubble.cjs +159 -0
- package/dist/cjs/toolbar/MathBubble.native.js +169 -0
- package/dist/cjs/toolbar/MathBubble.native.js.map +1 -0
- package/dist/cjs/toolbar/MoreDropdown.cjs +51 -98
- package/dist/cjs/toolbar/MoreDropdown.native.js +73 -98
- package/dist/cjs/toolbar/MoreDropdown.native.js.map +1 -1
- package/dist/cjs/toolbar/StatusBar.cjs +19 -10
- package/dist/cjs/toolbar/StatusBar.native.js +19 -10
- package/dist/cjs/toolbar/StatusBar.native.js.map +1 -1
- package/dist/cjs/toolbar/TableBubble.cjs +77 -95
- package/dist/cjs/toolbar/TableBubble.native.js +73 -71
- package/dist/cjs/toolbar/TableBubble.native.js.map +1 -1
- package/dist/cjs/toolbar/ToolbarButton.cjs +86 -21
- package/dist/cjs/toolbar/ToolbarButton.native.js +14 -4
- package/dist/cjs/toolbar/ToolbarButton.native.js.map +1 -1
- package/dist/cjs/toolbar/icons.cjs +111 -468
- package/dist/cjs/toolbar/shortcuts.cjs +73 -24
- package/dist/cjs/toolbar/shortcuts.native.js +73 -24
- package/dist/cjs/toolbar/shortcuts.native.js.map +1 -1
- package/dist/cjs/toolbar/useHorizontalScroll.cjs +25 -5
- package/dist/cjs/toolbar/useHorizontalScroll.native.js +25 -5
- package/dist/cjs/toolbar/useHorizontalScroll.native.js.map +1 -1
- package/dist/cjs/toolbar/useRovingFocus.cjs +80 -0
- package/dist/cjs/toolbar/useRovingFocus.native.js +113 -0
- package/dist/cjs/toolbar/useRovingFocus.native.js.map +1 -0
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/esm/RichEditor.mjs +85 -10
- package/dist/esm/RichEditor.mjs.map +1 -1
- package/dist/esm/RichEditor.native.js +425 -38
- package/dist/esm/RichEditor.native.js.map +1 -1
- package/dist/esm/RichTextEditor/index.mjs +18 -2
- package/dist/esm/RichTextEditor/index.mjs.map +1 -1
- package/dist/esm/RichTextEditor/index.native.js +18 -2
- package/dist/esm/RichTextEditor/index.native.js.map +1 -1
- package/dist/esm/constants.mjs +47 -29
- package/dist/esm/constants.mjs.map +1 -1
- package/dist/esm/constants.native.js +54 -29
- package/dist/esm/constants.native.js.map +1 -1
- package/dist/esm/editor/BlockDragHandle.mjs +22 -7
- package/dist/esm/editor/BlockDragHandle.mjs.map +1 -1
- package/dist/esm/editor/BlockDragHandle.native.js +41 -7
- package/dist/esm/editor/BlockDragHandle.native.js.map +1 -1
- package/dist/esm/editor/SlashCommands.mjs +250 -294
- package/dist/esm/editor/SlashCommands.mjs.map +1 -1
- package/dist/esm/editor/SlashCommands.native.js +307 -341
- package/dist/esm/editor/SlashCommands.native.js.map +1 -1
- package/dist/esm/editor/TentapEditor.native.js +45 -13
- package/dist/esm/editor/TentapEditor.native.js.map +1 -1
- package/dist/esm/editor/TiptapEditor.mjs +142 -35
- package/dist/esm/editor/TiptapEditor.mjs.map +1 -1
- package/dist/esm/editor/TiptapEditor.native.js +155 -35
- package/dist/esm/editor/TiptapEditor.native.js.map +1 -1
- package/dist/esm/editor/blockAnchor.mjs +18 -0
- package/dist/esm/editor/blockAnchor.mjs.map +1 -0
- package/dist/esm/editor/blockAnchor.native.js +40 -0
- package/dist/esm/editor/blockAnchor.native.js.map +1 -0
- package/dist/esm/editor/codeBlockPreview.mjs +190 -0
- package/dist/esm/editor/codeBlockPreview.mjs.map +1 -0
- package/dist/esm/editor/codeBlockPreview.native.js +222 -0
- package/dist/esm/editor/codeBlockPreview.native.js.map +1 -0
- package/dist/esm/editor/editorStyles.mjs +203 -34
- package/dist/esm/editor/editorStyles.mjs.map +1 -1
- package/dist/esm/editor/editorStyles.native.js +203 -34
- package/dist/esm/editor/editorStyles.native.js.map +1 -1
- package/dist/esm/editor/emoji.mjs +88 -0
- package/dist/esm/editor/emoji.mjs.map +1 -0
- package/dist/esm/editor/emoji.native.js +141 -0
- package/dist/esm/editor/emoji.native.js.map +1 -0
- package/dist/esm/editor/lazyKatex.mjs +40 -0
- package/dist/esm/editor/lazyKatex.mjs.map +1 -0
- package/dist/esm/editor/lazyKatex.native.js +76 -0
- package/dist/esm/editor/lazyKatex.native.js.map +1 -0
- package/dist/esm/editor/markdown.mjs +179 -0
- package/dist/esm/editor/markdown.mjs.map +1 -0
- package/dist/esm/editor/markdown.native.js +238 -0
- package/dist/esm/editor/markdown.native.js.map +1 -0
- package/dist/esm/editor/mathematics.mjs +142 -0
- package/dist/esm/editor/mathematics.mjs.map +1 -0
- package/dist/esm/editor/mathematics.native.js +173 -0
- package/dist/esm/editor/mathematics.native.js.map +1 -0
- package/dist/esm/editor/media.mjs +113 -0
- package/dist/esm/editor/media.mjs.map +1 -0
- package/dist/esm/editor/media.native.js +144 -0
- package/dist/esm/editor/media.native.js.map +1 -0
- package/dist/esm/editor/mentions.mjs +37 -0
- package/dist/esm/editor/mentions.mjs.map +1 -0
- package/dist/esm/editor/mentions.native.js +45 -0
- package/dist/esm/editor/mentions.native.js.map +1 -0
- package/dist/esm/editor/pasteCleanup.mjs +57 -0
- package/dist/esm/editor/pasteCleanup.mjs.map +1 -0
- package/dist/esm/editor/pasteCleanup.native.js +146 -0
- package/dist/esm/editor/pasteCleanup.native.js.map +1 -0
- package/dist/esm/editor/suggestionPopup.mjs +268 -0
- package/dist/esm/editor/suggestionPopup.mjs.map +1 -0
- package/dist/esm/editor/suggestionPopup.native.js +295 -0
- package/dist/esm/editor/suggestionPopup.native.js.map +1 -0
- package/dist/esm/preview.mjs +236 -0
- package/dist/esm/preview.mjs.map +1 -0
- package/dist/esm/preview.native.js +264 -0
- package/dist/esm/preview.native.js.map +1 -0
- package/dist/esm/shared/t.mjs +17 -0
- package/dist/esm/shared/t.mjs.map +1 -0
- package/dist/esm/shared/t.native.js +17 -0
- package/dist/esm/shared/t.native.js.map +1 -0
- package/dist/esm/shared/url.mjs +10 -0
- package/dist/esm/shared/url.mjs.map +1 -0
- package/dist/esm/shared/url.native.js +10 -0
- package/dist/esm/shared/url.native.js.map +1 -0
- package/dist/esm/styled.mjs +13 -6
- package/dist/esm/styled.mjs.map +1 -1
- package/dist/esm/styled.native.js +13 -6
- package/dist/esm/styled.native.js.map +1 -1
- package/dist/esm/toolbar/BubbleToolbar.mjs +11 -9
- package/dist/esm/toolbar/BubbleToolbar.mjs.map +1 -1
- package/dist/esm/toolbar/BubbleToolbar.native.js +11 -9
- package/dist/esm/toolbar/BubbleToolbar.native.js.map +1 -1
- package/dist/esm/toolbar/CodeBlockBubble.mjs +60 -24
- package/dist/esm/toolbar/CodeBlockBubble.mjs.map +1 -1
- package/dist/esm/toolbar/CodeBlockBubble.native.js +72 -26
- package/dist/esm/toolbar/CodeBlockBubble.native.js.map +1 -1
- package/dist/esm/toolbar/ColorPicker.mjs +21 -56
- package/dist/esm/toolbar/ColorPicker.mjs.map +1 -1
- package/dist/esm/toolbar/ColorPicker.native.js +82 -180
- package/dist/esm/toolbar/ColorPicker.native.js.map +1 -1
- package/dist/esm/toolbar/FixedToolbar.mjs +34 -11
- package/dist/esm/toolbar/FixedToolbar.mjs.map +1 -1
- package/dist/esm/toolbar/FixedToolbar.native.js +47 -55
- package/dist/esm/toolbar/FixedToolbar.native.js.map +1 -1
- package/dist/esm/toolbar/HeadingPicker.mjs +34 -41
- package/dist/esm/toolbar/HeadingPicker.mjs.map +1 -1
- package/dist/esm/toolbar/HeadingPicker.native.js +63 -53
- package/dist/esm/toolbar/HeadingPicker.native.js.map +1 -1
- package/dist/esm/toolbar/ImageBubble.mjs +20 -43
- package/dist/esm/toolbar/ImageBubble.mjs.map +1 -1
- package/dist/esm/toolbar/ImageBubble.native.js +20 -43
- package/dist/esm/toolbar/ImageBubble.native.js.map +1 -1
- package/dist/esm/toolbar/ImageDialog.mjs +5 -4
- package/dist/esm/toolbar/ImageDialog.mjs.map +1 -1
- package/dist/esm/toolbar/ImageDialog.native.js +75 -64
- package/dist/esm/toolbar/ImageDialog.native.js.map +1 -1
- package/dist/esm/toolbar/LinkBubble.mjs +23 -70
- package/dist/esm/toolbar/LinkBubble.mjs.map +1 -1
- package/dist/esm/toolbar/LinkBubble.native.js +23 -70
- package/dist/esm/toolbar/LinkBubble.native.js.map +1 -1
- package/dist/esm/toolbar/LinkDialog.mjs +17 -16
- package/dist/esm/toolbar/LinkDialog.mjs.map +1 -1
- package/dist/esm/toolbar/LinkDialog.native.js +84 -80
- package/dist/esm/toolbar/LinkDialog.native.js.map +1 -1
- package/dist/esm/toolbar/ListPicker.mjs +33 -44
- package/dist/esm/toolbar/ListPicker.mjs.map +1 -1
- package/dist/esm/toolbar/ListPicker.native.js +44 -45
- package/dist/esm/toolbar/ListPicker.native.js.map +1 -1
- package/dist/esm/toolbar/MathBubble.mjs +134 -0
- package/dist/esm/toolbar/MathBubble.mjs.map +1 -0
- package/dist/esm/toolbar/MathBubble.native.js +141 -0
- package/dist/esm/toolbar/MathBubble.native.js.map +1 -0
- package/dist/esm/toolbar/MoreDropdown.mjs +50 -97
- package/dist/esm/toolbar/MoreDropdown.mjs.map +1 -1
- package/dist/esm/toolbar/MoreDropdown.native.js +72 -97
- package/dist/esm/toolbar/MoreDropdown.native.js.map +1 -1
- package/dist/esm/toolbar/StatusBar.mjs +19 -10
- package/dist/esm/toolbar/StatusBar.mjs.map +1 -1
- package/dist/esm/toolbar/StatusBar.native.js +19 -10
- package/dist/esm/toolbar/StatusBar.native.js.map +1 -1
- package/dist/esm/toolbar/TableBubble.mjs +77 -95
- package/dist/esm/toolbar/TableBubble.mjs.map +1 -1
- package/dist/esm/toolbar/TableBubble.native.js +73 -71
- package/dist/esm/toolbar/TableBubble.native.js.map +1 -1
- package/dist/esm/toolbar/ToolbarButton.mjs +87 -22
- package/dist/esm/toolbar/ToolbarButton.mjs.map +1 -1
- package/dist/esm/toolbar/ToolbarButton.native.js +14 -4
- package/dist/esm/toolbar/ToolbarButton.native.js.map +1 -1
- package/dist/esm/toolbar/icons.mjs +109 -469
- package/dist/esm/toolbar/icons.mjs.map +1 -1
- package/dist/esm/toolbar/shortcuts.mjs +73 -24
- package/dist/esm/toolbar/shortcuts.mjs.map +1 -1
- package/dist/esm/toolbar/shortcuts.native.js +73 -24
- package/dist/esm/toolbar/shortcuts.native.js.map +1 -1
- package/dist/esm/toolbar/useHorizontalScroll.mjs +25 -6
- package/dist/esm/toolbar/useHorizontalScroll.mjs.map +1 -1
- package/dist/esm/toolbar/useHorizontalScroll.native.js +25 -6
- package/dist/esm/toolbar/useHorizontalScroll.native.js.map +1 -1
- package/dist/esm/toolbar/useRovingFocus.mjs +55 -0
- package/dist/esm/toolbar/useRovingFocus.mjs.map +1 -0
- package/dist/esm/toolbar/useRovingFocus.native.js +85 -0
- package/dist/esm/toolbar/useRovingFocus.native.js.map +1 -0
- package/dist/esm/types.mjs.map +1 -1
- package/dist/esm/types.native.js.map +1 -1
- package/dist/jsx/RichEditor.mjs +85 -10
- package/dist/jsx/RichEditor.mjs.map +1 -1
- package/dist/jsx/RichEditor.native.js +422 -35
- package/dist/jsx/RichEditor.native.js.map +1 -1
- package/dist/jsx/RichTextEditor/index.mjs +18 -2
- package/dist/jsx/RichTextEditor/index.mjs.map +1 -1
- package/dist/jsx/RichTextEditor/index.native.js +18 -2
- package/dist/jsx/RichTextEditor/index.native.js.map +1 -1
- package/dist/jsx/constants.mjs +47 -29
- package/dist/jsx/constants.mjs.map +1 -1
- package/dist/jsx/constants.native.js +59 -29
- package/dist/jsx/constants.native.js.map +1 -1
- package/dist/jsx/editor/BlockDragHandle.mjs +22 -7
- package/dist/jsx/editor/BlockDragHandle.mjs.map +1 -1
- package/dist/jsx/editor/BlockDragHandle.native.js +41 -7
- package/dist/jsx/editor/BlockDragHandle.native.js.map +1 -1
- package/dist/jsx/editor/SlashCommands.mjs +250 -294
- package/dist/jsx/editor/SlashCommands.mjs.map +1 -1
- package/dist/jsx/editor/SlashCommands.native.js +306 -340
- package/dist/jsx/editor/SlashCommands.native.js.map +1 -1
- package/dist/jsx/editor/TentapEditor.native.js +44 -12
- package/dist/jsx/editor/TentapEditor.native.js.map +1 -1
- package/dist/jsx/editor/TiptapEditor.mjs +142 -35
- package/dist/jsx/editor/TiptapEditor.mjs.map +1 -1
- package/dist/jsx/editor/TiptapEditor.native.js +153 -33
- package/dist/jsx/editor/TiptapEditor.native.js.map +1 -1
- package/dist/jsx/editor/blockAnchor.mjs +18 -0
- package/dist/jsx/editor/blockAnchor.mjs.map +1 -0
- package/dist/jsx/editor/blockAnchor.native.js +68 -0
- package/dist/jsx/editor/blockAnchor.native.js.map +1 -0
- package/dist/jsx/editor/codeBlockPreview.mjs +190 -0
- package/dist/jsx/editor/codeBlockPreview.mjs.map +1 -0
- package/dist/jsx/editor/codeBlockPreview.native.js +265 -0
- package/dist/jsx/editor/codeBlockPreview.native.js.map +1 -0
- package/dist/jsx/editor/editorStyles.mjs +203 -34
- package/dist/jsx/editor/editorStyles.mjs.map +1 -1
- package/dist/jsx/editor/editorStyles.native.js +203 -34
- package/dist/jsx/editor/editorStyles.native.js.map +1 -1
- package/dist/jsx/editor/emoji.mjs +88 -0
- package/dist/jsx/editor/emoji.mjs.map +1 -0
- package/dist/jsx/editor/emoji.native.js +184 -0
- package/dist/jsx/editor/emoji.native.js.map +1 -0
- package/dist/jsx/editor/lazyKatex.mjs +40 -0
- package/dist/jsx/editor/lazyKatex.mjs.map +1 -0
- package/dist/jsx/editor/lazyKatex.native.js +117 -0
- package/dist/jsx/editor/lazyKatex.native.js.map +1 -0
- package/dist/jsx/editor/markdown.mjs +179 -0
- package/dist/jsx/editor/markdown.mjs.map +1 -0
- package/dist/jsx/editor/markdown.native.js +278 -0
- package/dist/jsx/editor/markdown.native.js.map +1 -0
- package/dist/jsx/editor/mathematics.mjs +142 -0
- package/dist/jsx/editor/mathematics.mjs.map +1 -0
- package/dist/jsx/editor/mathematics.native.js +202 -0
- package/dist/jsx/editor/mathematics.native.js.map +1 -0
- package/dist/jsx/editor/media.mjs +113 -0
- package/dist/jsx/editor/media.mjs.map +1 -0
- package/dist/jsx/editor/media.native.js +172 -0
- package/dist/jsx/editor/media.native.js.map +1 -0
- package/dist/jsx/editor/mentions.mjs +37 -0
- package/dist/jsx/editor/mentions.mjs.map +1 -0
- package/dist/jsx/editor/mentions.native.js +84 -0
- package/dist/jsx/editor/mentions.native.js.map +1 -0
- package/dist/jsx/editor/pasteCleanup.mjs +57 -0
- package/dist/jsx/editor/pasteCleanup.mjs.map +1 -0
- package/dist/jsx/editor/pasteCleanup.native.js +175 -0
- package/dist/jsx/editor/pasteCleanup.native.js.map +1 -0
- package/dist/jsx/editor/suggestionPopup.mjs +268 -0
- package/dist/jsx/editor/suggestionPopup.mjs.map +1 -0
- package/dist/jsx/editor/suggestionPopup.native.js +327 -0
- package/dist/jsx/editor/suggestionPopup.native.js.map +1 -0
- package/dist/jsx/preview.mjs +236 -0
- package/dist/jsx/preview.mjs.map +1 -0
- package/dist/jsx/preview.native.js +294 -0
- package/dist/jsx/preview.native.js.map +1 -0
- package/dist/jsx/shared/t.mjs +17 -0
- package/dist/jsx/shared/t.mjs.map +1 -0
- package/dist/jsx/shared/t.native.js +56 -0
- package/dist/jsx/shared/t.native.js.map +1 -0
- package/dist/jsx/shared/url.mjs +10 -0
- package/dist/jsx/shared/url.mjs.map +1 -0
- package/dist/jsx/shared/url.native.js +38 -0
- package/dist/jsx/shared/url.native.js.map +1 -0
- package/dist/jsx/styled.mjs +13 -6
- package/dist/jsx/styled.mjs.map +1 -1
- package/dist/jsx/styled.native.js +13 -6
- package/dist/jsx/styled.native.js.map +1 -1
- package/dist/jsx/toolbar/BubbleToolbar.mjs +11 -9
- package/dist/jsx/toolbar/BubbleToolbar.mjs.map +1 -1
- package/dist/jsx/toolbar/BubbleToolbar.native.js +10 -8
- package/dist/jsx/toolbar/BubbleToolbar.native.js.map +1 -1
- package/dist/jsx/toolbar/CodeBlockBubble.mjs +60 -24
- package/dist/jsx/toolbar/CodeBlockBubble.mjs.map +1 -1
- package/dist/jsx/toolbar/CodeBlockBubble.native.js +71 -25
- package/dist/jsx/toolbar/CodeBlockBubble.native.js.map +1 -1
- package/dist/jsx/toolbar/ColorPicker.mjs +21 -56
- package/dist/jsx/toolbar/ColorPicker.mjs.map +1 -1
- package/dist/jsx/toolbar/ColorPicker.native.js +81 -179
- package/dist/jsx/toolbar/ColorPicker.native.js.map +1 -1
- package/dist/jsx/toolbar/FixedToolbar.mjs +34 -11
- package/dist/jsx/toolbar/FixedToolbar.mjs.map +1 -1
- package/dist/jsx/toolbar/FixedToolbar.native.js +46 -54
- package/dist/jsx/toolbar/FixedToolbar.native.js.map +1 -1
- package/dist/jsx/toolbar/HeadingPicker.mjs +34 -41
- package/dist/jsx/toolbar/HeadingPicker.mjs.map +1 -1
- package/dist/jsx/toolbar/HeadingPicker.native.js +61 -51
- package/dist/jsx/toolbar/HeadingPicker.native.js.map +1 -1
- package/dist/jsx/toolbar/ImageBubble.mjs +20 -43
- package/dist/jsx/toolbar/ImageBubble.mjs.map +1 -1
- package/dist/jsx/toolbar/ImageBubble.native.js +20 -43
- package/dist/jsx/toolbar/ImageBubble.native.js.map +1 -1
- package/dist/jsx/toolbar/ImageDialog.mjs +5 -4
- package/dist/jsx/toolbar/ImageDialog.mjs.map +1 -1
- package/dist/jsx/toolbar/ImageDialog.native.js +76 -65
- package/dist/jsx/toolbar/ImageDialog.native.js.map +1 -1
- package/dist/jsx/toolbar/LinkBubble.mjs +23 -70
- package/dist/jsx/toolbar/LinkBubble.mjs.map +1 -1
- package/dist/jsx/toolbar/LinkBubble.native.js +23 -70
- package/dist/jsx/toolbar/LinkBubble.native.js.map +1 -1
- package/dist/jsx/toolbar/LinkDialog.mjs +17 -16
- package/dist/jsx/toolbar/LinkDialog.mjs.map +1 -1
- package/dist/jsx/toolbar/LinkDialog.native.js +86 -83
- package/dist/jsx/toolbar/LinkDialog.native.js.map +1 -1
- package/dist/jsx/toolbar/ListPicker.mjs +33 -44
- package/dist/jsx/toolbar/ListPicker.mjs.map +1 -1
- package/dist/jsx/toolbar/ListPicker.native.js +43 -44
- package/dist/jsx/toolbar/ListPicker.native.js.map +1 -1
- package/dist/jsx/toolbar/MathBubble.mjs +134 -0
- package/dist/jsx/toolbar/MathBubble.mjs.map +1 -0
- package/dist/jsx/toolbar/MathBubble.native.js +169 -0
- package/dist/jsx/toolbar/MathBubble.native.js.map +1 -0
- package/dist/jsx/toolbar/MoreDropdown.mjs +50 -97
- package/dist/jsx/toolbar/MoreDropdown.mjs.map +1 -1
- package/dist/jsx/toolbar/MoreDropdown.native.js +73 -98
- package/dist/jsx/toolbar/MoreDropdown.native.js.map +1 -1
- package/dist/jsx/toolbar/StatusBar.mjs +19 -10
- package/dist/jsx/toolbar/StatusBar.mjs.map +1 -1
- package/dist/jsx/toolbar/StatusBar.native.js +19 -10
- package/dist/jsx/toolbar/StatusBar.native.js.map +1 -1
- package/dist/jsx/toolbar/TableBubble.mjs +77 -95
- package/dist/jsx/toolbar/TableBubble.mjs.map +1 -1
- package/dist/jsx/toolbar/TableBubble.native.js +73 -71
- package/dist/jsx/toolbar/TableBubble.native.js.map +1 -1
- package/dist/jsx/toolbar/ToolbarButton.mjs +87 -22
- package/dist/jsx/toolbar/ToolbarButton.mjs.map +1 -1
- package/dist/jsx/toolbar/ToolbarButton.native.js +14 -4
- package/dist/jsx/toolbar/ToolbarButton.native.js.map +1 -1
- package/dist/jsx/toolbar/icons.mjs +109 -469
- package/dist/jsx/toolbar/icons.mjs.map +1 -1
- package/dist/jsx/toolbar/shortcuts.mjs +73 -24
- package/dist/jsx/toolbar/shortcuts.mjs.map +1 -1
- package/dist/jsx/toolbar/shortcuts.native.js +73 -24
- package/dist/jsx/toolbar/shortcuts.native.js.map +1 -1
- package/dist/jsx/toolbar/useHorizontalScroll.mjs +25 -6
- package/dist/jsx/toolbar/useHorizontalScroll.mjs.map +1 -1
- package/dist/jsx/toolbar/useHorizontalScroll.native.js +25 -5
- package/dist/jsx/toolbar/useHorizontalScroll.native.js.map +1 -1
- package/dist/jsx/toolbar/useRovingFocus.mjs +55 -0
- package/dist/jsx/toolbar/useRovingFocus.mjs.map +1 -0
- package/dist/jsx/toolbar/useRovingFocus.native.js +113 -0
- package/dist/jsx/toolbar/useRovingFocus.native.js.map +1 -0
- package/dist/jsx/types.mjs.map +1 -1
- package/dist/jsx/types.native.js.map +1 -1
- package/package.json +28 -13
- package/src/RichEditor.native.tsx +451 -49
- package/src/RichEditor.stories.tsx +158 -0
- package/src/RichEditor.tsx +121 -7
- package/src/RichTextEditor/index.tsx +41 -3
- package/src/RichTextEditor/richTextEditor.spec.tsx +11 -4
- package/src/constants.ts +86 -24
- package/src/editor/BlockDragHandle.ts +30 -5
- package/src/editor/SlashCommands.tsx +228 -293
- package/src/editor/TentapEditor.native.tsx +68 -17
- package/src/editor/TiptapEditor.tsx +187 -22
- package/src/editor/blockAnchor.spec.ts +70 -0
- package/src/editor/blockAnchor.ts +42 -0
- package/src/editor/codeBlockPreview.spec.ts +144 -0
- package/src/editor/codeBlockPreview.ts +266 -0
- package/src/editor/css.d.ts +2 -0
- package/src/editor/details.spec.ts +48 -0
- package/src/editor/editorStyles.spec.ts +25 -0
- package/src/editor/editorStyles.ts +218 -34
- package/src/editor/emoji.spec.ts +88 -0
- package/src/editor/emoji.ts +147 -0
- package/src/editor/emojilib.d.ts +16 -0
- package/src/editor/lazyKatex.spec.ts +38 -0
- package/src/editor/lazyKatex.ts +68 -0
- package/src/editor/markdown.spec.ts +196 -0
- package/src/editor/markdown.ts +249 -0
- package/src/editor/mathematics.spec.ts +97 -0
- package/src/editor/mathematics.ts +179 -0
- package/src/editor/media.spec.ts +121 -0
- package/src/editor/media.ts +133 -0
- package/src/editor/mentions.spec.ts +41 -0
- package/src/editor/mentions.ts +55 -0
- package/src/editor/pasteCleanup.spec.ts +84 -0
- package/src/editor/pasteCleanup.ts +124 -0
- package/src/editor/suggestionPopup.spec.tsx +105 -0
- package/src/editor/suggestionPopup.tsx +414 -0
- package/src/editor/tiptapEditor.spec.tsx +15 -8
- package/src/exports.spec.ts +4 -2
- package/src/index.ts +7 -1
- package/src/integration.spec.tsx +38 -9
- package/src/preview.spec.ts +130 -0
- package/src/preview.ts +287 -0
- package/src/richEditor.spec.tsx +10 -3
- package/src/shared/t.ts +25 -0
- package/src/shared/url.ts +16 -0
- package/src/styled.ts +13 -6
- package/src/toolbar/BubbleToolbar.tsx +11 -8
- package/src/toolbar/CodeBlockBubble.tsx +66 -28
- package/src/toolbar/ColorPicker.native.tsx +126 -0
- package/src/toolbar/ColorPicker.tsx +23 -67
- package/src/toolbar/FixedToolbar.native.tsx +51 -51
- package/src/toolbar/FixedToolbar.tsx +54 -10
- package/src/toolbar/HeadingPicker.tsx +46 -38
- package/src/toolbar/ImageBubble.tsx +26 -44
- package/src/toolbar/ImageDialog.native.tsx +97 -0
- package/src/toolbar/ImageDialog.tsx +5 -4
- package/src/toolbar/LinkBubble.tsx +27 -64
- package/src/toolbar/LinkDialog.native.tsx +117 -0
- package/src/toolbar/LinkDialog.tsx +28 -24
- package/src/toolbar/ListPicker.tsx +47 -43
- package/src/toolbar/MathBubble.tsx +140 -0
- package/src/toolbar/MoreDropdown.tsx +53 -60
- package/src/toolbar/StatusBar.tsx +13 -8
- package/src/toolbar/TableBubble.tsx +82 -94
- package/src/toolbar/ToolbarButton.native.tsx +14 -4
- package/src/toolbar/ToolbarButton.tsx +98 -19
- package/src/toolbar/bubbleToolbar.spec.tsx +2 -1
- package/src/toolbar/fixedToolbar.spec.tsx +4 -2
- package/src/toolbar/icons.tsx +113 -323
- package/src/toolbar/shortcuts.ts +77 -24
- package/src/toolbar/toolbarPrimitives.spec.tsx +29 -1
- package/src/toolbar/toolbarSubComponents.spec.tsx +4 -2
- package/src/toolbar/useHorizontalScroll.spec.ts +67 -0
- package/src/toolbar/useHorizontalScroll.tsx +39 -12
- package/src/toolbar/useRovingFocus.spec.tsx +100 -0
- package/src/toolbar/useRovingFocus.ts +82 -0
- package/src/types.spec.ts +40 -1
- package/src/types.ts +28 -0
- package/types/RichEditor.d.ts +51 -0
- package/types/RichEditor.d.ts.map +1 -0
- package/types/RichEditor.native.d.ts +59 -0
- package/types/RichEditor.native.d.ts.map +1 -0
- package/types/RichTextEditor/index.d.ts +71 -0
- package/types/RichTextEditor/index.d.ts.map +1 -0
- package/types/constants.d.ts +49 -0
- package/types/constants.d.ts.map +1 -0
- package/types/context.d.ts +10 -0
- package/types/context.d.ts.map +1 -0
- package/types/editor/BlockDragHandle.d.ts +8 -0
- package/types/editor/BlockDragHandle.d.ts.map +1 -0
- package/types/editor/MarkdownPaste.d.ts +8 -0
- package/types/editor/MarkdownPaste.d.ts.map +1 -0
- package/types/editor/SlashCommands.d.ts +24 -0
- package/types/editor/SlashCommands.d.ts.map +1 -0
- package/types/editor/TentapEditor.native.d.ts +21 -0
- package/types/editor/TentapEditor.native.d.ts.map +1 -0
- package/types/editor/TiptapEditor.d.ts +24 -0
- package/types/editor/TiptapEditor.d.ts.map +1 -0
- package/types/editor/blockAnchor.d.ts +25 -0
- package/types/editor/blockAnchor.d.ts.map +1 -0
- package/types/editor/codeBlockPreview.d.ts +51 -0
- package/types/editor/codeBlockPreview.d.ts.map +1 -0
- package/types/editor/editorStyles.d.ts +25 -0
- package/types/editor/editorStyles.d.ts.map +1 -0
- package/types/editor/emoji.d.ts +45 -0
- package/types/editor/emoji.d.ts.map +1 -0
- package/types/editor/index.d.ts +11 -0
- package/types/editor/index.d.ts.map +1 -0
- package/types/editor/lazyKatex.d.ts +33 -0
- package/types/editor/lazyKatex.d.ts.map +1 -0
- package/types/editor/markdown.d.ts +24 -0
- package/types/editor/markdown.d.ts.map +1 -0
- package/types/editor/mathematics.d.ts +44 -0
- package/types/editor/mathematics.d.ts.map +1 -0
- package/types/editor/media.d.ts +32 -0
- package/types/editor/media.d.ts.map +1 -0
- package/types/editor/mentions.d.ts +15 -0
- package/types/editor/mentions.d.ts.map +1 -0
- package/types/editor/pasteCleanup.d.ts +24 -0
- package/types/editor/pasteCleanup.d.ts.map +1 -0
- package/types/editor/suggestionPopup.d.ts +113 -0
- package/types/editor/suggestionPopup.d.ts.map +1 -0
- package/types/editor/types.d.ts +80 -0
- package/types/editor/types.d.ts.map +1 -0
- package/types/editor/useEditorState.d.ts +19 -0
- package/types/editor/useEditorState.d.ts.map +1 -0
- package/types/index.d.ts +11 -0
- package/types/index.d.ts.map +1 -0
- package/types/preview.d.ts +44 -0
- package/types/preview.d.ts.map +1 -0
- package/types/shared/t.d.ts +10 -0
- package/types/shared/t.d.ts.map +1 -0
- package/types/shared/url.d.ts +9 -0
- package/types/shared/url.d.ts.map +1 -0
- package/types/styled.d.ts +40 -0
- package/types/styled.d.ts.map +1 -0
- package/types/toolbar/BubbleToolbar.d.ts +23 -0
- package/types/toolbar/BubbleToolbar.d.ts.map +1 -0
- package/types/toolbar/CodeBlockBubble.d.ts +10 -0
- package/types/toolbar/CodeBlockBubble.d.ts.map +1 -0
- package/types/toolbar/ColorPicker.d.ts +15 -0
- package/types/toolbar/ColorPicker.d.ts.map +1 -0
- package/types/toolbar/ColorPicker.native.d.ts +20 -0
- package/types/toolbar/ColorPicker.native.d.ts.map +1 -0
- package/types/toolbar/FixedToolbar.d.ts +32 -0
- package/types/toolbar/FixedToolbar.d.ts.map +1 -0
- package/types/toolbar/FixedToolbar.native.d.ts +30 -0
- package/types/toolbar/FixedToolbar.native.d.ts.map +1 -0
- package/types/toolbar/HeadingPicker.d.ts +14 -0
- package/types/toolbar/HeadingPicker.d.ts.map +1 -0
- package/types/toolbar/ImageBubble.d.ts +10 -0
- package/types/toolbar/ImageBubble.d.ts.map +1 -0
- package/types/toolbar/ImageDialog.d.ts +12 -0
- package/types/toolbar/ImageDialog.d.ts.map +1 -0
- package/types/toolbar/ImageDialog.native.d.ts +15 -0
- package/types/toolbar/ImageDialog.native.d.ts.map +1 -0
- package/types/toolbar/LinkBubble.d.ts +10 -0
- package/types/toolbar/LinkBubble.d.ts.map +1 -0
- package/types/toolbar/LinkDialog.d.ts +20 -0
- package/types/toolbar/LinkDialog.d.ts.map +1 -0
- package/types/toolbar/LinkDialog.native.d.ts +18 -0
- package/types/toolbar/LinkDialog.native.d.ts.map +1 -0
- package/types/toolbar/ListPicker.d.ts +14 -0
- package/types/toolbar/ListPicker.d.ts.map +1 -0
- package/types/toolbar/MathBubble.d.ts +11 -0
- package/types/toolbar/MathBubble.d.ts.map +1 -0
- package/types/toolbar/MoreDropdown.d.ts +13 -0
- package/types/toolbar/MoreDropdown.d.ts.map +1 -0
- package/types/toolbar/ResizeHandle.d.ts +11 -0
- package/types/toolbar/ResizeHandle.d.ts.map +1 -0
- package/types/toolbar/StatusBar.d.ts +11 -0
- package/types/toolbar/StatusBar.d.ts.map +1 -0
- package/types/toolbar/TableBubble.d.ts +10 -0
- package/types/toolbar/TableBubble.d.ts.map +1 -0
- package/types/toolbar/ToolbarButton.d.ts +35 -0
- package/types/toolbar/ToolbarButton.d.ts.map +1 -0
- package/types/toolbar/ToolbarButton.native.d.ts +30 -0
- package/types/toolbar/ToolbarButton.native.d.ts.map +1 -0
- package/types/toolbar/ToolbarGroup.d.ts +14 -0
- package/types/toolbar/ToolbarGroup.d.ts.map +1 -0
- package/types/toolbar/icons.d.ts +52 -0
- package/types/toolbar/icons.d.ts.map +1 -0
- package/types/toolbar/icons.native.d.ts +41 -0
- package/types/toolbar/icons.native.d.ts.map +1 -0
- package/types/toolbar/shortcuts.d.ts +34 -0
- package/types/toolbar/shortcuts.d.ts.map +1 -0
- package/types/toolbar/useHorizontalScroll.d.ts +43 -0
- package/types/toolbar/useHorizontalScroll.d.ts.map +1 -0
- package/types/toolbar/useRovingFocus.d.ts +10 -0
- package/types/toolbar/useRovingFocus.d.ts.map +1 -0
- package/types/types.d.ts +125 -0
- package/types/types.d.ts.map +1 -0
- package/dist/cjs/RichEditor.stories.cjs +0 -327
- package/dist/cjs/RichEditor.stories.native.js +0 -342
- package/dist/cjs/RichEditor.stories.native.js.map +0 -1
- package/dist/esm/RichEditor.stories.mjs +0 -291
- package/dist/esm/RichEditor.stories.mjs.map +0 -1
- package/dist/esm/RichEditor.stories.native.js +0 -303
- package/dist/esm/RichEditor.stories.native.js.map +0 -1
- package/dist/jsx/RichEditor.stories.mjs +0 -291
- package/dist/jsx/RichEditor.stories.mjs.map +0 -1
- package/dist/jsx/RichEditor.stories.native.js +0 -342
- package/dist/jsx/RichEditor.stories.native.js.map +0 -1
|
@@ -1,24 +1,49 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* RichEditor compound component (native)
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Mobile editing model (Notion / Gmail convention):
|
|
5
|
+
*
|
|
6
|
+
* - INLINE (default): a compact PREVIEW surface themed like an input --
|
|
7
|
+
* the committed content rendered as styled text (or the placeholder),
|
|
8
|
+
* with a subtle edit affordance. Tapping it does not type inline; it
|
|
9
|
+
* opens the fullscreen editor.
|
|
10
|
+
* - FULLSCREEN EDIT: a safe-area-aware RN Modal. Header bar with Cancel
|
|
11
|
+
* (left, discards the draft back to the pre-open value) and Done (right,
|
|
12
|
+
* commits via onChange) -- draft-until-commit. The Tentap editor fills
|
|
13
|
+
* the screen and the FixedToolbar docks ABOVE the keyboard via
|
|
14
|
+
* KeyboardAvoidingView.
|
|
15
|
+
* - `inlineEditing` opts back into the embedded inline editor for hosts
|
|
16
|
+
* that truly want the old behavior.
|
|
17
|
+
*
|
|
18
|
+
* The web `fullscreen` / `defaultFullscreen` / `onFullscreenChange` props
|
|
19
|
+
* map to the modal here, so the public API is one surface.
|
|
6
20
|
*
|
|
7
21
|
* No BubbleToolbar sub-component (10Tap does not support floating menus).
|
|
8
22
|
* The BubbleToolbar property is still present on the compound component
|
|
9
23
|
* to maintain the same public interface, but renders nothing on native.
|
|
10
24
|
*/
|
|
11
25
|
|
|
12
|
-
import { forwardRef, useCallback, useImperativeHandle, useRef, useState } from "react";
|
|
26
|
+
import { forwardRef, useCallback, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
27
|
+
import {
|
|
28
|
+
KeyboardAvoidingView,
|
|
29
|
+
Modal,
|
|
30
|
+
Platform,
|
|
31
|
+
Pressable,
|
|
32
|
+
SafeAreaView,
|
|
33
|
+
StyleSheet,
|
|
34
|
+
} from "react-native";
|
|
13
35
|
import type { SizeTokens } from "tamagui";
|
|
14
|
-
import { Text, View, withStaticProperties } from "tamagui";
|
|
36
|
+
import { Text, View, XStack, YStack, withStaticProperties } from "tamagui";
|
|
15
37
|
import { useResolvedKnobs } from "@multiplatform.one/theme";
|
|
16
|
-
import { clampRadiusForLargeComponent } from "@multiplatform.one/forms";
|
|
38
|
+
import { Button, clampRadiusForLargeComponent } from "@multiplatform.one/forms";
|
|
17
39
|
import type { EditorState, RichEditorProps, RichEditorRef, ToolbarSection } from "./types";
|
|
18
40
|
import { defaultEditorState } from "./types";
|
|
19
41
|
import { RichEditorContext } from "./context";
|
|
20
42
|
import { EditorFrame } from "./styled";
|
|
21
43
|
import { FixedToolbar } from "./toolbar/FixedToolbar";
|
|
44
|
+
import type { PreviewBlock } from "./preview";
|
|
45
|
+
import { parseHtmlPreview } from "./preview";
|
|
46
|
+
import { t } from "./shared/t";
|
|
22
47
|
|
|
23
48
|
// ===========================================================================
|
|
24
49
|
// Combined Props
|
|
@@ -35,6 +60,17 @@ export interface RichEditorCombinedProps extends RichEditorProps {
|
|
|
35
60
|
showBubbleToolbar?: boolean;
|
|
36
61
|
/** Toolbar sections to display (shows all when omitted) */
|
|
37
62
|
sections?: ToolbarSection[];
|
|
63
|
+
/** Controlled fullscreen state (opens the fullscreen edit modal) */
|
|
64
|
+
fullscreen?: boolean;
|
|
65
|
+
/** Initial fullscreen state when uncontrolled (default: false) */
|
|
66
|
+
defaultFullscreen?: boolean;
|
|
67
|
+
/** Called when the fullscreen state changes */
|
|
68
|
+
onFullscreenChange?: (fullscreen: boolean) => void;
|
|
69
|
+
/**
|
|
70
|
+
* Escape hatch: render the old embedded inline editor instead of the
|
|
71
|
+
* preview + fullscreen modal (default: false)
|
|
72
|
+
*/
|
|
73
|
+
inlineEditing?: boolean;
|
|
38
74
|
}
|
|
39
75
|
|
|
40
76
|
// ===========================================================================
|
|
@@ -51,10 +87,118 @@ function NativeBubbleToolbar() {
|
|
|
51
87
|
// ===========================================================================
|
|
52
88
|
|
|
53
89
|
let TentapEditor: any = null;
|
|
90
|
+
let tentapLoadError: string | null = null;
|
|
54
91
|
try {
|
|
55
92
|
TentapEditor = require("./editor/TentapEditor.native").TentapEditor;
|
|
56
|
-
} catch {
|
|
57
|
-
// @10play/tentap-editor
|
|
93
|
+
} catch (err) {
|
|
94
|
+
// @10play/tentap-editor missing or failed to init — surface visibly below.
|
|
95
|
+
tentapLoadError = err instanceof Error ? err.message : String(err);
|
|
96
|
+
console.warn("[RichEditor] TentapEditor failed to load:", tentapLoadError);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function TentapUnavailableMessage({ detail }: { detail?: string | null }) {
|
|
100
|
+
return (
|
|
101
|
+
<YStack gap="$2" alignItems="center" justifyContent="center" padding="$3">
|
|
102
|
+
<Text color="$orange10" fontSize={14} fontWeight="700" textAlign="center">
|
|
103
|
+
{t("Rich text editor unavailable")}
|
|
104
|
+
</Text>
|
|
105
|
+
<Text color="$color11" fontSize={12} textAlign="center">
|
|
106
|
+
{detail || t("TentapEditor failed to load (requires @10play/tentap-editor)")}
|
|
107
|
+
</Text>
|
|
108
|
+
</YStack>
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** Visible stub when compound `RichEditor.Editor` is used without Tentap */
|
|
113
|
+
function TentapUnavailableEditor(props: { minHeight?: number }) {
|
|
114
|
+
return (
|
|
115
|
+
<View
|
|
116
|
+
minHeight={props.minHeight ?? 150}
|
|
117
|
+
padding="$4"
|
|
118
|
+
justifyContent="center"
|
|
119
|
+
alignItems="center"
|
|
120
|
+
backgroundColor="$orange2"
|
|
121
|
+
borderWidth={1}
|
|
122
|
+
borderColor="$orange8"
|
|
123
|
+
borderRadius="$3"
|
|
124
|
+
accessibilityRole="alert"
|
|
125
|
+
aria-label={t("Rich text editor unavailable")}
|
|
126
|
+
>
|
|
127
|
+
<TentapUnavailableMessage detail={tentapLoadError} />
|
|
128
|
+
</View>
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// ===========================================================================
|
|
133
|
+
// Preview rendering
|
|
134
|
+
// ===========================================================================
|
|
135
|
+
|
|
136
|
+
const HEADING_STYLE: Record<string, { fontSize: number; fontWeight: any }> = {
|
|
137
|
+
heading1: { fontSize: 20, fontWeight: "700" },
|
|
138
|
+
heading2: { fontSize: 18, fontWeight: "700" },
|
|
139
|
+
heading3: { fontSize: 16, fontWeight: "600" },
|
|
140
|
+
heading4: { fontSize: 15, fontWeight: "600" },
|
|
141
|
+
heading5: { fontSize: 14, fontWeight: "600" },
|
|
142
|
+
heading6: { fontSize: 14, fontWeight: "600" },
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
function PreviewBlockText({ block }: { block: PreviewBlock }) {
|
|
146
|
+
const heading = HEADING_STYLE[block.kind];
|
|
147
|
+
const prefix =
|
|
148
|
+
block.kind === "bullet"
|
|
149
|
+
? "• "
|
|
150
|
+
: block.kind === "ordered"
|
|
151
|
+
? `${block.index ?? 1}. `
|
|
152
|
+
: block.kind === "task"
|
|
153
|
+
? block.checked
|
|
154
|
+
? "☑ "
|
|
155
|
+
: "☐ "
|
|
156
|
+
: "";
|
|
157
|
+
|
|
158
|
+
const body = (
|
|
159
|
+
<Text
|
|
160
|
+
color={block.quote ? "$color11" : "$color12"}
|
|
161
|
+
fontSize={heading?.fontSize ?? 14}
|
|
162
|
+
fontWeight={heading?.fontWeight}
|
|
163
|
+
fontStyle={block.quote ? "italic" : undefined}
|
|
164
|
+
lineHeight={heading ? undefined : 20}
|
|
165
|
+
numberOfLines={heading ? 2 : 4}
|
|
166
|
+
// RN logical prop so the block indent flips with I18nManager in RTL
|
|
167
|
+
paddingStart={(block.indent ?? 0) * 12}
|
|
168
|
+
>
|
|
169
|
+
{prefix}
|
|
170
|
+
{block.spans.map((span, i) => (
|
|
171
|
+
<Text
|
|
172
|
+
key={i}
|
|
173
|
+
color={span.code ? "$color12" : undefined}
|
|
174
|
+
fontWeight={span.bold ? "700" : undefined}
|
|
175
|
+
fontStyle={span.italic ? "italic" : undefined}
|
|
176
|
+
backgroundColor={span.code ? "$color4" : undefined}
|
|
177
|
+
textDecorationLine={
|
|
178
|
+
span.underline && span.strike
|
|
179
|
+
? "underline line-through"
|
|
180
|
+
: span.underline
|
|
181
|
+
? "underline"
|
|
182
|
+
: span.strike
|
|
183
|
+
? "line-through"
|
|
184
|
+
: undefined
|
|
185
|
+
}
|
|
186
|
+
>
|
|
187
|
+
{span.text}
|
|
188
|
+
</Text>
|
|
189
|
+
))}
|
|
190
|
+
</Text>
|
|
191
|
+
);
|
|
192
|
+
|
|
193
|
+
if (block.quote) {
|
|
194
|
+
return (
|
|
195
|
+
// RN logical props so the quote rail flips with I18nManager in RTL
|
|
196
|
+
<XStack borderStartWidth={3} borderStartColor="$color6" paddingStart="$2">
|
|
197
|
+
{body}
|
|
198
|
+
</XStack>
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
return body;
|
|
58
202
|
}
|
|
59
203
|
|
|
60
204
|
// ===========================================================================
|
|
@@ -68,17 +212,52 @@ const RichEditorImpl = forwardRef<RichEditorRef, RichEditorCombinedProps>(
|
|
|
68
212
|
compact = false,
|
|
69
213
|
showToolbar = true,
|
|
70
214
|
showBubbleToolbar: _showBubbleToolbar,
|
|
215
|
+
fullscreen: fullscreenProp,
|
|
216
|
+
defaultFullscreen = false,
|
|
217
|
+
onFullscreenChange,
|
|
218
|
+
inlineEditing = false,
|
|
71
219
|
sections,
|
|
72
220
|
hasError,
|
|
73
221
|
editable = true,
|
|
74
222
|
onStateChange,
|
|
75
223
|
minHeight = 150,
|
|
224
|
+
maxHeight,
|
|
76
225
|
...editorProps
|
|
77
226
|
},
|
|
78
227
|
ref,
|
|
79
228
|
) => {
|
|
80
229
|
const internalRef = useRef<RichEditorRef>(null);
|
|
81
230
|
const [editorState, setEditorState] = useState<EditorState>(defaultEditorState);
|
|
231
|
+
const [internalFullscreen, setInternalFullscreen] = useState(defaultFullscreen);
|
|
232
|
+
const fullscreen = fullscreenProp ?? internalFullscreen;
|
|
233
|
+
|
|
234
|
+
// Committed value (draft-until-commit): the preview renders this, the
|
|
235
|
+
// fullscreen editor drafts against it, Done promotes the draft into it.
|
|
236
|
+
const [committed, setCommitted] = useState<{ html: string; json: any }>(() => ({
|
|
237
|
+
html: editorProps.initialContent ?? "",
|
|
238
|
+
json: editorProps.initialJSON ?? null,
|
|
239
|
+
}));
|
|
240
|
+
const committedRef = useRef(committed);
|
|
241
|
+
committedRef.current = committed;
|
|
242
|
+
const draftHtml = useRef<string | null>(null);
|
|
243
|
+
const draftJson = useRef<any>(null);
|
|
244
|
+
|
|
245
|
+
// Adopt external resets (e.g. form.reset) while the modal is closed:
|
|
246
|
+
// when the initialContent prop changes to something we neither emitted
|
|
247
|
+
// nor already hold, treat it as the new committed value.
|
|
248
|
+
const lastInitialContent = useRef(editorProps.initialContent ?? "");
|
|
249
|
+
const lastEmitted = useRef<string | null>(null);
|
|
250
|
+
if (
|
|
251
|
+
!fullscreen &&
|
|
252
|
+
(editorProps.initialContent ?? "") !== lastInitialContent.current &&
|
|
253
|
+
(editorProps.initialContent ?? "") !== lastEmitted.current &&
|
|
254
|
+
(editorProps.initialContent ?? "") !== committedRef.current.html
|
|
255
|
+
) {
|
|
256
|
+
const html = editorProps.initialContent ?? "";
|
|
257
|
+
committedRef.current = { html, json: null };
|
|
258
|
+
setCommitted(committedRef.current);
|
|
259
|
+
}
|
|
260
|
+
lastInitialContent.current = editorProps.initialContent ?? "";
|
|
82
261
|
|
|
83
262
|
const { knobProps } = useResolvedKnobs({
|
|
84
263
|
component: "RichEditor",
|
|
@@ -94,55 +273,272 @@ const RichEditorImpl = forwardRef<RichEditorRef, RichEditorCombinedProps>(
|
|
|
94
273
|
[onStateChange],
|
|
95
274
|
);
|
|
96
275
|
|
|
97
|
-
|
|
276
|
+
const handleFullscreenChange = useCallback(
|
|
277
|
+
(next: boolean) => {
|
|
278
|
+
setInternalFullscreen(next);
|
|
279
|
+
onFullscreenChange?.(next);
|
|
280
|
+
},
|
|
281
|
+
[onFullscreenChange],
|
|
282
|
+
);
|
|
98
283
|
|
|
99
|
-
const
|
|
284
|
+
const openFullscreen = useCallback(() => {
|
|
285
|
+
draftHtml.current = null;
|
|
286
|
+
draftJson.current = null;
|
|
287
|
+
handleFullscreenChange(true);
|
|
288
|
+
}, [handleFullscreenChange]);
|
|
289
|
+
|
|
290
|
+
const { onChange, onBlur } = editorProps;
|
|
291
|
+
|
|
292
|
+
const handleCancel = useCallback(() => {
|
|
293
|
+
handleFullscreenChange(false);
|
|
294
|
+
onBlur?.();
|
|
295
|
+
}, [handleFullscreenChange, onBlur]);
|
|
100
296
|
|
|
297
|
+
const handleDone = useCallback(() => {
|
|
298
|
+
const html = draftHtml.current;
|
|
299
|
+
if (html !== null && html !== committedRef.current.html) {
|
|
300
|
+
committedRef.current = { html, json: draftJson.current };
|
|
301
|
+
setCommitted(committedRef.current);
|
|
302
|
+
lastEmitted.current = html;
|
|
303
|
+
onChange?.(html, draftJson.current);
|
|
304
|
+
}
|
|
305
|
+
handleFullscreenChange(false);
|
|
306
|
+
onBlur?.();
|
|
307
|
+
}, [handleFullscreenChange, onChange, onBlur]);
|
|
308
|
+
|
|
309
|
+
useImperativeHandle(
|
|
310
|
+
ref,
|
|
311
|
+
() => ({
|
|
312
|
+
executeCommand: (command, payload) => internalRef.current?.executeCommand(command, payload),
|
|
313
|
+
getState: () => internalRef.current?.getState() ?? defaultEditorState,
|
|
314
|
+
getHTML: () =>
|
|
315
|
+
internalRef.current
|
|
316
|
+
? internalRef.current.getHTML() || committedRef.current.html
|
|
317
|
+
: committedRef.current.html,
|
|
318
|
+
getJSON: () =>
|
|
319
|
+
internalRef.current
|
|
320
|
+
? (internalRef.current.getJSON() ?? committedRef.current.json)
|
|
321
|
+
: committedRef.current.json,
|
|
322
|
+
setHTML: (html: string) => {
|
|
323
|
+
if (internalRef.current) internalRef.current.setHTML(html);
|
|
324
|
+
else {
|
|
325
|
+
committedRef.current = { html, json: null };
|
|
326
|
+
setCommitted(committedRef.current);
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
setJSON: (json: any) => {
|
|
330
|
+
if (internalRef.current) internalRef.current.setJSON(json);
|
|
331
|
+
else {
|
|
332
|
+
committedRef.current = { ...committedRef.current, json };
|
|
333
|
+
setCommitted(committedRef.current);
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
focus: () => {
|
|
337
|
+
if (internalRef.current) internalRef.current.focus();
|
|
338
|
+
else if (!inlineEditing && editable) openFullscreen();
|
|
339
|
+
},
|
|
340
|
+
blur: () => internalRef.current?.blur(),
|
|
341
|
+
}),
|
|
342
|
+
[inlineEditing, editable, openFullscreen],
|
|
343
|
+
);
|
|
344
|
+
|
|
345
|
+
const cappedRadius = clampRadiusForLargeComponent(knobProps.borderRadius.borderRadius, 4);
|
|
101
346
|
const disabled = !editable;
|
|
347
|
+
const sizeToken = (knobProps.sizeToken ?? "$true") as any;
|
|
348
|
+
|
|
349
|
+
const preview = useMemo(() => parseHtmlPreview(committed.html, 6), [committed.html]);
|
|
350
|
+
const previewEmpty = preview.blocks.length === 0;
|
|
351
|
+
|
|
352
|
+
// -----------------------------------------------------------------------
|
|
353
|
+
// Escape hatch: old embedded inline editor
|
|
354
|
+
// -----------------------------------------------------------------------
|
|
355
|
+
|
|
356
|
+
if (inlineEditing) {
|
|
357
|
+
return (
|
|
358
|
+
<RichEditorContext.Provider size={sizeToken} compact={compact} disabled={disabled}>
|
|
359
|
+
<EditorFrame
|
|
360
|
+
hasError={hasError}
|
|
361
|
+
borderRadius={cappedRadius}
|
|
362
|
+
borderWidth={knobProps.borderRadius.borderWidth}
|
|
363
|
+
borderColor={hasError ? "$red10" : "$color6"}
|
|
364
|
+
disabled={disabled}
|
|
365
|
+
>
|
|
366
|
+
{showToolbar && !disabled && (
|
|
367
|
+
<FixedToolbar
|
|
368
|
+
editorRef={internalRef}
|
|
369
|
+
state={editorState}
|
|
370
|
+
sections={sections}
|
|
371
|
+
hasError={hasError}
|
|
372
|
+
/>
|
|
373
|
+
)}
|
|
374
|
+
{TentapEditor ? (
|
|
375
|
+
<TentapEditor
|
|
376
|
+
ref={internalRef}
|
|
377
|
+
minHeight={minHeight}
|
|
378
|
+
maxHeight={maxHeight}
|
|
379
|
+
{...editorProps}
|
|
380
|
+
editable={editable}
|
|
381
|
+
onStateChange={handleStateChange}
|
|
382
|
+
hasError={false}
|
|
383
|
+
/>
|
|
384
|
+
) : (
|
|
385
|
+
<View
|
|
386
|
+
minHeight={minHeight}
|
|
387
|
+
padding={knobProps.panelPadding.padding}
|
|
388
|
+
justifyContent="center"
|
|
389
|
+
alignItems="center"
|
|
390
|
+
backgroundColor="$orange2"
|
|
391
|
+
accessibilityRole="alert"
|
|
392
|
+
>
|
|
393
|
+
<TentapUnavailableMessage detail={tentapLoadError} />
|
|
394
|
+
</View>
|
|
395
|
+
)}
|
|
396
|
+
</EditorFrame>
|
|
397
|
+
</RichEditorContext.Provider>
|
|
398
|
+
);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
// -----------------------------------------------------------------------
|
|
402
|
+
// Default: compact preview + fullscreen edit modal
|
|
403
|
+
// -----------------------------------------------------------------------
|
|
102
404
|
|
|
103
405
|
return (
|
|
104
|
-
<RichEditorContext.Provider
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
<
|
|
110
|
-
|
|
111
|
-
borderRadius={cappedRadius}
|
|
112
|
-
borderWidth={knobProps.borderRadius.borderWidth}
|
|
113
|
-
borderColor={hasError ? "$red10" : "$color6"}
|
|
406
|
+
<RichEditorContext.Provider size={sizeToken} compact={compact} disabled={disabled}>
|
|
407
|
+
{/*
|
|
408
|
+
RN Text/YStack steal taps from Tamagui View onPress, so the preview
|
|
409
|
+
open target is a core Pressable. EditorFrame stays visual-only.
|
|
410
|
+
*/}
|
|
411
|
+
<Pressable
|
|
412
|
+
onPress={disabled ? undefined : openFullscreen}
|
|
114
413
|
disabled={disabled}
|
|
414
|
+
accessibilityRole="button"
|
|
415
|
+
accessibilityLabel={t("Edit rich text")}
|
|
416
|
+
style={({ pressed }) => ({ opacity: pressed && !disabled ? 0.85 : 1 })}
|
|
115
417
|
>
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
418
|
+
<EditorFrame
|
|
419
|
+
hasError={hasError}
|
|
420
|
+
borderRadius={cappedRadius}
|
|
421
|
+
borderWidth={knobProps.borderRadius.borderWidth}
|
|
422
|
+
borderColor={hasError ? "$red10" : "$color6"}
|
|
423
|
+
disabled={disabled}
|
|
424
|
+
minHeight={Math.min(minHeight, 120)}
|
|
425
|
+
maxHeight={maxHeight ?? 240}
|
|
426
|
+
pointerEvents="none"
|
|
427
|
+
>
|
|
428
|
+
<YStack padding={knobProps.panelPadding.padding} paddingRight="$6" gap="$1.5" flex={1}>
|
|
429
|
+
{!TentapEditor && (
|
|
430
|
+
<Text color="$orange10" fontSize={12} fontWeight="600">
|
|
431
|
+
{t("Editor unavailable — tap for details")}
|
|
432
|
+
</Text>
|
|
433
|
+
)}
|
|
434
|
+
{previewEmpty ? (
|
|
435
|
+
<Text color="$color10" fontSize={14} lineHeight={20}>
|
|
436
|
+
{editorProps.placeholder ?? t("Start writing...")}
|
|
437
|
+
</Text>
|
|
438
|
+
) : (
|
|
439
|
+
preview.blocks.map((block, i) => <PreviewBlockText key={i} block={block} />)
|
|
440
|
+
)}
|
|
441
|
+
{preview.truncated && (
|
|
442
|
+
<Text color="$color10" fontSize={14}>
|
|
443
|
+
{"…"}
|
|
444
|
+
</Text>
|
|
445
|
+
)}
|
|
446
|
+
</YStack>
|
|
447
|
+
{!disabled && (
|
|
448
|
+
<View position="absolute" top="$2.5" right="$2.5">
|
|
449
|
+
<Text color="$color10" fontSize={15}>
|
|
450
|
+
{"✎"}
|
|
451
|
+
</Text>
|
|
452
|
+
</View>
|
|
453
|
+
)}
|
|
454
|
+
</EditorFrame>
|
|
455
|
+
</Pressable>
|
|
456
|
+
|
|
457
|
+
<Modal
|
|
458
|
+
visible={fullscreen}
|
|
459
|
+
animationType="slide"
|
|
460
|
+
presentationStyle="fullScreen"
|
|
461
|
+
onRequestClose={handleCancel}
|
|
462
|
+
>
|
|
463
|
+
{fullscreen && (
|
|
464
|
+
<YStack flex={1} backgroundColor="$background">
|
|
465
|
+
<KeyboardAvoidingView
|
|
466
|
+
style={styles.flex}
|
|
467
|
+
behavior={Platform.OS === "ios" ? "padding" : undefined}
|
|
468
|
+
>
|
|
469
|
+
<SafeAreaView style={styles.flex}>
|
|
470
|
+
<XStack
|
|
471
|
+
alignItems="center"
|
|
472
|
+
justifyContent="space-between"
|
|
473
|
+
paddingHorizontal="$2"
|
|
474
|
+
paddingVertical="$1.5"
|
|
475
|
+
borderBottomWidth={1}
|
|
476
|
+
borderBottomColor="$color6"
|
|
477
|
+
>
|
|
478
|
+
<Button
|
|
479
|
+
chromeless
|
|
480
|
+
size={sizeToken}
|
|
481
|
+
compact={compact}
|
|
482
|
+
onPress={handleCancel}
|
|
483
|
+
aria-label={t("Cancel")}
|
|
484
|
+
>
|
|
485
|
+
<Text color="$color11">{t("Cancel")}</Text>
|
|
486
|
+
</Button>
|
|
487
|
+
<Button
|
|
488
|
+
chromeless
|
|
489
|
+
size={sizeToken}
|
|
490
|
+
compact={compact}
|
|
491
|
+
onPress={handleDone}
|
|
492
|
+
aria-label={t("Done")}
|
|
493
|
+
>
|
|
494
|
+
<Text color="$color12" fontWeight="700">
|
|
495
|
+
{t("Done")}
|
|
496
|
+
</Text>
|
|
497
|
+
</Button>
|
|
498
|
+
</XStack>
|
|
499
|
+
<YStack flex={1}>
|
|
500
|
+
{TentapEditor ? (
|
|
501
|
+
<TentapEditor
|
|
502
|
+
ref={internalRef}
|
|
503
|
+
{...editorProps}
|
|
504
|
+
initialContent={committed.html}
|
|
505
|
+
initialJSON={committed.json ?? undefined}
|
|
506
|
+
autoFocus={editorProps.autoFocus ?? true}
|
|
507
|
+
editable
|
|
508
|
+
fill
|
|
509
|
+
onChange={(html: string, json: any) => {
|
|
510
|
+
draftHtml.current = html;
|
|
511
|
+
draftJson.current = json;
|
|
512
|
+
}}
|
|
513
|
+
onStateChange={handleStateChange}
|
|
514
|
+
hasError={false}
|
|
515
|
+
/>
|
|
516
|
+
) : (
|
|
517
|
+
<View
|
|
518
|
+
flex={1}
|
|
519
|
+
justifyContent="center"
|
|
520
|
+
alignItems="center"
|
|
521
|
+
padding="$4"
|
|
522
|
+
backgroundColor="$orange2"
|
|
523
|
+
accessibilityRole="alert"
|
|
524
|
+
>
|
|
525
|
+
<TentapUnavailableMessage detail={tentapLoadError} />
|
|
526
|
+
</View>
|
|
527
|
+
)}
|
|
528
|
+
</YStack>
|
|
529
|
+
{showToolbar && (
|
|
530
|
+
<FixedToolbar
|
|
531
|
+
editorRef={internalRef}
|
|
532
|
+
state={editorState}
|
|
533
|
+
sections={sections}
|
|
534
|
+
docked="bottom"
|
|
535
|
+
/>
|
|
536
|
+
)}
|
|
537
|
+
</SafeAreaView>
|
|
538
|
+
</KeyboardAvoidingView>
|
|
539
|
+
</YStack>
|
|
144
540
|
)}
|
|
145
|
-
</
|
|
541
|
+
</Modal>
|
|
146
542
|
</RichEditorContext.Provider>
|
|
147
543
|
);
|
|
148
544
|
},
|
|
@@ -150,6 +546,12 @@ const RichEditorImpl = forwardRef<RichEditorRef, RichEditorCombinedProps>(
|
|
|
150
546
|
|
|
151
547
|
RichEditorImpl.displayName = "RichEditor";
|
|
152
548
|
|
|
549
|
+
const styles = StyleSheet.create({
|
|
550
|
+
flex: {
|
|
551
|
+
flex: 1,
|
|
552
|
+
},
|
|
553
|
+
});
|
|
554
|
+
|
|
153
555
|
// ===========================================================================
|
|
154
556
|
// Compound Component
|
|
155
557
|
// ===========================================================================
|
|
@@ -157,5 +559,5 @@ RichEditorImpl.displayName = "RichEditor";
|
|
|
157
559
|
export const RichEditor = withStaticProperties(RichEditorImpl, {
|
|
158
560
|
FixedToolbar,
|
|
159
561
|
BubbleToolbar: NativeBubbleToolbar,
|
|
160
|
-
Editor: TentapEditor ??
|
|
562
|
+
Editor: TentapEditor ?? TentapUnavailableEditor,
|
|
161
563
|
});
|