-
Right now, I if double click on a text element, I can edit its text even if I am in preview mode. Is there a way to prevent this without going through each element and changing its Is there a way to do it globally? In my opinion text elements should be editable on preview mode by default. Maybe something that can be 'fixed' in future releases? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I also tried setting Maybe there's a way to 'refresh' the wrapper and have it propagate through its old children? |
Beta Was this translation helpful? Give feedback.
-
Something like this should work const fn = (ev) => ev.stopPropagation();
editor.on('run:core:preview', () => {
const frameDoc = editor.Canvas.getDocument();
frameDoc.addEventListener('dblclick', fn, { capture: true })
});
editor.on('stop:core:preview', () => {
const frameDoc = editor.Canvas.getDocument();
frameDoc.removeEventListener('dblclick', fn, { capture: true })
}); |
Beta Was this translation helpful? Give feedback.
Something like this should work