Using a style from within
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngrichtextbox' list.


evd@fennum.com
Hi again,

The image button thing posted earlier is working now.

We do have one other issue that puzzles us. With EditorWysiwygModeCSS it is
possible to specify a location for an external stylesheet. Is there a
possibility to use styles defined within the <head> tag of the page that
itself contains the RichTextBox?
Our stylesheets are stored in a database, so we do not have a file location.
What we do not like is to save the style sheet temporarily to a file
location and point to that. We already have the styles in <head><style> so
we would like to use these. Any suggestions??

TIA,

Kind regards,
@win.
Reply to this message...
 
    
Ollie Cornes
Hi Edwin,

The scenario you describe isn't directly supported, but I think there
are a couple of ways to approach this:

1. Output the CSS to a file and import it using the CSS property (as you
described). If the stylesheet is common across content, this is probably
your best bet.

2. If you have large numbers of styles, you may find that including them
inline is the best approach. The challenge here is to add them to the
document in such a way that Internet Explorer does not remove them. For
example, below is a piece of HTML that includes a style inline. If you
paste this into the HTML view of a RichTextBox and look at the page,
you'll see the heading appear in red. In general this approach seems to
work fine, although if you move the <h1>.</h1> to the top above the
style, you'll find that IE will strip the style tags. A workaround for
this is to place the styles *last* in the document. If you still find IE
is removing them, and add some white space after the style definitions.
To keep your documents and the styles separate, just strip the <style>
tags when the page is submitted to the server.

Note that the styles must go in the document, because the it is
displayed in an iframe and the only way to add styles to the iframe is
in the document. Well, actually, that's not entirely true. I believe you
can use script to add individual styles to the iframe, but I'm not sure
that is going to work for you.

Any help?

Ollie
--
http://www.richtextbox.com/

<H1>Heading</H1>
<STYLE>
<!--
h1 {color: red;}
-->
</STYLE>

-----Original Message-----
From: Click here to reveal e-mail address
[mailto:Click here to reveal e-mail address] On Behalf Of
Click here to reveal e-mail address
Sent: 18 June 2002 13:22
To: aspngrichtextbox
Subject: [aspngrichtextbox] Using a style from within <header>

Hi again,

The image button thing posted earlier is working now.

We do have one other issue that puzzles us. With EditorWysiwygModeCSS it
is possible to specify a location for an external stylesheet. Is there a
possibility to use styles defined within the <head> tag of the page that
itself contains the RichTextBox?
Our stylesheets are stored in a database, so we do not have a file
location. What we do not like is to save the style sheet temporarily to
a file location and point to that. We already have the styles in
<head><style> so we would like to use these. Any suggestions??

TIA,

Kind regards,
@win.
| [aspngrichtextbox] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/aspngrichtextbox.asp = JOIN/QUIT
Reply to this message...
 
    
evd@fennum.com
Hi Ollie,

Thanks for your reply - it is of help. We will try the second option first.
Is there any other advantage to point to a CSS file? For instance: Is the
drop down list in RTB with the style classes being updated dynamically with
the styles defined within the external file??

Thanks again,
@win.

-----Original Message-----
From: Ollie Cornes [mailto:Click here to reveal e-mail address]
Sent: dinsdag 18 juni 2002 16:44
To: aspngrichtextbox
Subject: [aspngrichtextbox] RE: Using a style from within <header>

Hi Edwin,

The scenario you describe isn't directly supported, but I think there are a
couple of ways to approach this:

1. Output the CSS to a file and import it using the CSS property (as you
described). If the stylesheet is common across content, this is probably
your best bet.

2. If you have large numbers of styles, you may find that including them
inline is the best approach. The challenge here is to add them to the
document in such a way that Internet Explorer does not remove them. For
example, below is a piece of HTML that includes a style inline. If you paste
this into the HTML view of a RichTextBox and look at the page, you'll see
the heading appear in red. In general this approach seems to work fine,
although if you move the <h1>...</h1> to the top above the style, you'll
find that IE will strip the style tags. A workaround for this is to place
the styles *last* in the document. If you still find IE is removing them,
and add some white space after the style definitions. To keep your documents
and the styles separate, just strip the <style> tags when the page is
submitted to the server.

