Closed moreinput closed 11 years ago
I think you should probably do the save separately.. mercury isn't intended to provide a form input style editing tool -- you probably want to look for something more suited to that (eg. CKEditor, or markItUp! -- http://markitup.jaysalvat.com/home/).
If you're looking to provide more information back to Mercury (context that mercury might not care about) you can set data attributes on the element (using jquery or html) and tell Mercury you want those serialized on save (in the configuration).
Or if you understand what needs to be done in javascript you can override the mercury save event and do whatever you'd like.
Thanks a lot for your help - I'll be separating the save process then.
@jejacks0n how can I do the following? What data-attribute do I provide? I am looking for a data attribute that mercury can use to pass on the field back to server without letting me edit it
if you're looking to provide more information back to Mercury (context that mercury might not care about) you can set data attributes on the element (using jquery or html) and tell Mercury you want those serialized on save (in the configuration).
Hello,
I'd like to ask whether it's possible to combine mercury editable regions with a form_for/form_tag: I'm trying to save changes made to some text with the mercury editor along with changes to some text_fields in one go. My issue is that I don't get the necessary params that includes all changes at once (with which I want to update my object) - I either get the mercury related changes in the params when using the mercury save button, or I get the changes related to the selects/radio_buttons/... when using the submit button of the form_for.
So is there a way to mark selects/radio_buttons/.. in a way that mercury puts them into the params when saving, or, vice-versa, is there a way to mark text_fields in a way that they're editable with mercury and the changes are then submitted via form_for submit button?
It might well be that I didn't find a solution myself as I'm a rails rookie, so I apologize in advance in case this question is nonsense.
Thanks... moreinput