This topic is locked

Rich Text Editor

3/29/2009 1:16:52 PM
ASPRunnerPro General questions
A
andie.caron author

I am starting to use the Basic Rich Text Editor (tried the others, like this one).
Anyway, it works great and well. The only thing is that when I use the Editor, there is an additional check box item added "View Source".
Is there anyway of not having this, users are getting confused (they think it's like clicking on View Source in IE).
Thanks.
Andie.

Sergey Kornilov admin 3/30/2009

Andie,
I recommend to check Rich Text Editor web site for more info.

http://www.kevinroth.com/rte/
I believe that toggleSrc command is what you looking for.

List of supported commands: http://www.kevinroth.com/rte/usage.htm

A
andie.caron author 3/30/2009

Thanks for the pointer.
Where would I place this togglescr = false???
I guess what I am asking is where to put this in the web page?
I cannot find any referrence to this piece of code (bolded, which instantiates a richTextEditor instance). The VAR name rte1 is not the relevant portion, but the new richTextEditor is (i believe).

<script language="JavaScript" type="text/javascript">

<!--

//build new richTextEditor

var rte1 = new richTextEditor('rte1');

rte1.html = 'here's the "\<em\>preloaded\<\/em\> \<b\>content\<\/b\>"';

rte1.toggleSrc = false;

rte1.build();

//-->

</script>
Andie.

R
Roger 3/30/2009

Hi Andie. Although this is an excellent choice (lean and clean), I like CuteEditor for ASP.
It's light-weight (cost a few $$$), but it's good to go.
RTE that comes with; is absolutely great, but there is no "Author Support". The way RTE is implimented (not just here, but elsewhere) is totally implimentation independant and the author(s) cannot possibley support it. Try the others, they're great as well (each have their own features which makes them unique and innovative).
Case in point, setting a basic edit directive (value/constant) is really easy to do, but the method of calling the instantiation is application dependant and derived.
So your best bet is to edit the appropriate ASP (edit/add) files and DELETE the offending line of code, or just live with it.
I'm sure the users will eventually figure it out.
Roger.

Sergey Kornilov admin 3/30/2009

Andie,
check line 202 in source\include\richtext.js

if (!readOnly) document.writeln('<br /><input type="checkbox" id="chkSrc' + rte + '" onclick="toggleHTMLSrc(\'' + rte + '\');" />&nbsp;'+TEXT_VIEW_SOURCE);


Try to delete it or comment it out.

A
andie.caron author 3/31/2009

Thanks admin. I tried that to no avail, however I commented out this line:
includes=includes & "var TEXT_VIEW_SOURCE='" & addslashes("View Source") & "'; "



in the appropriate Add/Edit code and that did it.
I'm thinking there is somewhere else that this is configed. I would have to edit every add/edi tpage to commend/delete this.
I'll poke around a little more and post if I find it.
Thanks for the assist and pointer.
Andie.