This site is archived.
Skip to Content

Make Articles Sing By Embedding Images, Video, and Quote Cutouts with DME and WYSIWYG

Your session in a few words: 
Create new tags for node bodies to place media in your content.
Track: 
Code it, test it, deploy it
Session Type: 
Lecture
Level of expertise: 
Intermediate
Language: 
English

Drupal's basic node structure works well for presenting articles, but sometimes clients want to embed images, video, or other block-like items in the middle of the text, such as top rated comments or a snippet of interesting text from that article. The DME was built as an api to allow new tags to be defined by a developer to allow users to place other content in the middle of an article or other node's body, and with the new wysiwyg api, you can now easily add buttons to a toolbar to allow non-technical clients to place that other content without having to learn how to type html-like syntax.

I plan on going over the basics of how the DME works, break down how to build different sorts of tags to insert html, images, video, blocks or even other nodes into the code. Once this is established, I'll go over how to create extensions to the wysiwyg api to allow users to easily set their media inside of their articles, and how to do light theming to allow the node body to wrap around the inset content.