Private cUrl As String
Private Sub UserForm_Initialize()
Statusbar1.Panels(1).Text = "done"
WebBrowser2.Navigate "file:///E:/1111/kindeditor-3.5.5-zh_TW/examples/demo-14.html"
End Sub
Private Sub WebBrowser1_StatusTextChange(ByVal Text As String)
Statusbar1.Panels(1).Text = Text
End Sub
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then
WebBrowser1.Navigate TextBox1.Value
Do Until WebBrowser1.ReadyState = 4
DoEvents
Loop
End If
End Sub
Private Sub cmdSetValue_Click()
On Error GoTo Ne
Dim strExeFunc As String
Dim mydata As New DataObject
Dim strGetText As String
'//э跑??, ㄒ??KE.util.resize('content_1', '700px', '300px');
'strExeFunc = "KE.util.resize('content1', '300px', '300px');"
'WebBrowser2.Document.parentWindow.execScript. strExeFunc, "javascript"
strExeFunc = "window.clipboardData.setData('text',KE.text('content1'))"
WebBrowser2.Document.parentWindow.execScript. strExeFunc, "javascript"
mydata.GetFromClipboard
strGetText = mydata.GetText
Set mydata = Nothing
Dim vDoc
'Set vDoc = WebBrowser1.Document
'vDoc.getElementById("subject").Value = txtSubject.Value
'vDoc.getElementById("posteditor_textarea").Value = strGetText
'vDoc.getElementById("ctl00$CPH_BaseContent$tb_Subject").Value = txtSubject.Value
'vDoc.getElementById("ctl00_CPH_BaseContent_tb_TopicBody___Editor").Value = WebBrowser2.Document.getElementById("content1").Value
'vDoc.GetElementById("tk_btn_login").Click
Set vDoc = Nothing
'WebBrowser2.Document.body.bgcolor = &H123456
' Dim element
' Set element = WebBrowser2.Document.GetElementById("content1")
' If Not element Is Nothing Then
' 'MsgBox (element.innerHTML)
' MsgBox (element.Value)
' End If
Exit Sub
Ne:
MsgBox Err.Description
End Sub
body{
border:0px;
}