html in a custom field

Post Reply
missfx
Jr. Bludit
Posts: 5
Joined: Tue Apr 28, 2020 7:36 pm

Hello,
it's possible to write html in a custom field ? or use the tinymce editor on ?
Thank u
User avatar
multicolordev
Master Bludit
Posts: 137
Joined: Thu May 26, 2022 12:33 pm
Has thanked: 15 times
Been thanked: 91 times

Image
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

You can modify the example "Get custom field" in the documentation at

https://docs.bludit.com/en/content/custom-fields

Use for example the following

Code: Select all

<?php
   $custom = $page->custom('myfield');
   $custom = htmlspecialchars_decode($custom);

   echo nl2br($custom);
?>
instead of

Code: Select all

<?php
   echo $page->custom('myfield');
?>
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
missfx
Jr. Bludit
Posts: 5
Joined: Tue Apr 28, 2020 7:36 pm

Great ! Thanks u !
Post Reply