Skip to content

Commit

Permalink
Merge pull request #7 from musilondrej/fix/list-config-and-views
Browse files Browse the repository at this point in the history
Update view and config file to support latest @editorjs/list block
  • Loading branch information
alaminfirdows authored Aug 31, 2024
2 parents d324cf7 + 594aeca commit 1434834
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config/laravel_editorjs.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'level' => [1, 2, 3, 4, 5, 6],
],
'list' => [
'type' => [
'style' => [
0 => 'ordered',
1 => 'unordered',
],
Expand Down
6 changes: 2 additions & 4 deletions resources/views/blocks/list.blade.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
@php
$tag = 'ul';
if('ordered' === $data['type']){
$tag = 'ol';
}
$listType = $data['style'] ?? $data['type'] ?? 'unordered';
$tag = $listType === 'unordered' ? 'ul' : 'ol';
@endphp

<{{ $tag }}>
Expand Down

0 comments on commit 1434834

Please sign in to comment.