Procházet zdrojové kódy

Fixed docs after separating XML and HTML languages.

Kamil Piechaczek před 5 roky
rodič
revize
d88f7843e9

+ 1 - 1
packages/ckeditor5-code-block/docs/_snippets/features/code-block-custom-languages.html

@@ -1,6 +1,6 @@
 <div id="snippet-custom-languages">
 	<p>Put some text in the <code>&lt;body&gt;</code>:</p>
-<pre><code class="language-xml"><body>Hello world!</body></code></pre>
+<pre><code class="language-html"><body>Hello world!</body></code></pre>
 	<p>Then set the font color:</p>
 <pre><code class="language-css">body { color: red }</code></pre>
 </div>

+ 1 - 1
packages/ckeditor5-code-block/docs/_snippets/features/code-block-custom-languages.js

@@ -31,7 +31,7 @@ ClassicEditor
 		codeBlock: {
 			languages: [
 				{ language: 'css', label: 'CSS' },
-				{ language: 'xml', label: 'HTML/XML' }
+				{ language: 'html', label: 'HTML' }
 			]
 		}
 	} )

+ 1 - 1
packages/ckeditor5-code-block/docs/_snippets/features/code-block.html

@@ -1,7 +1,7 @@
 <textarea id="snippet-highlight">
 	&lt;h2>Getting started with CKEditor 5&lt;/h2>
 	&lt;p>First, create an HTML element with the initial content:&lt;/p>
-&lt;pre>&lt;code class="language-xml">&lt;div id="editor">
+&lt;pre>&lt;code class="language-html">&lt;div id="editor">
 	&lt;p&gt;Here goes the initial content of the editor.&lt;/p&gt;
 &lt;/div>&lt;/code>&lt;/pre>
 

+ 4 - 3
packages/ckeditor5-code-block/docs/features/code-blocks.md

@@ -24,7 +24,7 @@ Each code block can be assigned a programming language. The language of the code
 <pre><code class="language-javascript">window.alert( 'Hello world!' )</code></pre>
 ```
 
-It is possible to configure which languages are available to the users. You can use the {@link module:code-block/codeblock~CodeBlockConfig#languages `codeBlock.languages`} configuration and define your own languages. For example, the following editor supports only two languages (CSS and XML/HTML):
+It is possible to configure which languages are available to the users. You can use the {@link module:code-block/codeblock~CodeBlockConfig#languages `codeBlock.languages`} configuration and define your own languages. For example, the following editor supports only two languages (CSS and HTML):
 
 ```js
 ClassicEditor
@@ -32,7 +32,7 @@ ClassicEditor
 		codeBlock: {
 			languages: [
 				{ language: 'css', label: 'CSS' },
-				{ language: 'xml', label: 'HTML/XML' }
+				{ language: 'html', label: 'HTML' }
 			]
 		}
 	} )
@@ -166,13 +166,14 @@ The {@link module:code-block/codeblock~CodeBlock} plugin registers:
 		{ language: 'cpp', label: 'C++' },
 		{ language: 'css', label: 'CSS' },
 		{ language: 'diff', label: 'Diff' },
-		{ language: 'xml', label: 'HTML/XML' },
+		{ language: 'html', label: 'HTML' },
 		{ language: 'java', label: 'Java' },
 		{ language: 'javascript', label: 'JavaScript' },
 		{ language: 'php', label: 'PHP' },
 		{ language: 'python', label: 'Python' },
 		{ language: 'ruby', label: 'Ruby' },
 		{ language: 'typescript', label: 'TypeScript' },
+		{ language: 'xml', label: 'XML' }
 	]
 	```
 

+ 2 - 1
packages/ckeditor5-code-block/src/codeblock.js

@@ -137,13 +137,14 @@ export default class CodeBlock extends Plugin {
  *			{ language: 'cpp', label: 'C++' },
  *			{ language: 'css', label: 'CSS' },
  *			{ language: 'diff', label: 'Diff' },
- *			{ language: 'xml', label: 'HTML/XML' },
+ *			{ language: 'html', label: 'HTML' },
  *			{ language: 'java', label: 'Java' },
  *			{ language: 'javascript', label: 'JavaScript' },
  *			{ language: 'php', label: 'PHP' },
  *			{ language: 'python', label: 'Python' },
  *			{ language: 'ruby', label: 'Ruby' },
  *			{ language: 'typescript', label: 'TypeScript' },
+ *			{ language: 'xml', label: 'XML' }
  *		]
  *
  * **Note**: The first language defined in the configuration is considered the default one. This means it will be