diff --git a/dist/editor-content.min.css b/dist/editor-content.min.css deleted file mode 100644 index ac8eaedf..00000000 --- a/dist/editor-content.min.css +++ /dev/null @@ -1 +0,0 @@ -@charset "UTF-8";@import url("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/styles/github.min.css");.neeto-editor-content{-moz-tab-size:2;-o-tab-size:2;tab-size:2;white-space:pre-wrap;word-break:break-word}.neeto-editor-content h1,.neeto-editor-content h2,.neeto-editor-content h3,.neeto-editor-content h4,.neeto-editor-content h5,.neeto-editor-content h6{color:rgb(var(--neeto-ui-black))}.neeto-editor-content h1 strong,.neeto-editor-content h2 strong,.neeto-editor-content h3 strong,.neeto-editor-content h4 strong,.neeto-editor-content h5 strong,.neeto-editor-content h6 strong{font-weight:var(--neeto-ui-font-semibold)!important}.neeto-editor-content h1{margin:2rem 0 .25rem}.neeto-editor-content h2{margin:1.5rem 0 .25rem}.neeto-editor-content h3{margin:1rem 0 .25rem}.neeto-editor-content h4{margin:.875rem 0 .25rem}.neeto-editor-content h5{margin:.75rem 0 .25rem}.neeto-editor-content h6{margin:.5rem 0 .25rem}.neeto-editor-content p{color:rgb(var(--neeto-ui-black));font-size:var(--neeto-ui-text-body1);font-weight:var(--neeto-ui-font-normal);line-height:var(--neeto-ui-leading-normal)}.neeto-editor-content p:empty:after{content:" "}.neeto-editor-content p:last-child{margin-bottom:0}.neeto-editor-content p strong{font-weight:var(--neeto-ui-font-semibold)!important}.neeto-editor-content div{color:rgb(var(--neeto-ui-black));font-size:var(--neeto-ui-text-body1);font-weight:var(--neeto-ui-font-normal);line-height:var(--neeto-ui-leading-normal)}.neeto-editor-content code{background-color:rgb(var(--neeto-ui-gray-100));font-family:SFMono-Regular,Menlo,Consolas,PT Mono,Liberation Mono,Courier,monospace;padding:.2em .4em}.neeto-editor-content code,.neeto-editor-content pre{border-radius:var(--neeto-ui-rounded-sm);font-size:14px}.neeto-editor-content pre{background-color:#f7f6f3;line-height:1.5;margin-bottom:16px;margin-top:16px;overflow-x:auto;padding:34px 16px 32px 32px;position:relative}.neeto-editor-content pre .neeto-editor-codeblock-options{align-items:center;display:flex;gap:4px;position:absolute;right:4px;top:4px}.neeto-editor-content pre .neeto-editor-codeblock-options__menu{display:flex;flex-direction:column;gap:4px}.neeto-editor-content pre .neeto-editor-codeblock-options__input{margin:4px}.neeto-editor-content pre>code{background-color:transparent;border-radius:0;border-width:0;color:inherit;font-family:inherit;font-size:inherit;font-weight:400;line-height:inherit;padding:0;white-space:pre-wrap}.neeto-editor-content blockquote{border-left-color:#e5e7eb;border-left-width:4px;color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);margin:8px 0;padding-left:12px;quotes:"“" "”" "‘" "’"}.neeto-editor-content blockquote>p:after,.neeto-editor-content blockquote>p:before{content:""!important}.neeto-editor-content ol,.neeto-editor-content ul{list-style:revert;margin-bottom:1em;padding-left:28px}.neeto-editor-content ol li:before,.neeto-editor-content ul li:before{background-color:rgb(var(--neeto-ui-black))}.neeto-editor-content a[href]{color:rgb(var(--neeto-ui-primary-800));font-weight:500}.neeto-editor-content .neeto-editor__video-wrapper{display:flex;margin:16px 0}.neeto-editor-content .neeto-editor__video-wrapper .neeto-editor__video-iframe{border:2px solid rgb(var(--neeto-ui-gray-300));border-radius:var(--neeto-ui-rounded-lg);display:inline-block;padding:4px}.neeto-editor-content .neeto-editor__video-wrapper .neeto-editor__video-iframe iframe{height:100%;width:100%}.neeto-editor-content .neeto-editor__video--left{justify-content:flex-start}.neeto-editor-content .neeto-editor__video--right{justify-content:flex-end}.neeto-editor-content .neeto-editor__video--center{justify-content:center}.neeto-editor-content mark{border-radius:var(--neeto-ui-rounded-sm);padding:0 4px}.neeto-editor-content [data-type=mention],.neeto-editor-content [data-type=special-mention]{color:rgb(var(--neeto-ui-primary-800))}.neeto-editor-content table{border:1px solid rgba(var(--neeto-ui-gray-300));border-collapse:separate;border-radius:var(--neeto-ui-rounded-sm);border-spacing:0;min-width:300px;overflow:hidden;table-layout:fixed}.neeto-editor-content table td,.neeto-editor-content table th{border-left:1px solid rgba(var(--neeto-ui-gray-300));border-top:1px solid rgba(var(--neeto-ui-gray-300));padding:8px 12px;position:relative}.neeto-editor-content table td:first-child,.neeto-editor-content table th:first-child{border-left:none}.neeto-editor-content table th{background:rgb(var(--neeto-ui-gray-100));border-top:none}.neeto-editor-content table td{background:rgb(var(--neeto-ui-white))}.neeto-editor-content--hidden{display:none}.neeto-editor__image-wrapper{color:inherit!important;display:flex;font-weight:400!important;margin:16px 0;text-decoration:none}.neeto-editor__image-wrapper figure{display:inline-block;max-width:100%;overflow:hidden;position:relative}.neeto-editor__image-wrapper .neeto-editor__image{display:inline-block}.neeto-editor__image-wrapper .neeto-editor__image img,.neeto-editor__image-wrapper .neeto-editor__image video{border:2px solid rgb(var(--neeto-ui-gray-300));border-radius:var(--neeto-ui-rounded-lg);display:inline-block;height:auto;padding:4px;width:100%}.neeto-editor__image-wrapper .neeto-editor__image-placeholder{align-items:center;border:1px solid;border-radius:8px;display:flex;height:200px;justify-content:center;width:400px}.neeto-editor__image-wrapper figcaption div{color:rgb(var(--neeto-ui-gray-600));font-size:14px;font-weight:var(--neeto-ui-font-normal);line-height:1.4;text-align:center}.neeto-editor__image-wrapper figcaption div a{display:inline-block;margin:0;text-align:center}.neeto-editor__image-wrapper figcaption.is-empty div:before{color:rgb(var(--neeto-ui-gray-500));content:"Add a caption";inset:0;position:absolute}.neeto-editor__image--left{justify-content:flex-start}.neeto-editor__image--center{justify-content:center}.neeto-editor__image--right{justify-content:flex-end} \ No newline at end of file diff --git a/src/components/Editor/CustomExtensions/Image/ImageComponent.jsx b/src/components/Editor/CustomExtensions/Image/ImageComponent.jsx index 86ecbc98..9ff98284 100644 --- a/src/components/Editor/CustomExtensions/Image/ImageComponent.jsx +++ b/src/components/Editor/CustomExtensions/Image/ImageComponent.jsx @@ -28,44 +28,42 @@ const ImageComponent = ({ ? figureRef.current.querySelector("figcaption>div")?.textContent : alt; + const handleResizeStop = (_event, _direction, ref) => { + height = ref.offsetHeight; + width = ref.offsetWidth; + view.dispatch( + view.state.tr.setNodeMarkup( + getPos(), + undefined, + mergeRight(node.attrs, { + figheight: height, + figwidth: width, + height, + width, + }) + ) + ); + editor.commands.focus(); + }; + return (
- + {src ? ( setCaptionWidth(ref.offsetWidth) } - onResizeStop={(_event, _direction, ref) => { - height = ref.offsetHeight; - width = ref.offsetWidth; - view.dispatch( - view.state.tr.setNodeMarkup( - getPos(), - undefined, - mergeRight(node.attrs, { - figheight: height, - figwidth: width, - height, - width, - }) - ) - ); - editor.commands.focus(); - }} > - {caption} + {caption} ) : (
diff --git a/src/components/Editor/MediaUploader/LocalUploader.jsx b/src/components/Editor/MediaUploader/LocalUploader.jsx index d0adf5f9..0f13a844 100644 --- a/src/components/Editor/MediaUploader/LocalUploader.jsx +++ b/src/components/Editor/MediaUploader/LocalUploader.jsx @@ -34,9 +34,7 @@ const LocalUploader = ({ ? DEFAULT_IMAGE_UPPY_CONFIG : DEFAULT_VIDEO_UPPY_CONFIG; - const { uppy, isUploading } = useUppyUploader({ - uppyConfig, - }); + const { uppy, isUploading } = useUppyUploader({ uppyConfig }); setIsUploading(isUploading); @@ -109,20 +107,18 @@ const LocalUploader = ({ }, []); return !isEmpty(pendingUploads) || isUploading ? ( - + ) : (
fileInputRef.current?.click()} > -
+
{isFontSizeActive && ( )} @@ -143,7 +147,7 @@ const Fixed = ({
{fontStyleOptions.map(renderOptionButton)}
@@ -173,27 +177,26 @@ const Fixed = ({
{isLinkActive && ( )} {isTableActive && ( )} {miscOptions.map(renderOptionButton)} {isTextColorOptionActive && ( )} {isEmojiActive && ( setMediaUploader({ image: false, video: false }) } @@ -211,14 +212,11 @@ const Fixed = ({ )} {isEmbedOptionActive && ( )} {addonCommandOptions.map(renderOptionButton)} @@ -248,7 +246,7 @@ const Fixed = ({ {!isEmpty(variables) && (