Print Page | Close Window

Web Wiz Rich Text & CSS

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Rich Text Editor (RTE)
Forum Description: Support forum for the Web Wiz Rich Text Editor (RTE).
URL: https://forums.webwiz.net/forum_posts.asp?TID=12596
Printed Date: 28 March 2026 at 9:01am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Web Wiz Rich Text & CSS
Posted By: Caradog
Subject: Web Wiz Rich Text & CSS
Date Posted: 18 November 2004 at 6:24am
Guys, I got a small function added to the exisitng stable version of rtf editor to strip out styles from a CSS sheet and show them in a drop down list, but how to I then format a block of text from the selected style in the drop down? Tried adding a "class='mystyle'" etc but no luck :(



Replies:
Posted By: WebWiz-Bruce
Date Posted: 18 November 2004 at 7:00am
Not a simple thing to do, espcially as IE's built in RTE features have very limited support for CSS.

Mozilla's RTE implementation has very good CSS support.

Your best bet is to look into the FormatBlock method by doing a search on google.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: Caradog
Date Posted: 18 November 2004 at 10:05am
Ok, not the ideal solution but good enough :) I've redefined the "<h1><h2>" etc tags as styles for my client, works a treat.


Posted By: Ted Ljong
Date Posted: 06 December 2004 at 6:24am
Hi
I have the same problem. which file did you change.
 


Posted By: cbeaudry
Date Posted: 15 December 2004 at 12:00am
Kind of like a similar problem except that I use a CSS file to define the borders on images. Unfortunately, I have no clue where to modify the files so that uploaded images are displayed with the appropriate class. There is only one CSS attrbute for images but it would be nice to have it affect the images in the RTE.
 
Any ideas where I could insert a bit of code to define the class when the text is written to the database?


Posted By: WebWiz-Bruce
Date Posted: 15 December 2004 at 4:17am
Around line 168of the file popup_link.asp you could try the following:-

Response.Write(vbCrLf & "hyperlink[i].setAttribute('class', 'myClass');")

and 186:-

Response.Write(vbCrLf & "hyperlink.setAttribute('class', 'myClass');")


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: cbeaudry
Date Posted: 15 December 2004 at 11:31am
The page is incorrectly mentioned. It should actually be RTE_popup_adv_image.asp. The first bit of code wasn't necessary since I didn't need to preview it.
 
The second bit of code did the trick but I had to change it to:
 
Response.Write(vbCrLf & "img.setAttribute('class', 'myClass');")
 
The desired result was achieved in that the images have the CSS attributes as defined in my file.
 
Thanks!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net