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.
Sorry for the delay in posting! Thanks for this.
However I'm still getting the <textarea name="source"/> displaying by default under the actual editor in every browser.
I tried to get rid of it like this in the rendered function:
$("textarea[name='source']", this).hide();
But no dice. It won't go away. what am I doing wrong?
The easiest way is to remove the TEXTAREA element like this:
You should know that this TEXTAREA element is used to post the editor content to the server if used in HTML form, so this will not work in this case.
Best regards,
Infragistics, Inc.
It works in that it gets rid of the box, but it's a pretty ugly solution. Any way to just hide it reliably?
I would have thought that the default would have been for the source code to be hidden and only show the rich text version unless clicked and it would have been more like a tab than a box below like most html editors....
Found it. One of our scripts was making textareas into igTextBoxes and it was applying to the hidden area. I've filtered it out and now it doesn't show.
Thanks for the assistance!
Hi Geminiman,
You are right. TEXTAREA is initially hidden and it shows only when "View source" button is clicked.
In the screenshot you can see that the style applied to TEXTAREA (.ui-ightmleditor-content textarea) has property "display: none".
So what you are observing is not normal. Can you check the styles applied to the TEXTAREA and look for a problem there.
Can you attach a sample of the scenario which you describe for me to investigate it?