Rich Text Link Generation

Ry_Ellingson
Shopify Partner
3 0 1

Hello!

 

Is there anyone who can explain how the Rich Text section generates a link in the code base? I am using the Motion theme but am interested in a general answer. 

 

 

Reply 1 (1)

PaulNewton
Shopify Partner
6273 572 1309

Content created in the visual theme editor for OS2.0 settings,blocks,sections, template,etc are store in JSON files. ala configurations.

Inspect the file with the settings for that section for the value of the rich text sections content.

i.e if the section is on the frontpage/homepage/index inspect index.json.

URLs in settings are an escaped JSON string,,  because of the slashes or other characters.

i.e in a text block text-setting of a rich text section

"1234567asdfgh": {
  "type": "text",
  "settings": {
    "text": "<p><a href=\"\/collections\" title=\"All collections\">All Collections<\/a><\/p>"
  },
  ...

 

Loosely as if you were creating a URL in a setting info property. https://shopify.dev/docs/themes/architecture/settings/input-settings#create-links 

 

If you don't mean a url within actual rich-text value that is in a rich text section you need to elaborate.

Save time & money ,Ask Questions The Smart Way


Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com


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

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