Add class to checkbox when using TaskListExtension & DefaultAttributesExtension? #947
Unanswered
TaromaruYuki
asked this question in
Q&A
Replies: 1 comment 4 replies
-
|
That checkbox comes from this node type: https://github.com/thephpleague/commonmark/blob/2.3/src/Extension/TaskList/TaskListItemMarker.php Try adding a third entry to your config for |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment



Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I have been following along with #605, specifically this reply. I can get everything but the input checkbox itself.
ListBlock::class => [ 'class' => static function (ListBlock $listblock) { if ($listblock->firstChild()->firstChild()->firstChild() instanceof TaskListItemMarker) { return 'bg-primary'; } return null; }, ], ListItem::class => [ 'class' => static function (ListItem $listitem) { if ($listitem->firstChild()->firstChild() instanceof TaskListItemMarker) { return 'bg-danger'; } return null; }, ]Output:

Is it possible to add a class to the input element itself so I can add Bootstrap styling to it?
Beta Was this translation helpful? Give feedback.
All reactions