8
0
Просмотр исходного кода

Handle differently br and nbsp fillers.

Maciej Gołaszewski 6 лет назад
Родитель
Сommit
2e811ee429
1 измененных файлов с 5 добавлено и 7 удалено
  1. 5 7
      packages/ckeditor5-engine/src/view/domconverter.js

+ 5 - 7
packages/ckeditor5-engine/src/view/domconverter.js

@@ -373,15 +373,13 @@ export default class DomConverter {
 		if ( isBlockFiller( domNode, this.blockFiller ) ) {
 		if ( isBlockFiller( domNode, this.blockFiller ) ) {
 			const isSingle = domNode.parentNode && domNode.parentNode.childNodes.length <= 1;
 			const isSingle = domNode.parentNode && domNode.parentNode.childNodes.length <= 1;
 
 
-			if ( isSingle && _hasDomParentOfType( domNode, this.blockElements ) ) {
+			if ( isText( domNode ) ) {
+				if ( isSingle && _hasDomParentOfType( domNode, this.blockElements ) ) {
+					return null;
+				}
+			} else {
 				return null;
 				return null;
 			}
 			}
-
-			// if ( isText( domNode ) ) {
-			//
-			// } else {
-			// 	return null;
-			// }
 		}
 		}
 
 
 		// When node is inside UIElement return that UIElement as it's view representation.
 		// When node is inside UIElement return that UIElement as it's view representation.