Re: Apply CSS Class menu items to any block level element without the use of extra <span> tags

  •  08-27-2009, 10:16 AM

    Re: Apply CSS Class menu items to any block level element without the use of extra <span> tags

    I am having the same issue with CE that has been descibed previously in this thread. 

    We have several custom classes that show up in the CSS Class menu.  As much as possible we have tuned off the ability for our authors to use every crayon in the box including font colors, sizes and inline styles.  We want them to use the classes we have created for them instead of designing their own flavor of content layout on every page. 

    If I select an entire paragraph or div or other block level element and then pick a option from the CSS Class menu I do not want an extra span tag to be inserted with the class applied to it I expect the class to be applied to the tag itself.  Use of the span tag is fine only if a CSS Style is applied to only a portion of text.

    When an entire paragraph of text is selected and a CSS Style is applied CE is writing this code:
    <p><span class="CustomClass">Hello world</span></p>

    I want CE to apply the class to the tag itslef like this example:
    <p class="CustomClass">Hello world</p>

    Where is the setting to enable CE to apply classes from the CSS Class menu to any block level element itself like a <p>, <div>, <ul>, <li>, <h2> etc. instead of inserting extra <span> tags to contain the class.

    Note:  I know the  General tab on the Style Builder dialog box includes a CSS Class input box.  If our users had all of our class names memorized this would work fine but its not likely any of them will be able to know the name of the class they want to use and type it in that box.  Converting that input box to a CSS Style drop down menu would be helpful but not the complete solution I am asking about as it requres extra steps by the editor to right click on the selected content, select Tags, then click on the P in the flyout menu, wait for the dialog to show up and then choose an option.

    Thank you in advance for your help.






View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems