Skip to content

Commit

Permalink
Merge pull request #70 from canyongbs/feature/AIDAPP-64-knowledge-por…
Browse files Browse the repository at this point in the history
…tal-embed-bug

[AIDAPP-64]: Unable to embed knowledge portal
  • Loading branch information
Orrison authored May 2, 2024
2 parents 89bff33 + 85150c8 commit 0684889
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,14 @@ public function form(Form $form): Form
->state(function () {
$code = resolve(GeneratePortalEmbedCode::class)->handle(PortalType::KnowledgeManagement);

return <<<EOD
$state = <<<EOD
```
{$code}
```
EOD;

return str($state)->markdown()->toHtmlString();
})
->markdown()
->copyable()
->copyableState(fn () => resolve(GeneratePortalEmbedCode::class)->handle(PortalType::KnowledgeManagement))
->copyMessage('Copied!')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,14 @@ protected function getHeaderActions(): array
->state(function (ServiceRequestForm $serviceRequestForm) {
$code = resolve(GenerateSubmissibleEmbedCode::class)->handle($serviceRequestForm);

return <<<EOD
$state = <<<EOD
```
{$code}
```
EOD;

return str($state)->markdown()->toHtmlString();
})
->markdown()
->copyable()
->copyableState(fn (ServiceRequestForm $serviceRequestForm) => resolve(GenerateSubmissibleEmbedCode::class)->handle($serviceRequestForm))
->copyMessage('Copied!')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,14 @@ protected function getHeaderActions(): array
->state(function (Survey $survey) {
$code = resolve(GenerateSubmissibleEmbedCode::class)->handle($survey);

return <<<EOD
$state = <<<EOD
```
{$code}
```
EOD;

return str($state)->markdown()->toHtmlString();
})
->markdown()
->copyable()
->copyableState(fn (Survey $survey) => resolve(GenerateSubmissibleEmbedCode::class)->handle($survey))
->copyMessage('Copied!')
Expand Down

0 comments on commit 0684889

Please sign in to comment.