@lobehub/editor 1.28.0 → 1.28.1

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.
@@ -326,7 +326,7 @@ export function registerRichKeydown(editor, kernel, options) {
326
326
  return false;
327
327
  }, COMMAND_PRIORITY_EDITOR));
328
328
  }
329
- var NEEDS_FOLLOWING_PARAGRAPH_TYPES = new Set(['code', 'table']);
329
+ var NEEDS_FOLLOWING_PARAGRAPH_TYPES = new Set(['code', 'table', 'block-image']);
330
330
  export function registerLastElement(editor) {
331
331
  var isProcessing = false;
332
332
  return editor.registerUpdateListener(function (_ref3) {
@@ -36,7 +36,7 @@ export function registerImageCommand(editor, handleUpload) {
36
36
  src: placeholderURL
37
37
  });
38
38
  $insertNodes([imageNode]); // Insert a zero-width space to ensure the image is not the last child
39
- if ($isRootOrShadowRoot(imageNode.getParentOrThrow())) {
39
+ if (!block && $isRootOrShadowRoot(imageNode.getParentOrThrow())) {
40
40
  $wrapNodeInElement(imageNode, $createParagraphNode).selectEnd();
41
41
  }
42
42
  handleUpload(file).then(function (res) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/editor",
3
- "version": "1.28.0",
3
+ "version": "1.28.1",
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",