How to add a piece of HTML at the cursor position

E

eric.malkowiak

I am not use to the Front-page object model so I don't know how to
insert a piece of html at the cursor position, more precisly to replace
a piece of selected text by the same text in a tag.

I would like to surround a text selected by the user by a span tag.

Basically with the following html in the code view

<p> this is an internal term</p>

Then in the Design view the user select the word "internal", he clicks
on a button and a piece of VBA that I am trying to develop, surrounds
the word "internal" by a <span> tag, like this

<p> this is an <span id=int>internal</span> term</p>

I have a piece of java scrit that hide or display all the span tags
with the "int" id
Any help is welcome

Eric
 
S

Stefan B Rusynko

See
http://msdn.microsoft.com/library/d...3_ta/html/odc_fpautomatingrepetitivetasks.asp
and
http://msdn.microsoft.com/library/d...orkingWithHTMLProgrammatically.asp?frame=true

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


|I am not use to the Front-page object model so I don't know how to
| insert a piece of html at the cursor position, more precisly to replace
| a piece of selected text by the same text in a tag.
|
| I would like to surround a text selected by the user by a span tag.
|
| Basically with the following html in the code view
|
| <p> this is an internal term</p>
|
| Then in the Design view the user select the word "internal", he clicks
| on a button and a piece of VBA that I am trying to develop, surrounds
| the word "internal" by a <span> tag, like this
|
| <p> this is an <span id=int>internal</span> term</p>
|
| I have a piece of java scrit that hide or display all the span tags
| with the "int" id
| Any help is welcome
|
| Eric
|
 

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

Top