File tree Expand file tree Collapse file tree
plugins/ckeditor5-woltlab-metacode/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,12 +76,16 @@ export class WoltlabMetacode extends Plugin {
7676 this . #serializedAttributesToString( attributes ) ;
7777 const openingTag = writer . createText ( `[${ name } ${ attributeString } ]` ) ;
7878 const closingTag = writer . createText ( `[/${ name } ]` ) ;
79+ const parent = modelCursor . parent ;
7980
8081 // Check if the BBCode appears to be a block element.
8182 let isBlockElement = false ;
8283 const ancestors = modelCursor . getAncestors ( ) ;
8384 if ( ancestors [ ancestors . length - 1 ] . name === "$root" ) {
8485 isBlockElement = true ;
86+ } else if ( parent . name === "blockQuote" ) {
87+ // $text nodes only allowed on $block nodes
88+ isBlockElement = true ;
8589 } else {
8690 for ( const child of viewItem . getChildren ( ) ) {
8791 if ( child . is ( "containerElement" ) ) {
You can’t perform that action at this time.
0 commit comments