Editor: preserve the textarea content when saving, wpautop is not used and TinyMCE is hidden. Props WraithKenny, fixes #23743

git-svn-id: http://core.svn.wordpress.org/trunk@23745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2013-03-18 20:40:39 +00:00
parent b09f9fa157
commit 829a6f541b
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 ( ed.isHidden() )
o.content = o.element.value;
else
o.content = switchEditors.pre_wpautop(o.content);
}
// If editor is hidden, we just want the textarea's value to be saved
if ( ed.isHidden() )
o.content = o.element.value;
else if ( ed.getParam('wpautop', true) && typeof(switchEditors) == 'object' )
o.content = switchEditors.pre_wpautop(o.content);
});
/* disable for now