This method queries the value that is set for a given command. The commands
available are a subset of those available to execCmd. See the list below for
details.
- backColor - The text background color at cursor or current selection.
- bold - The bold attribute at cursor or current selection.
- fontName - The font name at cursor or selection.
- fontSize - The font size at cursor or selection, HTML size 1 to 7.
- foreColor - The text foreground color at cursor or selection.
- italic - The italic attribute at cursor or current selection.
- justifyCenter - Justifies center at cursor or selection.
- justifyLeft - Justifies left at cursor or selection.
- justifyRight - Justifies right at cursor or selection.
- orderedList - Value is true if in an ordered list context, false if not.
- underline - The underline attribute at cursor or current selection.
- unorderedList - Value is true if in an unordered list context, false if
not.
function SyncDisplayWithDocument()
{
var htmlBox = scene.getBoxById("myHtmlBox");
var displayBox = scene.getBoxById("displayBox");
if (htmlBox && displayBox)
{
var colorStr = htmlBox.queryCmdValue("backColor");
if (colorStr != "")
{
displayBox.setAttribute("fill", colorStr);
}
}
}