ToolbarSelect and CSS Styles

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ToolbarSelect and CSS Styles

Sherri Flemings
I'm trying to modify the select list for the fonts in the dojo Editor,
but I'm not sure how or where to do this.

In Editor.js the select list is created here:

---
else if(cmd == "fontname") {
    var select = dojo.widget.createWidget("ToolbarSelect", {
    name: "fontName",
    values: this.fontNameItems
});
---

Do I use createWidget to specify the css class used? (Something else?)
And is there a way to use a different css class for each <option> inside
the select?

My goal is to create a dropdown list of fonts, using the font displayed
for each item...

for example:
---
<SELECT>
        <OPTION class="fontArial">Arial</OPTION>
        <OPTION class="fontVerdana">Verdana</OPTION>
        <OPTION class="fontGoudy">Goudy</OPTION>
        <OPTION class="fontTimes">Tiimes New Roman</OPTION>
    </SELECT>
---

Any help or suggestions are much appreciated.

Thanks
*.*   Sherri
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: ToolbarSelect and CSS Styles

iTorrey
Administrator
I'm no expert but maybe you're looking for

templateCssPath: dojo.uri.dojoUri("foo.css")

which would be added to the other params of the createWidget function.



Sherri Flemings wrote:

> I'm trying to modify the select list for the fonts in the dojo Editor,
> but I'm not sure how or where to do this.
>
> In Editor.js the select list is created here:
>
> ---
> else if(cmd == "fontname") {
>    var select = dojo.widget.createWidget("ToolbarSelect", {
>    name: "fontName",
>    values: this.fontNameItems
> });
> ---
>
> Do I use createWidget to specify the css class used? (Something else?)
> And is there a way to use a different css class for each <option> inside
> the select?
>
> My goal is to create a dropdown list of fonts, using the font displayed
> for each item...
>
> for example:
> ---
> <SELECT>
>        <OPTION class="fontArial">Arial</OPTION>
>        <OPTION class="fontVerdana">Verdana</OPTION>
>        <OPTION class="fontGoudy">Goudy</OPTION>
>        <OPTION class="fontTimes">Tiimes New Roman</OPTION>
>    </SELECT>
> ---
>
> Any help or suggestions are much appreciated.
>
> Thanks
> *.*   Sherri
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> [hidden email]
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>
>
>
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest