这两个函数分别什么用 一行行解释下,麻烦了 没用过这控件
function GetHTML(Document:IHTMLDocument2):String;
var
  i:integer;
  IDisp:IDispatch;
  pElement:IHTMLElement;
begin
  for I := 0 to Document.all.length - 1 do
  begin
    IDisp:=Document.all.item(i,i);
    IDisp.QueryInterface(IID_IHTMLElement,pElement);
    if CompareText(pElement.id, 'sourceEditor') = 0 then
    begin
      Result := pElement.outerText;
      exit;
    end;
  end;
end;function SetHTML(Document:IHTMLDocument2; Str: string): string;
var
  i:integer;
  IDisp:IDispatch;
  pElement:IHTMLElement;
begin
  for I := 0 to Document.all.length - 1 do
  begin
    IDisp := Document.all.item(i,i);
    IDisp.QueryInterface(IID_IHTMLElement,pElement);
    if CompareText(pElement.id, 'sourceEditor') = 0 then
    begin
      pElement.insertAdjacentText('beforeEnd', Str);
      Exit;
    end;
  end;
end;