Paste Markdown
The paste Markdown feature lets users paste Markdown-formatted content straight into the editor. It will be then converted into rich text on the fly.
This feature is still in the experimental phase. See the known issues section to learn more.
Paste some Markdown-formatted content into the demo editor below and see it turn into rich text on the fly. You can copy this document for convenience.
Output:
After installing the editor, add the feature to your plugin list and toolbar configuration:
import { ClassicEditor, Bold, Italic, Essentials, PasteFromMarkdownExperimental } from 'ckeditor5';
ClassicEditor
.create( document.querySelector( '#snippet-markdown' ), {
licenseKey: '<YOUR_LICENSE_KEY>', // Or 'GPL'.
plugins: [
PasteFromMarkdownExperimental,
Essentials,
Bold,
Italic,
// More plugins.
// ...
],
} )
.then( /* ... */ )
.catch( /* ... */ );
While the paste Markdown feature is already stable enough to use, it still needs some more testing. We are now focused on testing it in connection with other tools and plugins. If you have any observations, suggestions, or feedback you want to share, feel free to put them in this GitHub issue.
CKEditor 5 supports a wider range of paste features, including:
- Paste from Office – Paste content from Microsoft Word and keep the original structure and formatting.
- Paste from Google Docs – Paste content from Google Docs, maintaining the original formatting and structure.
- Paste plain text – Paste text without formatting that will inherit the style of the content it was pasted into.
- Autoformatting – Format your content on the go with Markdown-like shortcodes.
The source code of the feature is available on GitHub at https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-markdown-gfm