On 11/30/2010 05:32 PM, Sergiu Dumitriu wrote:
On 11/30/2010 11:45 AM, Marius Dumitru Florea wrote:
Hi devs,
I'd like to add a new administration section for the WYSIWYG editor. For
this I'll create a new page:
XWiki.WysiwygEditorConfig (storing the WYSIWYG editor configuration
class/object and the XWiki.ConfigurableClass objects)
Is this fine with you? I don't think a separate application is needed yet.
+1.
The WYSIWYG editor configuration will contain
there sections/properties:
General settings
----------------
Display the WYSIWYG/Source tabs [Yes/No]
The editor tab selected initially [WYSIWYG/Source]
The list of enabled plugins [submit line separator ...]
The top menu items [link image table macro import]
The list of tool bar items [bold italic underline ...]
+0:
- I'd like the Source tab to be disabled by default
- I'm not sure the initially selected tab works well as a separate
option, since it can be set to a disabled tab. Actually I don't think it
makes sense to use the WYSIWYG editor in Source mode by default, that's
what the Wiki editor is for.
- How do we make the other options intuitive? Providing a plain text
input where the admin must enter valid names is not intuitive and prone
to errors.
This option would at least require very good
documentation
(and visibly linked from that field).
The administration section is generated automatically from the
ConfigurableClass. Adding links to the documentation near each field or
detailed help labels is not straightforward.
An alternative is to provide a
mechanism for listing these options (Wysiwyg.getAvailableToolbarItems)
which then populates a list of checkboxes.
It's not that simple. The order in which the items appear in the list is
important.
Link settings
-------------
Limit attachment selection to the edited page [Yes/No]
+1.
Default target?
Target as in target="_blank"? This parameter is not currently available.
I listed only current parameters. We can add others later.
Image settings
--------------
Allow insertion of external images [Yes/No]
Limit image selection to the edited page [Yes/No]
+1.
Automatically link to the image?
Unavailable.
Color settings
--------------
The colors available in the color picker
[#000000,#444444,#666666,#999999,#CCCCCC ...]
The number of colors to display per row in the color picker [8]
-0. I'm not sure this is really relevant enough.
IMO it just adds extra
complexity without too much value.
This parameters are currently available. I think we should expose all
global (i.e. not instance) parameters in the administration section.
Relevance is subjective. I imagine there are users who want to customise
the colors of the color picker.
Thanks,
Marius
Font settings
-------------
The list of available font names [andale mono, arial, arial black, ...]
The list of available font sizes [8pt, 10pt, 12pt, ...]
Same concern as above, but +0, since this is a bit more important.
Style settings
--------------
The list of predefined styles []
+1. Again, this will need some help to let people know what must be used
here, and how to create new styles.