Skip to content

Commit e710fc1

Browse files
committed
chore: pasting a link will not check whether it is an image
1 parent ed41672 commit e710fc1

File tree

3 files changed

+2
-28
lines changed

3 files changed

+2
-28
lines changed

frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/copy_and_paste/custom_paste_command.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ Future<bool> _pasteAsLinkPreview(
186186
node.delta?.toPlainText().isNotEmpty == true) {
187187
return false;
188188
}
189-
189+
if (!isMobile) return false;
190190
final bool isImageUrl;
191191
try {
192192
isImageUrl = await _isImageUrl(text);
@@ -195,7 +195,7 @@ Future<bool> _pasteAsLinkPreview(
195195
return false;
196196
}
197197

198-
if (!isMobile && !isImageUrl) return false;
198+
if (!isImageUrl) return false;
199199

200200
// insert the text with link format
201201
final textTransaction = editorState.transaction

frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_preview/link_preview_cache.dart

Lines changed: 0 additions & 25 deletions
This file was deleted.

frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/plugins.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export 'inline_math_equation/inline_math_equation.dart';
4040
export 'inline_math_equation/inline_math_equation_toolbar_item.dart';
4141
export 'keyboard_interceptor/keyboard_interceptor.dart';
4242
export 'link_preview/custom_link_preview.dart';
43-
export 'link_preview/link_preview_cache.dart';
4443
export 'link_preview/link_preview_menu.dart';
4544
export 'math_equation/math_equation_block_component.dart';
4645
export 'math_equation/mobile_math_equation_toolbar_item.dart';

0 commit comments

Comments
 (0)