[Config Default Attributes] How to set default attributes without value?
blackjyn opened this issue · comments
Ken Arok commented
For instance, HTML video
can have controls
and autoplay
attributes simply without any values.
I did this
$config = [
"default_attributes"=>[
Video::class=>[
"controls"=>"",
"autoplay"=>""
]
]
];
but rendered value will be :
<video controls="" autoplay="">...</video>
How do I get rendered value simply like this:
<video controls autoplay>...</video>
and notice *I don't want to write custom renderer for this to reduce unnecessary overhead .
Thank you
Env:
- PHP 8.1
- CommonMark v2.3
Ken Arok commented
My Godness, it was simply set to true
to just perform this.
$config = [
"default_attributes"=>[
Video::class=>[
"controls"=>true,
"autoplay"=>true
]
]
];
Solved!