浏览代码

Handle differently br and nbsp fillers.

Maciej Gołaszewski 6 年之前
父节点
当前提交
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 ) ) {
 			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;
 			}
-
-			// if ( isText( domNode ) ) {
-			//
-			// } else {
-			// 	return null;
-			// }
 		}
 
 		// When node is inside UIElement return that UIElement as it's view representation.