I know a bunch of you are using the free HTML editor downloaded from my website. The utility turns any textarea field in to a wysiwyg HTML editor.
I wanted to post a trick to resolve a problem I ran in to. I had two textarea fields in the Detail section of a grid. I wanted only one to be WYSIWYG, the other plain textarea. Normally, if you only want one textarea to be wysiwyg, you enter this at the top of the page that will display the textarea fields:
<script type="text/javascript" src="htmleditor/scripts/wysiwyg.js"></script>
<script language="javascript1.2">
WYSIWYG.attach('V.R1.DESCRIPTION');
</script>
where V.R1.DESCRIPTION is the field I want as wysiwyg.
And if you want all textarea field to be wysiwyg, you enter this:
<script type="text/javascript" src="htmleditor/scripts/wysiwyg.js"></script>
<script language="javascript1.2">
WYSIWYG.attach('all');
</script>
With the second code, even if there are no textarea fields on the page, there is no error. But when the Detail opens, then ALL of the textarea fields would be wysiwyg, not just the one I want as such.
If you use the first method, then IF that Description field is not on the page, you get an annoying "not found" alert. Unfortunately, since the Description field is in the Detail section, it is NOT present when the page with the Grid opens, and I always get the error message.
The way around it is to edit the wysiwyg.js file. Find the TWO sections that include the phrase "No textarea found with the given identifier" and comment them out. That will inhibit the error message.
I wanted to post a trick to resolve a problem I ran in to. I had two textarea fields in the Detail section of a grid. I wanted only one to be WYSIWYG, the other plain textarea. Normally, if you only want one textarea to be wysiwyg, you enter this at the top of the page that will display the textarea fields:
<script type="text/javascript" src="htmleditor/scripts/wysiwyg.js"></script>
<script language="javascript1.2">
WYSIWYG.attach('V.R1.DESCRIPTION');
</script>
where V.R1.DESCRIPTION is the field I want as wysiwyg.
And if you want all textarea field to be wysiwyg, you enter this:
<script type="text/javascript" src="htmleditor/scripts/wysiwyg.js"></script>
<script language="javascript1.2">
WYSIWYG.attach('all');
</script>
With the second code, even if there are no textarea fields on the page, there is no error. But when the Detail opens, then ALL of the textarea fields would be wysiwyg, not just the one I want as such.
If you use the first method, then IF that Description field is not on the page, you get an annoying "not found" alert. Unfortunately, since the Description field is in the Detail section, it is NOT present when the page with the Grid opens, and I always get the error message.
The way around it is to edit the wysiwyg.js file. Find the TWO sections that include the phrase "No textarea found with the given identifier" and comment them out. That will inhibit the error message.