Skip to content

Commit a17de1d

Browse files
committed
Replace codeblock in demo
1 parent eb2a342 commit a17de1d

File tree

4 files changed

+4
-45
lines changed

4 files changed

+4
-45
lines changed

demo/app/Sharp/Posts/PostForm.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use App\Models\Post;
77
use App\Models\User;
88
use App\Sharp\Utils\Embeds\AuthorEmbed;
9-
use App\Sharp\Utils\Embeds\CodeEmbed;
109
use App\Sharp\Utils\Embeds\RelatedPostEmbed;
1110
use App\Sharp\Utils\Embeds\TableOfContentsEmbed;
1211
use Code16\Sharp\Form\Eloquent\Uploads\Transformers\SharpUploadModelFormAttributeTransformer;
@@ -59,14 +58,13 @@ public function buildFormFields(FieldsContainer $formFields): void
5958
SharpFormEditorField::SEPARATOR,
6059
SharpFormEditorField::IFRAME,
6160
SharpFormEditorField::UPLOAD,
61+
SharpFormEditorField::CODE_BLOCK,
6262
AuthorEmbed::class,
63-
CodeEmbed::class,
6463
])
6564
->allowEmbeds([
6665
RelatedPostEmbed::class,
6766
AuthorEmbed::class,
6867
TableOfContentsEmbed::class,
69-
CodeEmbed::class,
7068
])
7169
->allowUploads(
7270
SharpFormEditorUpload::make()

demo/app/Sharp/Posts/PostShow.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use App\Sharp\Posts\Commands\EvaluateDraftPostWizardCommand;
1111
use App\Sharp\Posts\Commands\PreviewPostCommand;
1212
use App\Sharp\Utils\Embeds\AuthorEmbed;
13-
use App\Sharp\Utils\Embeds\CodeEmbed;
1413
use App\Sharp\Utils\Embeds\RelatedPostEmbed;
1514
use App\Sharp\Utils\Embeds\TableOfContentsEmbed;
1615
use App\Sharp\Utils\Filters\CategoryFilter;
@@ -41,7 +40,6 @@ protected function buildShowFields(FieldsContainer $showFields): void
4140
->allowEmbeds([
4241
RelatedPostEmbed::class,
4342
AuthorEmbed::class,
44-
CodeEmbed::class,
4543
TableOfContentsEmbed::class,
4644
])
4745
->collapseToWordCount(40)
@@ -157,7 +155,9 @@ public function find(mixed $id): array
157155
->renderAsText($instance->author->name)
158156
: null
159157
)
160-
->setCustomTransformer('categories', new SharpTagsTransformer('name')->setFilterLink(PostEntity::class, CategoryFilter::class))
158+
->setCustomTransformer('categories', (new SharpTagsTransformer('name'))
159+
->setFilterLink(PostEntity::class, CategoryFilter::class)
160+
)
161161
->setCustomTransformer('cover', new SharpUploadModelThumbnailUrlTransformer(500))
162162
->setCustomTransformer(
163163
'attachments[document]',

demo/app/Sharp/Utils/Embeds/CodeEmbed.php

Lines changed: 0 additions & 34 deletions
This file was deleted.

demo/resources/views/sharp/templates/codeblock-show-embed.blade.php

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)