#CODE BLOCKS FIND AND REPLACE CODE#
Note: If the selection is already in a code block, executing the command will convert the block back into plain paragraphs. create( document.querySelector( '#editor' ), ) For example, the following editor supports only two languages (CSS and HTML): ClassicEditor You can use the codeBlock.languages configuration and define your own languages.
It is possible to configure which languages are available to the users. The language of the code block is represented as a CSS class of the element, both when editing and in the editor data: window.alert( 'Hello world!' )
Here goes the initial content of the editor.
First, create an HTML element with the initial content: