Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By aina on
Hi!
Can I automatically disable tinymce in a particular textarea?
Thanks,
Aina
Comments
Moxie
I use Moxie - an offshoot of TinyMCE, but it should be possible in TinyMCE also to exclude textareas on certain pages, e.g. in the Admin pages.
Look in the admin for TinyMCE and you should see a "Visibility" section. To prevent TinyMCE appearing on admin page put admin/* on the textbox and click the "Show on every page except the listed pages." radio button.
You could also turn on the "Show disable/enable rich text editor toggle:" such that you can turn of TinyMCE when it gets in the way.
Hope that helps.
Jon
-----------------------------------------------
GeologyRocks: http://www.geologyrocks.co.uk
I am looking for the same
I am looking for the same thing "to disable the tinymce editor on certain textboxes".
On my 'edit content' page, there is the body copy area textbox that i want to have the editor, but then there is also a comment box that I dont want to have the editor. Is this possible?
Doesn't look like it is an option in TinyMCE
I was looking to implement this too.
Closest I could find was:
http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/mode
For the moment I'm just setting TinyMCE as disabled by default and assuming that people will enable it when it is required.
Mike
--
OpenConcept | SEO | Tech | Screencasts
For other content types
This doesn't work for other content types because, as soon as you go into node editing, the URL changes to node/ etc. The path goes away.
Just follow the visibility
Just follow the visibility example, put 1 line after line where you don't want it to appear (make sure you hit the radio button for this option.)
Different examples,
node/add/*
node/add/story/*
node/*/story/*
forum/*
First line will not show tinymce on any add new node pages; second will not show tinymce on any added story nodes only, third example will not show tinymce on any pages with story nodes (edit/add/delete) and fourth example won't show tinymce on any form in your forums.
Yes
Oh, yeah! I'm still wondrously discovering meaningful URLs for *everything*. Thanks!
page specific not textarea specific
That works quite fine if you want to disable all of the textareas on a page. However what I wanted (and what I thought the original post was on), was disabling a specific text area on a page. So perhaps they'd have a form with a few textarea boxes, but one of them needs to just use plain text and not have the wysiwyg applied.
--
OpenConcept | SEO | Tech | Screencasts
Text area control desired
Agreed.
Solution
The solution posted at the following does the job:
http://avocadoshake.net/blog/2007/08/20/how-disable-tinymce-fields-drupa...
It would seem that the
It would seem that the TinyMCE module could have a setting to enable or disable for specific node type forms (i.e. enable only for Books or disable for Comments). Too bad it doesn't have this...
Wysiwyg API
there is a nice module, which worked perfectly for me: Wysiwyg API
Custom theming function extended
Here is a defacto that we use a lot.
Alan Davison
www.caignwebs.com.au
Alan Davison
Disabling TinyMCE from SPECIFIC text areas
Just replace this function in ther file tinymce-3.js with this:
That gives you plain comments, but feel free to add as many more ID's of text areas as you want! Hope this helps someone!
Trigger javascript on WYSIWYG attach
Related: #641900: Integration: Trigger javascript on WYSIWYG attach?
mgifford - November 7, 2007 -
You could always define a new Input Format (Administer -> Site Configuration -> Input Formats). Then you could just set the textarea to use the custom input format.
Thanks.
There have been a bunch of good ideas since then. The WYSIWYG module is great for controlling this.