Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Web Wiz Rich Text & CSS
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum LockedWeb Wiz Rich Text & CSS

 Post Reply Post Reply
Author
Caradog View Drop Down
Newbie
Newbie
Avatar

Joined: 18 November 2004
Location: United Kingdom
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Caradog Quote  Post ReplyReply Direct Link To This Post Topic: Web Wiz Rich Text & CSS
    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 :(
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Caradog View Drop Down
Newbie
Newbie
Avatar

Joined: 18 November 2004
Location: United Kingdom
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Caradog Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Ted Ljong View Drop Down
Newbie
Newbie
Avatar

Joined: 25 November 2003
Location: Sweden
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ted Ljong Quote  Post ReplyReply Direct Link To This Post Posted: 06 December 2004 at 6:24am
Hi
I have the same problem. which file did you change.
 
Back to Top
cbeaudry View Drop Down
Newbie
Newbie


Joined: 06 May 2004
Location: United States
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote cbeaudry Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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');")


Edited by -boRg- - 15 December 2004 at 4:19am
Back to Top
cbeaudry View Drop Down
Newbie
Newbie


Joined: 06 May 2004
Location: United States
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote cbeaudry Quote  Post ReplyReply Direct Link To This Post 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!
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.