mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-12-27 23:24:38 +00:00
fix: unable to paste iframe in editor (#7525)
This commit is contained in:
parent
9bd13ac29e
commit
651046ab68
@ -32,8 +32,11 @@ extension PasteFromPlainText on EditorState {
|
||||
|
||||
await deleteSelectionIfNeeded();
|
||||
|
||||
/// try to parse the plain text as markdown
|
||||
final nodes = customMarkdownToDocument(plainText).root.children;
|
||||
if (nodes.isEmpty) {
|
||||
/// if the markdown parser failed, fallback to the plain text parser
|
||||
await pastePlainText(plainText);
|
||||
return;
|
||||
}
|
||||
if (nodes.length == 1) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user