Skip to content

Commit

Permalink
Add api check
Browse files Browse the repository at this point in the history
  • Loading branch information
francismengMS committed Jun 5, 2024
1 parent 807ef76 commit b0b15f2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const setContentModel: SetContentModel = (core, model, option, onNodeCrea
const editorContext = core.api.createEditorContext(core, true /*saveIndex*/);

if (option?.shouldMaintainSelection) {
if (CSS.highlights && Highlight) {
if ('highlights' in CSS && Highlight) {
const selectionEl = document.querySelector(SelectionSelector);
if (selectionEl && selectionEl.textContent) {
const textRange = new Range();
Expand Down

0 comments on commit b0b15f2

Please sign in to comment.