sykpcomposer 0.0.384 → 0.0.385
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/{dist/index.html → index.html} +13 -14
- package/index.ts +1 -0
- package/package.json +60 -76
- package/postcss.config.cjs +6 -0
- package/{dist → public}/assets/icons/3-columns.svg +3 -3
- package/{dist → public}/assets/icons/LICENSE.md +5 -5
- package/{dist → public}/assets/icons/add-sign.svg +3 -3
- package/{dist → public}/assets/icons/file-earmark-text.svg +3 -3
- package/{dist → public}/assets/icons/minus-sign.svg +3 -3
- package/{dist → public}/assets/icons/scissors.svg +2 -2
- package/public/index.html +43 -0
- package/{dist → public}/manifest.json +25 -25
- package/{dist → public}/robots.txt +3 -3
- package/src/index.tsx +8 -0
- package/src/lexical/App.tsx +139 -0
- package/src/lexical/Editor.tsx +496 -0
- package/src/lexical/appSettings.ts +34 -0
- package/src/lexical/codoxCollab.js +11 -0
- package/src/lexical/commenting/index.ts +451 -0
- package/src/lexical/context/SettingsContext.tsx +81 -0
- package/src/lexical/context/SharedAutocompleteContext.tsx +71 -0
- package/src/lexical/context/SharedHistoryContext.tsx +35 -0
- package/src/lexical/hooks/useModal.tsx +60 -0
- package/src/lexical/hooks/useReport.ts +64 -0
- package/src/lexical/http.ts +67 -0
- package/src/lexical/images/cat-typing.gif +0 -0
- package/src/lexical/images/emoji/1F600.png +0 -0
- package/src/lexical/images/emoji/1F641.png +0 -0
- package/src/lexical/images/emoji/1F642.png +0 -0
- package/src/lexical/images/emoji/2764.png +0 -0
- package/src/lexical/images/emoji/LICENSE.md +5 -0
- package/src/lexical/images/icons/3-columns.svg +3 -0
- package/src/lexical/images/icons/LICENSE.md +5 -0
- package/src/lexical/images/icons/add-sign.svg +3 -0
- package/src/lexical/images/icons/arrow-clockwise.svg +1 -0
- package/src/lexical/images/icons/arrow-counterclockwise.svg +1 -0
- package/src/lexical/images/icons/bg-color.svg +1 -0
- package/src/lexical/images/icons/camera.svg +1 -0
- package/src/lexical/images/icons/card-checklist.svg +1 -0
- package/src/lexical/images/icons/caret-right-fill.svg +1 -0
- package/src/lexical/images/icons/chat-left-text.svg +1 -0
- package/src/lexical/images/icons/chat-right-dots.svg +1 -0
- package/src/lexical/images/icons/chat-right-text.svg +1 -0
- package/src/lexical/images/icons/chat-right.svg +1 -0
- package/src/lexical/images/icons/chat-square-quote.svg +1 -0
- package/src/lexical/images/icons/chevron-down.svg +1 -0
- package/src/lexical/images/icons/clipboard.svg +1 -0
- package/src/lexical/images/icons/close.svg +1 -0
- package/src/lexical/images/icons/code.svg +1 -0
- package/src/lexical/images/icons/comments.svg +1 -0
- package/src/lexical/images/icons/copy.svg +1 -0
- package/src/lexical/images/icons/diagram-2.svg +1 -0
- package/src/lexical/images/icons/download.svg +1 -0
- package/src/lexical/images/icons/draggable-block-menu.svg +1 -0
- package/src/lexical/images/icons/dropdown-more.svg +1 -0
- package/src/lexical/images/icons/figma.svg +1 -0
- package/src/lexical/images/icons/file-earmark-text.svg +4 -0
- package/src/lexical/images/icons/file-image.svg +1 -0
- package/src/lexical/images/icons/filetype-gif.svg +1 -0
- package/src/lexical/images/icons/font-color.svg +1 -0
- package/src/lexical/images/icons/font-family.svg +1 -0
- package/src/lexical/images/icons/gear.svg +1 -0
- package/src/lexical/images/icons/horizontal-rule.svg +1 -0
- package/src/lexical/images/icons/indent.svg +1 -0
- package/src/lexical/images/icons/journal-code.svg +1 -0
- package/src/lexical/images/icons/journal-text.svg +1 -0
- package/src/lexical/images/icons/justify.svg +1 -0
- package/src/lexical/images/icons/link.svg +1 -0
- package/src/lexical/images/icons/list-ol.svg +1 -0
- package/src/lexical/images/icons/list-ul.svg +1 -0
- package/src/lexical/images/icons/lock-fill.svg +1 -0
- package/src/lexical/images/icons/lock.svg +1 -0
- package/src/lexical/images/icons/markdown.svg +1 -0
- package/src/lexical/images/icons/mic.svg +1 -0
- package/src/lexical/images/icons/minus-sign.svg +3 -0
- package/src/lexical/images/icons/outdent.svg +1 -0
- package/src/lexical/images/icons/paint-bucket.svg +1 -0
- package/src/lexical/images/icons/palette.svg +1 -0
- package/src/lexical/images/icons/pencil-fill.svg +1 -0
- package/src/lexical/images/icons/plug-fill.svg +1 -0
- package/src/lexical/images/icons/plug.svg +1 -0
- package/src/lexical/images/icons/plus-slash-minus.svg +1 -0
- package/src/lexical/images/icons/plus.svg +1 -0
- package/src/lexical/images/icons/prettier-error.svg +1 -0
- package/src/lexical/images/icons/prettier.svg +1 -0
- package/src/lexical/images/icons/scissors.svg +3 -0
- package/src/lexical/images/icons/send.svg +1 -0
- package/src/lexical/images/icons/square-check.svg +1 -0
- package/src/lexical/images/icons/sticky.svg +1 -0
- package/src/lexical/images/icons/success-alt.svg +1 -0
- package/src/lexical/images/icons/success.svg +1 -0
- package/src/lexical/images/icons/table.svg +1 -0
- package/src/lexical/images/icons/text-center.svg +1 -0
- package/src/lexical/images/icons/text-left.svg +1 -0
- package/src/lexical/images/icons/text-paragraph.svg +1 -0
- package/src/lexical/images/icons/text-right.svg +1 -0
- package/src/lexical/images/icons/trash.svg +1 -0
- package/src/lexical/images/icons/trash3.svg +1 -0
- package/src/lexical/images/icons/tweet.svg +1 -0
- package/src/lexical/images/icons/type-bold.svg +1 -0
- package/src/lexical/images/icons/type-h1.svg +1 -0
- package/src/lexical/images/icons/type-h2.svg +1 -0
- package/src/lexical/images/icons/type-h3.svg +1 -0
- package/src/lexical/images/icons/type-h4.svg +1 -0
- package/src/lexical/images/icons/type-h5.svg +1 -0
- package/src/lexical/images/icons/type-h6.svg +1 -0
- package/src/lexical/images/icons/type-italic.svg +1 -0
- package/src/lexical/images/icons/type-strikethrough.svg +1 -0
- package/src/lexical/images/icons/type-subscript.svg +1 -0
- package/src/lexical/images/icons/type-superscript.svg +1 -0
- package/src/lexical/images/icons/type-underline.svg +1 -0
- package/src/lexical/images/icons/upload.svg +1 -0
- package/src/lexical/images/icons/user.svg +1 -0
- package/src/lexical/images/icons/youtube.svg +1 -0
- package/src/lexical/images/image/LICENSE.md +5 -0
- package/src/lexical/images/landscape.jpg +0 -0
- package/src/lexical/images/logo.svg +1 -0
- package/src/lexical/images/yellow-flower-small.jpg +0 -0
- package/src/lexical/images/yellow-flower.jpg +0 -0
- package/src/lexical/index.css +1787 -0
- package/src/lexical/nodes/AutocompleteNode.tsx +107 -0
- package/src/lexical/nodes/EmojiNode.tsx +102 -0
- package/src/lexical/nodes/EquationComponent.tsx +132 -0
- package/src/lexical/nodes/FigmaNode.tsx +135 -0
- package/src/lexical/nodes/ImageComponent.tsx +427 -0
- package/src/lexical/nodes/ImageNode.css +43 -0
- package/src/lexical/nodes/ImageNode.tsx +253 -0
- package/src/lexical/nodes/InlineImageComponent.tsx +409 -0
- package/src/lexical/nodes/InlineImageNode.css +94 -0
- package/src/lexical/nodes/InlineImageNode.tsx +294 -0
- package/src/lexical/nodes/KeywordNode.ts +67 -0
- package/src/lexical/nodes/LayoutContainerNode.ts +137 -0
- package/src/lexical/nodes/LayoutItemNode.ts +71 -0
- package/src/lexical/nodes/MentionNode.ts +131 -0
- package/src/lexical/nodes/PageBreakNode/index.css +56 -0
- package/src/lexical/nodes/PageBreakNode/index.tsx +168 -0
- package/src/lexical/nodes/PlaygroundNodes.ts +72 -0
- package/src/lexical/nodes/PollComponent.tsx +248 -0
- package/src/lexical/nodes/PollNode.css +164 -0
- package/src/lexical/nodes/PollNode.tsx +209 -0
- package/src/lexical/nodes/StickyNode.css +37 -0
- package/src/lexical/nodes/TableNode.tsx +93 -0
- package/src/lexical/nodes/TweetNode.tsx +223 -0
- package/src/lexical/nodes/YouTubeNode.tsx +184 -0
- package/src/lexical/plugins/ActionsPlugin/index.tsx +0 -0
- package/src/lexical/plugins/AutoEmbedPlugin/index.tsx +354 -0
- package/src/lexical/plugins/AutoLinkPlugin/index.tsx +32 -0
- package/src/lexical/plugins/AutocompletePlugin/index.tsx +2529 -0
- package/src/lexical/plugins/CodeHighlightPlugin/index.ts +21 -0
- package/src/lexical/plugins/CollapsiblePlugin/Collapsible.css +57 -0
- package/src/lexical/plugins/CollapsiblePlugin/CollapsibleContainerNode.ts +136 -0
- package/src/lexical/plugins/CollapsiblePlugin/CollapsibleContentNode.ts +96 -0
- package/src/lexical/plugins/CollapsiblePlugin/CollapsibleTitleNode.ts +132 -0
- package/src/lexical/plugins/CollapsiblePlugin/index.ts +297 -0
- package/src/lexical/plugins/CommentPlugin/index.css +443 -0
- package/src/lexical/plugins/CommentPlugin/index.tsx +981 -0
- package/src/lexical/plugins/ContextMenuPlugin/index.tsx +244 -0
- package/src/lexical/plugins/DocsPlugin/index.tsx +20 -0
- package/src/lexical/plugins/DragDropPastePlugin/index.ts +51 -0
- package/src/lexical/plugins/DraggableBlockPlugin/index.css +36 -0
- package/src/lexical/plugins/DraggableBlockPlugin/index.tsx +431 -0
- package/src/lexical/plugins/EmojiPickerPlugin/index.tsx +199 -0
- package/src/lexical/plugins/EmojisPlugin/index.ts +79 -0
- package/src/lexical/plugins/FigmaPlugin/index.tsx +40 -0
- package/src/lexical/plugins/FloatingLinkEditorPlugin/index.css +41 -0
- package/src/lexical/plugins/FloatingLinkEditorPlugin/index.tsx +391 -0
- package/src/lexical/plugins/FloatingTextFormatToolbarPlugin/index.css +133 -0
- package/src/lexical/plugins/FloatingTextFormatToolbarPlugin/index.tsx +392 -0
- package/src/lexical/plugins/ImagesPlugin/index.tsx +354 -0
- package/src/lexical/plugins/InlineImagePlugin/index.tsx +343 -0
- package/src/lexical/plugins/KeywordsPlugin/index.ts +56 -0
- package/src/lexical/plugins/LayoutPlugin/InsertLayoutDialog.tsx +56 -0
- package/src/lexical/plugins/LayoutPlugin/LayoutPlugin.tsx +219 -0
- package/src/lexical/plugins/LinkPlugin/index.tsx +16 -0
- package/src/lexical/plugins/ListMaxIndentLevelPlugin/index.ts +86 -0
- package/src/lexical/plugins/MaxLengthPlugin/index.tsx +53 -0
- package/src/lexical/plugins/MentionsPlugin/index.tsx +696 -0
- package/src/lexical/plugins/PageBreakPlugin/index.tsx +57 -0
- package/src/lexical/plugins/PasteLogPlugin/index.tsx +54 -0
- package/src/lexical/plugins/PollPlugin/index.tsx +87 -0
- package/src/lexical/plugins/SpeechToTextPlugin/index.ts +125 -0
- package/src/lexical/plugins/StickyPlugin/index.ts +22 -0
- package/src/lexical/plugins/TabFocusPlugin/index.tsx +65 -0
- package/src/lexical/plugins/TableActionMenuPlugin/index.tsx +791 -0
- package/src/lexical/plugins/TableCellResizer/index.css +12 -0
- package/src/lexical/plugins/TableCellResizer/index.tsx +419 -0
- package/src/lexical/plugins/TableOfContentsPlugin/index.css +87 -0
- package/src/lexical/plugins/TableOfContentsPlugin/index.tsx +197 -0
- package/src/lexical/plugins/TablePlugin.tsx +182 -0
- package/src/lexical/plugins/TestRecorderPlugin/index.tsx +464 -0
- package/src/lexical/plugins/ToolbarPlugin/fontSize.css +44 -0
- package/src/lexical/plugins/ToolbarPlugin/fontSize.tsx +212 -0
- package/src/lexical/plugins/ToolbarPlugin/index.tsx +1001 -0
- package/src/lexical/plugins/TreeViewPlugin/index.tsx +26 -0
- package/src/lexical/plugins/TwitterPlugin/index.ts +41 -0
- package/src/lexical/plugins/TypingPerfPlugin/index.ts +117 -0
- package/src/lexical/plugins/YouTubePlugin/index.ts +41 -0
- package/src/lexical/server/validation.ts +132 -0
- package/src/lexical/themes/CommentEditorTheme.css +13 -0
- package/src/lexical/themes/CommentEditorTheme.ts +20 -0
- package/src/lexical/themes/PlaygroundEditorTheme.css +441 -0
- package/src/lexical/themes/PlaygroundEditorTheme.ts +119 -0
- package/src/lexical/themes/StickyEditorTheme.css +13 -0
- package/src/lexical/themes/StickyEditorTheme.ts +20 -0
- package/src/lexical/ui/Button.css +36 -0
- package/src/lexical/ui/Button.tsx +49 -0
- package/src/lexical/ui/ColorPicker.css +88 -0
- package/src/lexical/ui/ColorPicker.tsx +363 -0
- package/src/lexical/ui/ContentEditable.css +23 -0
- package/src/lexical/ui/ContentEditable.tsx +20 -0
- package/src/lexical/ui/Dialog.css +17 -0
- package/src/lexical/ui/Dialog.tsx +32 -0
- package/src/lexical/ui/DropDown.tsx +259 -0
- package/src/lexical/ui/DropdownColorPicker.tsx +41 -0
- package/src/lexical/ui/EquationEditor.css +38 -0
- package/src/lexical/ui/EquationEditor.tsx +56 -0
- package/src/lexical/ui/FileInput.tsx +38 -0
- package/src/lexical/ui/ImageResizer.tsx +313 -0
- package/src/lexical/ui/Input.css +32 -0
- package/src/lexical/ui/KatexEquationAlterer.css +41 -0
- package/src/lexical/ui/KatexEquationAlterer.tsx +81 -0
- package/src/lexical/ui/KatexRenderer.tsx +54 -0
- package/src/lexical/ui/Modal.css +62 -0
- package/src/lexical/ui/Modal.tsx +106 -0
- package/src/lexical/ui/Placeholder.css +28 -0
- package/src/lexical/ui/Placeholder.tsx +22 -0
- package/src/lexical/ui/Select.css +34 -0
- package/src/lexical/ui/Select.tsx +34 -0
- package/src/lexical/ui/Switch.tsx +36 -0
- package/src/lexical/ui/TextInput.tsx +46 -0
- package/src/lexical/utils/canUseDOM.ts +12 -0
- package/src/lexical/utils/emoji-list.ts +16615 -0
- package/src/lexical/utils/environment.ts +57 -0
- package/src/lexical/utils/getDOMRangeRect.ts +27 -0
- package/src/lexical/utils/getSelectedNode.ts +27 -0
- package/src/lexical/utils/guard.ts +10 -0
- package/src/lexical/utils/invariant.ts +26 -0
- package/src/lexical/utils/isMobileWidth.ts +7 -0
- package/src/lexical/utils/joinClasses.ts +13 -0
- package/src/lexical/utils/point.ts +55 -0
- package/src/lexical/utils/rect.ts +158 -0
- package/src/lexical/utils/setFloatingElemPosition.ts +51 -0
- package/src/lexical/utils/setFloatingElemPositionForLinkEditor.ts +46 -0
- package/src/lexical/utils/swipe.ts +127 -0
- package/src/lexical/utils/url.ts +38 -0
- package/src/lexical/utils/useLayoutEffect.ts +16 -0
- package/sykpcomposer-0.0.273.tgz +0 -0
- package/tailwind.config.cjs +8 -0
- package/tsconfig.json +23 -0
- package/tsconfig.node.json +9 -0
- package/vite.config.ts +26 -0
- package/yjs-wss-db/000015.ldb +0 -0
- package/yjs-wss-db/000018.ldb +0 -0
- package/yjs-wss-db/000019.log +0 -0
- package/yjs-wss-db/CURRENT +1 -0
- package/yjs-wss-db/LOCK +0 -0
- package/yjs-wss-db/LOG +5 -0
- package/yjs-wss-db/LOG.old +5 -0
- package/yjs-wss-db/MANIFEST-000017 +0 -0
- package/dist/assets/ImageComponent-DncIDz48.js +0 -23
- package/dist/assets/ImageComponent-NSP6xs1B.css +0 -1
- package/dist/assets/InlineImageComponent-BefYBd1k.js +0 -1
- package/dist/assets/InlineImageComponent-BnmVdNhp.css +0 -1
- package/dist/assets/LexicalNestedComposer.prod-BGbK0rVf.js +0 -1
- package/dist/assets/PollComponent-Brv_H-Vr.js +0 -1
- package/dist/assets/PollComponent-CymKlNoB.css +0 -1
- package/dist/assets/emoji-list-D_N31RbD.js +0 -1
- package/dist/assets/index-BR8wqG2P.js +0 -1441
- package/dist/assets/index-CDE-KF5Y.css +0 -1
- /package/{dist → public}/assets/icons/arrow-clockwise.svg +0 -0
- /package/{dist → public}/assets/icons/arrow-counterclockwise.svg +0 -0
- /package/{dist → public}/assets/icons/bg-color.svg +0 -0
- /package/{dist → public}/assets/icons/camera.svg +0 -0
- /package/{dist → public}/assets/icons/card-checklist.svg +0 -0
- /package/{dist → public}/assets/icons/caret-right-fill.svg +0 -0
- /package/{dist → public}/assets/icons/chat-left-text.svg +0 -0
- /package/{dist → public}/assets/icons/chat-right-dots.svg +0 -0
- /package/{dist → public}/assets/icons/chat-right-text.svg +0 -0
- /package/{dist → public}/assets/icons/chat-right.svg +0 -0
- /package/{dist → public}/assets/icons/chat-square-quote.svg +0 -0
- /package/{dist → public}/assets/icons/chevron-down.svg +0 -0
- /package/{dist → public}/assets/icons/clipboard.svg +0 -0
- /package/{dist → public}/assets/icons/close.svg +0 -0
- /package/{dist → public}/assets/icons/code.svg +0 -0
- /package/{dist → public}/assets/icons/comments.svg +0 -0
- /package/{dist → public}/assets/icons/copy.svg +0 -0
- /package/{dist → public}/assets/icons/diagram-2.svg +0 -0
- /package/{dist → public}/assets/icons/download.svg +0 -0
- /package/{dist → public}/assets/icons/draggable-block-menu.svg +0 -0
- /package/{dist → public}/assets/icons/dropdown-more.svg +0 -0
- /package/{dist → public}/assets/icons/figma.svg +0 -0
- /package/{dist → public}/assets/icons/file-image.svg +0 -0
- /package/{dist → public}/assets/icons/filetype-gif.svg +0 -0
- /package/{dist → public}/assets/icons/font-color.svg +0 -0
- /package/{dist → public}/assets/icons/font-family.svg +0 -0
- /package/{dist → public}/assets/icons/gear.svg +0 -0
- /package/{dist → public}/assets/icons/horizontal-rule.svg +0 -0
- /package/{dist → public}/assets/icons/indent.svg +0 -0
- /package/{dist → public}/assets/icons/journal-code.svg +0 -0
- /package/{dist → public}/assets/icons/journal-text.svg +0 -0
- /package/{dist → public}/assets/icons/justify.svg +0 -0
- /package/{dist → public}/assets/icons/link.svg +0 -0
- /package/{dist → public}/assets/icons/list-ol.svg +0 -0
- /package/{dist → public}/assets/icons/list-ul.svg +0 -0
- /package/{dist → public}/assets/icons/lock-fill.svg +0 -0
- /package/{dist → public}/assets/icons/lock.svg +0 -0
- /package/{dist → public}/assets/icons/markdown.svg +0 -0
- /package/{dist → public}/assets/icons/mic.svg +0 -0
- /package/{dist → public}/assets/icons/outdent.svg +0 -0
- /package/{dist → public}/assets/icons/paint-bucket.svg +0 -0
- /package/{dist → public}/assets/icons/palette.svg +0 -0
- /package/{dist → public}/assets/icons/pdf-svgrepo-com.svg +0 -0
- /package/{dist → public}/assets/icons/pencil-fill.svg +0 -0
- /package/{dist → public}/assets/icons/plug-fill.svg +0 -0
- /package/{dist → public}/assets/icons/plug.svg +0 -0
- /package/{dist → public}/assets/icons/plus-slash-minus.svg +0 -0
- /package/{dist → public}/assets/icons/plus.svg +0 -0
- /package/{dist → public}/assets/icons/prettier-error.svg +0 -0
- /package/{dist → public}/assets/icons/prettier.svg +0 -0
- /package/{dist → public}/assets/icons/send.svg +0 -0
- /package/{dist → public}/assets/icons/square-check.svg +0 -0
- /package/{dist → public}/assets/icons/sticky.svg +0 -0
- /package/{dist → public}/assets/icons/success-alt.svg +0 -0
- /package/{dist → public}/assets/icons/success.svg +0 -0
- /package/{dist → public}/assets/icons/table.svg +0 -0
- /package/{dist → public}/assets/icons/text-center.svg +0 -0
- /package/{dist → public}/assets/icons/text-left.svg +0 -0
- /package/{dist → public}/assets/icons/text-paragraph.svg +0 -0
- /package/{dist → public}/assets/icons/text-right.svg +0 -0
- /package/{dist → public}/assets/icons/trash.svg +0 -0
- /package/{dist → public}/assets/icons/trash3.svg +0 -0
- /package/{dist → public}/assets/icons/tweet.svg +0 -0
- /package/{dist → public}/assets/icons/type-bold.svg +0 -0
- /package/{dist → public}/assets/icons/type-h1.svg +0 -0
- /package/{dist → public}/assets/icons/type-h2.svg +0 -0
- /package/{dist → public}/assets/icons/type-h3.svg +0 -0
- /package/{dist → public}/assets/icons/type-h4.svg +0 -0
- /package/{dist → public}/assets/icons/type-h5.svg +0 -0
- /package/{dist → public}/assets/icons/type-h6.svg +0 -0
- /package/{dist → public}/assets/icons/type-italic.svg +0 -0
- /package/{dist → public}/assets/icons/type-strikethrough.svg +0 -0
- /package/{dist → public}/assets/icons/type-subscript.svg +0 -0
- /package/{dist → public}/assets/icons/type-superscript.svg +0 -0
- /package/{dist → public}/assets/icons/type-underline.svg +0 -0
- /package/{dist → public}/assets/icons/upload.svg +0 -0
- /package/{dist → public}/assets/icons/user.svg +0 -0
- /package/{dist → public}/assets/icons/youtube.svg +0 -0
- /package/{dist → public}/favicon.ico +0 -0
- /package/{dist → public}/logo192.png +0 -0
- /package/{dist → public}/logo512.png +0 -0
- /package/{dist → public}/vite.svg +0 -0
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>Vite + React + TS</title>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
</html>
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>Vite + React + TS</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="root"></div>
|
|
11
|
+
<script type="module" src="/src/index.tsx"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
package/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Editor } from "./src/lexical/Editor";
|
package/package.json
CHANGED
|
@@ -1,76 +1,60 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "sykpcomposer",
|
|
3
|
-
"description": "code for captions",
|
|
4
|
-
"private": false,
|
|
5
|
-
"version": "0.0.
|
|
6
|
-
"type": "module",
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"react": "
|
|
51
|
-
"react-
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"devDependencies": {
|
|
62
|
-
"@testing-library/jest-dom": "^6.6.3",
|
|
63
|
-
"@testing-library/react": "^16.2.0",
|
|
64
|
-
"@types/jest": "^29.5.14",
|
|
65
|
-
"@types/react": "^18.0.26",
|
|
66
|
-
"@types/react-dom": "^18.0.9",
|
|
67
|
-
"@vitejs/plugin-react-swc": "^3.8.0",
|
|
68
|
-
"autoprefixer": "^10.4.13",
|
|
69
|
-
"esbuild": "^0.13.4",
|
|
70
|
-
"jest": "^29.7.0",
|
|
71
|
-
"postcss": "^8.4.20",
|
|
72
|
-
"typescript": "^4.9.3",
|
|
73
|
-
"vite": "^4.0.0",
|
|
74
|
-
"vite-plugin-dts": "^1.7.1"
|
|
75
|
-
}
|
|
76
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "sykpcomposer",
|
|
3
|
+
"description": "code for captions",
|
|
4
|
+
"private": false,
|
|
5
|
+
"version": "0.0.385",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"dev": "vite",
|
|
9
|
+
"build": "vite build",
|
|
10
|
+
"prepare": "npm run build",
|
|
11
|
+
"preview": "vite preview",
|
|
12
|
+
"test": "jest"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@codoxhq/lexical-provider": "1.0.4",
|
|
16
|
+
"@lexical/headless": "0.20.0",
|
|
17
|
+
"@lexical/list": "0.14.2",
|
|
18
|
+
"@lexical/mark": "0.14.2",
|
|
19
|
+
"@lexical/react": "0.14.2",
|
|
20
|
+
"@lexical/rich-text": "0.14.2",
|
|
21
|
+
"@lexical/table": "0.14.2",
|
|
22
|
+
"@types/lodash-es": "4.17.12",
|
|
23
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
24
|
+
"buffer": "6.0.3",
|
|
25
|
+
"docx": "9.1.1",
|
|
26
|
+
"file-saver": "2.0.5",
|
|
27
|
+
"jquery": "3.7.1",
|
|
28
|
+
"jspdf": "2.5.2",
|
|
29
|
+
"jspdf-autotable": "3.8.4",
|
|
30
|
+
"katex": "^0.15.2",
|
|
31
|
+
"lexical": "0.14.2",
|
|
32
|
+
"lodash-es": "4.17.21",
|
|
33
|
+
"mammoth": "1.8.0",
|
|
34
|
+
"react": "17.0.2",
|
|
35
|
+
"react-dom": "17.0.2",
|
|
36
|
+
"react-helmet": "6.1.0",
|
|
37
|
+
"react-image-crop": "11.0.7",
|
|
38
|
+
"styled-components": "5.3.11",
|
|
39
|
+
"sykpcomposer": "0.0.40",
|
|
40
|
+
"tailwindcss": "3.2.4",
|
|
41
|
+
"y-webrtc": "10.3.0",
|
|
42
|
+
"y-websocket": "2.0.2",
|
|
43
|
+
"yjs": "13.6.15"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@testing-library/jest-dom": "6.6.3",
|
|
47
|
+
"@testing-library/react": "16.2.0",
|
|
48
|
+
"@types/jest": "29.5.14",
|
|
49
|
+
"@types/react": "18.0.26",
|
|
50
|
+
"@types/react-dom": "18.0.9",
|
|
51
|
+
"@vitejs/plugin-react-swc": "3.8.0",
|
|
52
|
+
"autoprefixer": "10.4.13",
|
|
53
|
+
"esbuild": "0.13.4",
|
|
54
|
+
"jest": "29.7.0",
|
|
55
|
+
"postcss": "8.4.20",
|
|
56
|
+
"typescript": "4.9.3",
|
|
57
|
+
"vite": "4.0.0",
|
|
58
|
+
"vite-plugin-dts": "1.7.1"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-layout-three-columns" viewBox="0 0 16 16">
|
|
2
|
-
<path d="M0 1.5A1.5 1.5 0 0 1 1.5 0h13A1.5 1.5 0 0 1 16 1.5v13a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 0 14.5v-13zM1.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 .5.5H5V1H1.5zM10 15V1H6v14h4zm1 0h3.5a.5.5 0 0 0 .5-.5v-13a.5.5 0 0 0-.5-.5H11v14z"/>
|
|
3
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-layout-three-columns" viewBox="0 0 16 16">
|
|
2
|
+
<path d="M0 1.5A1.5 1.5 0 0 1 1.5 0h13A1.5 1.5 0 0 1 16 1.5v13a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 0 14.5v-13zM1.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 .5.5H5V1H1.5zM10 15V1H6v14h4zm1 0h3.5a.5.5 0 0 0 .5-.5v-13a.5.5 0 0 0-.5-.5H11v14z"/>
|
|
3
|
+
</svg>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
Bootstrap Icons
|
|
2
|
-
https://icons.getbootstrap.com
|
|
3
|
-
|
|
4
|
-
Licensed under MIT license
|
|
5
|
-
https://github.com/twbs/icons/blob/main/LICENSE.md
|
|
1
|
+
Bootstrap Icons
|
|
2
|
+
https://icons.getbootstrap.com
|
|
3
|
+
|
|
4
|
+
Licensed under MIT license
|
|
5
|
+
https://github.com/twbs/icons/blob/main/LICENSE.md
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 17">
|
|
2
|
-
<path fill="" d="M10 7H6V3H4v4H0v2h4v4h2V9h4z"/>
|
|
3
|
-
</svg>
|
|
1
|
+
<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 17">
|
|
2
|
+
<path fill="" d="M10 7H6V3H4v4H0v2h4v4h2V9h4z"/>
|
|
3
|
+
</svg>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-file-earmark-text" viewBox="0 0 16 16">
|
|
2
|
-
<path d="M5.5 7a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1h-5zM5 9.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5z"/>
|
|
3
|
-
<path d="M9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4.5L9.5 0zm0 1v2A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5z"/>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-file-earmark-text" viewBox="0 0 16 16">
|
|
2
|
+
<path d="M5.5 7a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1h-5zM5 9.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5z"/>
|
|
3
|
+
<path d="M9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4.5L9.5 0zm0 1v2A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5z"/>
|
|
4
4
|
</svg>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<svg width="18" height="18" version="1.2" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 17">
|
|
2
|
-
<path d="M0 7h8v2H0z"/>
|
|
3
|
-
</svg>
|
|
1
|
+
<svg width="18" height="18" version="1.2" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 17">
|
|
2
|
+
<path d="M0 7h8v2H0z"/>
|
|
3
|
+
</svg>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-scissors" viewBox="0 0 16 16" transform="matrix(-1, 0, 0, 1, 0, 0)rotate(270)">
|
|
2
|
-
<path d="M3.5 3.5c-.614-.884-.074-1.962.858-2.5L8 7.226 11.642 1c.932.538 1.472 1.616.858 2.5L8.81 8.61l1.556 2.661a2.5 2.5 0 1 1-.794.637L8 9.73l-1.572 2.177a2.5 2.5 0 1 1-.794-.637L7.19 8.61 3.5 3.5zm2.5 10a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0zm7 0a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0z"/>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-scissors" viewBox="0 0 16 16" transform="matrix(-1, 0, 0, 1, 0, 0)rotate(270)">
|
|
2
|
+
<path d="M3.5 3.5c-.614-.884-.074-1.962.858-2.5L8 7.226 11.642 1c.932.538 1.472 1.616.858 2.5L8.81 8.61l1.556 2.661a2.5 2.5 0 1 1-.794.637L8 9.73l-1.572 2.177a2.5 2.5 0 1 1-.794-.637L7.19 8.61 3.5 3.5zm2.5 10a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0zm7 0a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0z"/>
|
|
3
3
|
</svg>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
+
<meta name="theme-color" content="#000000" />
|
|
8
|
+
<meta
|
|
9
|
+
name="description"
|
|
10
|
+
content="Web site created using create-react-app"
|
|
11
|
+
/>
|
|
12
|
+
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
|
13
|
+
<!--
|
|
14
|
+
manifest.json provides metadata used when your web app is installed on a
|
|
15
|
+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
|
16
|
+
-->
|
|
17
|
+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
|
18
|
+
<!--
|
|
19
|
+
Notice the use of %PUBLIC_URL% in the tags above.
|
|
20
|
+
It will be replaced with the URL of the `public` folder during the build.
|
|
21
|
+
Only files inside the `public` folder can be referenced from the HTML.
|
|
22
|
+
|
|
23
|
+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
|
24
|
+
work correctly both with client-side routing and a non-root public URL.
|
|
25
|
+
Learn how to configure a non-root public URL by running `npm run build`.
|
|
26
|
+
-->
|
|
27
|
+
<title>React App</title>
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
31
|
+
<div id="root"></div>
|
|
32
|
+
<!--
|
|
33
|
+
This HTML file is a template.
|
|
34
|
+
If you open it directly in the browser, you will see an empty page.
|
|
35
|
+
|
|
36
|
+
You can add webfonts, meta tags, or analytics to this file.
|
|
37
|
+
The build step will place the bundled scripts into the <body> tag.
|
|
38
|
+
|
|
39
|
+
To begin the development, run `npm start` or `yarn start`.
|
|
40
|
+
To create a production bundle, use `npm run build` or `yarn build`.
|
|
41
|
+
-->
|
|
42
|
+
</body>
|
|
43
|
+
</html>
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
{
|
|
2
|
-
"short_name": "React App",
|
|
3
|
-
"name": "Create React App Sample",
|
|
4
|
-
"icons": [
|
|
5
|
-
{
|
|
6
|
-
"src": "favicon.ico",
|
|
7
|
-
"sizes": "64x64 32x32 24x24 16x16",
|
|
8
|
-
"type": "image/x-icon"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"src": "logo192.png",
|
|
12
|
-
"type": "image/png",
|
|
13
|
-
"sizes": "192x192"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"src": "logo512.png",
|
|
17
|
-
"type": "image/png",
|
|
18
|
-
"sizes": "512x512"
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"start_url": ".",
|
|
22
|
-
"display": "standalone",
|
|
23
|
-
"theme_color": "#000000",
|
|
24
|
-
"background_color": "#ffffff"
|
|
25
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"short_name": "React App",
|
|
3
|
+
"name": "Create React App Sample",
|
|
4
|
+
"icons": [
|
|
5
|
+
{
|
|
6
|
+
"src": "favicon.ico",
|
|
7
|
+
"sizes": "64x64 32x32 24x24 16x16",
|
|
8
|
+
"type": "image/x-icon"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"src": "logo192.png",
|
|
12
|
+
"type": "image/png",
|
|
13
|
+
"sizes": "192x192"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"src": "logo512.png",
|
|
17
|
+
"type": "image/png",
|
|
18
|
+
"sizes": "512x512"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"start_url": ".",
|
|
22
|
+
"display": "standalone",
|
|
23
|
+
"theme_color": "#000000",
|
|
24
|
+
"background_color": "#ffffff"
|
|
25
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# https://www.robotstxt.org/robotstxt.html
|
|
2
|
-
User-agent: *
|
|
3
|
-
Disallow:
|
|
1
|
+
# https://www.robotstxt.org/robotstxt.html
|
|
2
|
+
User-agent: *
|
|
3
|
+
Disallow:
|
package/src/index.tsx
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom'; // Import from 'react-dom'
|
|
3
|
+
import App from './lexical/App'; // Ensure correct path
|
|
4
|
+
//@ts-ignore
|
|
5
|
+
ReactDOM.render(
|
|
6
|
+
<App />,
|
|
7
|
+
document.getElementById('root') as HTMLElement // Typecasting to HTMLElement
|
|
8
|
+
);
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { Editor } from './Editor';
|
|
3
|
+
|
|
4
|
+
function App() {
|
|
5
|
+
const [initialEditorState, setInitialEditorState] = useState<any>({});
|
|
6
|
+
const [CollabApiKey, setCollabApiKey] = useState("");
|
|
7
|
+
const [docId, setDocId] = useState('id_1');
|
|
8
|
+
const [showEd,setshowEd] = useState(false);
|
|
9
|
+
const [isValidEditorState,setisValidEditorState] = useState(false);
|
|
10
|
+
const [userObjData, setUserObj] = useState(
|
|
11
|
+
{
|
|
12
|
+
userName: 'sample',
|
|
13
|
+
userId: 1,
|
|
14
|
+
userEmail: 'sample@gmail.com',
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
const mentionItems = [
|
|
18
|
+
"tarun",
|
|
19
|
+
'Niraj',
|
|
20
|
+
'Borvo the Hutt',
|
|
21
|
+
'Akash',
|
|
22
|
+
'C-3PO',
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
function convertToJSON(inputString: any) {
|
|
26
|
+
// Fixing property names by replacing unquoted keys with double quotes
|
|
27
|
+
const fixedJsonString = inputString
|
|
28
|
+
.replace(/([a-zA-Z0-9_]+):/g, '"$1":').replace(/'(.*?)'/g, '"$1"');
|
|
29
|
+
|
|
30
|
+
try {
|
|
31
|
+
const jsonObject = JSON.parse(fixedJsonString);
|
|
32
|
+
console.log(jsonObject);
|
|
33
|
+
return jsonObject;
|
|
34
|
+
} catch (error) {
|
|
35
|
+
console.error("Error parsing JSON:", error);
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
const handleMessage = (event:any) => {
|
|
42
|
+
if (event.data) {
|
|
43
|
+
let eventData = JSON.parse(event.data);
|
|
44
|
+
if (eventData) {
|
|
45
|
+
console.log("eventData from spinverse 11111111 ==>", eventData);
|
|
46
|
+
console.log("eventData from spinverse 222222222==>", convertToJSON(eventData.initialEditorState));
|
|
47
|
+
setInitialEditorState(JSON.parse(eventData?.initialEditorState));
|
|
48
|
+
setCollabApiKey(eventData?.key);
|
|
49
|
+
setDocId(eventData?.doc_Id);
|
|
50
|
+
setUserObj(eventData?.userObj);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
window.addEventListener("message", handleMessage);
|
|
55
|
+
return () => {
|
|
56
|
+
window.removeEventListener("message", handleMessage);
|
|
57
|
+
};
|
|
58
|
+
}, []);
|
|
59
|
+
|
|
60
|
+
const sendEditorDataToParent = (editorData:any) => {
|
|
61
|
+
const message = {
|
|
62
|
+
action: 'saveEditorData',
|
|
63
|
+
editorData: editorData,
|
|
64
|
+
};
|
|
65
|
+
window.parent.postMessage(message, "*");
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const Empty =
|
|
69
|
+
{
|
|
70
|
+
root: {
|
|
71
|
+
children: [
|
|
72
|
+
{
|
|
73
|
+
children: [
|
|
74
|
+
{
|
|
75
|
+
detail: 0,
|
|
76
|
+
format: "",
|
|
77
|
+
mode: "normal",
|
|
78
|
+
style: "",
|
|
79
|
+
text: "Welcome A",
|
|
80
|
+
type: "text",
|
|
81
|
+
version: 1,
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
direction: "ltr",
|
|
85
|
+
format: "",
|
|
86
|
+
indent: 0,
|
|
87
|
+
type: "paragraph",
|
|
88
|
+
version: 1,
|
|
89
|
+
textFormat: 0,
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
direction: "ltr",
|
|
93
|
+
format: "",
|
|
94
|
+
indent: 0,
|
|
95
|
+
type: "root",
|
|
96
|
+
version: 1,
|
|
97
|
+
},
|
|
98
|
+
comments: []
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
React.useEffect(() => {
|
|
102
|
+
console.log("useEffect props",initialEditorState,userObjData)
|
|
103
|
+
if(initialEditorState && initialEditorState.root && initialEditorState.root.children && userObjData && userObjData.userName){
|
|
104
|
+
setTimeout(() => {
|
|
105
|
+
setisValidEditorState(true)
|
|
106
|
+
}, 2000);
|
|
107
|
+
}
|
|
108
|
+
else{
|
|
109
|
+
setisValidEditorState(false)
|
|
110
|
+
}
|
|
111
|
+
},[initialEditorState,userObjData])
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
console.log("Iframe rendered",initialEditorState,userObjData)
|
|
116
|
+
|
|
117
|
+
return (
|
|
118
|
+
<div className="min-h-screen bg-gray-100 flex flex-col">
|
|
119
|
+
<div className="flex-1 container mx-auto px-4">
|
|
120
|
+
<div className="bg-white rounded-lg shadow-md p-4">
|
|
121
|
+
{true ? (
|
|
122
|
+
<Editor
|
|
123
|
+
initialEditorState={initialEditorState}
|
|
124
|
+
docId={docId}
|
|
125
|
+
userObj={userObjData}
|
|
126
|
+
CollabApiKey={"aee67aec-6fad-4e92-b780-bc9fb7f16672"}
|
|
127
|
+
mentionItems={mentionItems}
|
|
128
|
+
sendEditorDataToParent={sendEditorDataToParent}
|
|
129
|
+
/>
|
|
130
|
+
) : (
|
|
131
|
+
<div>Loading editor...</div>
|
|
132
|
+
)}
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export default App;
|