@lobehub/editor 1.20.0 → 1.20.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.
@@ -1,4 +1,3 @@
1
1
  export * from './command';
2
- export * from './node/link-highlight';
3
2
  export * from './plugin';
4
3
  export * from './react';
@@ -1,5 +1,4 @@
1
1
  export * from "./command";
2
- export * from "./node/link-highlight";
3
2
  export * from "./plugin";
4
3
  export * from "./react";
5
4
  // Note: utils are internal only and not exported to avoid conflicts with other plugins
@@ -142,6 +142,13 @@ export var MarkdownPlugin = (_class = /*#__PURE__*/function (_KernelPlugin) {
142
142
  textLength: text.length
143
143
  });
144
144
 
145
+ // Check if the pasted content is a pure URL
146
+ // If so, let Link/LinkHighlight plugins handle it
147
+ if (clipboardData.types.length === 1 && clipboardData.types[0] === 'text/plain' && isValidLinkUrl(text)) {
148
+ _this2.logger.debug('pure URL detected, letting Link/LinkHighlight plugins handle');
149
+ return false; // Let other plugins handle URL paste
150
+ }
151
+
145
152
  // Check if cursor is inside code block or inline code
146
153
  // If so, always paste as plain text
147
154
  var isInCodeBlock = editor.read(function () {
@@ -274,13 +281,6 @@ export var MarkdownPlugin = (_class = /*#__PURE__*/function (_KernelPlugin) {
274
281
  return true; // Command handled
275
282
  }
276
283
 
277
- // Check if the pasted content is a pure URL
278
- // If so, let Link/LinkHighlight plugins handle it
279
- if (clipboardData.types.length === 1 && clipboardData.types[0] === 'text/plain' && isValidLinkUrl(text)) {
280
- _this2.logger.debug('pure URL detected, letting Link/LinkHighlight plugins handle');
281
- return false; // Let other plugins handle URL paste
282
- }
283
-
284
284
  // Force plain text paste for external content
285
285
  event.preventDefault();
286
286
  event.stopPropagation();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/editor",
3
- "version": "1.20.0",
3
+ "version": "1.20.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",