TWebBrowser的编辑模式下,
如何设定所选内容的字体具体大小(比如9pt,11pt)﹖

解决方案 »

  1.   

    1.取选定内容源码:
    src:=((webbrowser.Document as IHTMLDocument2).selection.createRange as IHtmlTxtRange).htmlText;
    2.修改选定内容的源码:(DIY)
    3.写回修改了的源码:
    ((webbrowser.Document as IHTMLDocument2).selection.createRange as IHtmlTxtRange).pasteHTML(src);
      

  2.   

    IHTMLDocument2::execCommand IDM_FONT
      

  3.   

    好的,谢谢回答的各位,
    特别谢谢iseekcode! 结帖了!