TinyMCE textarea 输入框外部程序动态修改方法

TinyMCE textarea 输入框外部程序动态修改方法

Public Function C2IE_TINYMCE(ByVal id As String, ByVal value As String)

 Dim ielist As New ShellWindows

 Dim browser

 Dim doc

 Dim cmd As String

 On Error Resume Next

 For Each browser In ielist

 If Mid(browser.Document.Title, 1, 6) = "1KISTI" Then

 Set doc = browser.Document

 cmd = "tinyMCE.getInstanceById('" + id + "').setContent('" + value + "');"

 doc.parentWindow.execScript (cmd)

 End If

 Next

End Function

你可能感兴趣的:(textarea)