0
votes

Two questions:

1) Do you know if it's possible to create a new button in NicEdit which adds a DIV tag around the selected word, instead of a SAPN tag?

2) I would like to have buttons placed outside the NicEdit area, which calls the appropriate function in NicEdit to add ie.

DIV CLASS="XXX" TEXT SELECTED /END DIV

Do you know if one may simply call the appropriate function to add a DIV HTML tag?

Cheers

1

1 Answers

0
votes

1) To add a new button to the nicEditor panel you need to extend the nicEditorAdvanceButton, as seen here. The function you will write for this extended button when clicked will wrap your selected text with the html div tag.

2) This again is straightforward, you just need to call the function you require of the instance of the panel from where ever your outer button is placed.