ckeditor5
ckeditor5 copied to clipboard
Enforcing a mobile version?
📝 Ask a question
I have a problem with CKEeditor I have a form that allows me to add new text fields. The problem is that when I add a new textarea and then overlay CKEditor on it, when I am on a mobile device it doesn't immediately set the mobile version but the desktop version and therefore the editor goes off the screen.
Is there any way to force the editor to be in the mobile version right away?
document.querySelectorAll('textarea.contents-textarea').forEach(textarea => { // Sprawdź, czy edytor został już zainicjalizowany dla tego textarea if (!textarea.editorInstance) { ClassicEditor.create(textarea, editorConfig) .then(editor => { textarea.editorInstance = editor; }) .catch(error => { console.error(error); }); } });