DHTMLED Basic but Important Questions
Code:
Option Explicit
Private Const BOLDHEAD= "<b>"
Private Const BOLDTAIL = "</b>"
Dim cInnerHTML As String
Dim DHTMLEditInitialized As Boolean
Private Sub Check1_Click()
If Check1.Value = 1 Then
cInnerHTML = DHTMLEdit1.DOM.body.innerHTML
DHTMLEdit1.DOM.body.innerHTML = cInnerHTML & HEAD_STYLE
Else
cInnerHTML = DHTMLEdit1.DOM.body.innerHTML
DHTMLEdit1.DOM.body.innerHTML = cInnerHTML & "</b>"
End If
End Sub
Private Sub Check2_Click()
If Check2.Value = 1 Then
cInnerHTML = DHTMLEdit1.DOM.body.innerHTML
DHTMLEdit1.DOM.body.innerHTML = cInnerHTML & "<i>"
Else
cInnerHTML = DHTMLEdit1.DOM.body.innerHTML
DHTMLEdit1.DOM.body.innerHTML = cInnerHTML & "</i>"
End If
End Sub
Private Sub Command1_Click()
WebBrowser1.Navigate2 "about:blank"
DoEvents
WebBrowser1.Document.Open
WebBrowser1.Document.Write DHTMLEdit1.DOM.body.outerhtml
WebBrowser1.Document.Close
End Sub
Private Sub Command2_Click()
cInnerHTML = DHTMLEdit1.DOM.body.innerHTML
DHTMLEdit1.DOM.body.innerHTML = cInnerHTML & "<font face=" & """" & Text1.Text & """" & " > "
End Sub
Private Sub Command4_Click()
cInnerHTML = DHTMLEdit1.DOM.body.innerHTML
DHTMLEdit1.DOM.body.innerHTML = cInnerHTML & "<font size=" & Slider1.Value & ">"
End Sub
Private Sub Form_Load()
End Sub
Hi guys! I was making a project with the DHTMLED control i heard newly about
I have some questions with the control tho
The code is on up if needed to look
1. How to properly add a tag I tried using only adding the head(start tag) or adding both, both they dont really work well, I need it to both make it in same line if can(this means form tags, header tags and P tags are exception because its impossible without CSS and im trying to avoid css for the project)
2.How to make that properly added tag get added to selected area if there is
Re: DHTMLED Basic but Important Questions
What does this contain when you try to write it out to the webbrowser?
-tg
Re: DHTMLED Basic but Important Questions
The input is written by user
The problem with the tag creation is its extremely buggy, sometimes you cant close a tag, its usually hard to use font tags etc