@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.
|
@@ -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