Books

Wednesday, September 20, 2006

Tweaking Tinymce

Tinymce has a lot of cute functionality that is handy for email formatting but might become redundant when you want to format text to be sent as SMS. So how do you remove those function? Things like bullets list, underline and stuffs like that?

I had to do that recently and it is quite simple.
You navigate to the themes folder:
tinymce\jscripts\tiny_mce\themes

And to the particular theme you are using.
By default you have advanced, default and simple as the three themes option you have; although you can surely well come up with your own theme.

Once you are in the folder you will see a .js file titled: editor_template.js.
This file contains the HTML table used to format the textarea and a corresponding javascript function.
So to quickly disable any function you can just remove it from the function or just remove its corresponding HTML codes.
Using the later method, to remove the ‘redo’ function just look for this block of code:

< img src="{$themeurl}/images/redo.gif" title="{$lang_redo_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Redo\')" >

And delete it.

Do this for the other functionalities you might not be needing

Tinymce

I am recently working on building a DHTML application that will interface with an sms and mailing service and I had to provide a nice neat and functional textarea where messages to be sent are to be formatted; this is where tinymce came in handy.

TinyMCE is a small WYSIWYG editor control for web browsers such as MSIE or Mozill that enables the user to edit HTML and TEXT contents in a more user friendly way.

What I really like about it is its simplicity and yet how it comes in so handy. It’s free, being released under the terms of GNU lesser General Public License so you can go grab a distribution anytime you need it.

Thursday, September 14, 2006

4:49 A.m this cold Thursday morning, browsing from a friends PC, I finally did what I have been postponing all these days: start blogging on blogspot.

I had to make this decision after the server hosting my former blog was hacked; losing all my previous posts in the process.

I should believe that I have more stability here on blogspot...

4:53 A.m this cold Thursday morning, I finished my first post here on Blogspot.