最後我找到了解決方案。首先,構建一個擴展SysInetHTMLEditor的類。
構建方法文本:
str text(str text = '')
{
int i;
;
if (prmisdefault(text))
return super();
i = strscan(text, '<body', 1, strlen(text));
if (i)
{
text = strdel(text, i, strscan(text, '>', i, strlen(text))-i+1);
}
return super(text);
}
- 使用 「this.text(sometext)」 設置初始文本(通常在新方法)
- 覆蓋保存()保存文本(送它與this.text())
- 倍率字幕方法來改變字幕
- 倍率canClose()
在退出之前保存騎isToolEnabled用於控制工具:
布爾isToolEnabled(INT commandId,INT標籤) { 開關(製表符) { 情況#TABSource: 開關(commandId) { 情況#TOOL_SAVE: 返回真; } return false;
case #TABPreview:
return false;
case #TABNormal:
switch (commandId)
{
case #TOOL_SAVEAS:
case #TOOL_NEW:
case #TOOL_OPEN:
case #TOOL_MENU_ELEMENT:
case #TOOL_MAKEABSOLUTE:
case #TOOL_BRINGTOFRONT:
case #TOOL_SENDTOBACK:
case #TOOL_BRINGFORWARD:
case #TOOL_SENDBACKWARD:
case #TOOL_BRINGABOVETEXT:
case #TOOL_SENDBELOWTEXT:
case #TOOL_LOCKELEMENT:
case #TOOL_INSERTWEBPART:
case #TOOL_INSERTACTIVEX:
case #TOOL_INSERTWEBLET:
case #TOOL_INSERTAXAPTAMENU:
case #TOOL_THEME:
return false;
case #TOOL_INSERTBOOKMARKLINK:
case #TOOL_HELPSYSTEM:
case #TOOL_INSERTHELPLINKMENU:
case #TOOL_INSERTFORMRUNLINK:
case #TOOL_INSERTEXTHELPLINK:
case #TOOL_INSERTFIELDLINK:
case #TOOL_INSERTMENUDISPLAYLINK:
case #TOOL_INSERTMENUOUTPUTLINK:
case #TOOL_INSERTMENUACTIONLINK:
case #TOOL_INSERTCLASSLINK:
case #TOOL_INSERTMETHODLINK:
case #TOOL_INSERTFUNCTIONLINK:
case #TOOL_INSERTPROPERTYLINK:
case #TOOL_INSERTHELPTITLE:
case #TOOL_INSERTIFRAME:
return false;
}
} return true; }