text_enabled plugins with markup-based preview?

17 views
Skip to first unread message

Martin Koistinen

unread,
Mar 22, 2014, 10:17:45 AM3/22/14
to django-cms...@googlegroups.com
At present (~3.0), text_enabled plugins are able to "render" as only an icon via icon_src() and icon_alt() into the text plugin. While this is a nice start, it leaves a lot to be desired.

Imagine the scenario where you have multiple link plugins (or any for that matter) in a given placeholder. The link plugin necessarily replaces the linked text/image/object in the placeholder with a single, uniform icon.  This not only makes it difficult to read the content of the placeholder as you work, but also, it is difficult for the operator to distinguish one plugin from the other, resorting to having to hover over each one in turn to read the tooltips to see which is which.

It would be a tremendously more operator friendly if we cms-developers had another function, say render_preview() that we could override to emit any markup we like into the resulting text/HTML field.

I would venture to guess that the original contributors of the plugins probably foresaw issues with this, and opted for the image-only approach. I further speculate that this may be related to concerns around the TextPlugin allowing the plugin's markup to be further edited which could result in the breaking of the "connection" of the markup to a corresponding plugin.

Further possible concerns could have been related to making the plugin API compatible with multiple TextPlugins. But I am again speculating.

Is anyone aware of any pitfalls that might prevent such a thing from being possible?

Martin Koistinen

unread,
Mar 22, 2014, 10:22:13 AM3/22/14
to django-cms...@googlegroups.com
OK, I see this topic was already discussed in 2011. Anyone interested in trying to get something into 3.1?

Martin Koistinen

unread,
Mar 22, 2014, 10:22:45 AM3/22/14
to django-cms...@googlegroups.com
Oops, forgot the reference to the other discussion: https://groups.google.com/forum/#!topic/django-cms-developers/6N4fa-w205I

benzkji

unread,
Apr 9, 2014, 9:55:11 AM4/9/14
to django-cms...@googlegroups.com
hi martin,
I had a glimpse on the 3.0rc2, with the CKEditor your which has arrived in django cms. at least as far as I can tell (I've just added 1 or 2 link plugins and the have the link text in the editor)...

best
ben
Reply all
Reply to author
Forward
0 new messages