Browse Source

Docs: Added links to the original issue. [skip ci].

Aleksander Nowodzinski 6 years ago
parent
commit
460c6cbe9b

+ 2 - 0
packages/ckeditor5-widget/src/widget.js

@@ -275,6 +275,8 @@ export default class Widget extends Plugin {
 				let position = writer.createPositionAt( objectElement, isBackwards ? 'before' : 'after' );
 				const paragraph = writer.createElement( 'paragraph' );
 
+				// Split the parent when inside a block element.
+				// https://github.com/ckeditor/ckeditor5/issues/1529
 				if ( !model.schema.isLimit( objectElement.parent ) ) {
 					const paragraphLimit = model.schema.findAllowedParent( position, paragraph );
 

+ 1 - 0
packages/ckeditor5-widget/tests/widget.js

@@ -729,6 +729,7 @@ describe( 'Widget', () => {
 				'<paragraph>f[]ar</paragraph>'
 			);
 
+			// https://github.com/ckeditor/ckeditor5/issues/1529
 			it( 'should split parent when widget is inside a block element', () => {
 				model.schema.register( 'allowP', {
 					inheritAllFrom: '$block'