General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 12th, 2002, 04:42 AM
w0lverine w0lverine is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Paris, France
Posts: 32 w0lverine User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to w0lverine
WYSIWYG Editor and CSS

Hi, I'm using the WYSIWYG, but I would like to add the CSS possibility to it, so I have to questions :
- I read about the createStyleSheet possibility to apply a CSS to the iframe, so I did :
Code:
<SCRIPT>
  iView.document.createStyleSheet('css.css');
</SCRIPT>


Why doesn't It work, whereas if I put the CSS in the <head> section of the edited text it does ?
Note that I can't do that way because the edited text is not a full page so i have to get rid of the <body> etc... tags. Note also that I can't use the Init() function Onload because the editor is included in the middle of a page so the onload event doesn't happen.

- My second question is : has anybody already done a css parser in PHP that would extract the css class names from the file ?
The goal is obviously to to a drop-down menu that would change the selected area class name.
So this leads to another question which is :
Say I select a whole part of a text, how do I apply the class name specification to all the tags selected through a selectrange() ?


Thanks already for your reading
__________________
who needs to know who i am ?

Reply With Quote
  #2  
Old August 12th, 2002, 08:17 AM
dgibson dgibson is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2002
Location: Urbana, MD, USA
Posts: 66 dgibson User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
The init() firing onload doesn't care where the WYSIWYG is. It renders out the IFRAME and basics and then sets it to editable (and adds the stylesheet, etc) when the page is fully downloaded to the client-side. So if you're having trouble with the init function, it's probably the same reason why the createStyleSheet isn't working.

Reply With Quote
  #3  
Old August 12th, 2002, 09:53 AM
w0lverine w0lverine is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Paris, France
Posts: 32 w0lverine User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to w0lverine
no no i don't need the Init() function, it works great since it's only used (in the article) the set the designMode to 'on' which I do later on with a line in a javascript .. so il don't need the Init function, just to have the createStyleSheet function work :/

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > WYSIWYG Editor and CSS


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT