OpenAid uses the Node Embed module to allow for the embedding of images or other media assets. This page will walk through the basics of configuring your OpenAid site to use Node Embed, but you can learn more about what Node Embed has to offer at their documentation pages.

As the name implies, anything that is a node can be embedded via Node Embed. Let's use the Image content type as an example.

Configuring Node Embed for Images

OpenAid provides an image content type. These image nodes can then be embedded into any filtered text by taking the following steps:

  1. Enable Node Embed
  2. Add Node Embed filter to text formats of choice
  3. Configure Node Embed view mode for Image content type

Enable Node Embed

This is oftentimes already enabled as it is a dependency of many OpenAid Features, including OpenAid Blog.

Add Node Embed Filter to Text Format

  1. Navigate to Administration > Configuration > Content authoring > Text formats
  2. Select the text format you would like to allow node embed to be used with
  3. Enable the Node Embed filter (labeled "Insert node")
  4. Save configuration

Configure Node Embed View Mode

View modes allow you to control a particular type of display for a bundle. You can learn more about view modes from the blog post, Custom Drupal 7 view modes: Different ways to see your content. The Node Embed view mode defines the way a node will appear when embedded in content. Set up the Node Embed view mode for all content types you wish to embed.

  1. Navigate to Administration > Structure > Content types > Image > Manage Display
  2. Under "Custom display settings" enable the Node embed view mode
  3. Navigate to the Node Embed view mode display (there will be a new working tab alongside Default and Teaser)
  4. Select fields to display and determine field formats to use
  5. Save

Embedding Content with Node Embed

After configuring Node Embed, authors can then embed nodes through the WYSIWYG Editor.

  1. Select the Node Embed icon from the WYSIWYG editor toolbar
  2. Select the node of choice from the pop-up window search interface
  3. Optional: Add any additional attributes to the node
    1. Here is an example of a node embedded into a blog post.

      Node Embed Attributes

      You can also add attributes to an embedded node such as floating it left or right or certain width or height values. Read more about attributes at the Node Embed documentation page.