
#Markdown indented codebox code
To highlight code in other languages, set the language in the info string (the line with the opening code fence). YouTrack detects and highlights code in C, C++, C#, Java, JavaScript, Perl, Python, Ruby, and SH automatically. Syntax highlighting is supported for a range of languages. Language-specific highlights make the code easier to read. Unlike indented code blocks, fenced code blocks have an info string that lets you specify which language is used for syntax highlighting. It ends the code block and starts a new paragraph. Start an indented code block following a paragraph with a blank line and at least four spaces of indentation:īlank lines between indented lines do not end the code block. The contents of the code block are literal text and are not parsed as Markdown.Īny non-blank line with fewer than four leading spaces ends the code block and starts a new paragraph. One level of indentation (four spaces) is removed from each line of the code block. An indented code block cannot interrupt a paragraph, so you must insert at least one blank line between a paragraph the indented code block that follows. To format a code block in Markdown, indent every line of the block by at least four spaces. You can format blocks of text in a monospaced font to make it easier to identify and read as code. > When you start a new line with additional > characters, > Character formatting is _also_ supported inside the **quote block**.

> The second paragraph is grouped with the previous paragraph in the same quote block. This line is not formatted and does not belong to the quote block. Executing it will remove the indentation character (sequence) from these lines, as configured by codeBlock.indentSequence.> Use quote blocks to emulate reply text. The 'outdentCodeBlock' command is enabled when the indentation of any code lines within the selection can be decreased.The indentation character (sequence) is configurable using the codeBlock.indentSequence configuration. The 'indentCodeBlock' command is enabled when the selection is anchored anywhere in the code block and it allows increasing the indentation of the lines of code.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!' ) # Configuring code block languagesĮach code block can be assigned a programming language. “Java” or “CSS” this is configurable) and supports basic editing tools, for instance, changing the line indentation using the keyboard. Visit the full-featured editor example to see more in action.Įach code block has a specific programming language assigned (e.g. This demo only presents a limited set of features.
