summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt1
-rw-r--r--wysiwyg.module10
2 files changed, 11 insertions, 0 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 456ac8b..fcf8b43 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,6 +1,7 @@
Wysiwyg 6.x-2.x, xxxx-xx-xx
---------------------------
+#524126 by sun: Re-added #wysiwyg property to enforce no editor via code.
#1153458 by Deciphered: Fixed TinyMCE 'Verify HTML' setting being ignored.
#1079694 by TwoD: Fixed Whizzywig not restoring textarea styles when detached.
#1132142 by tacituseu, TwoD, sun: Fixed nicEdit not removing its submit handler.
diff --git a/wysiwyg.module b/wysiwyg.module
index c788d72..1e3f951 100644
--- a/wysiwyg.module
+++ b/wysiwyg.module
@@ -131,6 +131,16 @@ function wysiwyg_process_form(&$form) {
// The element before this element is the target form field.
$field = &$form[$children[$index - 1]];
+ // Allow modules to programmatically enforce no client-side editor by
+ // setting the #wysiwyg property to FALSE.
+ if (isset($field['#wysiwyg']) && !$field['#wysiwyg']) {
+ // A 'format' element should not have any child elements that may
+ // need processing, so it should be safe to skip the recursion that
+ // happens at the end of this function, and move on to the next
+ // element on the same level.
+ continue;
+ }
+
// If this textarea is #resizable and we will load at least one
// editor, then only load the behavior and let the 'none' editor
// attach/detach it to avoid hi-jacking the UI. Due to our CSS class