Try our conversational search powered by Generative AI!

Triggering autosave event/ change to element in UI (visual mode)



My colleague is trying to use the visual editor in Edit view a bit creatively. What he wants to do is to be able to write to a block property (with jQuery/ JS) and then have Edit autosave/ listen to changes on this property like it would normally for a string property if you start typing into the input area.

What happens (of course), is that UI doesn't pick up on any writing to the element with jQuery (using .html()), and so when you move the cursor to the input area and click your mouse, the whole field is cleared.

Now, I've been reading a bit on dojo and widgets, and I'd assume there is no clear workaround for this, but I'm making this post in case there is a simple way to make the UI pick up on changes to an element.

Thoughts on this? Or, if no direct way, tips to another approach? (I have a bunch of links but some guidance would be really appreciated.)

Jan 04, 2018 10:28

You might want to look at the new OPE features

They are designed to allow you to take control via front end frameworks of editing and rendering.

Jan 04, 2018 12:22

Thanks. This looks like a good option for a future solution.

For now it looks like the only way to do this is to 'do it properly' (creating an UI solution which is properly integrated). (Which is probably a good thing!)

Jan 08, 2018 12:30
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.