@bigbinary/neeto-editor 1.47.103 → 1.47.104
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/Editor.js +2 -2
- package/dist/FormikEditor.js +2 -2
- package/dist/Menu.js +2 -2
- package/dist/{chunk-BOAmmpv4.js → chunk-B7tHOpir.js} +14 -5
- package/dist/{chunk-BOAmmpv4.js.map → chunk-B7tHOpir.js.map} +1 -1
- package/dist/{chunk-D-4C066v.js → chunk-CmM0OmZo.js} +2 -2
- package/dist/{chunk-D-4C066v.js.map → chunk-CmM0OmZo.js.map} +1 -1
- package/dist/cjs/Editor.cjs.js +2 -2
- package/dist/cjs/FormikEditor.cjs.js +2 -2
- package/dist/cjs/Menu.cjs.js +2 -2
- package/dist/cjs/{chunk-D2lzFp9p.cjs.js → chunk-2w0QpL4j.cjs.js} +2 -2
- package/dist/cjs/{chunk-D2lzFp9p.cjs.js.map → chunk-2w0QpL4j.cjs.js.map} +1 -1
- package/dist/cjs/{chunk-BWXzVFnj.cjs.js → chunk-CLeV8Bxb.cjs.js} +14 -5
- package/dist/cjs/{chunk-BWXzVFnj.cjs.js.map → chunk-CLeV8Bxb.cjs.js.map} +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/utils.cjs.js +1 -1
- package/dist/editor-stats.html +19 -1
- package/dist/index.js +2 -2
- package/dist/utils.js +1 -1
- package/package.json +1 -1
|
@@ -6703,10 +6703,19 @@ var isEmojiSuggestionsMenuActive = function isEmojiSuggestionsMenuActive() {
|
|
|
6703
6703
|
var transformPastedHTML = function transformPastedHTML(content) {
|
|
6704
6704
|
var contentWithoutBr = content.replaceAll("<br />", "<p></p>");
|
|
6705
6705
|
var doc = new DOMParser().parseFromString(contentWithoutBr, "text/html");
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6706
|
+
|
|
6707
|
+
// ProseMirror tags clipboard output from any TipTap/ProseMirror editor with
|
|
6708
|
+
// `data-pm-slice`. When present, the paste is coming from another
|
|
6709
|
+
// neeto-editor instance and we preserve the author's color choices. When
|
|
6710
|
+
// absent, the source is external (Word, websites, customer messages) and we
|
|
6711
|
+
// strip inline colors so foreign theming does not bleed into the editor.
|
|
6712
|
+
var isInternalPaste = doc.querySelector("[data-pm-slice]") !== null;
|
|
6713
|
+
if (!isInternalPaste) {
|
|
6714
|
+
doc.querySelectorAll("[style]").forEach(function (el) {
|
|
6715
|
+
el.style.color = "";
|
|
6716
|
+
el.style.backgroundColor = "";
|
|
6717
|
+
});
|
|
6718
|
+
}
|
|
6710
6719
|
return doc.body.innerHTML;
|
|
6711
6720
|
};
|
|
6712
6721
|
var buildLevelsFromOptions = function buildLevelsFromOptions(options) {
|
|
@@ -6754,4 +6763,4 @@ exports.setInitialPosition = setInitialPosition;
|
|
|
6754
6763
|
exports.transformEditorContent = transformEditorContent;
|
|
6755
6764
|
exports.transformPastedHTML = transformPastedHTML;
|
|
6756
6765
|
exports.validateAndFormatUrl = validateAndFormatUrl;
|
|
6757
|
-
//# sourceMappingURL=chunk-
|
|
6766
|
+
//# sourceMappingURL=chunk-CLeV8Bxb.cjs.js.map
|