I have the standard content editor that uses an iFrame as the text area and then onchange of dropdowns it performs:
idContent.document.execCommand(cmd,"",opt);
where "idContent" is the iFrame.
One of the dropdowns is supposed to be style but it performs a "formatBlock" command.
I have a custom style sheet. Is there a way for me to put styles that I've created into this style drop down? If not, I can have another dropdown for these custom styles but what is the command name to set those styles?
Here is the dropdown and javascript that I'm currently using:
<select onchange="cmdExec('formatBlock',this[this.selectedIndex].value);this.selectedIndex=0">
<option selected>Style</option>
<option value="Normal">Normal</option>
<option value="Heading 1">Heading 1</option>
<option value="Heading 2">Heading 2</option>
<option value="Heading 3">Heading 3</option>
<option value="Heading 4">Heading 4</option>
<option value="Heading 5">Heading 5</option>
<option value="Address">Address</option>
<option value="Formatted">Formatted</option>
<option value="Definition Term">Definition Term</option>
</select>
function cmdExec(cmd,opt)
{
idContent.document.execCommand(cmd,"",opt);
idContent.focus();
}