The 'indentCodeBlock' and 'outdentCodeBlock' commands.īoth commands are used by the Tab and Shift+ Tab keystrokes as described in the section about indentation: 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!' ) Autoformatting – Format the content on the go with Markdown code.Įach code block can be assigned a programming language.Block indentation – Set indentation for text blocks such as paragraphs or lists.Block quote – Include block quotations or pull quotes in your rich-text content.Basic text styles – Use the code formatting for short inline code chunks.Here are some CKEditor 5 features that you may find helpfully similar: create( document.querySelector( '#editor' ) ) Then use the following code to run the editor: Here goes the initial content of the editor. First, create an HTML element with the initial content:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |