Last updated April 27, 2010. Created by joachim on February 9, 2009.
Edited by Funkymoses, joshuajabbour, silverwing, jota2010. Log in to edit this page.
Before reading on, you should ensure you have downloaded the proper versions of modules.
Installing Wysiwyg module
- Download, extract, and place Wysiwyg module in the modules folder like any other Drupal module.
Installing client-side editors
Wysiwyg module does not do anything useful until there is at least one editor library, such as TinyMCE, FCKeditor, or NicEdit. These need to be downloaded from third-party web sites and put into the Wysiwyg module folder. admin/settings/wysiwyg/profile provides a list of compatible third-party editor libraries along with links to their respective websites and download pages, as well as detailed on-screen installation instructions.
- Follow the download link for an editor.
- Extract the package.
- The settings page tells you where to place the extracted files. Some editors come wrapped in an additional folder, some others do not.
In general, editor library folders are all lowercase, and use the editor's short-name without any version number or additions.
- If the editor comes in a wrapper folder that equals its short-name, then you can put the entire wrapper folder straight into Wysiwyg's folder:
/sites/all/libraries/[editorname]Make sure that the resulting structure is NOT like
/sites/all/libraries/[editorname]/[editorname]. - If the editor comes in a wrapper folder with additional characters (e.g. version number), then you can put the entire wrapper folder into the sites/all/libraries folder, but need to rename it to its short-name:
/sites/all/libraries/[editorname]Make sure that the resulting structure is NOT like
/sites/all/libraries/[editorname]/[editorname-version]. - If the editor comes without a wrapper folder, then you need to create the editor's short-name folder yourself and copy the editor library files into that folder:
/sites/all/libraries/[editorname]
- If the editor comes in a wrapper folder that equals its short-name, then you can put the entire wrapper folder straight into Wysiwyg's folder:
- Go to
admin/settings/wysiwyg/profileand reload the page. The newly installed editor should be marked as "installed" in the installation instructions now. If not, see the FAQ - As a starting point and preliminary test whether the editor itself works, you can now associate the installed editor with an input format. Go to
admin/settings/filtersand determine your default input format. Then go back toadmin/settings/wysiwyg/profileand associate the editor with that format. Then go tonode/add/page, where the editor should appear. If it doesn't check under the body text area to see if you have a different input format selected. If it's the right input format go back to the WYSYWIG configuration page and edit the settings for the default format. Some editors (like CKEditor) default to showing nothing. Add a few buttons and try again. - If you prefer, you can now create a new input format and associate the editor with that or just leave it using the default.
- Now head back to
admin/settings/wysiwyg/profileone more time and click on the edit link beside your format/editor combination and fine tune the editor.
Pathing
Pathing is not always easy to figure out.
Extract the archive and copy its contents into a new folder in the following location:sites/all/libraries/tinymce
So the actual library can be found at:sites/all/libraries/tinymce/jscripts/tiny_mce/tiny_mce.js
Language selection
Be sure the language dropdown menu on Basic settings on page /admin/settings/wysiwyg/profile/2/edit is set correctly. For example, if RU-UTF8 is selected rather than RU, it will not work. Double check your language selection.
It just won't load.
In a nutshell, the wysiwyg module assumes that your theme uses the closure variable, if you don't then wysiwyg.js won't load!
To make it work, insert the following in your theme's page.tpl.php, just before the closing body tag......print $closure
This will result in a script tag added to the bottom of your page that refers to the wysiwyg source, e.g., "/xxx/sites/all/modules/downloaded/wysiwyg/wysiwyg.js?q"
Comments
It just won't load
print $closureis in page.tpl.php and it just won't load. I've tried about half of the editors listed on the page. Fresh D6 install (6.20).I would change the world, if God would give me the source code.
print $styles on top of page.tpl.php
Sorry, there is no God, can't help with that, however
<?php print $styles ?>needs to be on top of page.tpl.php too, unfortunately, that could be the problem.WYSIWYG
Awesomeness! I personally recommend TinyMCE. Easy to install and use, not to mention it's open source!
Perfecting web standards one page at a time.