HTML Editor Providers - Introduction and concept

3. August 2007

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...

  1. I added a Control.Textbox class in the App_Code/Controls directory
  2. Removed the reference to the tinyMCE web user control page
    <%@ Register src="~/admin/tinyMCE.ascx" mce_src="~/admin/tinyMCE.ascx" TagPrefix="Blog" TagName="TextEditor" %>
  3. I left the <Blog:TextEditor runat="server" id="txtContent" TabIndex="4" /> extactlly the same.
  4. I added this to the App_Code
    image 
  5. I added this folder to support the two html editors that require external files
    image
  6. I added this to the <BlogEngine> Section
  7. <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>
  8. Run the solution and it works.

Take a look and tell me what you think.  I know how I am voting.

BlogEngine.NET.zip (2.62 mb)

.Net, Reviews, Visual Studio, BlogEngine.Net , ,