Quick Start Guide

1) Download the latest release http://yarte.codeplex.com/releases/view/48984 and add it as a reference to your project.

2) The 'HtmlEditor' control should show up in your toolbox. Drag it onto your form. Now you have an editor, but no buttons.

3) I've created a PredefinedButtonSets helper class. Right now, there's only one helper method in it, SetupDefaultButtons. Pass the HtmlEditor to that method in your form's constructor (or whatever), and you'll get my opinionated set of buttons (bold, italic, fonts, link, unlink, etc.)

4) Optional--instead of using PredefinedButtonSets, you can use these methods on HtmlEditr to customize your editor:
  • AddToolbarItem / AddToolbarItems - these take IHTMLEditorButton(s) and ToolStripItem(s)
  • AddFontSelector(IEnumerable<string> listofFonts)
  • AddFontSizeSelector(IEnumerable<int> fontSizes)
  • AddToolbarDivider()

Note that IHTMLEditorButtons is an interface supplied by YARTE, but ToolStripItems is supplied by .NET.

You can see an example of using PredefinedButtonSets in the Example project (source)

Last edited Jul 15, 2010 at 5:06 AM by mattgroves, version 2

Comments

No comments yet.