Pasting unicode into Frontpage desing window

G

Guest

I am trying to paste some unicode text into a Frontpage document. When I
copy and paste the Unicode characters from a Word document, they render
correctly on the design page, and on the html page I see the following:

<span style="font-size: 12.0pt; font-family: Code2000">Ø</span>

The characters that I want to paste into Frontpage are being copied from a
custom TextBox I have created as part of a .NET application. I have used
various strategies including methods belonging to the Clipboard class and the
inherited Copy method of the TextBox class. I can get the TextBox text and
prepend the span style stuff in front of the text and append the </span>, but
when I paste into the design page of a Frontpage document, instead of seeing
just the Unicode characters, I also see the <span style= string which is not
how Word does it. I could always switch over to the html page and paste in
the html string, but the people who will be using this application don’t want
to do that. They want to paste directly into the design page. Does anyone
know how to do this? Is there some way to communicate to Frontpage (when
doing the paste) that the string is html and should be copied to the html
page, but rendered correctly on the design page? Any help would be greatly
appreciated.
 
S

Steve Easton

<confused>
I'm a little confused, "I think."

Is this custom "textbox" being created in a VS.NET "windows application" ??
If so, it is part of windows.systems.forms and won't work as such in a html document.

If it's a standard html textbox we need a little more info. ( at least I do )

</confused>

;-)

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
 
G

Guest

The application is a Windows Forms app. The unicode characters are from the
Code2000 font, beginning at X'2800'. They render as braille characters. My
application's code is:

string s = "<span style=font-size: 12.0pt; font-family: Code2000>" +
MyCustomTextbox.Text + "</span>";
Clipboard.SetDataObject(s);

When I paste into the design page of Frontpage what I see is that string.
What I want to see is the braille character.
 
S

Steve Easton

In order to write a string value to an element in a web page, you need to use a script to
create the "string variable" and then also use the script to write the string value to a
location/element in the page.

Simple example:

<script type = text/javascript>
var = sMytbox
Function writeit()
sMytbox = '"<span style=font-size: 12.0pt; font-family: Code2000>" + MyCustomTextbox.Text
+ "</span>"; Clipboard.SetDataObject(s)';
document.all.thebrail.innerHTML = (Mytbox);
<script>

Note the extra hyphens ( single quotes as some call them ) at the beginning and end of the
"string"

Then use the script to write to the element in the page
<span id ="thebraille">&nbsp<span>

The &nbsp is simply a place holder until the string value is written.

Also you need to start the function with an onload in the opening body tag for the page:
<body onload="writeit()">

That said, I'm still not sure what you're trying to do with "Clipboard.SetDataObject(s)"
in a html document.

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
 
S

Steve Easton

Also note that all I posted is going to accomplish is to write :
"<span style=font-size: 12.0pt; font-family: Code2000>" +
MyCustomTextbox.Text + "</span>";
Clipboard.SetDataObject(s);

between the span tags. You need to create other strings for each part of the main string
and then concatenate the parts into one final string to write to the page element.


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
 

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