Skip to content
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

Monaco js error #14598

Closed
agriffard opened this issue Oct 28, 2023 · 1 comment · Fixed by #14601
Closed

Monaco js error #14598

agriffard opened this issue Oct 28, 2023 · 1 comment · Fixed by #14601
Milestone

Comments

@agriffard
Copy link
Member

agriffard commented Oct 28, 2023

See #13322 (comment)

jsonWorker.js:34 Not allowed to load local resource: file:///OrchardCore.Resources/Scripts/monaco/IStandaloneEditorConstructionOptions.json

To fix this, we need to fix this code in 3 places (HtmlBodyPartMonacoSettings.Edit.cshtml, HtmlFieldMonacoEditorSettings.Edit.cshtml and TextFieldMonacoEditorSettings.Edit.cshtml) :

@{
    var IStandaloneEditorConstructionOptionsSchemaPath = Url.Content("~/OrchardCore.Resources/Scripts/monaco/IStandaloneEditorConstructionOptions.json");
}

We need an absolute url, not a relative one.
Ex: to generate https://localhost:44300/blog/OrchardCore.Resources/..., not /blog/OrchardCore.Resources/...

What can we use to do that?

@agriffard
Copy link
Member Author

I wanted to fix it while replacing Monaco to version 0.44.0 in c9cd314 but forgot to make a branch.

@MikeAlhayek MikeAlhayek added this to the 1.x milestone Nov 3, 2023
@MikeAlhayek MikeAlhayek modified the milestones: 1.x, 1.8 Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants