A2KSHTML.zip is an HTML Editor built
around the MS Web Browser control.
A2K or higher ONLY!!!!
Version .8
Here is new functionality added by Jean-Baptiste Lecuit:
WB.Document.execCommand "JustifyFull"
WB.Document.execCommand "Undo"
WB.Document.execCommand "Redo"
Private Sub Highlight(Color As String)
Dim txtRng As IHTMLTxtRange, strHTML As String
' color = yellow, or fuchsia, or aqua, or lime, aso..
strHTML = "<SPAN style=" & chr(34) & "BACKGROUND: " & color & "; mso-highlight:
" & color & chr(34) & ">"
Set txtRng = WB.Document.Selection.createRange
strHTML = strHTML & txtRng.HTMLText & "</SPAN>"
txtRng.pasteHTML strHTML
End Sub
WB.Document.execCommand "CreateLink"
Private Sub Navigate(NavigationMode as Boolean)
WB.Document.DesignMode = IIf(NavigationMode , "Off", "On")
'Add code to Enable/disable Editing buttons
End Sub
Private Sub WBt_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, flags As
Variant, TargetFrameName As Variant, PostData As Variant, Headers As Variant,
Cancel As Boolean)
If URL = "about:blank" Then
Exit Sub 'Otherwise : error when initializing browser
Else
Cancel = True
WBcit.Navigate2 URL, , "Blank" 'IMPORTANT : to open in a New window (internet
explorer)
End If
End Sub
Stefano Dalli wrote:
In order to add/insert a table, how did you think about this:
Private Sub cmdTable_Click()
With Me.WBrowser.Document
.writeln "<table>"
.writeln "<tr><td>11</td>"
.writeln "<td>12</td>"
.writeln "</tr>"
.writeln "<tr><td>21</td>"
.writeln "<td>22</td>"
.writeln "</tr>"
.writeln "</table>"
End With
End Sub