Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Shopify schema richtext to display only specific formatting options

Solved

Shopify schema richtext to display only specific formatting options

smthngstrng
Tourist
4 0 1

Hi all,

 

I've seen screenshots of the Shopify richtext field that by default shows all formatting options (ai, paragraph, bold, italic, link, bulleted list, numbered list, etc.) like this:

smthngstrng_2-1696803743506.png

 

And then sometimes I've seen limited formatting options (only bold, italic, and link) like this:

smthngstrng_4-1696803875777.png

 

In other words, in my schema, is there some sort of input settings to allow me to display only the bold, italic, and link options?

 

My schema looks like this:

 

{% schema %}
{
  "name": "Example Name",
  "tag": "section",
  "settings": [
    {
      "type": "richtext",
      "id": "rich_text",
      "label": "Rich Text"
    }
  ]
}

{% endschema %}

 

 

Thank you for taking a look! Any help is much appreciated.

Accepted Solution (1)

PaulNewton
Shopify Partner
7450 657 1565

This is an accepted solution.

Use inline_richtext type not richtext type

https://shopify.dev/docs/themes/architecture/settings/input-settings#inline_richtext 

 

afaik no way to granularly control the formatting options for the full rich text input setting

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


View solution in original post

Replies 5 (5)

PaulNewton
Shopify Partner
7450 657 1565

This is an accepted solution.

Use inline_richtext type not richtext type

https://shopify.dev/docs/themes/architecture/settings/input-settings#inline_richtext 

 

afaik no way to granularly control the formatting options for the full rich text input setting

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


smthngstrng
Tourist
4 0 1

Ha! This is perfect, thank you Paul. I totally missed this input_richtext option in the list. Wewww!

PaulNewton
Shopify Partner
7450 657 1565

Same I always have to double check richtext  when I can't remember what the settings are for richtext to only have 1 control, like making it a list builder.

Because it's so non-intuitive and silly for there to be two separate controls.

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


smthngstrng
Tourist
4 0 1

Haha, right?!

smthngstrng
Tourist
4 0 1

Hi Paul,

 

I have been using this "inline_richtext" type now for a few pages, but I just noticed you can't hit "enter" of "shift + enter" for a line break, haha.. oh man. Frustrating that you can use hard returns with a "textarea" type and the "richtext" type but for whatever reason for the "inline_richtext", they just say no, no line breaks for you!

 

I don't see any ways around this, unless you happen to know something that maybe I'm missing here?