|
|
@@ -103,7 +103,8 @@ export default class CodeBlock extends Plugin {
|
|
|
*
|
|
|
* <pre><code class="language-javascript">window.alert( 'Hello world!' )</code></pre>
|
|
|
*
|
|
|
- * You can customize the CSS class by specifying an optional `class` property in the language definition:
|
|
|
+ * You can customize the CSS class by specifying an optional `class` property in the language definition.
|
|
|
+ * You can set **multiple classes** but **only the first one** will be used as defining language class:
|
|
|
*
|
|
|
* ClassicEditor
|
|
|
* .create( document.querySelector( '#editor' ), {
|
|
|
@@ -115,8 +116,8 @@ export default class CodeBlock extends Plugin {
|
|
|
* // 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 only the "js" class for JavaScript code blocks.
|
|
|
+ * { language: 'javascript', label: 'JavaScript', class: 'js javascript js-code' },
|
|
|
*
|
|
|
* // Python code blocks will have the default "language-python" CSS class.
|
|
|
* { language: 'python', label: 'Python' }
|