Kaynağa Gözat

Merge branch 'master' into t/ckeditor5/2472

Aleksander Nowodzinski 6 yıl önce
ebeveyn
işleme
0c4af71b16

Dosya farkı çok büyük olduğundan ihmal edildi
+ 26 - 8
packages/ckeditor5-heading/docs/_snippets/features/title.html


+ 5 - 4
packages/ckeditor5-heading/docs/_snippets/features/title.js

@@ -5,16 +5,17 @@
 
 /* globals console, window, document, setTimeout */
 
-import ClassicEditor from '@ckeditor/ckeditor5-build-classic/src/ckeditor';
+import BaloonBlockEditor from '@ckeditor/ckeditor5-build-balloon-block/src/ckeditor';
 import Title from '@ckeditor/ckeditor5-heading/src/title';
 
 import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config';
 
-ClassicEditor.builtinPlugins.push( Title );
+BaloonBlockEditor.builtinPlugins.push( Title );
 
-ClassicEditor
+BaloonBlockEditor
 	.create( document.querySelector( '#snippet-title' ), {
-		cloudServices: CS_CONFIG
+		cloudServices: CS_CONFIG,
+		blockToolbar: [ 'bulletedList', 'numberedList', 'imageUpload', 'blockQuote', 'insertTable', 'mediaEmbed' ]
 	} )
 	.then( editor => {
 		window.editor = editor;

+ 4 - 0
packages/ckeditor5-heading/docs/features/title.md

@@ -7,8 +7,12 @@ menu-title: Document title
 
 The {@link module:heading/title~Title} feature enables support for adding the title field to your document. It helps ensure that there will always be a single title field at the beginning of your document.
 
+This feature can be used to implement an editor with a clear division of content into the title and body sections, similar to solutions available in Medium, Grammarly, Slack post editor or some content management systems.
+
 ## Demo
 
+Use the editor below to create a document with clearly separated title and body sections.
+
 {@snippet features/title}
 
 ## Keyboard navigation

+ 7 - 0
packages/ckeditor5-heading/src/headingediting.js

@@ -26,6 +26,13 @@ export default class HeadingEditing extends Plugin {
 	/**
 	 * @inheritDoc
 	 */
+	static get pluginName() {
+		return 'HeadingEditing';
+	}
+
+	/**
+	 * @inheritDoc
+	 */
 	constructor( editor ) {
 		super( editor );
 

+ 4 - 0
packages/ckeditor5-heading/tests/headingediting.js

@@ -25,6 +25,10 @@ describe( 'HeadingEditing', () => {
 			} );
 	} );
 
+	it( 'should have pluginName', () => {
+		expect( HeadingEditing.pluginName ).to.equal( 'HeadingEditing' );
+	} );
+
 	it( 'should be loaded', () => {
 		expect( editor.plugins.get( HeadingEditing ) ).to.be.instanceOf( HeadingEditing );
 	} );