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);
});
Also in JavaScript:
- Better Array check with Array.isArray Because arrays are not true array in JavaScript, there is no simple typeof check. No problem! Use the method Array.isArray to check…
- angular rebuild
- cypress upload file
- trigger hover event javascript
- update one component from another component angular 9
- react native anination 2 valuse
- Math.random() javascript
- electron no menu bar
- let in javascript
- find next greater number with same set of digits javascript
- get messages by id discord.js
- router-outlet' is not a known element angular
- how to add carousel in javascript
- how to get json array response in retrofit
- functional component react with state
- ngswitchcase in angular 8
- Disable Multiple Form Submits with Vanilla JavaScript
- moment hour minute
- javascript remove character from string
- javascript map callback function
- how to compare elements in an array
- node sass version react
- jquery label with text
- trigger click on checkbox jquery