From: Alan Knowles Date: Tue, 20 Aug 2013 06:10:07 +0000 (+0800) Subject: Roo/form/HtmlEditor/ToolbarContext.js X-Git-Url: http://git.roojs.org/?a=commitdiff_plain;h=76cbad4bdd0a430e9322f6a4959efc28d334d464;p=roojs1 Roo/form/HtmlEditor/ToolbarContext.js --- diff --git a/Roo/form/HtmlEditor/ToolbarContext.js b/Roo/form/HtmlEditor/ToolbarContext.js index 708dee7694..2e69840634 100644 --- a/Roo/form/HtmlEditor/ToolbarContext.js +++ b/Roo/form/HtmlEditor/ToolbarContext.js @@ -126,6 +126,13 @@ Roo.form.HtmlEditor.ToolbarContext.types = { title: "Colspan", width: 20 + }, + 'font-family' : { + title : "Font", + style : 'fontFamily', + displayField: 'display', + optname : 'font-family', + width: 140 } }, 'INPUT' : { @@ -177,31 +184,63 @@ Roo.form.HtmlEditor.ToolbarContext.types = { // should this just be 'BODY' : { title : { - title: "title", + title: "Title", width: 200, disabled : true } }, + 'SPAN' : { + 'font-family' : { + title : "Font", + style : 'fontFamily', + displayField: 'display', + optname : 'font-family', + width: 140 + } + }, + 'DIV' : { + 'font-family' : { + title : "Font", + style : 'fontFamily', + displayField: 'display', + optname : 'font-family', + width: 140 + } + }, + 'P' : { + 'font-family' : { + title : "Font", + style : 'fontFamily', + displayField: 'display', + optname : 'font-family', + width: 140 + } + }, + '*' : { // empty.. } }; +// this should be configurable.. +Roo.form.HtmlEditor.ToolbarContext.options = { + 'font-family' : [ + [ 'Helvetica,Arial,sans-serif', 'Helvetica'], + [ 'Courier New', 'Courier New'], + [ 'Tahoma', 'Tahoma'], + [ 'Times New Roman,serif', 'Times'], + [ 'Verdana','Verdana' ] + ] +}; + // fixme - these need to be configurable.. Roo.form.HtmlEditor.ToolbarContext[ 'font-family'] = { title : "font", style : 'fontFamily', displayField: 'display', - opts : [ - ["" , '--None--'], - [ 'helvetica,Arial,sans-serif', 'Helvetica'], - [ 'Courier New', 'Courier New'], - [ 'Tahoma', 'Tahoma'], - [ 'Times New Roman,serif', 'Times'], - [ 'Verdana','Verdana' ] - ], + optname : 'font-family', width: 140 };