fabianmichael / kirby-markdown-field

Super-sophisticated markdown editor for Kirby 3, community built.
Other
160 stars 14 forks source link

Disabled Field appears "disabled" but content is still editable #168

Closed teichsta closed 1 year ago

teichsta commented 1 year ago

disabled is set to true and field appears to be disabled:

image

nevertheless the content is still editable:

image

and model is set dirty. It boils down to the fact that contenteditable attribute is still set to true

image

When changing this attribute to false (manually) the editor isn't editable anymore (as expected).

Any idea how to fix this @fabianmichael ?

teichsta commented 1 year ago

can i help with any further details @fabianmichael ?

fabianmichael commented 1 year ago

@teichsta TL;DR: Feel free to submit a PR, that updates the editor HTML manually, if this is urgent.

Long story: CodeMirror has seen quite a few releases that have probably changes quite a bit as well. The editor plugin currently uses 6.1.4 and CM is currently at 6.9.2 (and this bug has probably been tackled in the meantime). I will need some time for updating all the packages, which probably involves quite a bit of rewriting the editor itself. But since I am currently stuck in my daily work. I cannot give you any ETA on this. It will probably take a few months at best, until I’ll find the time for doing this huge update.

teichsta commented 1 year ago

this seems to be a kirby bug (see https://forum.getkirby.com/t/how-to-disable-all-blocks-in-a-blocks-field/28081). In my case i use the MarkdownBlock which doesn't get disabled through its surrounding BlocksField.