Skip to content

Commit

Permalink
Add flight check in InsertEntity #1602
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanValverdeU authored Feb 24, 2023
1 parent 144aa2d commit ac35447
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/roosterjs-editor-api/lib/format/insertEntity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
ChangeSource,
ContentPosition,
Entity,
ExperimentalFeatures,
IEditor,
NodePosition,
PositionType,
Expand Down Expand Up @@ -111,7 +112,11 @@ export default function insertEntity(
}

const entity = getEntityFromElement(wrapper);
if (!isBlock && isReadonly) {
if (
!isBlock &&
isReadonly &&
editor.isFeatureEnabled(ExperimentalFeatures.InlineEntityReadOnlyDelimiters)
) {
addDelimiters(entity.wrapper);
}

Expand Down

0 comments on commit ac35447

Please sign in to comment.