diff --git a/packages/ckeditor5-paste-from-office/src/filters/list.ts b/packages/ckeditor5-paste-from-office/src/filters/list.ts index 69f37163770..508cd92ca6f 100644 --- a/packages/ckeditor5-paste-from-office/src/filters/list.ts +++ b/packages/ckeditor5-paste-from-office/src/filters/list.ts @@ -261,7 +261,11 @@ function findListMarkerNode( element: ViewElement ): ViewText | null { continue; } - const textNodeOrElement = childNode.getChild( 0 )!; + const textNodeOrElement = childNode.getChild( 0 ); + + if ( !textNodeOrElement ) { + continue; + } // If already found the marker element, use it. if ( textNodeOrElement.is( '$text' ) ) { diff --git a/packages/ckeditor5-paste-from-office/tests/filters/list.js b/packages/ckeditor5-paste-from-office/tests/filters/list.js index aa26890e371..78df3087e38 100644 --- a/packages/ckeditor5-paste-from-office/tests/filters/list.js +++ b/packages/ckeditor5-paste-from-office/tests/filters/list.js @@ -82,6 +82,28 @@ describe( 'PasteFromOffice - filters', () => { expect( stringify( view ) ).to.equal( '' ); } ); + it( 'handles RTL lists with bold item - #13711', () => { + const html = '
' +
+ '' +
+ 'Foo