How to output markdown with CKEditor 5?

Viewed 30

I've been trying to output markdown with CKEditor 5 but I can't figure it out how to do it, how can I output markdown instead of html? So far I have tried:

<script src="https://cdn.ckeditor.com/ckeditor5/34.2.0/classic/ckeditor.js"></script>
<script>
var myEditor;
ClassicEditor
        .create( document.querySelector( 'textarea.editor' ),{
            plugins: [Bold,Italic, Markdown],
            toolbar:['bold', 'italic', 'markdown'],
        } )
        .then( editor => {
            console.log( 'Editor was initialized', editor );
            myEditor = editor;
        } )
        .catch( error => {
                console.error( error );
        } );
1 Answers

The Markdown plugin isn't added by default into the classic editor. You could create a custom editor with the Online Builder and include "Markdown" to get what you need.

Related