I wanted to post our tinymce settings for others to reference and review. This is just a guide based on our experiences. As always, your implementation might be different based on your needs.
Please let me know if you see anything that is potentially bad:
Access
Authenticated users and above get to access tinymce.
Profiles
Our current practice is to run two user profiles:
1. editors
Any roles that are considered administrators or content editors get this.
2. default
Authenticated users, etc.
Both of these have the default settings with the following notes:
- Default state is true
- Allow users to choose is true
- Safari browser warning is true
Buttons
Both have the following buttons turned on:
- Bold
- Italic
- Underline
- Strikethrough
- Justify left
- Justify right
- Justify center
- Bullet list
- Numbered list
- Outdent
- Indent
- Undo
- Redo
- Link
- Anchor
- Cleanup
- Sup
- Sub
- Hr
- Remove format
- Charmap
We also give editors the image button. The reasoning behind this is that we have a structured image on most of our nodes, and the image button has the potential to break the interface when users reference very wide images.
Input
In order for most of the html to generate past the buttons, we have adjusted configured the default filtered html to use the following allowed html tags:
<a> <em> <strong> <u> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <p> <sub> <sup> <strike> <blockquote> <hr> <br>
(Note that in 4.7 the system path to adjust this list can be accessed at 'admin/filters/1/configure' )
Any suggestions are welcome.
Comments
This is for 4.7
Sorry for not flagging it as such.
--------------------
Sean B. Fuller
www.seanbfuller.com
www.tractiv.com
--------------------
Sean B. Fuller
www.seanbfuller.com
Can you center images
I'm having some trouble centering images with image_assist and tinymce. The images show but won't center and have a black border. Are having any luck with this?
I had real problems getting
I had real problems getting some images to go where they should in 4.7. Whereas the normal align command has always resolved this until now it seemed to like:
float: left;
in the style.css if I wanted to make the image go left.
Don't know how you work this into the TinyMCE output but it might prove to be the issue.
Best wishes,
Ed
How did you get blockquotes
How did you get blockquotes to work with TinyMCE?
two profiles for users?
A question regarding your two profiles- I was unable to get a different profile to work for other user roles if I had a profile defined for the "authenticated user" role. Does this work for you? If so, what databse and PHP versions are you using?
related bug reports/patches:
http://drupal.org/node/66014
http://drupal.org/node/60667
---
Work: BioRAFT
Thanks for posting this...
I've been trying to figure out how to work tinymce with filtered html for hours and this is great.
I thought I was stuck with the "rich text editor" option --- which basically means that when you turn tinymce *off* you're stuck with *no* formatting whatsoever. Anyhow, this looks great. So, thanks.
Albert
Esalen Alumni Group
Filtered HTML input format fails with TinyMCE no matter what
Here's the interesting thing. I set up a new input format, called "Rich Text Editing", and set the filters and settings to be absolutely identical to Filtered HTML. Everything works great in TinyMCE now. But if I switch the input format to Filtered HTML on any node, it fails most horribly, displaying all my <br /> tags and not rendering special entities (These render as, for example,
&instead of&).Not sure why this is, but surely it will be helpful to someone else.
Filtered HTML input format fails with TinyMCE no matter what
Yes, the above worked for me as well as I had the same problem. Create a new input format with the same filtered options as 'Filtered html', then make this new format your default and it works well with TinyMCE...phew!
just wish i knew how to turn TinyMCE off for any disknode creations as it mucks up the file paths (and loses them on edit) when using mulitple files per node...?
If what you mean is that you
If what you mean is that you want to turn off tinymce for certain textareas on your site, check out the theme_tinymce_theme function. I was having similar problems with project module, and I was able to create a phptemplate_tinymce_theme funciton in my template.php. This function was the same as in the module, only I added 'components' (the element name of the project module's "component" text area.
That reminds me, I should probably submit an issue to tinymce for that.
Check out the INSTALL.txt file, and near the bottom look for the TWEAKING THE TINYMCE THEME section:
"Developers have complete control over when and how tinymce is enabled for each textarea inside Drupal by creating a custom Drupal theme function. The following example assumes you're using a phptemplate based theme."
--------------------
Sean B. Fuller
www.seanbfuller.com
www.tractiv.com
--------------------
Sean B. Fuller
www.seanbfuller.com
Filtered HTML, TinyMCE and Quote Module Working Correctly
Thank you, Sean and Ogredude for posting this. Sean - the standard you created helped greatly towards not re-inventing the wheel!
And - Ogredude - I also found that I lost all my HTML filters in the standard Filtered HTML. You know you have lost these filters when you can NOT see the "Allowed HTML tags:" line in your Filtered HTML list while editing a node. The symptom is that the output contains your HTML characters.
Following your instructions, I created a new "FIltered HMTL" input filter and all worked again.
I also have the Quote module installed, and found that I needed to click the 'rearrange' tab in my new input filter to make sure the 'quote' filter had a weight that would put it lower than all other filters. Otherwise, my paragraph, break, etc tags were not being picked up, and all content was smashed together.
So far, so good...
Thanks again - your posts saved me many hours of analysis!
Does it work with 5x
Has anyone tried this method with Drupal 5x? I am having difficulty with tinyMCE working correctly with my filtered HTML
Seems to work fine
I tried this for 5x and it seems to work fine. Thanks for the original post, Sean. I find quick entries on "what I did to get (X) to work" very helpful.
Spell checker for 5.1
Has any one got a spell checker working on 5.1.?
How about the CCS style, when your using compiled style sheets?
Ron Mahon
The-villages-info-center.com
Yet another Drupal Site
Filtered HTML, TinyMCE Working - how?
Drupal 5.1 here.
TinyMCE was working nicely and then it stopped. (After my update to OSX10.4 & PHP5 but not sure if there's a connection).
No quote module.
Following the suggestions here, I made an input format with the same settings as filtered HTML. Nothing worked. Then I tried full HTML, and *almost* everything worked, except the line spacing is still weird (double spacing no matter what I do).
What am I missing?
Sometimes trial and error works...
What I observed is that if I get rid of the spaces between the tags in the "allowed HTML tags" box, I get an input format that works with TinyMCE in 5.1.
I don't know why, but it does.
More trial and error : full HTML input format
Thank you for your help.
I got rid of the spaces - it 'cured' some issues. Then I switched to Full HTML input format and the rest of the issues seemed to go away.
I know Full HTML is deprecated but not sure what else to do.
WYSIWYG input is the core thing the users want.
Thank you, thank you, thank
Thank you, thank you, thank you! Your tips here made Tinymce work for me under Drupal 5.1.
Cheerily Yours,
Tim O'Laguna
Former Commodore 64 Junior Wizard
Great stuff
This is good stuff. I had just finished spending some time figuring most of this out myself when I came across your posting which helped me finish it off properly.
One question I have though ... does anyone know of a plugin or something that provides buttons for <code> <dt> and <dd> tags?