maglevhq / maglev-core

Ruby on Rails website builder
https://www.maglev.dev
MIT License
273 stars 47 forks source link

Add possibility to add a defaut text for link setting #4

Closed patdec closed 3 years ago

patdec commented 3 years ago

For now, in the settings part of section yml, we can add a default href for link type.

 - label: "Bouton"
    id: button
    type: link
    default: '#'

We have to create a separate new setting if we want to insert a default text between the a tags.

 - label: "Bouton Text"
    id: button_text
    type: text
    default: 'Je souhaite une assistance'

It would be a good idea to gather these two settings into one.

did commented 3 years ago

it can be solved with the following syntax:

- label: "Bouton Text"
    id: button_text
    type: text
    default: 
      url: '#'
      text: 'Je souhaite une assistance'