If you are following the articles at Slicehost, then you may notice that PickledOnion uses nano as the default editor. I somehow like vi more than nano (not ready for a debate 😉 ) and was looking for a way to make vi the default config editor. After some googling, I found how to do it.
I am writing it down here so that all I have to remember is that I just need to search my blog if I need to do it again in future.
Okay the command you have to use is (I am assuming that you are not logged in as root, which is the recommended approach)
sudo update-alternatives --config editor
And then press the number corresponding to the editor which you want to use. Below is the screenshot of how it looked in my slice.
Posted in Unix/Server Stuff
Tagged Editor, Linux, nano, slicehost, Ubuntu, vi
Update: This blog post is outdated. Use TinyMCE Advanced WordPress Plugin instead.
Chris Kasten has found an Easter egg in WordPress 2.1 which enables many advanced buttons and options in your WYSIWYG editor. To get these advanced buttons you need to press alt-shift-v in Firefox or alt-v in IE. Pressing the same keys again hides it. Nice find right? But it will only work if you have enabled visual editor in your user profile.
After reading about it I was trying to find out whether it is possible to enable it by default. After some googling I found this thread in WordPress Support forum. To enable these advanced buttons by default, you need to fiddle with some files in the wp-includes folder. The tiny_mce_config.php file in the wp-includes\js\tinymce directory to be exact. You need to open the file directly and remove the ‘wp_adv_start‘ and ‘wp_adv_end‘ present on line 31. (Do this only if you are brave at heart 😉 ).
When I was testing the change I noticed that WordPress 2.1 also missed the ‘Edit HTML source’ button which was available in the previous versions. This made me to search the TinyMCE documentation and there I found that TinyMCE has lot of other formatting options too. And after some fiddling I have picked up all those buttons which I may use.
This is how my editor looks now. If you want all these options start editing your tiny_mce_config.php file or just grab my file and put it in the wp-includes\js\tinymce directory. (Be warned I am not responsible if something breaks 😉 and don’t forget to backup your original file). Also remember that next time you update your WordPress installation this file could be over written.
The new buttons which I like are
- Paste as simple Text
- Plase from Word
- Format cleaner
- Insert Customer Character
- Subscript, superscript
There are still some more buttons and options available and if you want to use them, then have a look at TinyMCE manual and change your config file accordingly. Meanwhile I will try to find out whether it is possible to have a WordPress plugin do it so that you don’t need to edit your file manually and till then happy hacking 😉
Posted in WordPress
Tagged Editor, TinyMCE, WordPress, WYSIWYG