Hi Vincent,
On 11/29/2010 06:05 PM, Vincent Massol wrote:
Hi Marius,
On Nov 29, 2010, at 5:01 PM, Marius Dumitru Florea wrote:
Hi devs,
I'd like to introduce a new feature in the WYSIWYG editor in XE 2.7: the
ability to apply predefined custom styles to a text selection. Using
this instead of the other text formatting features (e.g. font name, font
size, text color etc.) can help improve the consistency between wiki pages.
Wiki administrators will be able to define a list of custom styles (CSS
class names) which will be listed in a select box on the WYSIWYG tool
bar. These styles should have meaningful names, e.g. "important",
"comment", "todo" etc..
Considering that this feature is independent and will be disabled by
default (i.e. we don't provide predefined styles in the standard XE
distribution) I think it's save to introduce it in 2.7. Let me know if
you are against it.
Where would the styles be saved?
The styles are saved in the skin (file system stylesheets, skin object,
stylesheet extensions). For instance you could put:
.todo {
background: url(/path/to/todo.png) no-repeat scroll 6px 8px #EFEFEF;
color: darkblue;
padding: 8px 28px;
}
in a stylesheet extension then configure the WYSIWYG editor like this:
styleNames: "[{...}, {name: 'todo', label: 'TODO', inline: false},
{...}]"
For a start, the list of predefined style names (CSS class names) will
be configurable only from macros.vm but later we can create a nice UI in
the administration to allow wiki administrators to configure the list.