Answer the question
In order to leave comments, you need to log in
How to make bb codes in twig?
Hello masters.
In general, I use twig, and I ran into one problem. That when adding data to the database, they are displayed completely without transitions to a new line. I tried to solve it this way: I extract a string from the base, and put the string processed by the nl2br function into the array, then I transfer the entire data array to twig. But it outputs just br tags as text. Here I had an urgent question, how then can I do here so that the transition is visible? And how can you write your own bb-codes and pass them to twig?
I used to do this: bb_codes(htmlspecialchars($text))
But I don’t know how it is)
I would be very grateful for your help
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question