Skip to content

Kirby 4.4.1

kirbytext

Configure the behavior of KirbyText and particular tags

(email: ..)

return [
  'kirbytext' => [
    'email' => [
      'class'  => 'email',
      'rel'    => 'nofollow',
      'target' => '_blank',
      'text'   => 'Write Us',
      'title'  => 'Email'
    ]
  ]
];

See the email tag's reference for details.

(file: ..)

return [
  'kirbytext' => [
    'file' => [
      'class'    => 'file',
      'download' => true,
      'rel'      => 'nofollow',
      'target'   => '_blank',
      'text'     => 'Download',
      'title'    => 'Filename'
    ]
  ]
];

See the file tag's reference for details.

(gist: ..)

return [
  'kirbytext' => [
    'gist' => [
      'file' => 'targetblank.js',
    ]
  ]
];

See the gist tag's reference for details.

(image: ..)

return [
  'kirbytext' => [
    'image' => [
      'alt'       => 'This is an awesome picture',
      'caption'   => 'I took this image in the park',
      'class'     => 'floated',
      'height'    => 600,
      'imgclass'  => 'myimage',
      'linkclass' => 'myimage',
      'rel'       => 'gallery',
      'target'    => '_blank',
      'title'     => 'This is an awesome picture ',
      'width'     => 800,
    ]
  ]
];

See the image tag's reference for details.

return [
  'kirbytext' => [
    'link' => [
      'class'  => 'mylink',
      'lang'   => 'de',
      'rel'    => 'nofollow',
      'role'   => 'button',
      'target' => '_blank',
      'title'  => 'Wikipedia',
      'text'   => 'Wikipedia',
    ]
  ]
];

See the link tag's reference for details.

(tel: ..)

return [
  'kirbytext' => [
    'tel' => [
      'class' => 'phone',
      'rel'   => 'nofollow',
      'text'  => 'call us',
      'title' => 'This is my phone number',
    ]
  ]
];

See the tel tag's reference for details.

(video: ..)

return [
  'kirbytext' => [
    'video' => [
      'autoplay' => true,
      'caption'  => 'This is a really nice video',
      'controls' => true,
      'class'    => 'video',
      'height'   => 200,
      'loop'     => true,
      'muted'    => true,
      'poster'   => 'cover.jpg',
      'preload'  => 'auto',
      'style'    => 'border: 3px solid red;'
      'width'    => 300,

      'options'  => [
        'youtube' => [
          'controls' => 0
        ]
      ]
    ]
  ]
];

See the video tag's reference for details.

In addition to the regular attributes, the config allows to specify the options default attribute:

Attribute Description Default
options The options for video providers []