How to add slices between texts in a blog post?

Hello everyone,

As explained in the title, I am trying to add a slice between texts, like a CTA slice between each paragraphs or images, is that doable? (Like the image above)

Hello @moe

Welcome to the Prismic community, and thanks for reaching out to us.

To achieve this, create two slices, e.g.:

  1. Text Slice that I assume you already have in your repo.
  2. CTA Slice with a * Key Text field for the button label and a Content relationship field to link to the relevant page.
    Slices are very flexible and easy to use. You can stack & reorganize them on the fly with drag and drop functionality. You can add the CTA slice between the text slice.

Learn more about Slices.

I hope it answers your questions. Let me know if you have any further questions.

Thanks,
Priyanka

Thanks @Priyanka

Sorry this does not solve it... but what a Text slice? I am using the regular text editor for my blog. under body section in the markdown editor.
It does not sound practical that the editor needs to import a slice for every paragraph they want to add, does it?

Please @Priyanka take a look at the image attached to give you an idea!

Hi Moe,

This isn't possible in the way you've imagined above with just the text editor.

Are you the developer on this project?

If so I would advise you to build your page with Slices. If you want to build a flexible page with Prismic then this is the best option. Each Slice corresponds to a content block on the frontend of your website and gives your users basically the power of having a page builder.

So if you have 5 Slices for example 1x [Rich Text Slice], 1x [Image Slice], 1x [Image + Text Slice], 1x [iframe Slice] 1x [CTA Slice], then your content creator can create many very different pages with what's available by using these Slices as building blocks like so.

[Rich Text Slice]
[CTA Slice]
[Image + Text Slice]
[Rich Text Slice]
[iframe Slice]
[Image Slice]
[Rich Text Slice]

This video explains the concept well. You can see the structure of a Slice field here and this article shows you how to build some in Javascript .

What technology are you using to build your project?

Thanks @Phil That fixes it!
I was just hoping to do it through the regular markdown editor but I was wrong!

Thanks again!

Happy to help.

The editor does not use markdown at the minute, but we hope to implement it in the future.