Adding HTML editor in Widget.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2017 02:42 AM
I want to add a HTML Editor in a Widget in HTML template. How can I achieve it??
Please find the below screenshot which I wanted to add in Widget:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2018 07:31 AM
Hi,
Insert this code in your HTML template of the widget. This is the Tiny MCE html editor that servicenow uses for the platform throughout.
I strongly believe this will do your work.
<!DOCTYPE html>
<html>
<head>
<script src="https://cloud.tinymce.com/stable/tinymce.min.js"></script>
<script>tinymce.init({ selector:'textarea' });</script>
</head>
<body>
<textarea>Next, start a free trial!</textarea>
</body>
</html>
Thanks,
Arnab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2018 07:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2018 10:08 PM
It just put a big empty area on the page for me. I manually changed one of the tinymce containers visibility from hidden to visible and then it gave me the same as you posted above.
Has anyone managed to get tinymce to work or have they just opted for a different WYSIWYG editor instead?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2018 11:03 PM
Did you guys added the dependencies to the widget. You could find the dependency here:
https://cloud.tinymce.com/stable/tinymce.min.js
Moreover, you could find details at https://www.tinymce.com/
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-02-2018 06:16 PM
Thanks for the link, didn't know we had to do that. I've tried adding the min and full file as a UI Script and added the widget dependency to the widget, and then added
<script>tinymce.init({ selector:'textarea' });</script>
to the top of my widgets body html template, but the only result is an empty space where the standard textarea used to be. I've tried adding an alert to the init function to see if it's being called and it doesn't do anything so i feel like i'm still missing something.