Closed (won't fix)
Project:
Wysiwyg
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Aug 2009 at 14:08 UTC
Updated:
9 Sep 2010 at 23:59 UTC
Sorry, this is a VERY busy issue list, but exactly how, with my seemingly normal install of wysiwyg and tinymce do I get the editor to show in the views UI so I can rich text edit the header field?
Comments
Comment #1
David.W commentedSame here: Subscr
Comment #2
twodAt the moment, you can't.
There are two reasons for this:
First, Views are not using "format" as they key to store the generated Input format selection markup (
filter_form()) when building their options forms.Currently they look like this:
Wysiwyg module specifically looks for the key "format" to know a textarea is input format enabled.
We'd need it to look like this:
A simple change which allows Wysiwyg module to know it should attach itself to those fields and to include some JavaScripts for the client.
But this only makes it work when not in Views' AJAX mode (or when JavaScript is completely disabled) as your theme will make sure all scripts are actually included in the output.
When using the Views UI in AJAX mode it won't work, even with the fix above, because Views never sends the scripts added using
drupal_add_jsback to the client in the JSON response.Views would need to fetch the JavaScripts collected by
drupal_add_js(), add them to the JSON response and then inject them into the page when the response is processed by the client.They must also be sure to not accidentally inject a script twice as that could cause problems.
I'll put together a patch for Views once I get some time over. I don't think Wysiwyg module will require any patches for this to work even in AJAX mode.
There's already an issue related to this in Views. #376392: Changing input format for header content
Comment #3
spydmobile commentedwhy is this marked fixed? I cannot see why.
F
Comment #4
twodIt was marked as a support request and has been answered, thus "fixed".
This should not require any changes to Wysiwyg module itself as it's Views' use of Form API that seems to not completely follow the guidelines. (Sorry but I forgot where I read those guidelines.)
I just found a Views issue which is more relevant than the previous one. #345722: edit-header and edit-footer behave funny
Comment #5
seutje commentedWould it seem sensible to change this line (124 in wywiwyg.module)
to this
or can you imagine some module using a
'_format'key without making it a input format?note: this doesn't work for the views ui, as the form is AJAXed in, so the js doesn't get added and stuff
but it works perfect for my use case, where I'm using views_header_footer module to expose the header on a separate page so my client doesn't have access to the entire view, but can edit the header
Comment #6
ziobudda commented+1 for fix #5
It works for me (I'm using the same module to bypass the original problem).
M.
Comment #7
awolfey commented+1 for #5.
Comment #8
pelicani commented+1 for #5. works like a charm.
Comment #9
Rob_Feature commented+1 for #5
Would love to see this fix rolled into the module if it made sense for everyone.
Comment #10
sunBetter title + proper status (no patch here) + proper version and component.
If I get this issue right, then #5 only helps with the http://drupal.org/project/views_header_footer resp. http://drupal.org/project/views_ui_basic module, but not for views_ui itself, because views_ui itself loads those forms via AJAX, which means that all the editor integration scripts are not loaded (which is a different issue).
Regarding views_ui_basic, I wonder why that module cannot simply use the regular $form array keys (i.e. 'format') and just assign different #parents?
Comment #11
Jonah Ellison commentedThe latest version of views_ui_basic has been modified to support WYSIWYG.
Comment #12
illSleepWheniDie commented#5 helped me, but I had to deal with an issue that wasn't mentioned here, so I'll add it here for reference:
Steps I took:
1) I installed the Views_UI_Basic module
2) Editted wysiwyg module according to instructions in #5
3) Configured the header and footer to show, with Full Html input filter
but the editor would not show ....
I fixed it by making sure that the ADMIN THEME shows up on the views_ui_basic pages. Put the code below into a custom module:
cheers!
Comment #13
sunIf http://drupal.org/project/views_ui_basic does the job, then that's good enough for us. D7 won't have this issue, so I hope we can happily ignore it for D6.