showing results for - "multiple ckeditor on same page"
Lotta
24 Nov 2019
1
2/*HTML CODE*/
3
4/*
5
6<script src="https://cdn.ckeditor.com/ckeditor5/18.0.0/classic/ckeditor.js"></script>
7
8<p><textarea  placeholder="Description"  id="body1" name="body"></textarea></p>
9<p><textarea  placeholder="Description"  id="body2" name="body"></textarea></p>
10<p><textarea  placeholder="Description"  id="body3" name="body"></textarea></p>
11
12*/
13
14document.addEventListener("DOMContentLoaded", function(event) { 
15var numb = 1;
16  do {
17    ClassicEditor
18    .create( document.querySelector( '#body'+ numb ), {
19      removePlugins: [ 'insertImage', 'insertMedia', 'Link', 'blockQuote' ],
20      toolbar: [ 'Heading', 'bold', 'italic', 'bulletedList', 'numberedList',  ]
21    } ) 
22    .catch( error => {
23      console.error( error );
24    } )
25    numb++;
26  }
27  while (numb < 3);
28});