Answer the question
In order to leave comments, you need to log in
How to localize CKEditor 5 Balloon Block?
Tell me, how can I localize the buttons of CKEditor 5 Balloon Block?
This is how I connect CKEditor:
<script src="https://cdn.ckeditor.com/ckeditor5/21.0.0/balloon-block/ckeditor.js"></script>
<script>
const textarea = document.querySelector( '#editor' );
BalloonEditor.create( textarea , {
language: 'ru',
removePlugins: [ 'Table' ],
toolbar: [ 'bold', 'italic', 'bulletedList', 'numberedList', 'blockQuote' ]
})
.then( editor => {
window.editor = editor;
} )
.catch( error => {
console.error( 'There was a problem initializing the editor.', error );
} );
document.getElementById( 'submit' ).onclick = () => {
textarea.value = editor.getData();
}
</script>
Answer the question
In order to leave comments, you need to log in
It turned out to be quite simple. It was necessary to connect the localization file:
<script src="https://cdn.ckeditor.com/ckeditor5/21.0.0/balloon-block/translations/ru.js"></script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question