Inserting tweets into blog posts

May 21, 2019

Martina Farkasova

Embedding content inside rich text is a matter of defining a structure for your content and then filling that structure in with specific content. See how it all works through the example of tweets inside articles.

You will first create a Tweet content model and then add a tweet to a blog post as a component. Once you have everything set up in Kentico Cloud, in your app you'll need to deal with structure in rich text so you can see the Tweets.

Table of contents

Creating a content type for the tweet

The first step is to create a content type that will define the basic content blocks of the tweet:

Using the filters on the left, select the Article content type to view only articles.

Open the Coffee Beverages Explained article for editing.

In the rich-text editor, position the cursor to where you want to add the tweet.

In the toolbar, click Insert... {@icon-plus-circle@} and then Insert new component {@icon-insert-component@}.

Choose Tweet from the list of the content types.

You're now creating a specific component based on the Tweet content type. Make sure to name the item, insert the tweet link and select from the options in the Multiple choice elements.

After you finish, you can continue editing the Coffee Beverages Explained article. Changes made to the tweet are saved automatically.

Tip: To change the position of the tweet within the Rich text element, drag & drop the component as needed.

In the Coffee Beverages Explained article, a tile representing the included component will appear, showing its contents. There are no restrictions on the type of components you can include in the Rich text element.