Przeglądaj źródła

Add draft of docs page with WProofreader.

Mateusz Samsel 6 lat temu
rodzic
commit
17c6e6df96

+ 12 - 0
docs/_snippets/features/wproofreader.html

@@ -0,0 +1,12 @@
+<script type="text/javascript" src="https://svc.webspellchecker.net/spellcheck31/wscbundle/wscbundle.js"></script>
+<script>
+	window.WEBSPELLCHECKER_CONFIG = {
+		autoSearch: true,
+		enableGrammar: true,
+		serviceId: 'your-service-ID'
+	};
+</script>
+<div id="snippet-wproofreader" >
+	<p>Typos hapen. We striving to correct them. Hover on the marked words for instant correction suggestions or click the dialog icon in the bottom right corner to have the whole text proofread at once.</p>
+	<p>Or just paste your own text to get it proofread.</p>
+</div>

+ 22 - 0
docs/_snippets/features/wproofreader.js

@@ -0,0 +1,22 @@
+/**
+ * @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 ClassicEditor, console, window, document */
+
+import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config';
+
+ClassicEditor
+	.create( document.querySelector( '#snippet-wproofreader' ), {
+		cloudServices: CS_CONFIG,
+		toolbar: {
+			viewportTopOffset: window.getViewportTopOffsetConfig()
+		}
+	} )
+	.then( editor => {
+		window.editor = editor;
+	} )
+	.catch( err => {
+		console.error( err.stack );
+	} );

+ 13 - 0
docs/features/wproofreader.md

@@ -0,0 +1,13 @@
+---
+category: features
+---
+
+# WProofreader
+
+{@snippet build-classic-source}
+
+The editor can be integrated with [WProofreader](https://webspellchecker.com/wsc-proofreader/#proofreader-ckeditor5).
+
+See the demo below:
+
+{@snippet features/wproofreader}