[QUESTION] How make a new component to allow laravel blade directives?
Question
Hi, thanks for the nice work.
I'll like to know if there is a way to use blade directives inside the code.
I already add a new functionality to edit the source code, and work just fine.

But when I write something like that, the canvas show a ugly text:

And I like to find a way that @if don't render in the canvas. Do you know how? The template in the front end works just fine, but I like to hide that from the canvas. Thanks!
Answers (3)
@msassa If you write the code like this, it's quite hard for the editor to understand it, but if you create a kind of custom conditional component you'll get more control over it. Here an example of your case where the condition can also be changed via trait https://jsfiddle.net/452fvwk6/
What would parse that syntax during rendering?
I've been looking at running react in the canvas, but we need to load react and transpile components we create. There is an in browser babel script to do something like this. Haven't got it fully working yet.
Fundamentally, what you are writing is being interpreted as text/html
Hi, I'm saving that code into a file, in S3. Later, I use that files in a Laravel application. Everything work fine, the only improvement I like to do, is:
The code is correct as source code, and it has to be saved that way. But when I visualize that block on the canvas, I just need to see the html, not the @if (...) as well as the @endif ... It could be marked with something special as indicating that it is surrounded by a directive bucket, but that would not be necessary.
Actually, it shows something like this:

Ideally, I would need to show something like this:

Thanks
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2364
[Question] How to add toolbar functionality to the layers panel.
I am trying to add the toolbar to the layers panel and I am not sure how to go about this. Is there any way to accomplish this? toolbar Whe...
Issue #417
Add Setting button to custom component.
Hello, How can I create a setting or you can say edit button for my custom component? LIke 4th option on this image:
Issue #1869
[QUESTION] how to add extra field in input traits
Hi, I want to add the new field in default input traits. for example:- i need to add {label: binding, name:binding} in already exist input...
Issue #1826
[Question] How to add link to an image?
Hi Artur, How to add a link to this image? If i need to create a custom component, please give me some example code Artur.. Thank you so mu...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.