@bigbinary/neeto-editor 1.47.125 → 1.47.127
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/{chunk-COgPAsPy.js → chunk-C8O6gt0z.js} +5 -4
- package/dist/chunk-C8O6gt0z.js.map +1 -0
- package/dist/cjs/{chunk-DoYRXWHQ.cjs.js → chunk-DkzRRlJ6.cjs.js} +5 -4
- package/dist/cjs/chunk-DkzRRlJ6.cjs.js.map +1 -0
- package/dist/cjs/v2/Editor.cjs.js +14 -4
- package/dist/cjs/v2/Editor.cjs.js.map +1 -1
- package/dist/cjs/v2/FormikEditor.cjs.js +1 -1
- package/dist/cjs/v2/Menu.cjs.js +1 -1
- package/dist/cjs/v2/index.cjs.js +1 -1
- package/dist/editor-stats.html +19 -1
- package/dist/v2/Editor.js +14 -4
- package/dist/v2/Editor.js.map +1 -1
- package/dist/v2/FormikEditor.js +1 -1
- package/dist/v2/Menu.js +1 -1
- package/dist/v2/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-COgPAsPy.js.map +0 -1
- package/dist/cjs/chunk-DoYRXWHQ.cjs.js.map +0 -1
package/dist/v2/Editor.js
CHANGED
|
@@ -16,7 +16,7 @@ import { is, intersection, difference, union, isEmpty, isNil, mergeRight, assoc,
|
|
|
16
16
|
import ReactDOM from 'react-dom/server';
|
|
17
17
|
import { l as lowlight, d as decodeHtmlEntities, r as removeEmptyTags } from '../chunk-Qg4uQqj3.js';
|
|
18
18
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
19
|
-
import { C as CALLOUT_TYPES, E as EmojiPickerMenu, v as validateUrl, b as buildLevelsFromOptions, g as getLinkPopoverPosition, L as LINK_VALIDATION_SCHEMA, c as validateAndFormatUrl, D as DEFAULT_EDITOR_OPTIONS, d as getEditorStyles, M as Menu$3, e as MenuDynamicVariables, f as MediaUploader, h as LinkAddPopOver, j as transformPastedHTML, k as clipboardTextParser, s as setInitialPosition } from '../chunk-
|
|
19
|
+
import { C as CALLOUT_TYPES, E as EmojiPickerMenu, v as validateUrl, b as buildLevelsFromOptions, g as getLinkPopoverPosition, L as LINK_VALIDATION_SCHEMA, c as validateAndFormatUrl, D as DEFAULT_EDITOR_OPTIONS, d as getEditorStyles, M as Menu$3, e as MenuDynamicVariables, f as MediaUploader, h as LinkAddPopOver, j as transformPastedHTML, k as clipboardTextParser, s as setInitialPosition } from '../chunk-C8O6gt0z.js';
|
|
20
20
|
import Megaphone from '@bigbinary/neeto-icons/misc/Megaphone';
|
|
21
21
|
import { m as PluginKey, P as Plugin, T as TextSelection } from '../chunk-C5svTfyQ.js';
|
|
22
22
|
import { ChevronDown, Highlighter, X, Ratio, Ellipsis, AlignLeft, AlignCenter, AlignRight, RectangleHorizontal, RectangleVertical, Square, SquareDashed, Trash2, BookOpen, Pencil } from 'lucide-react';
|
|
@@ -3769,6 +3769,13 @@ var getEmbedAttributes = function getEmbedAttributes() {
|
|
|
3769
3769
|
title: {
|
|
3770
3770
|
"default": null
|
|
3771
3771
|
},
|
|
3772
|
+
originalUrl: {
|
|
3773
|
+
"default": "",
|
|
3774
|
+
parseHTML: function parseHTML(element) {
|
|
3775
|
+
var iframe = element.querySelector(".neeto-editor__video-iframe");
|
|
3776
|
+
return (iframe === null || iframe === void 0 ? void 0 : iframe.getAttribute("data-original-url")) || "";
|
|
3777
|
+
}
|
|
3778
|
+
},
|
|
3772
3779
|
frameBorder: "0",
|
|
3773
3780
|
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen",
|
|
3774
3781
|
allowfullscreen: true
|
|
@@ -3780,7 +3787,8 @@ var renderEmbedHTML = function renderEmbedHTML(node, HTMLAttributes, options) {
|
|
|
3780
3787
|
figheight = _node$attrs.figheight,
|
|
3781
3788
|
figwidth = _node$attrs.figwidth,
|
|
3782
3789
|
border = _node$attrs.border,
|
|
3783
|
-
aspectRatio = _node$attrs.aspectRatio
|
|
3790
|
+
aspectRatio = _node$attrs.aspectRatio,
|
|
3791
|
+
originalUrl = _node$attrs.originalUrl;
|
|
3784
3792
|
return ["div", {
|
|
3785
3793
|
"class": classnames("neeto-editor__video-wrapper", "neeto-editor__video--".concat(align), {
|
|
3786
3794
|
"neeto-editor__video--bordered": border
|
|
@@ -3797,7 +3805,8 @@ var renderEmbedHTML = function renderEmbedHTML(node, HTMLAttributes, options) {
|
|
|
3797
3805
|
"data-aspect-ratio": aspectRatio
|
|
3798
3806
|
}, ["iframe", mergeAttributes(options.HTMLAttributes, _objectSpread$4(_objectSpread$4({}, HTMLAttributes), {}, {
|
|
3799
3807
|
allowfullscreen: true,
|
|
3800
|
-
"data-border": border
|
|
3808
|
+
"data-border": border,
|
|
3809
|
+
"data-original-url": originalUrl
|
|
3801
3810
|
}))]]];
|
|
3802
3811
|
};
|
|
3803
3812
|
var renderUploadHTML = function renderUploadHTML(node, HTMLAttributes, options) {
|
|
@@ -3840,7 +3849,8 @@ var handleVideoPaste = function handleVideoPaste(_ref) {
|
|
|
3840
3849
|
if (validatedUrl) {
|
|
3841
3850
|
var node = state.schema.nodes["unified-video"].create({
|
|
3842
3851
|
src: validatedUrl,
|
|
3843
|
-
videoType: "embed"
|
|
3852
|
+
videoType: "embed",
|
|
3853
|
+
originalUrl: match[0]
|
|
3844
3854
|
});
|
|
3845
3855
|
state.tr.insert(range.from, node);
|
|
3846
3856
|
state.tr.insert(range.from + node.nodeSize + 1, state.schema.nodes.paragraph.create());
|