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.)
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!)
Hi,
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.)