Hello Stack Overflow community,
I discovered a method called str.bold()
that wraps text in <b></b>
tags, which is perfect for a small WYSIWYG editor (I understand there are many open source solutions available, but I wanted to learn by creating my own).
However, I am facing an issue with unbolding the text.
Here is what I have tried so far: http://jsfiddle.net/Kxmaf/178/
I am aware of
editor.execCommand('bold', false, '');
, but it produces different HTML results in each browser. I specifically need only <b></b>
, <i></i>
, and <u></u>
tags.
Any assistance would be greatly appreciated :)