Revision: 642
Author: batiste.bieler
Date: Fri Aug 14 08:59:30 2009
Log: Fix revision bug with tinyMCE
http://code.google.com/p/django-page-cms/source/detail?r=642
Modified:
/trunk/pages/media/pages/javascript/pages_form.js
=======================================
--- /trunk/pages/media/pages/javascript/pages_form.js Mon Aug 3 07:26:03
2009
+++ /trunk/pages/media/pages/javascript/pages_form.js Fri Aug 14 08:59:30
2009
@@ -95,15 +95,25 @@
if ($('a.disable', formrow).length) {
$('iframe',
formrow)[0].contentWindow.document.getElementsByTagName("body")[0].innerHTML
= html;
} else {
+ // support for TextInput
+ $('input', formrow).val(html);
+ // support for TextArea
var formrow_textarea = $('textarea',
formrow).val(html);
// support for WYMeditor
- if (WYMeditor) {
+ if (window.WYMeditor !== undefined) {
$(WYMeditor.INSTANCES).each(function (i, wym) {
if (formrow_textarea.attr('id') ===
wym._element.attr('id')) {
wym.html(html);
}
});
}
+ // support for TinyMCE
+ if (window.tinyMCE !== undefined) {
+ var editor = tinyMCE.get(formrow_textarea.attr('id'));
+ if (editor !== undefined) {
+ editor.setContent(html);
+ }
+ }
}
});
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---