Skip to content

Commit

Permalink
fix(portable-text-editor): emit PT selections also in readOnly version
Browse files Browse the repository at this point in the history
  • Loading branch information
skogsmaskin authored and rexxars committed Sep 23, 2022
1 parent 13674f9 commit bd1fc33
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,16 @@ export const withPlugins = <T extends Editor>(
return withSchemaTypes(
withObjectKeys(
withPortableTextMarkModel(
withPortableTextBlockStyle(withUtils(withPlaceholderBlock(withPortableTextLists(e))))
withPortableTextBlockStyle(
withUtils(withPlaceholderBlock(withPortableTextLists(withPortableTextSelections(e))))
)
)
)
)
}

// The 'if' here is only to satisfy Typscript
if (withUndoRedo && withPatches && withPortableTextSelections) {
if (withUndoRedo && withPatches) {
// Ordering is important here, selection dealing last, data manipulation in the middle and core model stuff first.
return withSchemaTypes(
withObjectKeys(
Expand Down

0 comments on commit bd1fc33

Please sign in to comment.