In this tutorial you will learn how to replace the default editor in the DotNetNuke content management system with the KTML 4 online HTML editor.
In order to follow this tutorial you need:
An installed copy of the DotNetNuke content management system (either for .NET 1.1 or 2.0).
The .NET 1.1. or 2.0 ( the same version as for DotNetNuke) KTML 4 standalone package.
The HTML editor provider DLL file.You can find it inside the downloaded KTML 4 package, in the /documentation/CMS-Integration/dotnetNuke/version, where version can be 1.1 or 2.0
Some knowledge of .NET is recommended, but not mandatory.
A text editor.
To add KTML 4 as a rich text editor for DotNetNuke, you need to make the required files available to the system, and then make the CMS aware of the editor by editing the Web.config file.
First, copy the required files in place:
Copy the InterAKT.Ktml4.dll and InterAKT.Common.dll files in the ~\bin\ folder.
Browse to the ~/Provider/HtlmProviders/HtmlEditorProviders/ folder. Create a new subfolder named Ktml4HtmlEditorProvider.
In this folder copy the entire includes folder from the KTML4 standalone package.
Also copy the documentation/CMS-Integration/dotnetNuke/version/InterAKT.Ktml4HtmlEditorProvider.dll file to the ~/Provider/HtlmProviders/HtmlEditorProviders/Ktml4HtmlEditorProvider folder.
Next you have to make DotNetNuke aware of the editor:
Open the ~/Web.config file with a text editor.
Locate the line that defines the application level of trust. By default it should look like the following:
<trust level="Medium" originUrl="http://localhost/.*" />
Change the trust level to Full:
<trust level="Full" originUrl="http://localhost/.*" />
Next locate the htmlEditor section. By default it is configured like this:
<htmlEditor defaultProvider="Ftb3HtmlEditorProvider">
<providers>
<clear />
<!--
FTB options:
============
toolbarStyle="Office2003|OfficeXP|Office2000|OfficeMac" Sets the default FTB Toolbar style
enableProFeatures="[true|false]" Pro features require a license from FreeTextBox
or you may test them with localhost only
spellCheck="[{none}|IeSpellCheck|NetSpell]" IeSpellCheck is free for non-commercial use only
NetSpell requires some integration work
-->
<add name="Ftb3HtmlEditorProvider" type="DotNetNuke.HtmlEditor.Ftb3HtmlEditorProvider, DotNetNuke.Ftb3HtmlEditorProvider"
providerPath="~\Providers\HtmlEditorProviders\Ftb3HtmlEditorProvider\" toolbarStyle="Office2003" enableProFeatures="false" spellCheck="" />
</providers>
</htmlEditor>
You need to replace the defaultProvider value with the KTML editor, and also define it. The new section should look like - the lines to add have been bolded:
<htmlEditor defaultProvider="Ktml4HtmlEditorProvider">
<providers>
<clear />
<!--
FTB options:
============
toolbarStyle="Office2003|OfficeXP|Office2000|OfficeMac" Sets the default FTB Toolbar style
enableProFeatures="[true|false]" Pro features require a license from FreeTextBox
or you may test them with localhost only
spellCheck="[{none}|IeSpellCheck|NetSpell]" IeSpellCheck is free for non-commercial use only
NetSpell requires some integration work
-->
<add name="Ftb3HtmlEditorProvider" type="DotNetNuke.HtmlEditor.Ftb3HtmlEditorProvider, DotNetNuke.Ftb3HtmlEditorProvider" providerPath="~\Providers\HtmlEditorProviders\Ftb3HtmlEditorProvider\" toolbarStyle="Office2003" enableProFeatures="false" spellCheck="" />
<add name="Ktml4HtmlEditorProvider" type="DotNetNuke.HtmlEditor.Ktml4HtmlEditorProvider, InterAKT.Ktml4HtmlEditorProvider" providerPath="~\Providers\HtmlEditorProviders\Ktml4HtmlEditorProvider\"/>
</providers>
</htmlEditor>
Save the file
The KTML 4 editor has replaced the default editor. To check it, open the main page in a browser, login with the admin account and edit some content. The KTML4 editor will load instead of the default one: