0

I have a script that allows users to edit a div and save what they wrote in it. I want to add a feature so they can insert a link into highlighted text as well as be able to BOLD and UNDERLINE selected text.

For example: If I'm talking about a yahoo news article, I might want to add a hyperlink into the specific text part of Yahoo! rather than having something like "Blah blah blah, Check out this new article Yahoo!" (the entire text box) having the link attached to it.

I'm not a master coder so I can't think of a way of doing this, thanks for your help :).

Kalamarico
  • 5,466
  • 22
  • 53
  • 70
  • You don't need to be a master coder to achieve this simple task - just a coder will do – Jaromanda X Jan 19 '18 at 00:04
  • @JaromandaX Good to know, but where do I start? :P – ThisIsAGoodUsername Jan 19 '18 at 00:06
  • Here: Have you tried anything so far? StackOverflow isn't a free code-writing service, and expects you to [try to solve your own problem first](http://meta.stackoverflow.com/questions/261592). Please update your question to show what you have already tried, showing the specific problem you are facing in a [minimal, complete, and verifiable example](http://stackoverflow.com/help/mcve). For further information, please see [how to ask a good question](http://stackoverflow.com/help/how-to-ask), and take the [tour of the site](http://stackoverflow.com/tour) – Jaromanda X Jan 19 '18 at 00:07
  • @ThisIsAGoodUsername I think you should start here: [www.w3schools.com/js/](https://www.w3schools.com/js/) and possibly search SO before posting a question, since this question is already answered at least once [https://stackoverflow.com/questions/38218268/how-to-make-selected-text-bold-italic-underlined-in-javascript](https://stackoverflow.com/questions/38218268/how-to-make-selected-text-bold-italic-underlined-in-javascript) – Ivan86 Jan 19 '18 at 00:08

1 Answers1

0

try using froala wysiwys editor, it's nice, clean and very easy to use

A. Bechir
  • 120
  • 2
  • 15