WordPress.org

Ready to get started?Download WordPress

Ideas

Automatic adding of usable CSS classes to the editor

  1. Dickie
    Member

    12345

    How about a way of automatically pulling the CSS classes from the current theme's CSS file (for example there could be a defined section within the Theme's CSS file that is exported styles)

    These are then loaded into the editor (as a drop down for example) so that you can assign the predefined classes to any elements in the post.

    With also the ability to select some text an wrap it in a span or div

    This would mean that styling a document could be done relatively easily without having to delve into the HTML.

    Posted: 7 years ago #
  2. mozey
    Member

    12345

    YES YES YES!, its puts extra load on the theme developers!, but think about the applications!. good job

    Posted: 7 years ago #
  3. Dickie
    Member

    12345

    Only 5 votes !!! Come on, if you don't like the idea then vote it lower... don't just not vote at all.
    If you don't like the idea, then please say why, maybe I can further refine the idea.

    Posted: 7 years ago #
  4. mozey
    Member

    12345

    what?
    i do like the idea!!!!

    Posted: 7 years ago #
  5. Dickie
    Member

    12345

    Not you mozey... ;-) the other bazillion people who haven't even voted !!... lol
    As I said I don't mind people not liking the idea, but I would like to know why if they don't

    Posted: 7 years ago #
  6. Peter Westwood
    WordPress Lead Developer

    12345

    I would have thought it would be better for there to be a set of common styles that the editor supports and all theme designers are encouraged to use.

    This will make it more user friendly in the long run.

    Maybe also allow the list of styles to be filtered so that the functions.php within a theme could add extra ones or remove ones it doesn't support.

    Posted: 7 years ago #
  7. Dickie
    Member

    12345

    @westi
    That sounds like a good idea... but it must be pluggable by function.php as the whole concept of this was so that CMS was easier, and also to that "specific classes" could be included.
    The obvious problem with pre defined lists is you cannot please all the people... etc.

    The original idea about parsing the CSS was only a concept... the main thust of this idea is to have usable classes in the editor.

    I still think it's very important to be able to wrap text in divs/spans that you can assign an ID/class too, as this dort of goes hand in hand with this.

    Posted: 7 years ago #
  8. bornliar
    Member

    12345

    Pulling the CSS classes from only a part of a CSS file (or even entering the styles you want to use in a post or page on first use?) would be truly awesome.

    But if it took ALL the CSS from a file, that would just be a cluttered mess of a dropdown list. I have multiple, huge CSS files, and going through a list of all my css classes and ids would take as long as just typing it in.

    That said, I love the basic idea of selecting classes from the write screen.

    Posted: 7 years ago #
  9. Dickie
    Member

    12345

    Thanks for your comments...
    Yeah, the idea about pulling them from the CSS file was only a concept... the main idea was that there was a selection of classes that applied to that theme... that could then be used in the editor.

    Admittedly this is more of a CMS thing, but it could equally apply to blogs as well.

    As said... It really does need to go hand in hand with allowing the wrapping of blocks of text etc. in Divs/spans though

    Posted: 7 years ago #
  10. AndreyFrolov
    Member

    The classes to be exposed could be separated by some special format comments like
    /*expose-to-editor*/

    Posted: 5 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.

  • Rating

    12345
    118 Votes
  • Status

    This is plugin territory