Insert social media posts into articles
To embed content like social media posts into your articles, you define the structure of the embedded content and then insert components based on that structure into your articles.See how it all works on the example of social media posts like tweets inside articles.
Create a content type for posts
The first step is to create a content type that will define the basic elements of the social media posts. Generally, the one element all social media posts have in common is the URL. Use a text element for posts’ URLs. Set it as required and add validation rules to prevent common mistakes that might break your app, like leaving outhttps://
.
Define display options
Besides URLs, you can add network-specific elements that would give your content creators some control over the rendering of the embedded content. To pick the most common examples:- Dark or light color theme?
- Display or hide replies to the post?
- Include media from the post, like video or image?
Embed posts into articles
Once you have the content type ready, you can start enriching the content by embedding social media posts.You will most likely want to embed the posts into rich text:
- In Content & assets, open an article for editing.
- Place the cursor into a rich text element where you want to add a post.
- In the editor toolbar, click and then .
- Select the content type for social media posts.
- Fill in the elements.
Sign in with your Kontent.ai credentials or sign up for free to unlock the full lesson, track your progress, and access exclusive expert insights and tips!