Skip to content

Commit

Permalink
Added code comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
niegowski committed Jul 17, 2024
1 parent 9850438 commit c08d7d8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/ckeditor5-engine/src/model/utils/insertcontent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,9 @@ class Insertion {
}
}

// At this point, we split elements up to the parent in which `node` is allowed.
// Note that `_getAllowedIn()` checks if the `node` is allowed either directly, or when auto-paragraphed.
// So, let's check if the `node` is allowed directly. If not, we need to auto-paragraph it.
if ( !this.schema.checkChild( this.position.parent, node ) ) {
this._insertAutoParagraph();
}
Expand Down

0 comments on commit c08d7d8

Please sign in to comment.