CSS Class on Block Object - Help Please

Last post 07-11-2006, 7:56 PM by jojolevy. 2 replies.
Sort Posts: Previous Next
  •  07-10-2006, 10:52 PM 20881

    CSS Class on Block Object - Help Please

    I am trying to customize CE so that I can get a class on a block element such as <DIV class=myClass>Text</DIV>.
     
    Tried editing "Common.config", since CssClass (Class menu) only places class names on a span tag, I tried to add to/edit the FormatBlock "Paragraph" menu area in Config ex:

    <item text="[[My Item]]" value="&lt;P class=myClass&gt;"></item>

    That didn't seem to work. Can someone help me or point me to a thread where this was discussed before?
     
    - Thanks
    Jordan
  •  07-11-2006, 3:46 PM 20902 in reply to 20881

    Re: CSS Class on Block Object - Help Please

    Jordan,
     
    If your selection is a block element, when you select the css class dropdown,  CuteEditor will just change/ass the cass attribute of this block element.
     
    For example:
     
    <DIV class=myClass>Text</DIV>
     
    Will be changed to:
     
    <DIV class=newClass>Text</DIV>
     
    If your selections is not a bock element,  CuteEditor will uses the span tag.
     
    >><item text="[[My Item]]" value="&lt;P class=myClass&gt;"></item>
     
    It will not work.
     
    >>I tried to add to/edit the FormatBlock "Paragraph" menu area in Config ex:
     
    You can change the <P> tag in the FormatBlock to <DIV> tag.

      <FormatBlock>
       <item text="[[Normal]]" value="&lt;P&gt;"></item>
       <item text="[[Heading 1]]" value="&lt;H1&gt;"></item>
       <item text="[[Heading 2]]" value="&lt;H2&gt;"></item>
       <item text="[[Heading 3]]" value="&lt;H3&gt;"></item>
       <item text="[[Heading 4]]" value="&lt;H4&gt;"></item>
       <item text="[[Heading 5]]" value="&lt;H5&gt;"></item>
       <item text="[[Heading 6]]" value="&lt;H6&gt;"></item>
       <item text="[[Address]]" value="&lt;Address&gt;"></item>
       <item text="[[MenuList]]" value="&lt;MENU&gt;"></item>
       <item text="[[Formatted]]" value="&lt;PRE&gt;"></item>
       <item text="[[Definition Term]]" value="&lt;DT&gt;"></item>
      </FormatBlock>
     
     
     
     
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  07-11-2006, 7:56 PM 20910 in reply to 20902

    Re: CSS Class on Block Object - Help Please

    >>You can change the <P> tag in the FormatBlock to <DIV> tag.
    >>
    Thanks for you suggestion but...
     
    >>  <FormatBlock>
    >>    <item text="[[Normal]]" value="&lt;P&gt;"></item>
    I can get it to change to a DIV. The problem is I want to add a class to the DIV. Whenever I add Class into a elements value in the <FormatBlock> section, CE stops working. 
     
    >><item text="[[Normal]]" value="&lt;div class=myClass&gt;"></item>
     
    I think the problem has to deal with how CE inserts / appends text to the HTML. If it sees <P> as the value of the ITEM, then CE knows that it must add </P> to the end of the selected block of text. But if CE sees  <div Class=myClass> it does not know how to close the tag & so it inserts nothing.
     
    I could be wrong. Does anyone have any other suggestions?
     
    Maybe I can get around my problem by adding a code snipet to do what I want & training my app users how to get the desired HTML.
     
    - Thanks.
     
View as RSS news feed in XML