Need Help

Jun 3, 2016 at 3:05 PM

I need help, to add Underline button to default toolbar, please help me, i have added toolbar using bellow code.


i also want to add custom button to this.
Jun 3, 2016 at 3:08 PM
The "SetupDefaultButtons" is simply a convenient method, but you can add buttons of your own.

To add buttons, you can use AddToolbarItem.

You can check out the document for more information:
Jun 3, 2016 at 3:15 PM
can you give me example code, please

Thanks & Regards,
Sunil Dabhi

Jun 3, 2016 at 3:21 PM
Edited Jun 3, 2016 at 3:21 PM
It's right there in that link.

Look at IHTMLEditorButton example at the bottom for how you would create a custom button class.

Once you've created that class (maybe you called it MyButton), use AddToolBarItem(new MyButton()).
Jun 3, 2016 at 3:23 PM
Oh, actually I see you want to add Underline, which already exists.

So you can just AddToolBarItem(new UnderlineButton())

I highly advise against using underline if this tool is creating content for the web. Underlines usually mean "link" to people, so you don't want underlined text that's not a link. See:
Jun 3, 2016 at 3:51 PM
ok thanks

Thanks & Regards,
Sunil Dabhi