Blogging on programming and life in general.

Fixing BlogEngine HTML Editor Problem

Posted in: BlogEngine

I have to say that after using BlogEngine for my first couple of posts, I can't think of any other Blogging tool to use. However, the thing that really annoys me about BlogEngine is the HTML editor when I want to create my postings. I have found that the TinyMCE HTML editor rejects some HTML tags. For example, <code> and <iframe> tags.

I have been desperately looking through the BlogEngine forum posting's to see if there is anyway to fix this problem. There was no specific way of rectifying this problem.

However, I found a way to fix this!!! Laughing

You will need to make a simple change to the tinyMCE.ascx file located in the admin folder (/wwwroot/admin/). Find the following line:

extended_valid_elements : "hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style],script[charset|defer|language|src|type]",

Now you will see in this line that there are tag elements listed as valid. All you have to do is add tags to this line in order for them to be accepted by the TinyMCE HTML editor. For example, I want my <code> and <iframe> tags to be accepted:

extended_valid_elements : "hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style],script[charset|defer|language|src|type],code,iframe",

And there you have it!

Hope this helps!

blog comments powered by Disqus