@lobehub/editor 3.2.1 → 3.2.2

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.
@@ -18,6 +18,9 @@ export var useAnchor = function useAnchor() {
18
18
  if (typeof document === 'undefined' || !editor) return;
19
19
  var root = editor.getRootElement();
20
20
  var anchor = root ? root.parentElement : null;
21
- return anchor || document.body;
21
+ if (anchor) return anchor;
22
+ // Fallback to .ant-app if exists, otherwise document.body
23
+ var antApp = document.querySelector('.ant-app');
24
+ return antApp || document.body;
22
25
  }, [editor]);
23
26
  };
@@ -368,8 +368,11 @@ export default /*#__PURE__*/memo(function (_ref2) {
368
368
  if (typeof document === 'undefined') {
369
369
  return null;
370
370
  }
371
+
372
+ // Mount to .ant-app if exists, otherwise document.body
373
+ var container = document.querySelector('.ant-app') || document.body;
371
374
  return /*#__PURE__*/createPortal( /*#__PURE__*/_jsx(TableCellResize, {
372
375
  editor: editor,
373
376
  eventEmitter: eventEmitter
374
- }), document.body);
377
+ }), container);
375
378
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/editor",
3
- "version": "3.2.1",
3
+ "version": "3.2.2",
4
4
  "description": "A powerful and extensible rich text editor built on Meta's Lexical framework, providing a modern editing experience with React integration.",
5
5
  "keywords": [
6
6
  "lobehub",