Hi
I've posted this question in the forums and on the IRC but no one has responded so I'll give the the groups a go.
I need to know how I can get the WYSIWYG editor to work with the summary field. I cant seem to find a way to get the summary field to work with a WYSIWYG editor.
At the moment to get what I need I have to create extra blocks to act as teasers. This approach is causing bloat but I need different teasers than the body of an article or other content type and the teasers need to be properly formatted.
The content needs to be managed and administered by an not coder and needs to work with the WYSIWYG editor.
I understand there is a break that can be put in the body that will break the teaser from the body but this seems to be a redundant concept as there is already a summary field.
I'm using D7 any help would be much appreciated.
Marcel

Comments
try something else
I've spent some time on this without success. It seems that the WYSIWYG editor is linked to the format, and the summary has no format selector. I've tried calling Drupal.wysiwygAttach() in JS directly but also without luck. I think you would be better off adding a separate textarea field for the summary.
HTH
Shaun
Often I'll add a separate
Often I'll add a separate field on a content type called "Summary". That could potentially solve your problem if you enabled input formats on your new summary field.
Views?
This might not be the answer to your question - but I often take the approach of ignoring the standard summary, and just use Views create specific page views or block views, using the body field with a specific trimmed character limit to create the summary, with an added "...read more" or similar. I find that the more I can get Views to do automagically, the easier for the users to manage.
Did anyone every come up with
Did anyone every come up with a solution?
I found one here
I found one here http://theunraveler.com/blog/2012/drupal-7-how-add-wysiwyg-editor-text-s...
I have it working nicely now
I have it working nicely now with the code from gberniers previous post (http://theunraveler.com/blog/2012/drupal-7-how-add-wysiwyg-editor-text-s...) and a little javascript tweak that I found at http://www.hashbangcode.com/blog/adding-wisiwyg-support-drupal-7-node-su...
That tweak stops the show/hide field showing up more than once and what it does is change the 'label' selectors in the JavaScript to 'label:first'.
Thanks cafuego. those links
Thanks cafuego. those links worked great showing WYSIWYG on summary field.
One small thing though. (Edit summary) link shows up twice in Drupal7
Can you post the whole javascript code that worked for you?
re: Thanks cafuego. those links
I can indeed, here you go: https://github.com/web-arts-unimelb/profile/blob/master/modules/custom/u...
You probably want to change the strings that refer to "Front page summary", those are specific to the sites I use it on.
To also grab the code that attaches it to the form, have a look at https://github.com/web-arts-unimelb/profile/blob/master/modules/custom/u... On line 44 that file also references the extra CSS I use to hide format selection on the summary field.
Summary field shows up when there should not be one
First of all, thank you Cafuego for your work on this. It has brought me very close to the solution I need.
However, I just discovered that the code you graciously provided exposes the WYSIWYG and the summary field to users who should not see it.
For instance, I have content type on my site with plain text body field where the summary input is suppose to be disabled, but when I use this code it will provide a link to show the summary field with the WYSIWYG.
I'm working on fix, but I'm not I'm that proficient with jQuery. Any ideas from you or anyone else, would be greatly appreciated!
Thanks in advance!
Steve
Found a better solution...
The more I thought about this, the more I thought this needs to be handled differently for security reasons so that things are exposed to users who should see them. I don't know if this correct or not, but it led me to search around some more and I found a patch for the WYSIWYG module that accomplishes what we are all trying to do here. You can find the patch http://drupal.org/node/741606#comment-6346640
Hope this helps someone else.
Steve