funcion cambio estilo
Publicado por Carles (1 intervención) el 24/05/2009 16:05:23
tengo el siguiente XML y javascript , mi intencion es añadir botones al editor de thunderbird , que sean capaces de cambiar el estilo de la letra. alguien sabe que estoy haciendo mal?
<?xml version="1.0"?>
<?xml-stylesheet
href="chrome://sidebaronright/content/overlay.css"
type="text/css"?>
<overlay id="emptySidebarOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<vbox id="sidebar-box" label="STYLES" persist="sidebarVisible width" hidden="false">
<script type="application/x-javascript"
src="chrome://sample/content/sample2.js"/>
<button id="bold" label="Bold" position="2" oncommand="modifyStyle('bold');"/>
</vbox>
</overlay>
y el javascript es el siguiente:
function modifyStyle(String cadena) {
switch(cadena){
case "("bold")": doStyleUICommand('cmd_bold'); break;
}
}
Gracias !!!
<?xml version="1.0"?>
<?xml-stylesheet
href="chrome://sidebaronright/content/overlay.css"
type="text/css"?>
<overlay id="emptySidebarOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<vbox id="sidebar-box" label="STYLES" persist="sidebarVisible width" hidden="false">
<script type="application/x-javascript"
src="chrome://sample/content/sample2.js"/>
<button id="bold" label="Bold" position="2" oncommand="modifyStyle('bold');"/>
</vbox>
</overlay>
y el javascript es el siguiente:
function modifyStyle(String cadena) {
switch(cadena){
case "("bold")": doStyleUICommand('cmd_bold'); break;
}
}
Gracias !!!
Valora esta pregunta


0