You are not logged in.
#1 2008-05-30 17:33:28
- Jinxed
- Member
- Registered: 2008-05-30
- Posts: 1
How To Remove/Disable TinyMCE Toolbar.
Okay so I looked all over for a simple way to do this, I saw more people say something stupid like 'why would you want to disable the toolbar, thats the whole point'.
The answer is simple, to retain the paragraph formatting while restricting html code, bold and even italic. A perfect example, a comments feature. If a user posts a comment and types in a linebreak <enter> or paragraph <shift+enter> the final comment they post should look the same... So I scoured these forums, and put together my own solution...
// Initialize TinyMCE with the new plugin and listbox
tinyMCE.init({
mode : "textareas",
theme : "advanced",
theme_advanced_buttons1 : "",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : ""
});
is the init code, disabling the buttons... and then to remove the stupid space where the toolbar is located (even after removing the buttons this doesnt go away)
<style type="text/css">
<!--
.mceToolbar {
display:none;
}
'-->
</style>
put the style above the textarea in question, the end result is a clean 'textarea' look with formatting capabilities.
Good day!
Last edited by Jinxed (2008-05-30 17:34:04)
Offline
© 2003-2010