When a readonly note is temporarily changed to editable via the pen button, no NoteContextAwareWidget events are fired.
This is contrary to what happens if you toggle the readonly state by using the "Editable:" drop down, in that case an entitiesReloadedEvent is generated.
In addition, widgets that may rely on whether a note is rendered with a CKEditor (editable notes) or with raw html (readonly notes) may need that event to refresh the widget.
The Table of Contents Widget is one example of such widgets, the TOC navigation is done differently depending on whether the note is rendered with CKEditor or with raw html.
Right now this is being worked around in the TOC widget by checking the note type at TOC navigation time instead of at TOC generation time.
Trilium Version
0.50.3
What operating system are you using?
Windows
What is your setup?
Local (no sync)
Operating System Version
Windows 10
Description
When a readonly note is temporarily changed to editable via the pen button, no
NoteContextAwareWidget
events are fired.This is contrary to what happens if you toggle the readonly state by using the "Editable:" drop down, in that case an
entitiesReloadedEvent
is generated.In addition, widgets that may rely on whether a note is rendered with a
CKEditor
(editable notes) or with raw html (readonly notes) may need that event to refresh the widget.The Table of Contents Widget is one example of such widgets, the TOC navigation is done differently depending on whether the note is rendered with CKEditor or with raw html.
Right now this is being worked around in the TOC widget by checking the note type at TOC navigation time instead of at TOC generation time.