Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
katiepuran
Contributor II
Contributor II

How to get rich text editor into Extension?

Hello Qlik experts, The index.html in folder sample-html can load rich text editor. I am trying to get this done in Qlik Sense extension but no luck. Any idea?

2020-03-30_17-43-31.jpg

Attached: Rich-Text-Editor.zip

We have 2 folders when extract the zip file.

  1. sample-html : test rich text editor in HTML. Please open index.html to see the output
  2. TinyMCE-Sense : Qlik Sense Extension....trying to load TinyMCE but no luck

Code snippets:

index.html

 

<body>
	<textarea class="tinymce"></textarea>
	<!-- javascript -->
	<script type="text/javascript" src="js/jquery.min.js"></script>
	<script type="text/javascript" src="plugin/tinymce/tinymce.min.js"></script>
	<script type="text/javascript" src="plugin/tinymce/init-tinymce.js"></script>
</body>

 

 

TinyMCE-Sense.js

 

define ([
	"./js/jquery.min",
	"./plugin/tinymce/tinymce.min",
	"./plugin/tinymce/init-tinymce"
], function () {
	return {
		paint: function ($element) {
			var html ="";
			html += '<body>' +
						'<textarea class="tinymce"></textarea>' +
						'<script type="text/javascript" src="js/jquery.min.js"></script>' +
						'<script type="text/javascript" src="plugin/tinymce/tinymce.min.js"></script>' +
						'<script type="text/javascript" src="plugin/tinymce/init-tinymce.js"></script>'	+
					'</body>';
				$element.html(html)
		}
	};
});

 

 

Labels (2)
0 Replies