Make selected text bold/unbold

后端 未结 8 1938
谎友^
谎友^ 2020-12-08 12:18

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.

8条回答
  •  清歌不尽
    2020-12-08 12:51

    check this is it what u wanted ???

    using

    .toggleclass()
    

    (to make all text in text editor class bold only)

提交回复
热议问题