浏览代码

Docs: Expanded Paste from Word and Paste from Google Docs samples. [skip ci]

Anna Tomanek 5 年之前
父节点
当前提交
5798499724

+ 2 - 0
packages/ckeditor5-paste-from-office/docs/_snippets/features/build-paste-from-office-source.js

@@ -14,6 +14,7 @@ import Subscript from '@ckeditor/ckeditor5-basic-styles/src/subscript';
 import Superscript from '@ckeditor/ckeditor5-basic-styles/src/superscript';
 import Underline from '@ckeditor/ckeditor5-basic-styles/src/underline';
 import Font from '@ckeditor/ckeditor5-font/src/font';
+import HorizontalLine from '@ckeditor/ckeditor5-horizontal-line/src/horizontalline';
 import Indent from '@ckeditor/ckeditor5-indent/src/indent';
 import IndentBlock from '@ckeditor/ckeditor5-indent/src/indentblock';
 import ImageResize from '@ckeditor/ckeditor5-image/src/imageresize';
@@ -29,6 +30,7 @@ ClassicEditor.builtinPlugins.push(
 	Superscript,
 	Underline,
 	Font,
+	HorizontalLine,
 	Indent,
 	IndentBlock,
 	ImageResize,

+ 55 - 0
packages/ckeditor5-paste-from-office/docs/_snippets/features/paste-from-office.js

@@ -9,6 +9,61 @@ import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud
 
 ClassicEditor
 	.create( document.querySelector( '#snippet-paste-from-office' ), {
+		toolbar: {
+			items: [
+				'heading',
+				'|',
+				'fontSize',
+				'fontFamily',
+				'fontColor',
+				'fontBackgroundColor',
+				'|',
+				'bold',
+				'italic',
+				'underline',
+				'strikethrough',
+				'|',
+				'alignment',
+				'|',
+				'numberedList',
+				'bulletedList',
+				'|',
+				'indent',
+				'outdent',
+				'|',
+				'link',
+				'imageUpload',
+				'insertTable',
+				'horizontalLine',
+				'|',
+				'undo',
+				'redo'
+			],
+			viewportTopOffset: window.getViewportTopOffsetConfig()
+		},
+		image: {
+			styles: [
+				'full',
+				'alignLeft',
+				'alignRight'
+			],
+			toolbar: [
+				'imageStyle:alignLeft',
+				'imageStyle:full',
+				'imageStyle:alignRight',
+				'|',
+				'imageTextAlternative'
+			]
+		},
+		table: {
+			contentToolbar: [
+				'tableColumn',
+				'tableRow',
+				'mergeTableCells',
+				'tableProperties',
+				'tableCellProperties'
+			]
+		},
 		placeholder: 'Paste the content here to test the feature.',
 		cloudServices: CS_CONFIG
 	} )

二进制
packages/ckeditor5-paste-from-office/docs/assets/CKEditor5.PFO.Sample.Recognition_of_Achievement.docx


+ 2 - 0
packages/ckeditor5-paste-from-office/docs/features/paste-from-google-docs.md

@@ -1,6 +1,8 @@
 ---
 menu-title: Paste from Google Docs
 category: features-pasting
+classes: main__content--no-toc
+toc: false
 order: 20
 ---
 

+ 2 - 0
packages/ckeditor5-paste-from-office/docs/features/paste-from-word.md

@@ -1,6 +1,8 @@
 ---
 menu-title: Paste from Word
 category: features-pasting
+classes: main__content--no-toc
+toc: false
 order: 10
 ---