tag:help-archives.hannonhill.com,2010-02-09:/discussions/how-do-i/548-styling-the-wysiwyg-content-editor-with-a-target-css-file-i-cant-get-this-workingCascade CMS: Discussion 2011-10-21T16:29:08Ztag:help-archives.hannonhill.com,2010-02-09:Comment/106978202011-10-18T22:04:32Z2011-10-18T22:04:32ZStyling the WYSIWYG content editor with a Target CSS file -- I can't get this working<div><p>Hi Shiv,</p>
<p>Yes - in order for this to work, you need to list the CSS class
names in the Target's CSS Classes field. Those class names need to
match up with class names that exist within your selected CSS file
(also at the Target level). Once you've followed these steps, the
classes should appear in the Styles dropdown in the WYSIWYG
editor.</p>
<p>Let me know if you need more help.</p>
<p>Thanks</p></div>Timtag:help-archives.hannonhill.com,2010-02-09:Comment/106978202011-10-18T22:29:10Z2011-10-18T22:29:10ZStyling the WYSIWYG content editor with a Target CSS file -- I can't get this working<div><p>Also, you have to be aware that CSS rules like #maincontent h3
won't work in he wysiwyg because Cascade has no idea on the edit
screen that your h3s are going to be wrapped by an element called
#maincontent by your template or XSL. So you have to unpack those
rules for the wysiwyg CSS. For example your wysiwyg CSS would just
target the h3 tag instead of #maincontent h3.</p></div>Lee Roberson (Function Digital LLC)tag:help-archives.hannonhill.com,2010-02-09:Comment/106978202011-10-19T14:41:49Z2011-10-19T14:41:49ZStyling the WYSIWYG content editor with a Target CSS file -- I can't get this working<div><p>Thanks Tim, I'll do what you suggested re adding class names to
the Target.</p>
<p>However, I think this implementation could be better. It
<strong>IS</strong> useful if a site designer creates CSS classes
that are intended for the end-user to apply to selected content,
and wants to limit the end-user's choices to a small subset of all
classes within the stylesheet.</p>
<p>However, suppose a designer/developer doesn't use CSS classes,
but instead styles HTML elements, e.g.</p>
<pre>
<code>h1 { font-size: 1.6em; color: #ff9; }</code>
</pre>
<p>One might do this for any number of reasons. But, unless the
site developer specifies some class names in the Target -- <em>even
if they are nonfunctional</em> -- none of the CSS rules will be
applied to the WYSIWYG editor panel.</p>
<p>From what you're saying here: In order for my h1, h2, p,
address, ul, ol, li, etc. styles to be used in the WYSIWYG editor
panel, I'll have to create a "dummy" CSS style --</p>
<pre>
<code>.placeholder { }</code>
</pre>
<p>...and then add it to the Target definition. Now, my end-users
will be able to select that style and apply it to content, even
though it does nothing. It really seems like a kludge to have to do
it that way.</p>
<p>A better default behavior would be for the WYSIWYG editor to
include the CSS file specified in the Target, regardless of whether
any class names are listed in the Target definition. Then, if any
class names are listed there, only those classes would be visible
in the CSS class selector drop-down. In other words, don't throw
out the whole CSS file just because it doesn't include classes, or
just because none of its classes are for the end-user.</p></div>Shivtag:help-archives.hannonhill.com,2010-02-09:Comment/106978202011-10-19T14:42:30Z2011-10-19T14:42:30ZStyling the WYSIWYG content editor with a Target CSS file -- I can't get this working<div><p>Also thank you Lee, that's a good point.</p></div>Shivtag:help-archives.hannonhill.com,2010-02-09:Comment/106978202011-10-20T14:07:23Z2011-10-20T14:07:23ZStyling the WYSIWYG content editor with a Target CSS file -- I can't get this working<div><p>Shiv,</p>
<p>Thanks for the feedback! I tend to agree that there could be
some improvements made to the CSS interface. I had created a
general improvement item for this a while back which you can vote
on <a href=
"http://ideas.hannonhill.com/forums/52559-cascade-ideas/suggestions/679625-better-interface-for-css-styles?ref=title">
here</a>. Things have changed a bit since the addition of Sites to
Cascade Server, but for the most part a lot of this still
applies.</p>
<p>Please be sure to vote that up and also comment there if you
wish. Or, if you have other ideas that don't really fall under that
heading feel free to add a new ones!</p>
<p>Thanks!</p></div>Tim