TinyMce plug-in for Editor
TinyMce plug-in for Editor
Simple question,as I can't really see what happens behind the scenes and thus can't create a valid test case.
Does using field type tinymce always trigger a save using "allIfChanged" on submit in inline editing even if the content is not changed?
KR,
Bjørn H
This question has accepted answers - jump to:

Answers
Hi Bjørn,
No - as with all fields, if there is now change then only if there is a value change should the data be submitted. My guess is that the input value and what TinyMCE is then giving back as the value are different. What that difference is, I'm not sure without being able to see your use case. Are you able to give me a link to the page in question please?
Many thanks,
Allan
PM with access rights sent to you
KR,
Björn H
Follow up:
After viewing the page I got this reply from Allan:
Looking at the error, it is only happening with the "Kort..." column is empty. If I put a little test text into it, then it will correctly not submit when the value is unchanged.
The reason the empty text is having a problem is that when the inline editing is activated the value of
absolute.requirement_textis<p></p>. However, if it is left empty, then the value TinyMCE is returning is actually an empty string! Hence the value is different and the field submits.I'm not sure if there is an option in TinyMCE that will effect this, but one option might be to tweak the get function in the Editor / TinyMCE plugin. Instead of
return editor.getContent();you could have:That should prevent the submission since the string value is the same.
Allan
The reason this happens is of the setting in opts for the field:
So setting this to
will take away thsi side effect, but as I think there is a bug in the tinymce handling this correctly in certain siuations we have had, I still need the 'forced_root block' as is.
Anyway, my question has been answered.
KR;
Bjørn H
Nice one - thanks for writing this up for everyone
.
I've tweaked your post a little to add syntax highlighting.
Allan