|
|
@@ -42,7 +42,7 @@ ClassicEditor
|
|
|
|
|
|
{@snippet features/code-block-custom-languages}
|
|
|
|
|
|
-By default, the CSS class of the `<code>` element in the data and editing is generated using the `language` property (prefixed with "language-"). You can customize it by specifying an optional `class` property:
|
|
|
+By default, the CSS class of the `<code>` element in the data and editing is generated using the `language` property (prefixed with "language-"). You can customize it by specifying an optional `class` property. You can set **multiple classes** but **only the first one** will be used as defining language class:
|
|
|
|
|
|
```js
|
|
|
ClassicEditor
|
|
|
@@ -55,8 +55,8 @@ ClassicEditor
|
|
|
// Use the "php-code" class for PHP code blocks.
|
|
|
{ language: 'php', label: 'PHP', class: 'php-code' },
|
|
|
|
|
|
- // Use the "js" class for JavaScript code blocks.
|
|
|
- { language: 'javascript', label: 'JavaScript', class: 'js' },
|
|
|
+ // Use the "js" class for JavaScript code blocks (the first class is defining).
|
|
|
+ { language: 'javascript', label: 'JavaScript', class: 'js javascript js-code' },
|
|
|
|
|
|
// Python code blocks will have the default "language-python" CSS class.
|
|
|
{ language: 'python', label: 'Python' }
|