WYSIWYG Issue:

mu5a5hi's picture

I am trying to finally get my D6 WYSIWYG going well by following along with Andrew Mallis's excellent 'WYS(is not always)WYG(but it can be)'

https://docs.google.com/document/d/1BJfL0tx6eLJyQ2bvjpeTCREjaPsLKRzs78mj...

I am running into issues and solving them as I go along. Currently I am stumped on this one..

I define a div.boxed to have an outline and color in css.. then in my settings/1/configure page i add "div[class]," into the Allowed HTML elements and attributes under 'WYSIWYG Filter" ... Then I go to the editor.. and i put the div in and it gets applied INDIVIDUALLY to every element.. example A List.. each

  • gets the div put around it instead of just around the whole selection of text. Not pretty.
  • Video:
    http://screencast.com/t/r3egiKvRUydk

    How might I approach getting the div tag to go around my whole selection rather than get applied to each element contained within?

    I am new to asking for help in these groups. If this is the wrong place to ask, please let me know where the correct place is.
    Thanks!
    Jeff

    Comments

    You need the "Div Container" feature

    FredCK's picture

    The Style combo in CKEditor will go across the selection and simply make every "block" it founds the block you have selected (several div's, in your screencast).

    What you need instead is the "Div Container" feature of CKEditor.

    Just try the "Create Div Container" button at the CKEditor demo:
    http://ckeditor.com/demo

    Cool!

    mu5a5hi's picture

    Your solution worked great. Now i just have to figure out what I did wrong in drupal's filtering. So many filters.. not sure which one is the culprit...

    http://farm8.staticflickr.com/7266/7044752313_3b7b4445a3_o.jpg

    Seems its the wysiwyg filter

    mu5a5hi's picture

    Seems its the wysiwyg filter removing it most likely..

    heres what i have in the HTML elements and attributes there on /admin/settings/filters/4/configure

    @[class|style|title],
    div[class],
    a[!href|target<_blank|name|rel|id],
    -div[align<center?justify?left?right],

    p[align<center?justify?left?right],

    strong/b,em/i,u,-sup,-sub,
    -ol[type|compact],-ul[type|compact],-li,-dl,-dt,-dd,
    caption,-code,-pre,address,-h1,-h2,-h3,-h4,-h5,-h6,hr[size|noshade],
    br,cite,code,-blockquote,cite,abbr,acronym,legend,
    img[src|width|height|align|hspace|vspace],
    -table[border=0|cellspacing|cellpadding|width|frame|rules|height|align|summary|bgcolor|background|bordercolor],
    -tr[rowspan|width|height|align|valign|bgcolor|background|bordercolor],
    tbody,thead,tfoot,#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor|scope],

    th[colspan|rowspan|width|height|align|valign|scope],

    -span[align<center?justify?left?right]

    is div[class], wrong?

    Wysiwyg

    Group organizers

    Group categories

    Group notifications

    This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

    Hot content this week