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
- selector
- skin
- skin_variant
- table_inline_editing
- theme
- imagemanager_contextmenu
Callbacks
- cleanup_callback
- execcommand_callback
- file_browser_callback
- handle_event_callback
- handle_node_change_callback
- init_instance_callback
- onchange_callback
- oninit
- onpageload
- remove_instance_callback
- save_callback
- setup
- setupcontent_callback
- urlconverter_callback
Cleanup/Output
- apply_source_formatting
- convert_fonts_to_spans
- convert_newlines_to_brs
- custom_elements
- doctype
- element_format
- encoding
- entities
- entity_encoding
- extended_valid_elements
- fix_list_elements
- 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
- remove_linebreaks
- preformatted
- protect
- schema
- style_formats
- valid_children
- 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_
- theme_advanced_container_
_class - theme_advanced_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.
Was this article helpful? Yes - No
Well, that's awkward . Would you mind opening an issue or helping us out?
Thanks for the feedback!
Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.