By dandaka on
In TinyMCE settings I can set up pages, where I want TinyMCE to be shown. But I want to directly set textareas, which are to be replaced by TinyMCE, like in HTMLarea settings.
Is this possible?
TinyMCE 1.44 CVS, Drupal 4.6
In TinyMCE settings I can set up pages, where I want TinyMCE to be shown. But I want to directly set textareas, which are to be replaced by TinyMCE, like in HTMLarea settings.
Is this possible?
TinyMCE 1.44 CVS, Drupal 4.6
Comments
It's really annoying!
I want TinyMCE to be shown when I edit pages only. I set "show on specific pages" filter to "node/*". Must works, but not! TinyMCE appears on comment textarea (because it's located on this url). Also, it doesn't appear on nodes with path aliases.
I think it's a serious obstacle and it's should be replaced with HTMLarea-style settings.
i like it
the current mechanism where users may enable disable the editor when they need it is just perfect IMO. the htmlarea configuration was annoying.
i don't
This mechanism isn't flexible - fact. In some cases I have to forbid users to use rich-formatting.
Example: I want to use rich-formatting on page creation and not use on comments. This mechanism doesn't give me such possibility.
It does work
For your case you want just,
node/add/*
in your tinymce profile settings. And remove the line:
comment/*
Also, make sure you have a recent build of the tinymce module, builds before about a week ago were ignoring the profile settings.
and also
you must select the preference in admin/settings/comment for composing on separate page
it's limitation
Why should I tune one module to make another work as I want? I think it's not right way. Also I do want comment field to be located on node page. It stimulates users to post comments.
It doesn't in my case
It doesn't work when comment field is displayed below post.
> Also, make sure you have a recent build of the tinymce module
of course I do :)
per textarea configuration
You can tweak tinymce per textarea, though it takes some knowledge of Drupal. You just override the theme_tinymce_theme function in your sites theme. Checkout the module's README for more details.
Thanks, it also help me. But
Thanks, it also helps me.
But I think these settings must be avialable through module settings, not through 'knowledge of Drupal'.
You can read about
You can read about overriding theme functions here:
http://drupal.org/node/11811
Sooner or later I imagine you'll want to do this for other design components of your site anyway.
You may have some work to do ...
... I say that because in accordance with the tinymce instructions I read, you may have to name each textarea with a unique id and then refer to them in tinymce by their id name as individual textareas.
Going through and renaming each textarea by adding "id=whatever" may be difficult to do. If you use a system of category/section/number that might be workable. say admin_login_1 ... whatever will give you numbers to work with that will identfy each section/page/textarea.
Then (and I haven't looked yet) if any textareas are created by a loop you can replace the parameters in the id on the fly ...
Make any sense?
I say that because in
Can you point me?
you may have to name each
Each textarea already have unique id. But how do I refer to them in TinyMCE? What do you mean by this? Should I modify javascript of TinyMCE to be shown only on specific textareas with needed ids? If so it can be a temporary solution, but it doesn't solve the problem.
Soorryyeee I thought you said
you wanted to control which textareas were replaced with instances of the editor. Now I'm not sure what you meant. In any case, you may find that the commands for setting up htmlarea and tinymce are very much alike, but tinymce does not set up very much for you in default and htmlarea assumes what you want and does so.
If I'm not mistaken, the tinymce folder has a subfolder called "docs" and in combination with the information available on the tinymce support page, it tells you all the ways to set it up, which are nearly identical to htmlarea, but unfortunately you actually have to look at the documentation.
Sorry I couldn't help you,
Yes I do mean that
I want to control which textareas must be replaced with TinyMCE.
Your solution is to tune init script of TinyMCE (according to 'docs' folder). I should replace
tinyMCE.init({mode : "textareas"});
with
tinyMCE.init({mode : "specific_textareas"});
and then add to all textareas I want to be replaced with TinyMCE attribute mce_editable="true".
Do you think it's a good solution? It requires knowledge of HTML and Drupal internal mechanism just to set, where user wants to use rich-formatting. I think its too much.
Thanks for your help anyway :)
If only
If only there was simply an input filter called Rich Text editor... and it enabled the WYSIWYG if it was selected. This page by Page granulatrity would be nice.
David McIntosh
neofactor.com
That's pretty close to what I was thinking ...
... but then I thought you might just want to try different url's. Didn't someone suggest changing from /node to /somethingelse?
I wish I could help more, I just finished setting up tinymce on another cms but havent in Drupal yet, though I will because I like tinymce the best.
BTW try looking at the tinymce website manual pages to get all init details for tinymce ... look at http://tinymce.moxiecode.com/example_full.php?example=true
and read the PAGE SOURCE and copy whatever you want for your setup :)
PS - in another applicaton there is an iff(user=admin &&& pagesection=[siteinfo] || pagesection=[menus] || pagesection=[index]) then load tinymce ...
so it only loads the editor when certain pages are shown and only for the admin instead of loading for all users ...
If you can find that place in Drupal header block where the js scripts are inserted and the variable that records which page is being loaded, or at least which section the page is in, then let me know where please. I will be looking for it shortly as soon as I figure out how to make flash banners (which is very frustrating for a new-b).
Turn off TinyMCE per textarea field
I think the only way to switch off TinyMCE on individual textareas on a page which also contains other textareas where you want the editor is to have your theme override the theme_tinymce_theme() function. The default function starts with
Your override function would want to add an extra line there for each textarea where you want to switch off the editor.
Turn off TinyMCE for flashvideo_module file description
Here's how I got rid of TinyMCE with the flashvideo module. Since the file description textarea is uniquely named with the fid (file id), for example id="edit-files-242-description" where 242 is the fid, I did the following:
Doug Gough
TinyMCE & Panels 2
Trying to disable TinyMCE when using Panels 2 (breaking the popup mechanism). What should I have in my switch statement to handle this?
Panels 2 generates the following HTML:
I've tried:
But none of these are working.
Had the same problem myself.
Had the same problem myself. You can see what the
phptemplate_tinymce_theme()function is using for the textarea's by printing them out, so add:as the first line of the function and the first thing on the page will be a list of the text areas that are trying to use the TinyMCE module. From what I've seen you need to use the name of the text areas rather than the id, so the code you'll need to use is:
Hope that helps.
Toodle Pip
Sam
WYSIWYG API
All wysiwyg editors suffer from this.
Anyone interested in a generic wysiwyg API for Drupal should participate here:
http://drupal.org/project/wysiwyg
http://groups.drupal.org/wysiwyg
Daniel F. Kudwien
unleashed mind
Daniel 'sun' Kudwien
makers99
subscribing
subscribing
subscribing
subscribing
Update at
Update at http://drupal.org/node/129710#comment-1049023