I got a Laravel project, with TailwindCSS and I am trying to retrieve a piece of text from my database: “<div class="bg-red-500 text-green-200 text-lg border">Code should be here</div>
“.
And I use Laravel Facade to retrieve it and got this in my view {!! $code !!}.
Now the issue is, the border seems to be applied, the larger text seems to work well, its just I cant set a background or text color, it just doesn’t work.
What I am aiming to do, is that I can have a piece of frontend code including TailwindCSS stored in my database, and that I can basically ‘pull’ and store different code snippets to my database. (And also show the code working on my website)
What i already tried:
I already tried setting custom colors in my TailwindCSS config, but that did not fix the issue.
And I dont seem to be able to find a anwser on the internet either.
ImACoder is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.