@bigbinary/neeto-editor 1.47.126 → 1.47.130
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 +32 -29
- package/dist/Editor.js.map +1 -1
- package/dist/{chunk-COgPAsPy.js → chunk-BSdgi_3H.js} +20 -5
- package/dist/chunk-BSdgi_3H.js.map +1 -0
- package/dist/cjs/Editor.cjs.js +32 -29
- package/dist/cjs/Editor.cjs.js.map +1 -1
- package/dist/cjs/{chunk-DoYRXWHQ.cjs.js → chunk-DRJy8PFC.cjs.js} +20 -4
- package/dist/cjs/chunk-DRJy8PFC.cjs.js.map +1 -0
- package/dist/cjs/v2/Editor.cjs.js +33 -30
- 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 +33 -30
- 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/types.d.ts +1 -0
- package/dist/chunk-COgPAsPy.js.map +0 -1
- package/dist/cjs/chunk-DoYRXWHQ.cjs.js.map +0 -1
|
@@ -168,6 +168,20 @@ var buildLevelsFromOptions = function buildLevelsFromOptions(options) {
|
|
|
168
168
|
});
|
|
169
169
|
};
|
|
170
170
|
|
|
171
|
+
// Suggestion popups (slash, mention, emoji) append to the editor container by
|
|
172
|
+
// default so they stay usable inside a Radix Dialog, whose focus trap excludes
|
|
173
|
+
// document.body. An editor docked at the viewport bottom (e.g. a chat composer)
|
|
174
|
+
// can opt into appending to body via the Editor `appendSuggestionsToBody` prop,
|
|
175
|
+
// so the popup escapes the container's clipping and stacking context and can
|
|
176
|
+
// flip upward into the available space.
|
|
177
|
+
var getSuggestionAppendTo = function getSuggestionAppendTo(editor) {
|
|
178
|
+
return function () {
|
|
179
|
+
var _editor$storage, _container$containerR, _container$containerR2;
|
|
180
|
+
var container = editor === null || editor === void 0 || (_editor$storage = editor.storage) === null || _editor$storage === void 0 ? void 0 : _editor$storage.editorContainer;
|
|
181
|
+
return container !== null && container !== void 0 && container.appendSuggestionsToBody ? document.body : (_container$containerR = container === null || container === void 0 || (_container$containerR2 = container.containerRef) === null || _container$containerR2 === void 0 ? void 0 : _container$containerR2.current) !== null && _container$containerR !== void 0 ? _container$containerR : document.body;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
|
|
171
185
|
var CALLOUT_TYPES = [{
|
|
172
186
|
type: "default",
|
|
173
187
|
label: i18n.t("neetoEditor.menu.calloutDefault"),
|
|
@@ -1455,7 +1469,7 @@ var VideoEmbedForm = function VideoEmbedForm(_ref) {
|
|
|
1455
1469
|
var onSubmit = function onSubmit(_ref2) {
|
|
1456
1470
|
var url = _ref2.url;
|
|
1457
1471
|
var embedUrl = validateUrl(url);
|
|
1458
|
-
if (embedUrl) onEmbedVideo(embedUrl);else onAttachVideo(url);
|
|
1472
|
+
if (embedUrl) onEmbedVideo(url, embedUrl);else onAttachVideo(url);
|
|
1459
1473
|
onClose();
|
|
1460
1474
|
};
|
|
1461
1475
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
@@ -1594,10 +1608,11 @@ var MediaUploader = function MediaUploader(_ref) {
|
|
|
1594
1608
|
url: url};
|
|
1595
1609
|
insertMediaToEditor(file);
|
|
1596
1610
|
};
|
|
1597
|
-
var onEmbedVideo = function onEmbedVideo(
|
|
1611
|
+
var onEmbedVideo = function onEmbedVideo(originalUrl, embedUrl) {
|
|
1598
1612
|
if (!editor) return;
|
|
1599
1613
|
editor.chain().focus().setExternalVideo({
|
|
1600
|
-
src:
|
|
1614
|
+
src: embedUrl,
|
|
1615
|
+
originalUrl: originalUrl
|
|
1601
1616
|
}).run();
|
|
1602
1617
|
};
|
|
1603
1618
|
var allowDismiss = ramda.not(isUploading);
|
|
@@ -3478,6 +3493,7 @@ exports.buildLevelsFromOptions = buildLevelsFromOptions;
|
|
|
3478
3493
|
exports.clipboardTextParser = clipboardTextParser;
|
|
3479
3494
|
exports.getEditorStyles = getEditorStyles;
|
|
3480
3495
|
exports.getLinkPopoverPosition = getLinkPopoverPosition;
|
|
3496
|
+
exports.getSuggestionAppendTo = getSuggestionAppendTo;
|
|
3481
3497
|
exports.isEditorOverlaysActive = isEditorOverlaysActive;
|
|
3482
3498
|
exports.isEmojiSuggestionsMenuActive = isEmojiSuggestionsMenuActive;
|
|
3483
3499
|
exports.setInitialPosition = setInitialPosition;
|
|
@@ -3485,4 +3501,4 @@ exports.transformEditorContent = transformEditorContent;
|
|
|
3485
3501
|
exports.transformPastedHTML = transformPastedHTML;
|
|
3486
3502
|
exports.validateAndFormatUrl = validateAndFormatUrl;
|
|
3487
3503
|
exports.validateUrl = validateUrl;
|
|
3488
|
-
//# sourceMappingURL=chunk-
|
|
3504
|
+
//# sourceMappingURL=chunk-DRJy8PFC.cjs.js.map
|