Created
January 30, 2010 06:43
-
-
Save davidhemphill/290460 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TinyMCE Settings. | |
tinyMCE.init({ | |
extended_valid_elements: 'style', | |
mode: 'exact', | |
elements: 'id_name', | |
theme: 'advanced', | |
theme_advanced_toolbar_location: 'top', | |
theme_advanced_toolbar_align: 'left', | |
plugins: 'safari, style, table, paste, media', | |
theme_advanced_buttons1: 'bold, italic, underline, justifyleft, justifycenter, justifyright, justifyfull, formatselect, fontselect, fontsizeselect', | |
theme_advanced_buttons2: 'pastetext, pasteword, search, replace, bullist, numlist, outdent, indent, blockquote, undo, redo, link, unlink, image, forecolor, backcolor, hr, charmap', | |
theme_advanced_buttons3: 'visualaid, tablecontrols, |, code, removeformat, media', | |
content_css: '/path/to/rich_text_editor.css', | |
paste_retain_style_properties: 'background, border, color, font-family, font-size, font-weight, line-height, text-align, text-decoration, text-indent', | |
auto_focus: 'id_name', | |
width: '500px', | |
height: '300px' | |
}); | |
// If using Prototype... | |
document.observe('dom:loaded', function() { | |
tinyMCE.getInstanceById('id_name').execCommand('mceSetContent', false, $('id_name').value); | |
}); | |
// If using jQuery... | |
$(document).ready(function() { | |
tinyMCE.getInstanceById('id_name').execCommand('mceSetContent', false, $('#id_name')[0].value); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment