Codemirror loading fails in certain circumstances due to innerCodeElem reference #4547

Closed
opened 2026-02-05 09:04:46 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @ssddanbrown on GitHub (Mar 28, 2024).

Error thrown when viewing page:

Uncaught (in promise) TypeError: innerCodeElem is null
    highlightElem index.mjs:58
    highlight index.mjs:93
    setup page-display.js:38
    promise callback*setup page-display.js:38
    initComponent components.js:95
    init components.js:122
    <anonymous> app.js:37

Can reproduce with the following in the MD editor: (ignoring backslashes)

\```
   blank format
\```

Reported by Reddit user BaccanoMob here.

Originally created by @ssddanbrown on GitHub (Mar 28, 2024). Error thrown when viewing page: ``` Uncaught (in promise) TypeError: innerCodeElem is null highlightElem index.mjs:58 highlight index.mjs:93 setup page-display.js:38 promise callback*setup page-display.js:38 initComponent components.js:95 init components.js:122 <anonymous> app.js:37 ``` Can reproduce with the following in the MD editor: (ignoring backslashes) ``` \``` blank format \``` ``` Reported by [Reddit user BaccanoMob here](https://www.reddit.com/r/BookStack/comments/1bpqga0/how_do_i_make_the_code_block_with_line_numbers/).
OVERLORD added the 🐛 Bug💻 Front-End labels 2026-02-05 09:04:46 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4547