This is a limitation of the way we're currently doing things.
We can only sync back/save/store modifications by the user through forms.
We want to be able to edit textual fields (such as the body field) "directly" (i.e. with contentEditable).
When we load the form for the body field, there's a "summary" form item (by default; the user can configure it to not have a summary). We keep this form hidden.
Upon saving the "directly" edited textual field, its value simply gets set on every input[type=text] in the hidden form, then submit it.
Resulting in summary == body text.
There are two ways around this:
Don't allow text to be "directly" edited when the summary stuff is enabled, this will cause the form to be shown, and thus the "summary" stuff to be editable by the user.
Prevent everyinput[type=text] to get the value, but only the right one.
Went with a variation of 2: if the input name has summary in it, don't select it. Teasers can't be inline edited right now so it shouldn't be to much of an issue. Would be great to select only the right one but that harder to do :)
Comments
Comment #1
wim leersBy "teaser", you mean "summary"?
This is a limitation of the way we're currently doing things.
contentEditable).input[type=text]in the hidden form, then submit it.There are two ways around this:
input[type=text]to get the value, but only the right one.Comment #2
nod_That was really helpful, thanks!
Went with a variation of 2: if the input name has summary in it, don't select it. Teasers can't be inline edited right now so it shouldn't be to much of an issue. Would be great to select only the right one but that harder to do :)
http://drupalcode.org/project/edit.git/commitdiff/0eeaeb75e1d547e9c6cdc8...
Comment #3
wim leers#2: HAHAHAHA! Now THAT is hacky!
Comment #4
nod_Looks like it needs proper solving actually #1894298: When editing body field with ckeditor teaser == body text
Comment #5
wim leers#4: eh… you just linked to this very issue? :P
Comment #6
nod_Woops #1895142: Metatags + Edit module prevents save of body field but I was able to solve it better so no big deal.
Comment #7
webchick