Editor: preserve the textarea content when saving, wpautop is not used and TinyMCE is hidden. Props WraithKenny, fixes #23743
git-svn-id: https://develop.svn.wordpress.org/trunk@23745 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1c2a9008c5
commit
cc7ca57f85
|
@ -217,12 +217,11 @@
|
|||
});
|
||||
|
||||
ed.onSaveContent.add(function(ed, o) {
|
||||
if ( ed.getParam('wpautop', true) && typeof(switchEditors) == 'object' ) {
|
||||
// If editor is hidden, we just want the textarea's value to be saved
|
||||
if ( ed.isHidden() )
|
||||
o.content = o.element.value;
|
||||
else
|
||||
else if ( ed.getParam('wpautop', true) && typeof(switchEditors) == 'object' )
|
||||
o.content = switchEditors.pre_wpautop(o.content);
|
||||
}
|
||||
});
|
||||
|
||||
/* disable for now
|
||||
|
|
Loading…
Reference in New Issue