Inserting HTML Tags into DHTML Edit Control????

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hello,

I am developing a simple web editor to enable my users to update their websites and add simple formatting to the text.

The page content is recovered from a SQL Server database and displayed in the Microsoft DHTML Edit control ( I am working in Visual Studio 2003 - VB ). I have experimented with the ExecCommand function but all I want to do is select some text - press a button to make that selected text <h1>some text</h1>. I have a button that reads the clipboard content, adds the correct HTML tags around the text, and then pastes back to the DHTML Edit Control.

However, when I paste the contents of the clipboard back to the DHTML Edit control I get this :

<h1>some text</h1> instead of some text , and I have no control over where the new text appears!

How can I select text, enclose in the desired HTML Tag and then replace the selected text with the new HTML formatted text?

Any help would be really appreciated as I have spent some days on this!

Thank you

Mike Lowe
Application Developer
Rhondda-Cynon-Taf County Borough Council
Education & Children's Services
 
Hi Mike,

did you look at designMode = "On"

And please do us a favor, do not post in HTML to newsgroups,
For some of us it looks terrible and beside that it is in most newsreaders
difficult reading.

Cor
 
Hi,

apologies for HTML.

Yeah, design mode is on, any other clues?

Cheers,

Mike.
 
Hi Herfried,
<news://news.microsoft.com/microsoft.public.inetsdk.programming.dhtml_editin
g>

Real a newsgroup for you.
In 2 months
81 messages
12 answered

Something to do for you
:-))

Cor
 
* "Cor said:
<news://news.microsoft.com/microsoft.public.inetsdk.programming.dhtml_editin
g>

Real a newsgroup for you.
In 2 months
81 messages
12 answered

Something to do for you

I did a google search on the DHTML Edit control and I saw that most
threads about this control were posted to this group. Thank you for
making me aware of the "inactivity" of this group.
 
Hi Herfried,

I was curious, because I am thinking on doing something the same as Mike and
think that I know how to do it, but all solutions I did think of till now
are a lot of work and not user friendly.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top