Page 1 of 1
How can I remove the WYSIWYG editor from some fields?
Posted: Mon Mar 20, 2006 7:11 pm
by stopsatgreen
Hi,
In my News module I want to remove the WYSIWYG editor from the Summary field but keep it on the Story field. I'm pretty sure I have to remove it from the code manually - how can I do this?
I set the site up for some non-technical clients and they keep putting formatting in the Summary, which messes up the page design; if I can strip it out I think it will be easier for all concerned!
Re: How can I remove the WYSIWYG editor from some fields?
Posted: Mon Mar 20, 2006 8:16 pm
by Oliver
That's really simple. The [content] - tag in your template has got the option wysiwyg (true/false). Just turn it off there. You find this info in your admin panel under "Extensions" -> "Tags". Good luck.
Re: How can I remove the WYSIWYG editor from some fields?
Posted: Mon Mar 20, 2006 8:35 pm
by stopsatgreen
That's just for frontend editing, isn't it? Which page/template do I have to modify?
Re: How can I remove the WYSIWYG editor from some fields?
Posted: Mon Mar 20, 2006 10:46 pm
by Oliver
I have to realize that news templates are not as pretty as all other templates where my method would have worked...
Someone with programming skills is needed here!
Re: How can I remove the WYSIWYG editor from some fields?
Posted: Thu Mar 23, 2006 10:05 am
by stopsatgreen
Can anyone point me in the direction of the file I need to alter the code, please?
Re: How can I remove the WYSIWYG editor from some fields?
Posted: Thu Mar 23, 2006 10:44 am
by cyberman
Please change your template like this:
{content block='test' wysiwyg='false'}
Re: How can I remove the WYSIWYG editor from some fields?
Posted: Thu Mar 23, 2006 11:29 am
by stopsatgreen
Um... no. I need to remove it from inside Admin; this isn't a frontend edit. I want to remove the option inside the News module, so the admin who enters the news doesn't have to use the WYSIWYG.
Re: How can I remove the WYSIWYG editor from some fields?
Posted: Mon Mar 27, 2006 4:42 pm
by stopsatgreen
Sorry to keep bumping this up... last time, I promise
If somebody could please explain to me which file I need to alter, I could try to work out the rest for myself...
Re: How can I remove the WYSIWYG editor from some fields?
Posted: Mon Mar 27, 2006 9:30 pm
by Oliver
If it were a regular page, in your admin you'd navigate to Layout > Templates, click on the template you're using for that page, look for a tag named {content} and change it to {content wysiwyg='false'}.
Unforturnately you are not dealing with a regular page but a news item. This means its layout is controlled by a special template. You can access this from your admin navigating to Content > News.
There you have a Summary Template and a Detail Template. Thats how far my help goes - unfortrunately I am no programmer and have no clue on how these templates are configured.
Re: How can I remove the WYSIWYG editor from some fields?
Posted: Mon Mar 27, 2006 10:08 pm
by stopsatgreen
Thanks everyone for the help, but I think I'm not making myself clear... I want to remove the WYSIWYG editor from INSIDE the Admin area; ie, login to Admin, go to Content > News and click on a news story to create it... I want to keep the WYSIWYG for the Content area, but remove it from the Summary. I know I can disable it in the Preferences, but that removes it from all fields. I want to know which file I need to alter in order for this not to appear as an option.
Re: How can I remove the WYSIWYG editor from some fields?
Posted: Tue Mar 28, 2006 6:55 am
by jah
I think what you are looking for is this:
In action.addarticle.php line 144 (in my version)
Change from:
Code: Select all
$this->smarty->assign('inputsummary', $this->CreateTextArea(true, $id, $summary, 'summary', '', '', '', '', '80', '3'));
to:
Code: Select all
$this->smarty->assign('inputsummary', $this->CreateTextArea(false, $id, $summary, 'summary', '', '', '', '', '80', '3'));
do the same in action.editarticle.php line 168
Jon
Re: How can I remove the WYSIWYG editor from some fields?
Posted: Tue Mar 28, 2006 8:39 am
by stopsatgreen
Exactly that!!! Thanks very much!
Re: How can I remove the WYSIWYG editor from some fields?
Posted: Wed May 31, 2006 6:06 pm
by stopsatgreen
I've upgraded to 0.13 and now changing this option to 'false' no longer seems to work. Does anybody have any idea why?
Me being stupid! I forgot to change the line in action.editarticle.php.