Jelajahi Sumber

Merge pull request #7955 from ckeditor/i/7944

Docs (ckeditor5): Temporarily use v21.0.0 build for Mathtype plugin documentation, until integration is aligned with v22 changes. Closes #7944.
Maciej Bukowski 5 tahun lalu
induk
melakukan
c9d834a131
2 mengubah file dengan 15 tambahan dan 62 penghapusan
  1. 14 0
      docs/_snippets/features/mathtype.html
  2. 1 62
      docs/_snippets/features/mathtype.js

+ 14 - 0
docs/_snippets/features/mathtype.html

@@ -3,3 +3,17 @@
 
 	<p><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>x</mi><mo>=</mo><mfrac><mrow><mo>-</mo><mi>b</mi><mo>&#177;</mo><msqrt><msup><mi>b</mi><mn>2</mn></msup><mo>-</mo><mn>4</mn><mi>a</mi><mi>c</mi></msqrt></mrow><mrow><mn>2</mn><mi>a</mi></mrow></mfrac></math></p>
 </div>
+
+<script>
+	(() => {
+		const linkElement = document.createElement( 'link' );
+		linkElement.href = 'https://ckeditor.com/docs/ckeditor5/21.0.0/snippets/features/mathtype/snippet.css';
+		linkElement.type = 'text/css';
+		linkElement.rel = 'stylesheet';
+		linkElement.dataset[ 'cke' ] = 'true';
+
+		document.head.appendChild( linkElement );
+	})()
+</script>
+<script src="https://ckeditor.com/docs/ckeditor5/21.0.0/assets/snippet.js"></script>
+<script src="https://ckeditor.com/docs/ckeditor5/21.0.0/snippets/features/mathtype/snippet.js"></script>

+ 1 - 62
docs/_snippets/features/mathtype.js

@@ -3,65 +3,4 @@
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
 
-/* globals window, document, console */
-
-import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
-import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
-import EasyImage from '@ckeditor/ckeditor5-easy-image/src/easyimage';
-import MathType from '@wiris/mathtype-ckeditor5';
-import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config';
-
-ClassicEditor
-	.create( document.querySelector( '#mathtype-editor' ), {
-		plugins: [
-			ArticlePluginSet,
-			EasyImage,
-			MathType
-		],
-		toolbar: {
-			items: [
-				'heading',
-				'|',
-				'bold',
-				'italic',
-				'bulletedList',
-				'numberedList',
-				'|',
-				'outdent',
-				'indent',
-				'|',
-				'MathType',
-				'ChemType',
-				'|',
-				'blockQuote',
-				'link',
-				'mediaEmbed',
-				'insertTable',
-				'|',
-				'undo',
-				'redo'
-			],
-			viewportTopOffset: window.getViewportTopOffsetConfig()
-		},
-		image: {
-			styles: [
-				'full',
-				'alignLeft',
-				'alignRight'
-			],
-			toolbar: [
-				'imageStyle:alignLeft',
-				'imageStyle:full',
-				'imageStyle:alignRight',
-				'|',
-				'imageTextAlternative'
-			]
-		},
-		table: {
-			contentToolbar: [ 'tableColumn', 'tableRow', 'mergeTableCells' ]
-		},
-		cloudServices: CS_CONFIG
-	} )
-	.catch( err => {
-		console.error( err.stack );
-	} );
+/* Content removed as a workaround in #7944. Should be restored once the upstream is fixed. */