pre-process visual editor pastes w/ unified
This commit is contained in:
parent
5a664f8be1
commit
a8fe57e5d6
@ -270,7 +270,9 @@ export default class Editor extends Component {
|
||||
if (data.type !== 'html' || data.isShift) {
|
||||
return;
|
||||
}
|
||||
const fragment = serializer.deserialize(data.html).document;
|
||||
const markdown = htmlToMarkdown(data.html);
|
||||
const html = markdownToHtml(markdown);
|
||||
const fragment = serializer.deserialize(html).document;
|
||||
return state.transform().insertFragment(fragment).apply();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user