I wanted to use the AJAX Control Toolkit HTML Editor, but wanted less functionality than the standard implementation. In fact, the Lite top toolbar without bottom toolbar was what I wanted.
To do this you need to copy the HTMLEditor.Samples.cs into your App_Code directory. You'll find it in Ajax Control Toolkit\SampleWebSite\App_Code\.
If, like me, you use VB rather than C#, then you'll need to convert it. I did this using the amazing tool at developerfusion.com. Obvisously, change the file extension to .vb too.
Then at the top of your aspx page you need to register it:
<%@ RegisterI'm assuming here that you've already used the AjaxControlToolkit in your project, otherwise you'll have to register the main assembly too.
TagPrefix="customEditors"
Namespace="AjaxControlToolkit.HTMLEditor.Samples" %>
And finally you can add your control like so:
<customEditors:LiteNoBottom ID="myEditor" runat="server" Height="300px" Width="100%" TabIndex="2" NoScript="true" NoUnicode="true" />Works for me!
OMG THANK YOU!
ReplyDeleteI never would have figured this out and you made it easy!!!
Thanks Dude!
I was only able to get this to work once I included HTMLEditor.CustomButtonsAndPopups.cs as well as specified the Assembly in the Register tag at the top of the page. Without those additions, I receive compile errors and parse errors on the ASPX markup.
ReplyDeleteGreat post and thank you!