ianstormtaylor / slate

A completely customizable framework for building rich text editors. (Currently in beta.)
http://slatejs.org
MIT License
29.86k stars 3.25k forks source link

Ability to paste pre-formatted text cross rich text editor #4792

Open quoctienkt opened 2 years ago

quoctienkt commented 2 years ago

Problem Currently this rich text editor lost all styling for text copied and pasted from other sources, I hope it would be enhanced! Please check for the same thing happens in Summernote : https://summernote.org/

dylans commented 2 years ago

To make this work you need to deserialize content that gets pasted into something Slate understands.

For example, Plate (slate plugins package) has an HTML deserializer ( https://github.com/udecode/plate/tree/main/packages/core/src/plugins/html-deserializer ) as well as markdown, csv, docx, etc.