On Nov 29, 2010, at 5:37 PM, Marius Dumitru Florea wrote:
> 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.
I don't like too much to use macros.vm for this since the goal is to remove it
so we're slimming it down instead.
Thanks
-Vincent
>
> When the user selects a piece of text and applies the TODO style from
> the WYSIWYG editor, he'll get:
>
> (% class="todo" %)
> Some TODO text..
>
>>
>
>> How would the user define them?
>
> I don't think it's good to let users define their own styles. The idea
> is to have consistency between wiki pages. One way to achieve this is to
> enforce users to use the same styles for the same type of information.
>
> Thanks,
> Marius
>
>>
>> Thanks
>> -Vincent
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs