Introducing shortcode parsing API #53836
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It all started with this: a useful feature in a blog is having the capability to introduce a "Read more..." breakpoint into a blog article. This way, when the post is displayed (for example in the Blender Cloud frontpage) there is more control on the amount of content displayed. Introducing this kind of elements in a post or other content is not very uncommon.
Proposed functionality
Introduce shortcodes parsing on content (similarly to how attachment parsing currently works), so that we can insert elements such as
[breakpoint]
. Possibly we could support attributes as well, like[youtube src='https://www.youtube.com/watch?v=RJnKaAtBPhA']
.Proposed implementation
Create an API where shortcodes and the way are parsed is defined programmatically (base shortcode class, with various attrs).
Feedback is welcome.
Added subscribers: @fsiddi, @dr.sybren, @pablovazquez
Awesome idea. I was also thinking about something for Scripting for Artists, to have a way to include the slides only for subscribers. Maybe something like
[iframe src='xxx' cap='subscriber']
?This
cap='subscribers'
could also be used for embedding multiple YouTube videos in the same node, but for susbcribers only.Awesome indeed! Not only solves the YouTube, Vimeo, SoundCloud whitelisting issue, but we could also embed our own Blender Cloud assets as well! Done in the extension app (blender-cloud) I guess, not Pillar.
Development is being developed in my shortcodes branch .
Changed status from 'Open' to: 'Resolved'
It's in master + live in production. Production database has also been migrated to the new schema and all nodes have had their empty
attachments
dicts removed.