Note that the styles must go in the document, because the it is displayed in
an iframe and the only way to add styles to the iframe is in the document.
Well, actually, that's not entirely true. I believe you can use script to
add individual styles to the iframe, but I'm not sure that is going to work
for you.

Any help?

Ollie
--
http://www.richtextbox.com/

<H1>Heading</H1>
<STYLE>
<!--
h1 {color: red;}
-->
</STYLE>

-----Original Message-----
From: Click here to reveal e-mail address
[mailto:Click here to reveal e-mail address] On Behalf Of
Click here to reveal e-mail address
Sent: 18 June 2002 13:22
To: aspngrichtextbox
Subject: [aspngrichtextbox] Using a style from within <header>

Hi again,

The image button thing posted earlier is working now.

We do have one other issue that puzzles us. With EditorWysiwygModeCSS it is
possible to specify a location for an external stylesheet. Is there a
possibility to use styles defined within the <head> tag of the page that
itself contains the RichTextBox?
Our stylesheets are stored in a database, so we do not have a file location.
What we do not like is to save the style sheet temporarily to a file
location and point to that. We already have the styles in <head><style> so
we would like to use these. Any suggestions??

TIA,

Kind regards,
@win.
| [aspngrichtextbox] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/aspngrichtextbox.asp = JOIN/QUIT
| [aspngrichtextbox] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/aspngrichtextbox.asp = JOIN/QUIT
Reply to this message...
 
    
Ronnie Hoogland
Hi Ollie

I'm the colleague of Edwin and also working with your control. We've tried
option 2 and it works, but now we want to take it a step further, of course
:-)

Is it possible to remove the style we added, when we go from wysiwyg mode to
html mode and visa versa?

TIA

Kind regards

Ronnie
-----Original Message-----
From: Ollie Cornes [mailto:Click here to reveal e-mail address]
Sent: Tuesday, June 18, 2002 4:44 PM
To: aspngrichtextbox
Subject: [aspngrichtextbox] RE: Using a style from within <header>

Hi Edwin,

The scenario you describe isn't directly supported, but I think there are a
couple of ways to approach this:

1. Output the CSS to a file and import it using the CSS property (as you
described). If the stylesheet is common across content, this is probably
your best bet.

2. If you have large numbers of styles, you may find that including them
inline is the best approach. The challenge here is to add them to the
document in such a way that Internet Explorer does not remove them. For
example, below is a piece of HTML that includes a style inline. If you paste
this into the HTML view of a RichTextBox and look at the page, you'll see
the heading appear in red. In general this approach seems to work fine,
although if you move the <h1>.</h1> to the top above the style, you'll find
that IE will strip the style tags. A workaround for this is to place the
styles *last* in the document. If you still find IE is removing them, and
add some white space after the style definitions. To keep your documents and
the styles separate, just strip the <style> tags when the page is submitted
to the server.

Note that the styles must go in the document, because the it is displayed in
an iframe and the only way to add styles to the iframe is in the document.
Well, actually, that's not entirely true. I believe you can use script to
add individual styles to the iframe, but I'm not sure that is going to work
for you.

Any help?

Ollie
--
http://www.richtextbox.com/

<H1>Heading</H1>
<STYLE>
<!--
h1 {color: red;}
-->
</STYLE>

-----Original Message-----
From: Click here to reveal e-mail address
[mailto:Click here to reveal e-mail address] On Behalf Of
Click here to reveal e-mail address
Sent: 18 June 2002 13:22
To: aspngrichtextbox
Subject: [aspngrichtextbox] Using a style from within <header>

Hi again,

The image button thing posted earlier is working now.

