| Ratibor |
|
|---|---|
#82 rayblo : Show an example then? [spoiler]
function writeRTE( a, b, c, d, e, f, g )
{
if( Credit != "Rich Text Editor by www.eCardMax.com" )
{
alert( "Please do not remove or modify the Credit 'Rich Text Editor by www.eCardMax.com' inside the script editor.js" );
return false
}
document.write( "<table class=Hoteditor_Main_Border width=" + d + " cellspacing=0 cellpadding=0>\n" );
document.write( "<tr><td><table width=100% class=Hoteditor_TitleBar><tr>\n" );
document.write( "<td nowrap>\n" );
if( isRichText && use_RichText == "1" && show_switch == "1" )document.write( "<span onClick=\"switch_editor( '"+b+"' ); \" title='"+capOnOff_RichText+"' style=\"float : right; CURSOR : hand; CURSOR : Pointer; \" id=switch_span" + b + ">" + capDesignModeTitle + " <img id=editor_switch" + b + " align=absmiddle border=0 src=" + styles_folder_path + "/" + ImgSwitch + "></span>" );
if( editor_type == "1" )
{
document.write( "<img align=absmiddle border=0 src=" + styles_folder_path + "/logo.gif> <span id=change_title_editor" + b + ">" + TitleText + "</span></td>\n" )
}
else
{
document.write( "<img align=absmiddle border=0 src=" + styles_folder_path + "/logo.gif> <span id=change_title_editor" + b + ">" + TitleText_Texarea + "</span></td>\n" )
}
if( show_arrow_up_down == 1 )document.write( "<td width=1% nowrap align=right><div><img title=\""+capDecrease_Size+"\" class=Hoteditor_Button STYLE=\"cursor : hand; cursor : pointer\" onmouseover=\"this.className = 'Hoteditor_Button_Over'; \" onmouseout=\"this.className = 'Hoteditor_Button_Out'; \" onClick=\"resize_editor( 'decrease_size', '"+b+"', '"+"textarea_"+b+"' ); \" border=0 src=" + styles_folder_path + "/arrow_up.gif></div><div><img title=\""+capIncrease_Size+"\" class=Hoteditor_Button STYLE=\"cursor : hand; cursor : pointer\" onmouseover=\"this.className = 'Hoteditor_Button_Over'; \" onmouseout=\"this.className = 'Hoteditor_Button_Out'; \" onClick=\"resize_editor( 'increase_size', '"+b+"', '"+"textarea_"+b+"' ); \" border=0 src=" + styles_folder_path + "/arrow_dn.gif></div></td>\n" );
document.write( "</tr></table></td></tr>\n" );
document.write( "<tr><td nowrap>\n" );
if( isRichText )
{
document.write( "<div id=hoteditor_richtool" + b + ">\n" );
document.write( "<table width=100% cellspacing=0 cellpadding=0>\n" );
if( toolbar1 != "" && a != "min" )
{
document.write( "<tr><td nowrap>\n" );
array = toolbar1.split( "," );
for( i = 0; i <= array.length; i ++ )
{
if( array[i] )show_toolbar( array[i], b )
}
document.write( "</td></tr>\n" )
}
if( toolbar2 != "" && a != "min" )
{
document.write( "<tr><td nowrap>\n" );
array = toolbar2.split( "," );
for( i = 0; i <= array.length; i ++ )
{
if( array[i] )show_toolbar( array[i], b )
}
document.write( "</td></tr>\n" )
}
if( toolbar3 != "" && a != "min" )
{
document.write( "<tr><td nowrap>\n" );
array = toolbar3.split( "," );
for( i = 0; i <= array.length; i ++ )
{
if( array[i] )show_toolbar( array[i], b )
}
document.write( "</td></tr>\n" )
}
if( show_custom_bbcode_bar == "1" && a != "min" && ! isSafari )
{
document.write( "<tr><td nowrap>\n" );
for( i = 0; i <= array_toolbar_user_custom.length;
i ++ )
{
if( array_toolbar_user_custom[i] )show_custom_toolbar( array_toolbar_user_custom[i], b )
}
document.write( "</td></tr>\n" )
}
if( minibar != "" && a == "min" )
{
document.write( "<tr><td nowrap>\n" );
array = minibar.split( "," );
for( i = 0; i <= array.length; i ++ )
{
if( array[i] )show_toolbar( array[i], b )
}
document.write( "</td></tr>\n" )
}
document.write( "</table>\n" );
if( isMacOS && isGecko )
{
document.write( "</div>\n" )
}
document.write( "<center><iframe style='width:98%;height:"+e+";background-color:white' frameborder=0 class=Hoteditor_iFrame id='"+b+"' name='"+b+"'></iframe></center>\n" );
if( isMacOS && isGecko )
{
var h = ""
}
else
{
document.write( "</div>\n" )
}
}
document.write( "<div id=hoteditor_texttool" + b + ">\n" );
document.write( "<table width=100% cellspacing=0 cellpadding=0>\n" );
if( textarea_toolbar1 != "" && a != "min" )
{
document.write( "<tr><td nowrap>\n" );
array = textarea_toolbar1.split( "," );
for( i = 0; i <= array.length; i ++ )
{
if( array[i] )show_toolbar_textarea( array[i], "textarea_" + b )
}
document.write( "</td></tr>\n" )
}
if( textarea_toolbar2 != "" && a != "min" )
{
document.write( "<tr><td nowrap>\n" );
array = textarea_toolbar2.split( "," );
for( i = 0; i <= array.length; i ++ )
{
if( array[i] )show_toolbar_textarea( array[i], "textarea_" + b )
}
document.write( "</td></tr>\n" )
}
if( textarea_toolbar3 != "" && a != "min" )
{
document.write( "<tr><td nowrap>\n" );
array = textarea_toolbar3.split( "," );
for( i = 0; i <= array.length; i ++ )
{
if( array[i] )show_toolbar_textarea( array[i], "textarea_" + b )
}
document.write( "</td></tr>\n" )
}
if( show_custom_bbcode_bar == "1" && a != "min" )
{
document.write( "<tr><td nowrap>\n" );
for( i = 0; i <= array_toolbar_user_custom.length;
i ++ )
{
if( array_toolbar_user_custom[i] )show_custom_toolbar_bbcode( array_toolbar_user_custom[i], b )
}
document.write( "</td></tr>\n" )
}
if( textarea_minibar != "" && a == "min" )
{
document.write( "<tr><td nowrap>\n" );
array = textarea_minibar.split( "," );
for( i = 0; i <= array.length; i ++ )
{
if( array[i] )show_toolbar_textarea( array[i], "textarea_" + b )
}
document.write( "</td></tr>\n" )
}
document.write( "</table>\n" );
if( isMacOS && isGecko )
{
document.write( "</div>\n" )
}
var j = c.replace( /<br>/ig, "\n" );
j = j.replace( /</g, "<" );
j = j.replace( />/g, ">" );
j = j.replace( /&#/gi, "&#" );
j = j.replace( /\[\/tr\]/gi, "\n[/TR]" );
j = j.replace( /\[tr\]/gi, "\n[TR]" );
j = j.replace( /\[td\]/gi, "\n[TD]" );
j = j.replace( /\[\/table\]/gi, "\n[/TABLE]" );
j = j.replace( /\[\/table\]$/gi, "[/TABLE]\n" );
document.write( "<center><textarea wrap=auto " + print_dir + " style='font-family:Verdana,Arial,Sans-Serif,Tahoma;font-size:12px;color: black;width:98%;height:"+e+"' class=Hoteditor_iTextarea id='textarea_"+b+"' name='textarea_"+b+"'>" + j + "</textarea></center>\n" );
if( isMacOS && isGecko )
{
var h = ""
}
else
{
document.write( "</div>\n" )
}
document.write( "</td></tr>\n" );
and more......................................
[/spoiler] I have full decompress editor.js version 4.2 Very small editor with support bbcode - NicEdit Не задавай глупых вопросов, не услышишь вранья.
Dit bericht is bewerkt door Ratibor (2008-08-04 10:23, 17 jaren ago) |