Closed medienbaecker closed 4 years ago
Hi,
here my solution:
Subscribe a event to refresh the editor: site/plugins/kirby-markdown-field/src/components/input/MarkdownInput.vue Line 102
mounted() {
...
window.addEventListener('kirby-bulder.expandBLock', () => {
this.$nextTick(() => this.editor.refresh())
});
}
Fire a event by open a tab in the kirby-builder: site/plugins/kirby-builder/src/components/BuilderBlock.vue Line 278
toggleExpand(expanded) {
...
if(this.expanded){
window.dispatchEvent(new Event('kirby-bulder.expandBLock'));
}
}
@medienbaecker is it still happening for you with Kirby 3.2.5+, the latest builder and the latest markdown field?
Seems fixed on my end.
@sylvainjule I just reproduced it in Kirby 3.3.0-rc.3 with the latest builder and markdown field:
It only works (or doesn't) when you load a page with already collapsed builder blocks.
This happens when using the markdown field in a builder field and you're loading a page with collapsed fieldsets:
To me it looks like the field "forgets" to initiate at the un-collapse event.