HTML Pages
The SDK contains HTML pages for the Simple, Style, and Structure Editors. The Simple Editor and Simple Editor Applet can only use HTML pages as help, since JavaHelp isn't included in their jar files. The HTML help pages for the Style and Structure Editors are context-sensitive; thus, changing the names of the HTML files will cause this feature to malfunction. Alternatively, you can customize any editor's content pages. For example, you can replace the editor screenshots with those from your own custom editor.
Applets
To set your applet to use HTML pages, use the setHelp() javascript method. You need to pass in 2 (non-context sensitive) for the Simple Editor helpType and 1 (context sensitive) for the Style Editor. The resulting javascript for the Style or Structure Editor is similar to that shown below.
<script type="text/javascript">
function setHelp() {
SampleStyleEditorApplet.setHelp(1,
"../../../docs/help/html/style/index.htm");
}
</script>
</head>
<body onLoad="setHelp()">
Applications
Applications use the SimpleConfigurationInfo, StyleConfigurationInfo, and StructureConfigurationInfo objects to set various options on the editor. The following code sets the HTML Help via this object:
StyleConfigurationInfo config = new StyleConfigurationInfo();
// To use context sensitive HTML Help page
config.setHelp(HelpInfo.HTML_HELP,
"../../../docs/help/html/style/index.htm");
|