Category "textselection"

How to add a new option in text selections toolbar

I want to add a new option in the text selection toolbar, an extra option apart of the classics cut, copy, paste, selectAll. enter image description here I use

How to find out if a selected text is surrounded by an html element of not

I am implementing a simple text editor with content editable div and a two buttons, one for bold text and one for italic. The way I am making a text bold or ita