MyBB Community Forums

Full Version: Ckeditor 5
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
To have a quick look at what Ckeditor 5 is like:

Go to the contact template under Ungrouped templates.

Add
<script src="https://cdn.ckeditor.com/ckeditor5/12.3.0/classic/ckeditor.js"></script>

above
</head>

Find:
<textarea cols="50" rows="10" name="message" class="textarea" >{$contact_message}</textarea>

replace with:
<textarea cols="50" rows="10" name="message" id="message" class="textarea" >{$contact_message}</textarea>

Add:
                <script>
                        ClassicEditor
                                .create( document.querySelector( '#message' ) )
                                .then( editor => {
                                        console.log( editor );
                                } )
                                .catch( error => {
                                        console.error( error );
                                } );
                </script>

below:
{$footer}

Now open your contact page and have a look. Note the editor can't be used as is with MyBB, it needs some configuration first.