473,503 Members | 1,666 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Html Editor

Mague
137 New Member
hey i want to beable to make a html editor. I want to make it so you can highlight something an click for eg bold. And then on either sde it will have the <B> blahblahgl <b/>

Is there a way i cana do this
Jun 30 '07 #1
3 1088
danp129
323 Recognized Expert Contributor
in vb6 it would be:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command1_Click()
  2.    AddTag "<B>", "</B>"
  3. End Sub
  4.  
  5. Sub AddTag(sStartTag As String, sEndTag As String)
  6.     Dim lngNextSelStart As Long
  7.     With Text1
  8.         If Not .SelLength > 0 Then
  9.             lngNextSelStart = .SelStart + Len(sStartTag)
  10.         End If
  11.         .SelText = sStartTag & .SelText & sEndTag
  12.         If lngNextSelStart > 0 Then .SelStart = lngNextSelStart
  13.         .SetFocus
  14.     End With
  15. End Sub
Jun 30 '07 #2
Mague
137 New Member
i should have mensioned earlier i use vb.net. Also im am using a richtextbox. Any more idea


ty anyways
Mague
Jul 1 '07 #3
Mague
137 New Member
Dont worry i fixed it.


If your intrested i got rid of the with

changed the selselect to richtextbox.textlength

changed selstart and seltext to richtextbox.selectedtext

and deleted the last command and it worked
Jul 1 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

71
6382
by: tomy_baseo | last post by:
I'm new to HTML and want to learn the basics by learning to code by hand (with the assistance of an HTML editor to eliminate repetitive tasks). Can anyone recommend a good, basic HTML editor that's...
72
5301
by: Mel | last post by:
Are we going backwards ? (please excuse my spelling...) In my opinion an absolute YES ! Take a look at what we are doing ! we create TAGS, things like <H1> etc. and although there are tools...
9
2778
by: Frances | last post by:
at work we switched to UTF-16 encoding and now when I open html files in HomeSite the code is all messed up, and if I turn on "enable non-ANSI file encoding" code looks fine when I open files but I...
2
1923
by: Leszek | last post by:
Hello, Has anybody heard about an HTML editor available as an ASP.NET control or so? I need one for my Content Management System. I would appreciate any help: links to existing components,...
20
5594
by: Guadala Harry | last post by:
In an ASCX, I have a Literal control into which I inject a at runtime. litInjectedContent.Text = dataClass.GetHTMLSnippetFromDB(someID); This works great as long as the contains just...
19
780
by: MajorSetback | last post by:
I am starting up a home business and will be setting up a web site to market the software that I will be developing in C++. I was wondering if I should buy something like Dreamweaver or Frontpage...
5
2316
by: DaveC | last post by:
I need some sage advice. For years I have been using a HTML editor (HomeSite 3) to produce crude web sites, mostly travelogs with text and a few clickable thumbnails leading to larger images. ...
27
3797
by: prt7u | last post by:
Howdy, I've started back afte a very long time of working with web pages for an organization that I am affiliated with (personally not professionally). Seeing that technology has advanced a lot...
5
16820
by: Joe | last post by:
We're looking for a fully functional RTF/HTML editor for our WinForms application. We need a control with the following features: 1. Supports image 2. Supports hyperlinks (auto detects) and...
0
1626
by: akingsly | last post by:
Hai, I am using a html editor control in windows application. For eg. I was having a html file(say test.html). When I opened the file thru html editor control I can't view the images in that...
0
7087
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7281
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7334
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6993
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3156
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
737
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
383
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.