Bladeren bron

Add mathtype docs and dependencies.

Mateusz Samsel 6 jaren geleden
bovenliggende
commit
7430ba3866
5 gewijzigde bestanden met toevoegingen van 109 en 0 verwijderingen
  1. 4 0
      docs/_snippets/features/math-type.html
  2. 28 0
      docs/_snippets/features/math-type.js
  3. 64 0
      docs/features/mathtype.md
  4. 1 0
      package.json
  5. 12 0
      yarn.lock

+ 4 - 0
docs/_snippets/features/math-type.html

@@ -0,0 +1,4 @@
+<div id="math-type-editor">
+	<h2>MathType demo</h2>
+	<p>Select the square root or the C symbol from a toolbar to insert the MathType equation.</p>
+</div>

+ 28 - 0
docs/_snippets/features/math-type.js

@@ -0,0 +1,28 @@
+/**
+ * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
+ */
+
+/* globals document, console */
+
+import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
+import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials';
+import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
+import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
+import Heading from '@ckeditor/ckeditor5-heading/src/heading';
+import MathType from '@wiris/mathtype-ckeditor5';
+
+ClassicEditor
+	.create( document.querySelector( '#math-type-editor' ), {
+		plugins: [
+			Essentials,
+			Bold,
+			Italic,
+			Heading,
+			MathType
+		],
+		toolbar: [ 'heading', '|', 'bold', 'italic', '|', 'undo', 'redo', '|', 'MathType', 'ChemType' ]
+	} )
+	.catch( err => {
+		console.error( err.stack );
+	} );

File diff suppressed because it is too large
+ 64 - 0
docs/features/mathtype.md


+ 1 - 0
package.json

@@ -78,6 +78,7 @@
     "@ckeditor/ckeditor5-inspector": "^1.2.0",
     "@ckeditor/ckeditor5-real-time-collaboration": "^12.3.0",
     "@ckeditor/ckeditor5-track-changes": "^1.0.0",
+    "@wiris/mathtype-ckeditor5": "^7.15.0",
     "css-loader": "^1.0.0",
     "eslint": "^5.5.0",
     "eslint-config-ckeditor5": "^2.0.0",

+ 12 - 0
yarn.lock

@@ -1214,6 +1214,18 @@
     "@webassemblyjs/wast-parser" "1.8.5"
     "@xtuc/long" "4.2.2"
 
+"@wiris/ckeditor5-mathml@^1.0.0":
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/@wiris/ckeditor5-mathml/-/ckeditor5-mathml-1.1.0.tgz#ab88461f329ea467c0aa281a78dc8e0f3ddb5b1b"
+  integrity sha512-sX1OmxFLn6js/s3FVmO6+r83yaoJiwGt3SO3m0XSuZCuO8Kynj2IqZJSNBTjuLms4/mxqTupyZCFpjuyjM6XSg==
+
+"@wiris/mathtype-ckeditor5@^7.15.0":
+  version "7.16.0"
+  resolved "https://registry.yarnpkg.com/@wiris/mathtype-ckeditor5/-/mathtype-ckeditor5-7.16.0.tgz#93fb4ccf121d90445b176fdef73da90e3fb2055d"
+  integrity sha512-AB+wAJp13mQXRidHqs93YDHtYPgpwhJjkjMh6fTpnugEfsLnGLN0KmrFtagPXoVgQF7oA3NDhFAVo9Gs5NteLQ==
+  dependencies:
+    "@wiris/ckeditor5-mathml" "^1.0.0"
+
 "@xtuc/ieee754@^1.2.0":
   version "1.2.0"
   resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790"