I\'m wrapping the selected text in span tags, when you click a button. If I then select a different piece of text and click the button, that text also gets wrapped in tags.
check this is it what u wanted ???
using
.toggleclass()
(to make all text in text editor class bold only)