How to make selected text bold/italic/underlined in javascript
Loading
How to make selected text bold/italic/underlined in javascript
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Naimish MakwanaPosted Feb 1, 2023, 10:11 AM
Hello Ankush,
To assign the
tinymcefunction to thepopupHTMLvariable, you can wrap thetinymcefunction call in an anonymous function and then assign the result to thepopupHTMLvariable:Thanks
Naimish
Naimish MakwanaPosted Feb 1, 2023, 5:42 AM
Hello Ankush,
Please refer below link.
Thanks
Naimish
Ankush VermaPosted Jan 31, 2023, 5:01 PM
I have use this code . Please let me know how to assign tinymce function popupHTML this variable
const popupHTML = ``;
popupHTML=tinymce({
height: 500,
menubar: false,
plugins: [
'advlist autolink lists link image charmap print preview anchor',
'searchreplace visualblocks code fullscreen',
'insertdatetime media table paste code help wordcount'
],
toolbar: 'undo redo | formatselect | bold italic backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help'
});
Uday DodiyaPosted Jan 31, 2023, 6:59 AM
Hello Ankush,
Try Following Code
Naimish MakwanaPosted Jan 31, 2023, 5:12 AM
Hello Ankush,
You can do as below.
Your HTML
CSS:
Javascript:
Working Example : https://codepen.io/Naimishcon/pen/abjagJW
Thanks