-
-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to configure Scalar #949
Comments
@shalvah I've done some additional testing of this now and can't get it to work. If I set the configuration like this I get an array to string conversion error in the blade template: 'external' => [
'html_attributes' => [
'data-configuration' => [
'hideTestRequestButton' => true,
]
]
], and if I try to work around that by encapsulating it in a json_encode like this I get an error in the browser console stating that there's a syntax error 'external' => [
'html_attributes' => [
'data-configuration' => json_encode([
'hideTestRequestButton' => true,
])
]
], As I see it there's two ways to go about fixing this:
I can implement this and add a pull request for it but would like to check which way you prefer first? Or do you have another solution for it? Am I missing something here? |
My guess is that it causes an error because the JSON includes double quotes, which terminate the attribute string. If we escape the quotes, we should be good. Try |
I tried that and still got the same error but did manage to solve it by doing the following: 'external' => [
'html_attributes' => [
'data-configuration' => htmlspecialchars(json_encode([
"hideTestRequestButton" => true,
]), ENT_QUOTES, 'UTF-8'),
]
], |
Scribe version
4.39.0
Your question
How do I configure the parameters that exist here for the Scalar implementation? I looked at the view which iterates through
external->html_attributes
and tried entering the following properties one by one but I couldn't get any of them to work.What's the correct way of entering these configuration values?
Docs
The text was updated successfully, but these errors were encountered: