Tobias
Tobias

Reputation: 2561

Plone best practice for embedding of objects by uid

I have a Plone 4 site where I currently use the following method to embed objects (e.g. images, videos, tables …) in user-editable HTML content:

Now that I'm developing an additional customization package (which contains new object types, now using Dexterity), I wonder whether there is some more "plonish" way. Is there, for example, some embed action?

Upvotes: 1

Views: 120

Answers (1)

fRiSi
fRiSi

Reputation: 1238

i don't know of a package that does the same and what you're doing sounds sane to me ;-)

i just would use https://pypi.python.org/pypi/plone.outputfilters instead of your transform BrowserView.

if it's possible to explicitly mark links that should not be auto-embedded (eg via span.noEmbed a.internal-link selector) this could become a useful addon.

i guess for portal_type=='File' you'll need to check the mimetype too in order to decide if you're embedding a video file or something else...

other products i know of embed content outside of your plone site (eg. collective.embedly)

another approach would be a to use a tinymce plugin to genereate the proper embed html when editing the html-body of your page (i personally would not go this route because there are different tiny versions to support for 4.3 and 5.0 and we're not sure if tiny woun't be replaced as default editor in the future)

Upvotes: 2

Related Questions