How do I turn off the source view so that it only shows the rich text and not the source area below it?
Thanks!
Hi,
In 12.1 igHtmlEditor doesn't have such an option, but it will be implemented in the future. You can accomplish this with workaround.
Here is the code:
#htmlEditor prefix in the selectors is the ID of the DOM element on which the igHtmlEditor is instantiated.
Hope this helps,
Martin Pavlov
Infrgistics Inc.
This is actually a composite question, consisting of:
1. How to hide the "View Source" button2. How to turn off (or hide) the source view next to that buttonUnfortunately there is no option which can be used to disable both of these so you need locate the DOM elements of these parts of the igHTMLEditor and hide them from view in some way.Here's what I can offer:
<body> <div id="editorDiv"></div> <script type="text/javascript"> $(function () { $('#editorDiv').igHtmlEditor({ rendered: function (ui, evt) { $(".ui-igPathFinder", this).hide(); $(".ui-igbutton-viewsource", this).igButton("destroy"); } }); }); </script> </body>
$(function () { $('#editorDiv').igHtmlEditor({ rendered: function (ui, evt) { $(".ui-igPathFinder", this).hide(); $(".ui-igbutton-viewsource", this).igButton("destroy"); } }); }); </script> </body>
I've also attached a sample HTML page to my reply which illustrates this solution.PS: Note that you can use other means of removing these elements from view - like using .hide() on the "View Source" button as well, but that's a rather personal choice.
Cheers,Borislav