Q. I've added an image/table to my page/story/blog, but it is not showing up when I view it?
A. This is often caused by publishing the item with the Input format set to Filtered HTML. The HTML you've added is inserted into your database, but is filtered out when the item is displayed. This is why you will still see the when you edit the item.
Q. TinyMCE doesn't show up when using theme X?
An increasing number of themes seem to be missing
<?php
print $scripts
?>If the print $help is missing, users may see a blank page in TinyMCE settings.
Q. TinyMCE doesn't allow me to use embed/iframe/script/object?
TinyMCE is used by content management systems other than Drupal. While Drupal allows site administrators to filter potentially harmful code from being displayed, Moxiecode's default TinyMCE configuration filters content as well. Moxiecode's TinyMCE wiki provides documentation for the default set of valid html tags allowed as well the how to enable specific tags or the Full XHTML rule set.
Q. How do I enable TinyMCE for a specific a CCK text field
See this Handbook page.
Q. When I use the Enter/Return key, TinyMCE adds a new paragraph. How do I get a line break?
This is done similarly to many other programs by holding shift while pressing the Enter/Return.
How do I use TinyMCE with a language pack?
Example on installing extra language support: Swedish language for TinyMCE :
- Download the Swedish language pack from http://tinymce.moxiecode.com/i18n .
- Unzip it on your local computer. Find the folder with the 'langs', 'plugins' and 'themes' folders, and copy those folders to the 'sites\all\libraries\tinymce\jscripts\tiny_mce\' directory so that all the language files are placed in the same structure into those 3 folders that already exist there.
- In Drupal, select Swedish as the language for the desired profile in admin/config/content/wysiwyg (edit the profile, see under Basic settings).
(Initial solution suggested by AdrianB in Issue #62502.)
Grey areas on both sides of TinyMCE
Jay Wolf suggested adding a function to your template.php. Appears to work.
Q. How do I use the Word Count in the TinyMCE example template?
./tinymce/examples/example_template.htm has some javascript to compute a word count. I have TinyMCE working under Drupal 5, but don't know how to change templates / configure TinyMCE / put the logic in the page and invoke it so that my users can have a word count feature. Any step-by-step help would be appreciated!
Removing tinymce from textareas
The team at Computer Minds posted this tip...
TinyMCE has a habit of popping up right where you don't want it - the log field on a node edit page is a good example.
Lucklily it is a relatively easy job to theme out tinymce for a particular textarea.
The following theme override should go into your template.php file
function phptemplate_tinymce_theme($init, $textarea_name, $theme_name, $is_running) {
switch($textarea_name){
case 'nodewords-description':
case 'edit-nodewords-description':
unset($init);
return $init;
break;
default:
return theme_tinymce_theme($init, $textarea_name, $theme_name, $is_running);
}
}Just keep adding extra cases for any additional textareas ...
How to get JQuery and TinyMCE to work
Brian Pontarelli has some advice for getting TinyMCE to play nice with JQuery.
I was just having a ton of issues getting JQuery and TinyMCE to work. Sometimes loading of TinyMCE would hang and never complete and other times I would lose my tinyMCE or jQuery objects for some reason. Well, I’m not sure what the error was, but I finally got it working. It seems that you first need to completely load and initialize TinyMCE before loading JQuery. Here’s my code:
<head>
<!-- Tiny MCE -->
<script type="text/javascript" src="/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({ mode : "none"});
</script>
<!-- JQuery -->
<script type="text/javascript" src="/js/jquery/jquery-1.2.js"></script>
</head>This seems to work and allow me to do everything AJAX style and use TinyMCE editors in my AJAX forms (i.e. forms that I download the HTML for and that I submit via AJAX). Here’s a simple form snippet that is downloaded via AJAX and placed into a div:
<form action="submit-ajax">
<textarea id="editor" ...>
...
</form>
<script type="text/javascript">
tinyMCE.addMCEControl(document.getElementById("editor"), "editor");
</script>Q. Some of the original formatting of a page is lost when switching the
Enable Rich Text button on/off, or going from non-TinyMCE to TinyMCE editing on a page
An answer to this problem is to disable the ability for a user to turn TinyMCE functionality on and off, instead,
have a profile where only TinyMCE editing of text is allowed, and another profile that is scrictly text only w no TinyMCE etc.. depending on user. As a site administrator/designer I have a different profile for each, switching TinyMCE on & off on a page just creates too many problems. Also, create a new blank (no filtering) input format for the TinyMCE-only profile and set that to the default input type, and don't allow that to be changed as it can interfere with TinyMCE's formatting - this would be in the context of users who would only be using TinyMCE and don't need to enter HTML.