Skip to content

Commit

Permalink
Monaco js error fix (#14601)
Browse files Browse the repository at this point in the history
  • Loading branch information
agriffard authored Oct 31, 2023
1 parent 1c66126 commit 38b085a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
@using OrchardCore.Mvc.Core.Utilities
@model OrchardCore.ContentFields.ViewModels.MonacoSettingsViewModel

@{
var IStandaloneEditorConstructionOptionsSchemaPath = Url.Content("~/OrchardCore.Resources/Scripts/monaco/IStandaloneEditorConstructionOptions.json");
// Use Url.ToAbsoluteUrl() because Url.Content() leads to a js error: 'Not allowed to load local resource'.
var IStandaloneEditorConstructionOptionsSchemaPath = Url.ToAbsoluteUrl("~/OrchardCore.Resources/Scripts/monaco/IStandaloneEditorConstructionOptions.json");
}

<div id="@Html.IdFor(m => m)" class="field-editor field-editor-monaco">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
@using OrchardCore.Mvc.Core.Utilities
@model OrchardCore.ContentFields.ViewModels.MonacoSettingsViewModel

@{
var IStandaloneEditorConstructionOptionsSchemaPath = Url.Content("~/OrchardCore.Resources/Scripts/monaco/IStandaloneEditorConstructionOptions.json");
// Use Url.ToAbsoluteUrl() because Url.Content() leads to a js error: 'Not allowed to load local resource'.
var IStandaloneEditorConstructionOptionsSchemaPath = Url.ToAbsoluteUrl("~/OrchardCore.Resources/Scripts/monaco/IStandaloneEditorConstructionOptions.json");
}

<div id="@Html.IdFor(m => m)" class="field-editor field-editor-monaco">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
@using OrchardCore.Mvc.Core.Utilities
@model OrchardCore.Html.ViewModels.MonacoSettingsViewModel

@{
var IStandaloneEditorConstructionOptionsSchemaPath = Url.Content("~/OrchardCore.Resources/Scripts/monaco/IStandaloneEditorConstructionOptions.json");
// Use Url.ToAbsoluteUrl() because Url.Content() leads to a js error: 'Not allowed to load local resource'.
var IStandaloneEditorConstructionOptionsSchemaPath = Url.ToAbsoluteUrl("~/OrchardCore.Resources/Scripts/monaco/IStandaloneEditorConstructionOptions.json");
}

<div id="@Html.IdFor(m => m)" class="type-part-editor type-part-editor-monaco">
Expand Down

0 comments on commit 38b085a

Please sign in to comment.