A
A
Andrej Kopp2020-08-07 15:44:35
JavaScript
Andrej Kopp, 2020-08-07 15:44:35

How to change the icon on the left of the form in CKEditor 5 Balloon Block?

Hello. Can you tell me how to change the icon on the left side of the form? I need to replace it with a plus sign. Perhaps CKEditor 5 Balloon Block already has its own set of icons, where perhaps there is a button with a plus.

5f2d4ba678aac585236860.png

Intuitively, I assume that this can be done through the configuration of the JavaScript script.

<script src="https://cdn.ckeditor.com/ckeditor5/21.0.0/balloon-block/ckeditor.js"></script>
<script src="https://cdn.ckeditor.com/ckeditor5/21.0.0/balloon-block/translations/ru.js"></script>
<script>
  const textarea = document.getElementById('tickets-editor');
  BalloonEditor.create( document.querySelector( '#editor' ) , {
        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 );
    } );
  editor.model.document.on( 'change:data', () => textarea.value = editor.getData());
</script>


I will be grateful for help.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question