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:
Andrew Ozz 2013-03-18 20:40:39 +00:00
parent 1c2a9008c5
commit cc7ca57f85
1 changed files with 5 additions and 6 deletions

View File

@ -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