Save selection text and show it later in html and javascript

后端 未结 8 908
悲哀的现实
悲哀的现实 2020-12-14 18:39

I have a difficult situation with html and javascript. My html page allows user to select text and highlight it with colors. Now I want to save the state into database to sh

8条回答
  •  借酒劲吻你
    2020-12-14 19:09

    my idea is to add at the start and end of selected text after that when you save the document whole html is saved into the database so when he retrieves the record back highlighted text will remain.

    
    

    this is a paragraph creted to demonstrate highlighting selected text

    it will be comfortable in jquery to add elements

提交回复
热议问题