SitePoint Sponsor

User Tag List

View Poll Results: How should CSS be integrated

Voters
4. You may not vote on this poll
  • CSS classNames in config

    1 25.00%
  • Separate stylesheet for editor

    1 25.00%
  • Search stylesheet for rules

    1 25.00%
  • Full CSS rules in config - use inline

    0 0%
  • Other (specify)

    0 0%
  • Choice/Combination (specify)

    1 25.00%
Results 1 to 6 of 6
  1. #1
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS Styles in a Rich-Text Editor

    Hey fellow developers

    I'm making an RTE and have come to the point where I'd like to integrate CSS support - that is, give the editing widgets (and, concurrently, the user of the editor) access to CSS styles, so you aren't just stuck with <strong>, <em>, and inline style attributes.

    SO, what I need to know from you, as developers, is the preferred way of getting the styles to the script. I'm going to explain the options in detail here, and just give cursory labels for the poll
    1. Add classNames to be used into a configuration file of the editor. Only classes specified here will be made available for editing.
    2. Use a dedicated stylesheet just for the editor, in which all rules need to be used. This would be attached to the IFRAME's document, and could be @import-ed into the regular page so the same stylesheet can be used for editing and rendering.
    3. Search all current stylesheets for rules that are a descendant of the editor's ID.
    4. Specify styles in the config to be added inline on the HTML.
    5. Other (specify)
    6. A combination/choice of any of the above.
    Please give some serious thought to this before responding - I want this to be something that works with the current zeitgeist of web development. Think about what the conditions under which you'd use this, and what would be best/easiest for those conditions.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey mods - can you maybe move this to "General Development Issues" and then delete this post? Thanks.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  3. #3
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    I like the classNames option, but I think the RTE should also search any specified stylesheet for rules. Using only the classNames would leave your code marked up validly (if that's the intention in the first place), but would probably be a waste of classes when inheritance or good IDs can take its place. I'm voting for classNames + search stylesheet.

    Off Topic:

    Beetle, maybe change the radio buttons to checkboxes in the poll so people can vote for more than one option?

  4. #4
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd rather you just vote for "Combo" and I'll keep mental notes about what you want. I don't want the combo votes to get lost amongst the regular, single ones.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  5. #5
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by beetle
    I'd rather you just vote for "Combo" and I'll keep mental notes about what you want. I don't want the combo votes to get lost amongst the regular, single ones.

  6. #6
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I too like the classNames option (and voted for that), but the "search stylesheet" option does have some interesting possibilities.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •