Index: richtext.js =================================================================== RCS file: /cvsroot/encore/packages/gcms/www/resources/rte/richtext.js,v retrieving revision 1.2 retrieving revision 1.4 diff -u -r1.2 -r1.4 --- richtext.js 13 Mar 2005 21:54:37 -0000 1.2 +++ richtext.js 16 Mar 2005 16:56:07 -0000 1.4 @@ -58,7 +58,7 @@ //isRichText = false; } -function writeRichText(rte, html, width, height, buttons, readOnly) { +function writeRichText(rte, html, width, height, buttons, readOnly, extra_content, on_fail) { if (isRichText) { if (allRTEs.length > 0) allRTEs += ";"; allRTEs += rte; @@ -75,11 +75,14 @@ } document.writeln('
'); + + if (!readOnly) document.writeln('
 
'); + if (buttons == true) { document.writeln(''); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); - document.writeln(' '); document.writeln(' '); document.writeln('
'); - document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); @@ -93,7 +96,7 @@ document.writeln(' '); document.writeln(' '); - document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); @@ -102,7 +105,7 @@ document.writeln(' '); document.writeln(' '); - document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); @@ -113,10 +116,11 @@ document.writeln(' '); document.writeln(' '); document.writeln(' '); + document.writeln(' '); document.writeln('
'); + document.writeln(''); document.writeln(' '); document.writeln(' '); @@ -154,20 +158,30 @@ document.writeln(' '); document.writeln(' '); document.writeln('
Bold
'); + } + document.writeln(''); - if (!readOnly) document.writeln('
 '); + document.writeln(''); document.writeln(''); document.writeln('
'); + if (extra_content) { + document.writeln(extra_content); + } + document.getElementById('hdn' + rte).value = html; enableDesignMode(rte, html, readOnly); } else { - if (!readOnly) { - document.writeln(''); + if (on_fail) { + document.writeln(on_fail); } else { - document.writeln(''); + if (!readOnly) { + document.writeln(''); + } else { + document.writeln(''); + } } } } @@ -200,7 +214,9 @@ oRTE.close(); if (!readOnly) { oRTE.designMode = "On"; - frames[rte].document.attachEvent("onkeypress", function evt_ie_keypress(event) {ieKeyPress(event, rte);}); + + function evt_ie_keypress(event) {ieKeyPress(event, rte);}; + frames[rte].document.attachEvent("onkeypress",evt_ie_keypress); } } else { try { Index: rte.css =================================================================== RCS file: /cvsroot/encore/packages/gcms/www/resources/rte/rte.css,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- rte.css 13 Mar 2005 21:54:37 -0000 1.2 +++ rte.css 14 Mar 2005 14:53:44 -0000 1.3 @@ -38,4 +38,8 @@ .rteDiv { display: block; position: relative; +} + +div.rteDiv div.rteCheck { + float: right; }