TinyMCE:Configuration
From Moxiecode Documentation Wiki
Configuration reference
This document is the index/reference page for all available core configuration options in TinyMCE. There is also a list of old and deprecated config options for older versions of TinyMCE.
Configuration options
All configuration options below are to be placed within the tinyMCE.init() JavaScript call. This call will usually be made from outside of TinyMCE.
General
- accessibility_warnings
- auto_focus
- browsers
- class_filter
- custom_shortcuts
- dialog_type
- directionality
- editor_deselector
- editor_selector
- elements
- gecko_spellcheck
- keep_styles
- language
- mode
- nowrap
- object_resizing
- plugins
- readonly
- skin
- skin_variant
- strict_loading_mode
- table_inline_editing
- theme
Callbacks
Cleanup/Output
- apply_source_formatting
- cleanup
- cleanup_on_startup
- convert_fonts_to_spans
- convert_newlines_to_brs
- custom_elements
- doctype
- element_format
- encoding
- entities
- entity_encoding
- extended_valid_elements
- fix_content_duplication
- fix_list_elements
- fix_table_elements
- fix_nesting
- font_size_classes
- font_size_style_values
- force_p_newlines
- force_br_newlines
- force_hex_style_colors
- forced_root_block
- formats
- indentation
- inline_styles
- invalid_elements
- merge_styles_invalid_parents
- remove_linebreaks
- remove_redundant_brs
- preformatted
- style_formats
- valid_child_elements
- valid_elements
- verify_css_classes
- verify_html
- removeformat_selector
URL
Layout
Visual aids
Undo/Redo
- custom_undo_redo
- custom_undo_redo_levels
- custom_undo_redo_keyboard_shortcuts
- custom_undo_redo_restore_selection
File lists
Triggers/Patches
Advanced theme
- theme_advanced_layout_manager
- theme_advanced_blockformats
- theme_advanced_styles
- theme_advanced_source_editor_width
- theme_advanced_source_editor_height
- theme_advanced_source_editor_wrap
- theme_advanced_toolbar_location
- theme_advanced_toolbar_align
- theme_advanced_statusbar_location
- theme_advanced_buttons<1-n>
- theme_advanced_buttons<1-n>_add
- theme_advanced_buttons<1-n>_add_before
- theme_advanced_disable
- theme_advanced_containers
- theme_advanced_containers_default_class
- theme_advanced_containers_default_align
- theme_advanced_container_<container>
- theme_advanced_container_<container>_class
- theme_advanced_container_<container>_align
- theme_advanced_custom_layout
- theme_advanced_link_targets
- theme_advanced_resizing
- theme_advanced_resizing_min_width
- theme_advanced_resizing_min_height
- theme_advanced_resizing_max_width
- theme_advanced_resizing_max_height
- theme_advanced_resizing_use_cookie
- theme_advanced_resize_horizontal
- theme_advanced_path
- theme_advanced_fonts
- theme_advanced_font_sizes
- theme_advanced_text_colors
- theme_advanced_background_colors
- theme_advanced_default_foreground_color
- theme_advanced_default_background_color
- theme_advanced_more_colors
Initialization of TinyMCE
In order to initialize the TinyMCE the following code must be placed within HEAD element of a document. The following example is configured to convert all TEXTAREA elements into editors when the page loads. There are other modes as well.
Example of TinyMCE configuration
<html>
<head>
<script language="javascript" type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
theme : "advanced",
mode : "textareas"
});
</script>
</head>
NOTE: Remember to remove the last "," character in the options list. In some versions of Microsoft Internet Explorer, not removing the final comma will cause tinyMCE to be initialized with the default settings.
As an alternative, the tinyMCE.init statement can be put in it's own file and referenced in a script tag:
<html> <head> <script language="javascript" type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script> <script language="javascript" type="text/javascript" src="../jscripts/tiny_mce/basic_config.js"></script> </head>
Using this approach, you can create various configurations and reuse them in scripts as needed.
