From my first blog on this domain, August 2, 2007. Recovered from the Internet Archive: https://web.archive.org/web/20081003082906/http://www.romanclarkson.us:80/post/HTML-Editor-Providers-Introduction-and-concept.aspx. The photos in this post were not archived.
I am publishing a first draft of my idea on using an HTML Editor provider of the BlogEngine.Net.
Essentially, I added an html provider to the web application. I got a little frustrated with tinyMCE. So, I decided that I wanted an easy way to interchange html editors. I prefer Telerik and FCKEditor over tinyMCE any day. However, the motto for BlogEngine.Net is no third party assemblies. I like that idea. No supporting third party assemblies. Period.
I am still working on the provider for tinyMCE. The issue that I am running into is the having the js files load and execute on the textbox that is being rendered. It can be fixed but I haven’t finished it yet.
The code is pretty well organized and you should be able to review it with much confusion. Here is what I did…
- I added a Control.Textbox class in the App_Code/Controls directory
- Removed the reference to the tinyMCE web user control page
<%@ Register src=”~/admin/tinyMCE.ascx” mce_src=”~/admin/tinyMCE.ascx” TagPrefix=”Blog” TagName=”TextEditor” %> - I left the <Blog:TextEditor runat=”server” id=”txtContent” TabIndex=”4″ /> extactlly the same.
- I added this to the App_Code
- I added this folder to support the two html editors that require external files
- I added this to the <BlogEngine> Section
- Run the solution and it works.
<BlogEngine>
<blogProvider defaultProvider=”XmlBlogProvider”>
<providers>
<add name=”XmlBlogProvider” type=”BlogEngine.Core.Providers.XmlBlogProvider”/>
<add name=”MSSQLBlogProvider” type=”BlogEngine.Core.Providers.MSSQLBlogProvider”/>
</providers>
</blogProvider>
<htmleditorprovider defaultProvider=”FCKEditorHTMLProvider”>
<providers>
<add name=”TextboxHTMLProvider” type=”BlogEngine.Core.Providers.HTMLEditors.TextboxHTMLEditorProvider” height=”200″ width=”500″/>
<add name=”FreeTextBoxHTMLProvider” type=”BlogEngine.Core.Providers.HTMLEditors.FreeTextBoxHTMLProvider” height=”200″ width=”500″/>
<add name=”FCKEditorHTMLProvider” type=”BlogEngine.Core.Providers.HTMLEditors.FCKEditorHTMLProvider” height=”300″ width=”800″/>
<add name=”tinyMCE” type=”BlogEngine.Core.Providers.HTMLEditors.tinyMCEHTMLEditorProvider” height=”300″ width=”800″/>
</providers>
</htmleditorprovider>
</BlogEngine>
Take a look and tell me what you think. I know how I am voting.