Przeglądaj źródła

Docs: Updated Paste plain text snippet code.

Mgsy 5 lat temu
rodzic
commit
af72f795ca

+ 1 - 19
packages/ckeditor5-clipboard/docs/_snippets/features/build-paste-source.js

@@ -6,38 +6,20 @@
 /* globals window */
 
 import ClassicEditor from '@ckeditor/ckeditor5-build-classic/src/ckeditor';
-import PasteFromOffice from '@ckeditor/ckeditor5-paste-from-office/src/pastefromoffice';
-import Alignment from '@ckeditor/ckeditor5-alignment/src/alignment';
-import Code from '@ckeditor/ckeditor5-basic-styles/src/code';
 import Strikethrough from '@ckeditor/ckeditor5-basic-styles/src/strikethrough';
 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';
-import TableProperties from '@ckeditor/ckeditor5-table/src/tableproperties';
-import TableCellProperties from '@ckeditor/ckeditor5-table/src/tablecellproperties';
 
 ClassicEditor.builtinPlugins.push(
-	PasteFromOffice,
-	Alignment,
-	Code,
 	Strikethrough,
 	Subscript,
 	Superscript,
 	Underline,
 	Font,
-	HorizontalLine,
-	Indent,
-	IndentBlock,
-	ImageResize,
-	TableProperties,
-	TableCellProperties
+	ImageResize
 );
 
-ClassicEditor.defaultConfig.table.contentToolbar.push( 'tableProperties', 'tableCellProperties' );
-
 window.ClassicEditor = ClassicEditor;

+ 1 - 29
packages/ckeditor5-clipboard/docs/_snippets/features/paste-plain-text.js

@@ -23,39 +23,11 @@ ClassicEditor
 				'underline',
 				'strikethrough',
 				'|',
-				'alignment',
-				'|',
-				'indent',
-				'outdent',
-				'|',
 				'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'
-			]
-		},
 		fontFamily: {
 			supportAllValues: true
 		},
@@ -69,7 +41,7 @@ ClassicEditor
 	.then( editor => {
 		window.editor = editor;
 		// Prevent showing a warning notification when user is pasting a content from MS Word or Google Docs.
-		window.preventPasteFromOfficeNotification = true;
+		window.preventPasteFromOfficeNotification = false;
 	} )
 	.catch( err => {
 		console.error( err.stack );