Answers for "multiple ckeditor on same page"

0

multiple ckeditor on same page

/*HTML CODE*/

/*

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

<p><textarea  placeholder="Description"  id="body1" name="body"></textarea></p>
<p><textarea  placeholder="Description"  id="body2" name="body"></textarea></p>
<p><textarea  placeholder="Description"  id="body3" name="body"></textarea></p>

*/

document.addEventListener("DOMContentLoaded", function(event) { 
var numb = 1;
  do {
    ClassicEditor
    .create( document.querySelector( '#body'+ numb ), {
      removePlugins: [ 'insertImage', 'insertMedia', 'Link', 'blockQuote' ],
      toolbar: [ 'Heading', 'bold', 'italic', 'bulletedList', 'numberedList',  ]
    } ) 
    .catch( error => {
      console.error( error );
    } )
    numb++;
  }
  while (numb < 3);
});
Posted by: Guest on June-14-2020

Code answers related to "multiple ckeditor on same page"

Code answers related to "Javascript"

Browse Popular Code Answers by Language