How to get rid of TinyMCE in BE.net

TinyMCE can be a pain in the neck, especially when you like to have full control over your blog posts, or you’re using something like my Text Formatting Extension

Removing it from the blog engine is very easy, but it has some sideeffects. The smilie-extension isn’t working anymore. 😉 Okay.. it’s possible to bring it back to life. 😀

So let’s begin with our operation.

At first move your smilies to a save place!
They are located in /admin/tiny_mce/plugins/emotions/images
Now open Smilies.cs from your extension folder, and replace the path in line 24 to your new one.

[code=c#;col=off;Smile Extension modification example]
private const string LINK = „{2}„;
[/code]

Wasn’t that hard, right?
Oh sure, you can even replace the standard images by some new one.

Now you can delete your TinyMCE folder without loosing your emoteicons.
This step isn’t really needed, but I felt quite happy after deleting this huge folder.

Let’s continue. Go to your admin folder. There you’ll find two files called tinyMCE.ascx and tinyMCE.ascx.cs. Delete them too. You don’t need them anymore.

Now open the file htmlEditor.ascx. There you have to remove the second line (<%@ Register …) and replace the last one by this:

[code=html;col=off;Your new TextArea]

[/code]

Feel free to adjust the settings of this TextBox to your needs.

Because we renamed the TextBox we have to open htmlEditor.ascx.cs too, and replace all four occurrences of TinyMCE1 by textBox.

After applying these steps you’re free of TinyMCE, but one feature of BlogEngine.net isn’t working right know. The AutoSave options. To enable it again, one additional step is needed.

Step into the Pages subdirectory and open Add_entry.aspx
Look for an javascript function called AutoSave, and replace the first line after the bracket with this one:

[code=html;col=off;AutoSave with a simple TextArea]
var content = document.getElementById(“).value;
[/code]

Now you’re done. 🙂

Have fun with your regained freedom.

One thought on “How to get rid of TinyMCE in BE.net

Kommentare sind nicht möglich.