Skip to content

Commit

Permalink
Don't assume ckeditor exists on page
Browse files Browse the repository at this point in the history
  • Loading branch information
ejunga committed Dec 4, 2025
1 parent 256b508 commit 86db883
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tdx-enhanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -1226,9 +1226,11 @@
updateHeading(t)
}

for (const instance in CKEDITOR.instances) {
ckeinjectCustomCss(CKEDITOR.instances[instance]);
}
try {
for (const instance in CKEDITOR.instances) {
ckeinjectCustomCss(CKEDITOR.instances[instance]);
}
} catch (error) {}

//search whole document, frames may reset when reopened
// let frames = document.querySelectorAll("iframe:not(.customEmbed)")
Expand Down Expand Up @@ -1364,9 +1366,8 @@
CKEDITOR.on('instanceReady', function(event) {
ckeinjectCustomCss(event)
})
} catch (error) {

}
} catch (error) {}

async function injectToolbar() {
let iconBar = document.querySelector("#globalSearchBar")

Expand Down

0 comments on commit 86db883

Please sign in to comment.