Adding link in citation source in kupu

Bug #101274 reported by Yves Serrano
8
Affects Status Importance Assigned to Milestone
Silva
Fix Released
Medium
Andy Altepeter

Bug Description

If you add an <a href="...">title</a> into the source field in the form
editor (citation form), the citation looks correct. By swiching to kupu the
citation gets messed up.

Revision history for this message
Guido Wesdorp (guido-infrae) wrote :

Hehehe, obviously that shouldn't happen but I'm not surprised I didn't expect
people to actually do that... ;)

I'll check it out.

Revision history for this message
Guido Wesdorp (guido-infrae) wrote :

Ah, now I noticed I misread the issue: I thought the link was added to the input
field in the Kupu tool, but now I noticed that it was actually in the forms
editor... Obviously this should be changed, although it's not entirely clear to
me what the best solution would be, since we currently use an input field in
Kupu to set the 'author' and 'source' values (both of which can contain markup
in the field editor) and both fields are not part of the WYSIWYG widget in Kupu.

There would be two possible solutions: the prettiest would obviously be to get
the 'author' and 'source' fields into the WYSIWYG iframe, but that would be
*very* hard, since it's almost impossible to put constraints on what can be in
the iframe. If we modify Kupu so that it won't allow adding arbitrary elements
(tables, lists, other citations, etc.) to those fields, or disallow changing the
order of the citation contents for instance, then still it would be possible to
completely mess it up using copy/paste.
A second solution would be to allow adding markup in the input field, but
obviously this wouldn't 'feel' nice, we'd have a WYSIWYG editor in which people
have to write markup...

Revision history for this message
Martijn Faassen (faassen) wrote :

Would anything be possible to do about this in the Silva 1.1.1 timeframe. If
not, what would be the plan of action for Silva-1.2?

Revision history for this message
Guido Wesdorp (guido-infrae) wrote :

I need to get feedback about my questions first, don't know what the best
solution would be, see below.

Revision history for this message
Walco van Loon (walco) wrote :

Removing the Silva 1.1 topic, might move to Silva midterm?

Revision history for this message
Kit Blake (kitblake) wrote :

Since the ‘prettiest’ solution sounds near impossible, let's go for the other,
and make markup allowed in the Author and Source fields. Then people can enter
whatever they want (horrible urls with ...?page_id=18599, give the href a title
attribute, etc).

Revision history for this message
Flynt (flyntle) wrote :

I agree with Kit.

Cheers, Flynt

Revision history for this message
Flynt (flyntle) wrote :

Hi, what is the actual status of this issue ? Is it still open ?

Greetings, Flynt

Revision history for this message
Kit Blake (kitblake) wrote :

Yes, this one is still open.

Revision history for this message
Andy Altepeter (aaltepet) wrote :

This brings up a question again...there will be increasing desire to have markup capabilities in kupu tools. This citation tool is one example...metadata fields are another (when a full-fledged metatadata editor is completed). I'm using a wysiwyg editor for a property-tool extension in my local SNN.

There are a few possibilities here. Use a _very_ lightweight wysiwyg editor (perhaps tinymce). Use one that has the ability to "edit in a new, small popup window". The latter may be desired, as loading "another" wysiwyg editor into kupu may have an undesired performance hit.

Changed in silva:
assignee: guido-infrae → kitblake
Revision history for this message
Kit Blake (kitblake) wrote :

As a result of the discussion there are several issues in this one issue:

1. One point is we'd like to deprecate the citation element and make it a code source. The citation element is one of the few custom elements in silva xml and the editing of it in Kupu is clunky (no wysiwyg display, text in Kupu, author/source in toolbox). So we want to remove it. This will mean a migration script that converts citation elements into a code source. But this doesn't solve the underlying problem of having markup in kupu toolbox fields.

2. Having rich text in kupu toolboxes would be nice. Right now I hard code html sometimes to get the result I want. Best would be to have kupu do the editing, albeit with a limited editor. But then we could reuse things like the lookup window for linking and such. In our sister cms plone there are examples of having multiple kupus in one form (in fact that's why they don't have toolboxes and everything is packed into the drawers).

3. If we use another editor like tinymce (I'm not sure how light it is, AFAIK it's a full fledged editor) then we definitely have to use a popup, and more popups for linking.

4. We should have a solution that code sources can use. If there's a textarea in a code source, the developer should have the option of making it a rich text field.

Changed in silva:
assignee: kitblake → aaltepet
milestone: none → 2.2
Revision history for this message
Andy Altepeter (aaltepet) wrote :

marking this one as fix released, since awhile back kupu was patched to support markup in the citation tool.

But, the citation tool is being deprecated in favor of a code source, which is recorded in this issue:
https://bugs.launchpad.net/silva/+bug/300549

Changed in silva:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.