We do have one other issue that puzzles us. With EditorWysiwygModeCSS it is
possible to specify a location for an external stylesheet. Is there a
possibility to use styles defined within the <head> tag of the page that
itself contains the RichTextBox?
Our stylesheets are stored in a database, so we do not have a file location.
What we do not like is to save the style sheet temporarily to a file
location and point to that. We already have the styles in <head><style> so
we would like to use these. Any suggestions??

TIA,

Kind regards,
@win.
| [aspngrichtextbox] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/aspngrichtextbox.asp = JOIN/QUIT
| [aspngrichtextbox] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/aspngrichtextbox.asp = JOIN/QUIT
Reply to this message...
 
    
Ollie Cornes
The drop-down list contents are entirely under your control. So really
where you put the styles is down to your needs, although as Ronnie
mentioned in his post, if you use inline styles they will be added to
the document and therefore visible in the HTML view. Because of that the
preference is usually going to be to go for an external CSS file.

Ollie

--
http://www.richtextbox.com/

-----Original Message-----
From: Click here to reveal e-mail address
[mailto:Click here to reveal e-mail address] On Behalf Of
Click here to reveal e-mail address
Sent: 19 June 2002 06:26
To: aspngrichtextbox
Subject: [aspngrichtextbox] RE: Using a style from within <header>

Hi Ollie,

Thanks for your reply - it is of help. We will try the second option
first. Is there any other advantage to point to a CSS file? For
instance: Is the drop down list in RTB with the style classes being
updated dynamically with the styles defined within the external file??

Thanks again,
@win.

-----Original Message-----
From: Ollie Cornes [mailto:Click here to reveal e-mail address]
Sent: dinsdag 18 juni 2002 16:44
To: aspngrichtextbox
Subject: [aspngrichtextbox] RE: Using a style from within <header>

Hi Edwin,

The scenario you describe isn't directly supported, but I think there
are a couple of ways to approach this:

1. Output the CSS to a file and import it using the CSS property (as you
described). If the stylesheet is common across content, this is probably
your best bet.

2. If you have large numbers of styles, you may find that including them
inline is the best approach. The challenge here is to add them to the
document in such a way that Internet Explorer does not remove them. For
example, below is a piece of HTML that includes a style inline. If you
paste this into the HTML view of a RichTextBox and look at the page,
you'll see the heading appear in red. In general this approach seems to
work fine, although if you move the <h1>.</h1> to the top above the
style, you'll find that IE will strip the style tags. A workaround for
this is to place the styles *last* in the document. If you still find IE
is removing them, and add some white space after the style definitions.
To keep your documents and the styles separate, just strip the <style>
tags when the page is submitted to the server.

Note that the styles must go in the document, because the it is
displayed in an iframe and the only way to add styles to the iframe is
in the document. Well, actually, that's not entirely true. I believe you
can use script to add individual styles to the iframe, but I'm not sure
that is going to work for you.

Any help?

Ollie
--
http://www.richtextbox.com/

<H1>Heading</H1>
<STYLE>
<!--
h1 {color: red;}
-->
</STYLE>

-----Original Message-----
From: Click here to reveal e-mail address
[mailto:Click here to reveal e-mail address] On Behalf Of
Click here to reveal e-mail address
Sent: 18 June 2002 13:22
To: aspngrichtextbox
Subject: [aspngrichtextbox] Using a style from within <header>

Hi again,

The image button thing posted earlier is working now.

We do have one other issue that puzzles us. With EditorWysiwygModeCSS it
is possible to specify a location for an external stylesheet. Is there a
possibility to use styles defined within the <head> tag of the page that
itself contains the RichTextBox?
Our stylesheets are stored in a database, so we do not have a file
location. What we do not like is to save the style sheet temporarily to
a file location and point to that. We already have the styles in
<head><style> so we would like to use these. Any suggestions??

TIA,

