ct-rich-text-editor 1.3.25 → 1.3.26
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/{html2pdf.bundle-915945f4.js → html2pdf.bundle-41a72ab2.js} +2 -2
- package/dist/{html2pdf.bundle-915945f4.js.map → html2pdf.bundle-41a72ab2.js.map} +1 -1
- package/dist/{html2pdf.bundle.min-53a200a1.js → html2pdf.bundle.min-1f376935.js} +2 -2
- package/dist/{html2pdf.bundle.min-53a200a1.js.map → html2pdf.bundle.min-1f376935.js.map} +1 -1
- package/dist/{index-8daaa42a.js → index-01a6d110.js} +2 -2
- package/dist/{index-8daaa42a.js.map → index-01a6d110.js.map} +1 -1
- package/dist/{index-f8c2acae.js → index-9b519a99.js} +2 -2
- package/dist/{index-f8c2acae.js.map → index-9b519a99.js.map} +1 -1
- package/dist/{index-d46a32ad.js → index-a2107b7c.js} +126 -129
- package/dist/{index-d46a32ad.js.map → index-a2107b7c.js.map} +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1478,7 +1478,7 @@ const AiTextTransform = async ({ content, apiKey }) => {
|
|
|
1478
1478
|
const AI_ACTION_COMMAND = createCommand(
|
|
1479
1479
|
"AI_ACTION_COMMAND"
|
|
1480
1480
|
);
|
|
1481
|
-
const ImageView = React__default.lazy(() => import("./index-
|
|
1481
|
+
const ImageView = React__default.lazy(() => import("./index-01a6d110.js"));
|
|
1482
1482
|
function isGoogleDocCheckboxImg(img) {
|
|
1483
1483
|
return img.parentElement != null && img.parentElement.tagName === "LI" && img.previousSibling === null && img.getAttribute("aria-roledescription") === "checkbox";
|
|
1484
1484
|
}
|
|
@@ -15370,7 +15370,7 @@ const EmbedComponent = ({ url, displayType, alignment, nodeKey }) => {
|
|
|
15370
15370
|
}
|
|
15371
15371
|
);
|
|
15372
15372
|
};
|
|
15373
|
-
const FileComponent = React$1.lazy(() => import("./index-
|
|
15373
|
+
const FileComponent = React$1.lazy(() => import("./index-9b519a99.js"));
|
|
15374
15374
|
function convertFileElement(domNode) {
|
|
15375
15375
|
if (domNode instanceof HTMLDivElement) {
|
|
15376
15376
|
const dataUrl = domNode.getAttribute("data-lexical-file-src");
|
|
@@ -20486,10 +20486,10 @@ const PDF_CONFIG = {
|
|
|
20486
20486
|
};
|
|
20487
20487
|
const loadHtml2Pdf = async () => {
|
|
20488
20488
|
try {
|
|
20489
|
-
const mod = await import("./html2pdf.bundle.min-
|
|
20489
|
+
const mod = await import("./html2pdf.bundle.min-1f376935.js").then((n) => n.h);
|
|
20490
20490
|
return (mod == null ? void 0 : mod.default) || mod;
|
|
20491
20491
|
} catch {
|
|
20492
|
-
const mod2 = await import("./html2pdf.bundle-
|
|
20492
|
+
const mod2 = await import("./html2pdf.bundle-41a72ab2.js").then((n) => n.h);
|
|
20493
20493
|
return (mod2 == null ? void 0 : mod2.default) || mod2;
|
|
20494
20494
|
}
|
|
20495
20495
|
};
|
|
@@ -38323,141 +38323,138 @@ const ConfigurableEditor = ({
|
|
|
38323
38323
|
const editorInitialConfig = {
|
|
38324
38324
|
...initialConfig
|
|
38325
38325
|
};
|
|
38326
|
-
return /* @__PURE__ */
|
|
38327
|
-
/* @__PURE__ */ jsx(
|
|
38328
|
-
|
|
38329
|
-
|
|
38330
|
-
/* @__PURE__ */ jsxs(Stack, { children: [
|
|
38331
|
-
config.enableToolbar && /* @__PURE__ */ jsxs("div", { className: "cteditor-flex cteditor-justify-between cteditor-items-center cteditor-mb-2 cteditor-sticky cteditor-top-2 cteditor-z-50", children: [
|
|
38332
|
-
/* @__PURE__ */ jsx(
|
|
38333
|
-
ToolbarWithEditor,
|
|
38334
|
-
{
|
|
38335
|
-
editable: true,
|
|
38336
|
-
...config.toolbarOptions,
|
|
38337
|
-
fonts: defaultFontFamilies
|
|
38338
|
-
}
|
|
38339
|
-
),
|
|
38340
|
-
/* @__PURE__ */ jsx(
|
|
38341
|
-
CommentToggle,
|
|
38342
|
-
{
|
|
38343
|
-
isOpen: isCommentSidebarOpen,
|
|
38344
|
-
onClick: () => setIsCommentSidebarOpen(!isCommentSidebarOpen),
|
|
38345
|
-
commentCount
|
|
38346
|
-
}
|
|
38347
|
-
)
|
|
38348
|
-
] }),
|
|
38349
|
-
" ",
|
|
38350
|
-
/* @__PURE__ */ jsx(NewMentionsPlugin, { userList: mentionUserList }),
|
|
38351
|
-
/* @__PURE__ */ jsx(NotePanelPlugin, {}),
|
|
38352
|
-
/* @__PURE__ */ jsx(CommentPlugin, {}),
|
|
38353
|
-
/* @__PURE__ */ jsx(CommentBubblePlugin, {}),
|
|
38354
|
-
/* @__PURE__ */ jsx(CellBackgroundPersistencePlugin, {}),
|
|
38355
|
-
/* @__PURE__ */ jsxs("div", { style: { position: "relative" }, children: [
|
|
38356
|
-
/* @__PURE__ */ jsx(
|
|
38357
|
-
RichTextPlugin,
|
|
38358
|
-
{
|
|
38359
|
-
contentEditable: /* @__PURE__ */ jsx("div", { className: "editor-scroller ", children: /* @__PURE__ */ jsx("div", { ref: onRef, children: /* @__PURE__ */ jsx(
|
|
38360
|
-
ContentEditable,
|
|
38361
|
-
{
|
|
38362
|
-
ref: contentRef,
|
|
38363
|
-
className: classes.contentEditable,
|
|
38364
|
-
style: {
|
|
38365
|
-
tabSize: 1,
|
|
38366
|
-
...autoHeightStyle
|
|
38367
|
-
}
|
|
38368
|
-
}
|
|
38369
|
-
) }) }),
|
|
38370
|
-
placeholder: /* @__PURE__ */ jsx(Placeholder, { className: classes.placeholder, children: "Start writing and for quick commands use /" }),
|
|
38371
|
-
ErrorBoundary: LexicalErrorBoundary
|
|
38372
|
-
}
|
|
38373
|
-
),
|
|
38374
|
-
/* @__PURE__ */ jsx(WordCountPlugin, {}),
|
|
38375
|
-
/* @__PURE__ */ jsx(UsageTrackingPlugin, { licenseKey: apiKey })
|
|
38376
|
-
] }),
|
|
38377
|
-
/* @__PURE__ */ jsx(HtmlViewDisplay, {}),
|
|
38378
|
-
/* @__PURE__ */ jsx(AIRephrasePlugin, {}),
|
|
38379
|
-
/* @__PURE__ */ jsx(AIChatPlugin, { apiKey }),
|
|
38380
|
-
/* @__PURE__ */ jsx(TextEnhancePlugin, { apiKey }),
|
|
38381
|
-
/* @__PURE__ */ jsx(HtmlSyncPlugin, {}),
|
|
38382
|
-
/* @__PURE__ */ jsx(AndroidKeyboardFixPlugin, {}),
|
|
38383
|
-
/* @__PURE__ */ jsx(CodeHighlightPlugin, {}),
|
|
38384
|
-
/* @__PURE__ */ jsx(CodeBlockNormalizerPlugin, {}),
|
|
38385
|
-
/* @__PURE__ */ jsx(CodeBlockSelectAllPlugin, {}),
|
|
38386
|
-
/* @__PURE__ */ jsx(SlashCommandPlugin, {}),
|
|
38387
|
-
/* @__PURE__ */ jsx(CombinedPluginWrapper, {}),
|
|
38388
|
-
/* @__PURE__ */ jsx(OnChangeWrapper, { onChange }),
|
|
38389
|
-
/* @__PURE__ */ jsx(InitialContentPlugin, { initialContent }),
|
|
38390
|
-
/* @__PURE__ */ jsx(HistoryPlugin, {}),
|
|
38391
|
-
/* @__PURE__ */ jsx(LocalStoragePlugin$1, { namespace: initialConfig.namespace }),
|
|
38392
|
-
/* @__PURE__ */ jsx(ListPlugin, {}),
|
|
38393
|
-
/* @__PURE__ */ jsx(LinkPlugin, { hasLinkAttributes: false }),
|
|
38394
|
-
/* @__PURE__ */ jsx(LinkPreviewPlugin, {}),
|
|
38395
|
-
/* @__PURE__ */ jsx(DragDropPaste, {}),
|
|
38396
|
-
/* @__PURE__ */ jsx(RichTextPastePlugin, {}),
|
|
38397
|
-
/* @__PURE__ */ jsx(FilePlugin, {}),
|
|
38398
|
-
/* @__PURE__ */ jsx(HorizontalRulePlugin, {}),
|
|
38399
|
-
/* @__PURE__ */ jsx(CustomHorizontalRulePlugin, {}),
|
|
38400
|
-
/* @__PURE__ */ jsx(CheckListPlugin, {}),
|
|
38401
|
-
/* @__PURE__ */ jsx(ImagePlugin, {}),
|
|
38402
|
-
/* @__PURE__ */ jsx(SignatureCanvasPlugin, {}),
|
|
38326
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(CommentProvider, { currentUser, children: /* @__PURE__ */ jsxs(LexicalComposer, { initialConfig: editorInitialConfig, children: [
|
|
38327
|
+
/* @__PURE__ */ jsx(HtmlViewProvider, { children: /* @__PURE__ */ jsxs(ToolbarContext, { children: [
|
|
38328
|
+
/* @__PURE__ */ jsxs(Stack, { children: [
|
|
38329
|
+
config.enableToolbar && /* @__PURE__ */ jsxs("div", { className: "cteditor-flex cteditor-justify-between cteditor-items-center cteditor-mb-2 cteditor-sticky cteditor-top-2 cteditor-z-50", children: [
|
|
38403
38330
|
/* @__PURE__ */ jsx(
|
|
38404
|
-
|
|
38331
|
+
ToolbarWithEditor,
|
|
38405
38332
|
{
|
|
38406
|
-
|
|
38407
|
-
|
|
38408
|
-
|
|
38333
|
+
editable: true,
|
|
38334
|
+
...config.toolbarOptions,
|
|
38335
|
+
fonts: defaultFontFamilies
|
|
38409
38336
|
}
|
|
38410
38337
|
),
|
|
38411
|
-
/* @__PURE__ */ jsx(TableImageAutoResizePlugin, {}),
|
|
38412
|
-
/* @__PURE__ */ jsx(TableCellResizerPlugin, {}),
|
|
38413
|
-
/* @__PURE__ */ jsx(EmbedPreviewPlugin, {}),
|
|
38414
|
-
config.htmlViewOption && !config.toolbarOptions.enableHtmlViewToggle && /* @__PURE__ */ jsx(HtmlViewTogglePlugin, {})
|
|
38415
|
-
] }),
|
|
38416
|
-
floatingAnchorElem && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
38417
38338
|
/* @__PURE__ */ jsx(
|
|
38418
|
-
|
|
38339
|
+
CommentToggle,
|
|
38419
38340
|
{
|
|
38420
|
-
|
|
38421
|
-
|
|
38422
|
-
|
|
38341
|
+
isOpen: isCommentSidebarOpen,
|
|
38342
|
+
onClick: () => setIsCommentSidebarOpen(!isCommentSidebarOpen),
|
|
38343
|
+
commentCount
|
|
38423
38344
|
}
|
|
38424
|
-
)
|
|
38425
|
-
|
|
38426
|
-
|
|
38345
|
+
)
|
|
38346
|
+
] }),
|
|
38347
|
+
" ",
|
|
38348
|
+
/* @__PURE__ */ jsx(NewMentionsPlugin, { userList: mentionUserList }),
|
|
38349
|
+
/* @__PURE__ */ jsx(NotePanelPlugin, {}),
|
|
38350
|
+
/* @__PURE__ */ jsx(CommentPlugin, {}),
|
|
38351
|
+
/* @__PURE__ */ jsx(CommentBubblePlugin, {}),
|
|
38352
|
+
/* @__PURE__ */ jsx(CellBackgroundPersistencePlugin, {}),
|
|
38353
|
+
/* @__PURE__ */ jsxs("div", { style: { position: "relative" }, children: [
|
|
38427
38354
|
/* @__PURE__ */ jsx(
|
|
38428
|
-
|
|
38429
|
-
{
|
|
38430
|
-
anchorElem: floatingAnchorElem,
|
|
38431
|
-
isLinkEditMode,
|
|
38432
|
-
setIsLinkEditMode
|
|
38433
|
-
}
|
|
38434
|
-
),
|
|
38435
|
-
config.enableFloatingMenu && /* @__PURE__ */ jsx(
|
|
38436
|
-
FloatingTextFormatToolbarPlugin,
|
|
38355
|
+
RichTextPlugin,
|
|
38437
38356
|
{
|
|
38438
|
-
|
|
38439
|
-
|
|
38440
|
-
|
|
38357
|
+
contentEditable: /* @__PURE__ */ jsx("div", { className: "editor-scroller ", children: /* @__PURE__ */ jsx("div", { ref: onRef, children: /* @__PURE__ */ jsx(
|
|
38358
|
+
ContentEditable,
|
|
38359
|
+
{
|
|
38360
|
+
ref: contentRef,
|
|
38361
|
+
className: classes.contentEditable,
|
|
38362
|
+
style: {
|
|
38363
|
+
tabSize: 1,
|
|
38364
|
+
...autoHeightStyle
|
|
38365
|
+
}
|
|
38366
|
+
}
|
|
38367
|
+
) }) }),
|
|
38368
|
+
placeholder: /* @__PURE__ */ jsx(Placeholder, { className: classes.placeholder, children: "Start writing and for quick commands use /" }),
|
|
38369
|
+
ErrorBoundary: LexicalErrorBoundary
|
|
38441
38370
|
}
|
|
38442
38371
|
),
|
|
38443
|
-
/* @__PURE__ */ jsx(
|
|
38444
|
-
|
|
38445
|
-
|
|
38446
|
-
|
|
38447
|
-
|
|
38448
|
-
|
|
38449
|
-
|
|
38450
|
-
|
|
38451
|
-
|
|
38452
|
-
|
|
38453
|
-
{
|
|
38454
|
-
|
|
38455
|
-
|
|
38456
|
-
|
|
38457
|
-
}
|
|
38458
|
-
|
|
38459
|
-
|
|
38460
|
-
|
|
38372
|
+
/* @__PURE__ */ jsx(WordCountPlugin, {}),
|
|
38373
|
+
/* @__PURE__ */ jsx(UsageTrackingPlugin, { licenseKey: apiKey })
|
|
38374
|
+
] }),
|
|
38375
|
+
/* @__PURE__ */ jsx(HtmlViewDisplay, {}),
|
|
38376
|
+
/* @__PURE__ */ jsx(AIRephrasePlugin, {}),
|
|
38377
|
+
/* @__PURE__ */ jsx(AIChatPlugin, { apiKey }),
|
|
38378
|
+
/* @__PURE__ */ jsx(TextEnhancePlugin, { apiKey }),
|
|
38379
|
+
/* @__PURE__ */ jsx(HtmlSyncPlugin, {}),
|
|
38380
|
+
/* @__PURE__ */ jsx(AndroidKeyboardFixPlugin, {}),
|
|
38381
|
+
/* @__PURE__ */ jsx(CodeHighlightPlugin, {}),
|
|
38382
|
+
/* @__PURE__ */ jsx(CodeBlockNormalizerPlugin, {}),
|
|
38383
|
+
/* @__PURE__ */ jsx(CodeBlockSelectAllPlugin, {}),
|
|
38384
|
+
/* @__PURE__ */ jsx(SlashCommandPlugin, {}),
|
|
38385
|
+
/* @__PURE__ */ jsx(CombinedPluginWrapper, {}),
|
|
38386
|
+
/* @__PURE__ */ jsx(OnChangeWrapper, { onChange }),
|
|
38387
|
+
/* @__PURE__ */ jsx(InitialContentPlugin, { initialContent }),
|
|
38388
|
+
/* @__PURE__ */ jsx(HistoryPlugin, {}),
|
|
38389
|
+
/* @__PURE__ */ jsx(LocalStoragePlugin$1, { namespace: initialConfig.namespace }),
|
|
38390
|
+
/* @__PURE__ */ jsx(ListPlugin, {}),
|
|
38391
|
+
/* @__PURE__ */ jsx(LinkPlugin, { hasLinkAttributes: false }),
|
|
38392
|
+
/* @__PURE__ */ jsx(LinkPreviewPlugin, {}),
|
|
38393
|
+
/* @__PURE__ */ jsx(DragDropPaste, {}),
|
|
38394
|
+
/* @__PURE__ */ jsx(RichTextPastePlugin, {}),
|
|
38395
|
+
/* @__PURE__ */ jsx(FilePlugin, {}),
|
|
38396
|
+
/* @__PURE__ */ jsx(HorizontalRulePlugin, {}),
|
|
38397
|
+
/* @__PURE__ */ jsx(CustomHorizontalRulePlugin, {}),
|
|
38398
|
+
/* @__PURE__ */ jsx(CheckListPlugin, {}),
|
|
38399
|
+
/* @__PURE__ */ jsx(ImagePlugin, {}),
|
|
38400
|
+
/* @__PURE__ */ jsx(SignatureCanvasPlugin, {}),
|
|
38401
|
+
/* @__PURE__ */ jsx(
|
|
38402
|
+
TablePlugin,
|
|
38403
|
+
{
|
|
38404
|
+
hasCellMerge: true,
|
|
38405
|
+
hasCellBackgroundColor: true,
|
|
38406
|
+
hasHorizontalScroll: true
|
|
38407
|
+
}
|
|
38408
|
+
),
|
|
38409
|
+
/* @__PURE__ */ jsx(TableImageAutoResizePlugin, {}),
|
|
38410
|
+
/* @__PURE__ */ jsx(TableCellResizerPlugin, {}),
|
|
38411
|
+
/* @__PURE__ */ jsx(EmbedPreviewPlugin, {}),
|
|
38412
|
+
config.htmlViewOption && !config.toolbarOptions.enableHtmlViewToggle && /* @__PURE__ */ jsx(HtmlViewTogglePlugin, {})
|
|
38413
|
+
] }),
|
|
38414
|
+
floatingAnchorElem && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
38415
|
+
/* @__PURE__ */ jsx(
|
|
38416
|
+
TableActionMenuPlugin,
|
|
38417
|
+
{
|
|
38418
|
+
anchorElem: floatingAnchorElem,
|
|
38419
|
+
cellMerge: true,
|
|
38420
|
+
isSmallWidthViewport
|
|
38421
|
+
}
|
|
38422
|
+
),
|
|
38423
|
+
/* @__PURE__ */ jsx(TableHoverActionsPlugin, { anchorElem: floatingAnchorElem }),
|
|
38424
|
+
/* @__PURE__ */ jsx(CodeActionMenuPlugin, { anchorElem: floatingAnchorElem }),
|
|
38425
|
+
/* @__PURE__ */ jsx(
|
|
38426
|
+
FloatingLinkEditorPlugin,
|
|
38427
|
+
{
|
|
38428
|
+
anchorElem: floatingAnchorElem,
|
|
38429
|
+
isLinkEditMode,
|
|
38430
|
+
setIsLinkEditMode
|
|
38431
|
+
}
|
|
38432
|
+
),
|
|
38433
|
+
config.enableFloatingMenu && /* @__PURE__ */ jsx(
|
|
38434
|
+
FloatingTextFormatToolbarPlugin,
|
|
38435
|
+
{
|
|
38436
|
+
anchorElem: floatingAnchorElem,
|
|
38437
|
+
setIsLinkEditMode,
|
|
38438
|
+
features: config.floatingMenuOptions
|
|
38439
|
+
}
|
|
38440
|
+
),
|
|
38441
|
+
/* @__PURE__ */ jsx(
|
|
38442
|
+
FloatingEnhanceButtonPlugin,
|
|
38443
|
+
{
|
|
38444
|
+
anchorElem: floatingAnchorElem
|
|
38445
|
+
}
|
|
38446
|
+
)
|
|
38447
|
+
] })
|
|
38448
|
+
] }) }),
|
|
38449
|
+
/* @__PURE__ */ jsx(
|
|
38450
|
+
CommentSidebar,
|
|
38451
|
+
{
|
|
38452
|
+
isOpen: isCommentSidebarOpen,
|
|
38453
|
+
onClose: () => setIsCommentSidebarOpen(false),
|
|
38454
|
+
onCommentCountChange: setCommentCount
|
|
38455
|
+
}
|
|
38456
|
+
)
|
|
38457
|
+
] }) }) });
|
|
38461
38458
|
};
|
|
38462
38459
|
const ScopedEditorWrapper = ({
|
|
38463
38460
|
children,
|
|
@@ -38611,4 +38608,4 @@ export {
|
|
|
38611
38608
|
useHtmlView as u,
|
|
38612
38609
|
verifyApiKey as v
|
|
38613
38610
|
};
|
|
38614
|
-
//# sourceMappingURL=index-
|
|
38611
|
+
//# sourceMappingURL=index-a2107b7c.js.map
|