como puedo hacer?
aqui el codigo
Código:
continua abajo // // htmlArea v2.03 - Copyright (c) 2002 interactivetools.com, inc. // This copyright notice MUST stay intact for use (see license.txt). // // A free WYSIWYG editor replacement for <textarea> fields. // For full source code and docs, visit http://www.interactivetools.com/ // // write out styles for UI buttons document.write('<style type="text/css">\n'); document.write('.btn { width: 22px; height: 22px; border: 1px solid #E8E8E8; margin: 0; padding: 0; background-color: #DCDCDC; }\n'); document.write('.btnOver { width: 22px; height: 22px; border: 1px outset; background-color: #E8E8E8;}\n'); document.write('.btnDown { width: 22px; height: 22px; border: 1px inset; background-color: #E8E8E8; }\n'); document.write('.btnNA { width: 22px; height: 22px; border: 1px solid #B7B7B7; filter: alpha(opacity=25); }\n'); document.write('.cMenu { background-color: #D2D2D2; cursor: Default; font-family: MS Sans Serif; font-size: 8pt; padding: 2 12 2 16; }'); document.write('.cMenuOver { background-color: #D2D2D2; cursor: Default; font-family: MS Sans Serif; font-size: 8pt; padding: 2 12 2 16; }'); document.write('.cMenuDivOuter { background-color: #D2D2D2; height: 9 }'); document.write('.cMenuDivInner { margin: 0 4 0 4; border-width: 1; border-style: solid; border-color: #B7B7B7 #B7B7B7 #B7B7B7 #B7B7B7; }'); document.write('</style>\n'); /* ---------------------------------------------------------------------- *\ Function : editor_defaultConfig Description : default configuration settings for wysiwyg editor \* ---------------------------------------------------------------------- */ function editor_defaultConfig(objname) { this.version = "2.03" this.width = "auto"; this.height = "auto"; this.bodyStyle = 'background-color: #FFFFFF; font-family: "Verdana"; font-size: x-small;'; this.imgURL = _editor_url + '../img/iconos/'; this.debug = 0; this.replaceNextlines = 0; // replace nextlines from spaces (on output) this.plaintextInput = 0; // replace nextlines with breaks (on input) this.toolbar = [ ['fontstyle','fontname','fontsize','bold','italic','underline','justifyleft','justifycenter','justifyright'], // ['linebreak'], // ['bold','italic','underline','justifyleft','justifycenter','justifyright'], // ['strikethrough','subscript','superscript','separator'], // ['justifyleft','justifycenter','justifyright','separator'], ['OrderedList','UnOrderedList','Outdent','Indent','forecolor','backcolor','HorizontalRule','Createlink','InsertImage','InsertTable','htmlmode','popupeditor','about'], // ['forecolor','backcolor','separator'], // ['HorizontalRule','Createlink','InsertImage','InsertTable','htmlmode','popupeditor','about'], // ['custom1','custom2','custom3','separator'], // ['popupeditor','about'] ]; this.fontnames = { "Trebuchet MS": "Trebuchet MS, Arial", "Arial": "arial, helvetica, sans-serif", "Courier New": "courier new, courier, mono", "Georgia": "Georgia, Times New Roman, Times, Serif", "Tahoma": "Tahoma, Arial, Helvetica, sans-serif", "Times New Roman": "times new roman, times, serif", "Verdana": "Verdana, Arial, Helvetica, sans-serif", "impact": "impact", "WingDings": "WingDings"}; this.fontsizes = { "1 (8 pt)": "1", "2 (10 pt)": "2", "3 (12 pt)": "3", "4 (14 pt)": "4", "5 (18 pt)": "5", "6 (24 pt)": "6", "7 (36 pt)": "7" }; //this.stylesheet = "http://www.domain.com/sample.css"; // full URL to stylesheet this.fontstyles = [ // make sure these exist in the header of page the content is being display as well in or they won't work! { name: "Texto", className: "NotTexto", classStyle: "FONT-SIZE: 12px;COLOR: #333333;LINE-HEIGHT: 16px;FONT-FAMILY: Trebuchet MS, Arial;TEXT-DECORATION: none;text-align: left;font-weight: normal" }, { name: "Subtitulo", className: "NotSubtitulo", classStyle: "font-family: Trebuchet MS, Arial; font-size: 12px; font-weight: bold" }, { name: "Resaltado", className: "NotResaltado", classStyle: "font-family: Trebuchet MS, Arial; font-size: 12px; background-color:#FFFF99" }, { name: "TitulitoNota", className: "NotTitulitoNota", classStyle: "font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; color:#003399; font-weight: bold" }, { name: "TextoMagna", className: "NotTextoMagna", classStyle: "FONT-SIZE: 12px;COLOR: #990000;LINE-HEIGHT: 16px;FONT-FAMILY: Trebuchet MS, Arial;TEXT-DECORATION: none;text-align: left;font-weight: bold" }, ]; this.btnList = { // buttonName: commandID, title, onclick, image, "bold": ['Bold', 'Bold', 'editor_action(this.id)', 'ed_format_bold.gif'], "italic": ['Italic', 'Italic', 'editor_action(this.id)', 'ed_format_italic.gif'], "underline": ['Underline', 'Underline', 'editor_action(this.id)', 'ed_format_underline.gif'], "strikethrough": ['StrikeThrough', 'Strikethrough', 'editor_action(this.id)', 'ed_format_strike.gif'], "subscript": ['SubScript', 'Subscript', 'editor_action(this.id)', 'ed_format_sub.gif'], "superscript": ['SuperScript', 'Superscript', 'editor_action(this.id)', 'ed_format_sup.gif'], "justifyleft": ['JustifyLeft', 'Justify Left', 'editor_action(this.id)', 'ed_align_left.gif'], "justifycenter": ['JustifyCenter', 'Justify Center', 'editor_action(this.id)', 'ed_align_center.gif'], "justifyright": ['JustifyRight', 'Justify Right', 'editor_action(this.id)', 'ed_align_right.gif'], "orderedlist": ['InsertOrderedList', 'Ordered List', 'editor_action(this.id)', 'ed_list_num.gif'], "unorderedlist": ['InsertUnorderedList', 'Bulleted List', 'editor_action(this.id)', 'ed_list_bullet.gif'], "outdent": ['Outdent', 'Decrease Indent', 'editor_action(this.id)', 'ed_indent_less.gif'], "indent": ['Indent', 'Increase Indent', 'editor_action(this.id)', 'ed_indent_more.gif'], "forecolor": ['ForeColor', 'Font Color', 'editor_action(this.id)', 'ed_color_fg.gif'], "backcolor": ['BackColor', 'Background Color', 'editor_action(this.id)', 'ed_color_bg.gif'], "horizontalrule": ['InsertHorizontalRule', 'Horizontal Rule', 'editor_action(this.id)', 'ed_hr.gif'], "createlink": ['CreateLink', 'Insert Web Link', 'editor_action(this.id)', 'ed_link.gif'], "insertimage": ['InsertImage', 'Insert Image', 'editor_action(this.id)', 'ed_image.gif'], "inserttable": ['InsertTable', 'Insert Table', 'editor_action(this.id)', 'insert_table.gif'], "htmlmode": ['HtmlMode', 'View HTML Source', 'editor_setmode(\''+objname+'\')', 'ed_html.gif'], "popupeditor": ['popupeditor', 'Enlarge Editor', 'editor_action(this.id)', 'fullscreen_maximize.gif'], "about": ['about', 'About this editor', 'editor_about(\''+objname+'\')', 'ed_about.gif'], // Add custom buttons here: "custom1": ['custom1', 'Purpose of button 1', 'editor_action(this.id)', 'ed_custom.gif'], "custom2": ['custom2', 'Purpose of button 2', 'editor_action(this.id)', 'ed_custom.gif'], "custom3": ['custom3', 'Purpose of button 3', 'editor_action(this.id)', 'ed_custom.gif'], // end: custom buttons "help": ['showhelp', 'Help using editor', 'editor_action(this.id)', 'ed_help.gif']}; }