Kind regards,
@win.
| [aspngrichtextbox] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/aspngrichtextbox.asp = JOIN/QUIT
| [aspngrichtextbox] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/aspngrichtextbox.asp = JOIN/QUIT
| [aspngrichtextbox] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/aspngrichtextbox.asp = JOIN/QUIT
Reply to this message...
 
    
evd@fennum.com
Hi Ollie,

Unfortunately (or fortunately from the content editors' point of view)
WebDirector.nl can be used by a lot of different content managers at the
same time, editing a lot of different pages, using a lot of different style
sheets. So it's not that simple to just create an external style sheet file
somewhere.
So if there is a hookup somehow to control what happens when the HTML
checkbox is clicked, than we could make the style sheet automatically
disappear when content editors switch to HTML view and include it again when
they switch to WYSIWYG mode again - like Ronnie suggested.

TIA,
@win.
-----Original Message-----
From: Ollie Cornes [mailto:Click here to reveal e-mail address]
Sent: woensdag 19 juni 2002 10:49
To: aspngrichtextbox
Subject: [aspngrichtextbox] RE: Using a style from within <header>

The drop-down list contents are entirely under your control. So really where
you put the styles is down to your needs, although as Ronnie mentioned in
his post, if you use inline styles they will be added to the document and
therefore visible in the HTML view. Because of that the preference is
usually going to be to go for an external CSS file.

Ollie

--
http://www.richtextbox.com/

-----Original Message-----
From: Click here to reveal e-mail address
[mailto:Click here to reveal e-mail address] On Behalf Of
Click here to reveal e-mail address
Sent: 19 June 2002 06:26
To: aspngrichtextbox
Subject: [aspngrichtextbox] RE: Using a style from within <header>

Hi Ollie,

Thanks for your reply - it is of help. We will try the second option first.
Is there any other advantage to point to a CSS file? For instance: Is the
drop down list in RTB with the style classes being updated dynamically with
the styles defined within the external file??

Thanks again,
@win.

-----Original Message-----
From: Ollie Cornes [mailto:Click here to reveal e-mail address]
Sent: dinsdag 18 juni 2002 16:44
To: aspngrichtextbox
Subject: [aspngrichtextbox] RE: Using a style from within <header>

Hi Edwin,

The scenario you describe isn't directly supported, but I think there are a
couple of ways to approach this:

1. Output the CSS to a file and import it using the CSS property (as you
described). If the stylesheet is common across content, this is probably
your best bet.

2. If you have large numbers of styles, you may find that including them
inline is the best approach. The challenge here is to add them to the
document in such a way that Internet Explorer does not remove them. For
example, below is a piece of HTML that includes a style inline. If you paste
this into the HTML view of a RichTextBox and look at the page, you'll see
the heading appear in red. In general this approach seems to work fine,
although if you move the <h1>...</h1> to the top above the style, you'll
find that IE will strip the style tags. A workaround for this is to place
the styles *last* in the document. If you still find IE is removing them,
and add some white space after the style definitions. To keep your documents
and the styles separate, just strip the <style> tags when the page is
submitted to the server.

Note that the styles must go in the document, because the it is displayed in
an iframe and the only way to add styles to the iframe is in the document.
Well, actually, that's not entirely true. I believe you can use script to
add individual styles to the iframe, but I'm not sure that is going to work
for you.

Any help?

Ollie
--
http://www.richtextbox.com/

<H1>Heading</H1>
<STYLE>
<!--
h1 {color: red;}
-->
</STYLE>

-----Original Message-----
From: Click here to reveal e-mail address
[mailto:Click here to reveal e-mail address] On Behalf Of
Click here to reveal e-mail address
Sent: 18 June 2002 13:22
To: aspngrichtextbox
Subject: [aspngrichtextbox] Using a style from within <header>

Hi again,

The image button thing posted earlier is working now.

We do have one other issue that puzzles us. With EditorWysiwygModeCSS it is
possible to specify a location for an external stylesheet. Is there a
possibility to use styles defined within the <head> tag of the page that
itself contains the RichTextBox?
Our stylesheets are stored in a database, so we do not have a file location.
What we do not like is to save the style sheet temporarily to a file
location and point to that. We already have the styles in <head><style> so
we would like to use these. Any suggestions??

TIA,

Kind regards,
@win.
| [aspngrichtextbox] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/aspngrichtextbox.asp = JOIN/QUIT
| [aspngrichtextbox] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/aspngrichtextbox.asp = JOIN/QUIT
| [aspngrichtextbox] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/aspngrichtextbox.asp = JOIN/QUIT
| [aspngrichtextbox] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/aspngrichtextbox.asp = JOIN/QUIT
Reply to this message...
 
    
Ollie Cornes
I think with the feature set of the control as it is at the moment, your
best bet is going to be external stylesheets. When I suggested using
inline ones, I assumed you were disabling the HTML view and that's
obviously not the case. I think we're hitting the limits of the control
in its current form here.

Ollie
--
http://www.richtextbox.com/

-----Original Message-----
From: Click here to reveal e-mail address
[mailto:Click here to reveal e-mail address] On Behalf Of
Click here to reveal e-mail address
Sent: 19 June 2002 10:10
To: aspngrichtextbox
Subject: [aspngrichtextbox] RE: Using a style from within <header>

Hi Ollie,

Unfortunately (or fortunately from the content editors' point of view)
WebDirector.nl can be used by a lot of different content managers at the
same time, editing a lot of different pages, using a lot of different
style sheets. So it's not that simple to just create an external style
sheet file somewhere.
So if there is a hookup somehow to control what happens when the HTML
checkbox is clicked, than we could make the style sheet automatically
disappear when content editors switch to HTML view and include it again
when they switch to WYSIWYG mode again - like Ronnie suggested.

TIA,
@win.
-----Original Message-----
From: Ollie Cornes [mailto:Click here to reveal e-mail address]
Sent: woensdag 19 juni 2002 10:49
To: aspngrichtextbox
Subject: [aspngrichtextbox] RE: Using a style from within <header>

The drop-down list contents are entirely under your control. So really
where you put the styles is down to your needs, although as Ronnie
mentioned in his post, if you use inline styles they will be added to
the document and therefore visible in the HTML view. Because of that the
preference is usually going to be to go for an external CSS file.

Ollie

--
http://www.richtextbox.com/

-----Original Message-----
From: Click here to reveal e-mail address
[mailto:Click here to reveal e-mail address] On Behalf Of
Click here to reveal e-mail address
Sent: 19 June 2002 06:26
To: aspngrichtextbox
Subject: [aspngrichtextbox] RE: Using a style from within <header>

Hi Ollie,

Thanks for your reply - it is of help. We will try the second option
first. Is there any other advantage to point to a CSS file? For
instance: Is the drop down list in RTB with the style classes being
updated dynamically with the styles defined within the external file??

Thanks again,
@win.

-----Original Message-----
From: Ollie Cornes [mailto:Click here to reveal e-mail address]
Sent: dinsdag 18 juni 2002 16:44
To: aspngrichtextbox
Subject: [aspngrichtextbox] RE: Using a style from within <header>

Hi Edwin,

The scenario you describe isn't directly supported, but I think there
are a couple of ways to approach this:

1. Output the CSS to a file and import it using the CSS property (as you
described). If the stylesheet is common across content, this is probably
your best bet.

2. If you have large numbers of styles, you may find that including them
inline is the best approach. The challenge here is to add them to the
document in such a way that Internet Explorer does not remove them. For
example, below is a piece of HTML that includes a style inline. If you
paste this into the HTML view of a RichTextBox and look at the page,
you'll see the heading appear in red. In general this approach seems to
work fine, although if you move the <h1>.</h1> to the top above the
style, you'll find that IE will strip the style tags. A workaround for
this is to place the styles *last* in the document. If you still find IE
is removing them, and add some white space after the style definitions.
To keep your documents and the styles separate, just strip the <style>
tags when the page is submitted to the server.

Note that the styles must go in the document, because the it is
displayed in an iframe and the only way to add styles to the iframe is
in the document. Well, actually, that's not entirely true. I believe you
can use script to add individual styles to the iframe, but I'm not sure
that is going to work for you.

Any help?

Ollie
--
http://www.richtextbox.com/

<H1>Heading</H1>
<STYLE>
<!--
h1 {color: red;}
-->
</STYLE>

-----Original Message-----
From: Click here to reveal e-mail address
[mailto:Click here to reveal e-mail address] On Behalf Of
Click here to reveal e-mail address
Sent: 18 June 2002 13:22
To: aspngrichtextbox
Subject: [aspngrichtextbox] Using a style from within <header>

Hi again,

The image button thing posted earlier is working now.

We do have one other issue that puzzles us. With EditorWysiwygModeCSS it
is possible to specify a location for an external stylesheet. Is there a
possibility to use styles defined within the <head> tag of the page that
itself contains the RichTextBox?
Our stylesheets are stored in a database, so we do not have a file
location. What we do not like is to save the style sheet temporarily to
a file location and point to that. We already have the styles in
<head><style> so we would like to use these. Any suggestions??

TIA,

Kind regards,
@win.
| [aspngrichtextbox] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/aspngrichtextbox.asp = JOIN/QUIT
| [aspngrichtextbox] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/aspngrichtextbox.asp = JOIN/QUIT
| [aspngrichtextbox] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/aspngrichtextbox.asp = JOIN/QUIT
| [aspngrichtextbox] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/aspngrichtextbox.asp = JOIN/QUIT
| [aspngrichtextbox] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/aspngrichtextbox.asp = JOIN/QUIT
Reply to this message...
 
    
Ronnie Hoogland
Hi Ollie

We've solved the problem, we've set the EditorWysiwygModeCss property to an
aspx file. Like this:
.EditorWysiwygModeCss = "GetCss.aspx"
and the GetCss.aspx.vb
Dim strCSS As String = GetCSS(ConnectionString,CssID)
Response.Expires = -1
Response.Write(strCSS)
You have to expire the page, so that it couples a new stylesheet instead of
the one that was created the first time, because it stays in cache.

So we're pushing the limits a little further. :-)
Ronnie
-----Original Message-----
From: Ollie Cornes [mailto:Click here to reveal e-mail address]
Sent: Wednesday, June 19, 2002 11:20 AM
To: aspngrichtextbox
Subject: [aspngrichtextbox] RE: Using a style from within <header>

I think with the feature set of the control as it is at the moment, your
best bet is going to be external stylesheets. When I suggested using inline
ones, I assumed you were disabling the HTML view and that's obviously not
the case. I think we're hitting the limits of the control in its current
form here.

Ollie
--
http://www.richtextbox.com/

-----Original Message-----
From: Click here to reveal e-mail address
[mailto:Click here to reveal e-mail address] On Behalf Of
Click here to reveal e-mail address
Sent: 19 June 2002 10:10
To: aspngrichtextbox
Subject: [aspngrichtextbox] RE: Using a style from within <header>

Hi Ollie,

Unfortunately (or fortunately from the content editors' point of view)
WebDirector.nl can be used by a lot of different content managers at the
same time, editing a lot of different pages, using a lot of different style
sheets. So it's not that simple to just create an external style sheet file
somewhere.
So if there is a hookup somehow to control what happens when the HTML
checkbox is clicked, than we could make the style sheet automatically
disappear when content editors switch to HTML view and include it again when
they switch to WYSIWYG mode again - like Ronnie suggested.

TIA,
@win.
-----Original Message-----
From: Ollie Cornes [mailto:Click here to reveal e-mail address]
Sent: woensdag 19 juni 2002 10:49
To: aspngrichtextbox
Subject: [aspngrichtextbox] RE: Using a style from within <header>

The drop-down list contents are entirely under your control. So really where
you put the styles is down to your needs, although as Ronnie mentioned in
his post, if you use inline styles they will be added to the document and
therefore visible in the HTML view. Because of that the preference is
usually going to be to go for an external CSS file.

Ollie

--
http://www.richtextbox.com/

-----Original Message-----
From: Click here to reveal e-mail address
[mailto:Click here to reveal e-mail address] On Behalf Of
Click here to reveal e-mail address
Sent: 19 June 2002 06:26
To: aspngrichtextbox
Subject: [aspngrichtextbox] RE: Using a style from within <header>

Hi Ollie,

Thanks for your reply - it is of help. We will try the second option first.
Is there any other advantage to point to a CSS file? For instance: Is the
drop down list in RTB with the style classes being updated dynamically with
the styles defined within the external file??

Thanks again,
@win.

-----Original Message-----
From: Ollie Cornes [mailto:Click here to reveal e-mail address]
Sent: dinsdag 18 juni 2002 16:44
To: aspngrichtextbox
Subject: [aspngrichtextbox] RE: Using a style from within <header>

Hi Edwin,

The scenario you describe isn't directly supported, but I think there are a
couple of ways to approach this:

1. Output the CSS to a file and import it using the CSS property (as you
described). If the stylesheet is common across content, this is probably
your best bet.

2. If you have large numbers of styles, you may find that including them
inline is the best approach. The challenge here is to add them to the
document in such a way that Internet Explorer does not remove them. For
example, below is a piece of HTML that includes a style inline. If you paste
this into the HTML view of a RichTextBox and look at the page, you'll see
the heading appear in red. In general this approach seems to work fine,
although if you move the <h1>.</h1> to the top above the style, you'll find
that IE will strip the style tags. A workaround for this is to place the
styles *last* in the document. If you still find IE is removing them, and
add some white space after the style definitions. To keep your documents and
the styles separate, just strip the <style> tags when the page is submitted
to the server.

Note that the styles must go in the document, because the it is displayed in
an iframe and the only way to add styles to the iframe is in the document.
Well, actually, that's not entirely true. I believe you can use script to
add individual styles to the iframe, but I'm not sure that is going to work
for you.

Any help?

Ollie
--
http://www.richtextbox.com/

<H1>Heading</H1>
<STYLE>
<!--
h1 {color: red;}
-->
</STYLE>

-----Original Message-----
From: Click here to reveal e-mail address
[mailto:Click here to reveal e-mail address] On Behalf Of
Click here to reveal e-mail address
Sent: 18 June 2002 13:22
To: aspngrichtextbox
Subject: [aspngrichtextbox] Using a style from within <header>

Hi again,

The image button thing posted earlier is working now.

We do have one other issue that puzzles us. With EditorWysiwygModeCSS it is
possible to specify a location for an external stylesheet. Is there a
possibility to use styles defined within the <head> tag of the page that
itself contains the RichTextBox?
Our stylesheets are stored in a database, so we do not have a file location.
What we do not like is to save the style sheet temporarily to a file
location and point to that. We already have the styles in <head><style> so
we would like to use these. Any suggestions??

TIA,

Kind regards,
@win.
| [aspngrichtextbox] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/aspngrichtextbox.asp = JOIN/QUIT
| [aspngrichtextbox] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/aspngrichtextbox.asp = JOIN/QUIT
| [aspngrichtextbox] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/aspngrichtextbox.asp = JOIN/QUIT
| [aspngrichtextbox] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/aspngrichtextbox.asp = JOIN/QUIT
| [aspngrichtextbox] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/aspngrichtextbox.asp = JOIN/QUIT
| [aspngrichtextbox] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/aspngrichtextbox.asp = JOIN/QUIT
Reply to this message...
 
 
System.Windows.Forms.RichTextBox




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com