Skip to content

Commit

Permalink
Repeal and replace monaco for codemirror #228
Browse files Browse the repository at this point in the history
  • Loading branch information
apexdodge committed Nov 27, 2024
1 parent b0bbe4f commit 45896fd
Show file tree
Hide file tree
Showing 10 changed files with 408 additions and 80 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<div class="col-lg-12">
<div class="mb-3">
<label class="form-label raytha-required" asp-for="Code"></label><br />
<div class="@Model.HasError("Code")" id="editorContainer" style="height:500px;" data-raythafunctions--codehighlighting-target="editor"></div>
<div class="@Model.HasError("Code")" id="editorContainer" style="height:600px;overflow: auto;" data-raythafunctions--codehighlighting-target="editor"></div>
<input type="hidden" asp-for="Code" data-raythafunctions--codehighlighting-target="textarea">
<div class="invalid-feedback">@Model.ErrorMessageFor("Code")</div>
</div>
Expand All @@ -63,4 +63,7 @@
</div>
</div>
</div>
</div>
</div>
<style>
.CodeMirror { height: 100%; }
</style>
15 changes: 9 additions & 6 deletions src/Raytha.Web/Areas/Admin/Views/RaythaFunctions/Edit.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<div class="col-lg-12">
<div class="mb-3">
<label class="form-label raytha-required" asp-for="Code"></label><br />
<div class="@Model.HasError("Code")" id="editorContainer" style="height: 500px;" data-raythafunctions--codehighlighting-target="editor"></div>
<div class="@Model.HasError("Code")" id="editorContainer" style="height: 600px;overflow: auto;" data-raythafunctions--codehighlighting-target="editor"></div>
<input type="hidden" asp-for="Code" data-raythafunctions--codehighlighting-target="textarea" />
<div class="invalid-feedback">@Model.ErrorMessageFor("Code")</div>
</div>
Expand All @@ -65,8 +65,11 @@
</div>
</div>
@(await Html.PartialAsync("_ActionsMenu", new RaythaFunctionsActionsMenu_ViewModel
{
Id = Model.Id,
ActivePage = "Edit",
}))
</div>
{
Id = Model.Id,
ActivePage = "Edit",
}))
</div>
<style>
.CodeMirror { height: 100%; }
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<div class="mb-3">
<label class="form-label raytha-required" asp-for="Content"></label><br />
<button class="btn btn-sm btn-secondary mb-2" type="button" data-bs-toggle="offcanvas" data-bs-target="#insertvariablemenu" aria-controls="insertvariablemenu">Insert variable</button>
<div class="@Model.HasError("Content")" id="editorContainer" style="height:500px;" data-templates--codehighlighting-target="editor"></div>
<div class="@Model.HasError("Content")" id="editorContainer" style="height:600px;overflow: auto;" data-templates--codehighlighting-target="editor"></div>
<input type="hidden" asp-for="Content" data-templates--codehighlighting-target="textarea" />
<div class="invalid-feedback">@Model.ErrorMessageFor("Content")</div>
<div id="uploadAssets"
Expand Down Expand Up @@ -129,4 +129,7 @@
ThemeId = Model.ThemeId,
}))
</div>
<partial name="_InsertVariableMenu.cshtml" model="Model.TemplateVariables" />
<partial name="_InsertVariableMenu.cshtml" model="Model.TemplateVariables" />
<style>
.CodeMirror { height: 100%; }
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
<div class="mb-3">
<label class="form-label raytha-required" asp-for="Content"></label><br />
<button class="btn btn-sm btn-secondary mb-2" type="button" data-bs-toggle="offcanvas" data-bs-target="#insertvariablemenu" aria-controls="insertvariablemenu">Insert variable</button>
<div class="@Model.HasError("Content")" id="editorContainer" style="height:500px;" data-templates--codehighlighting-target="editor"></div>
<div class="@Model.HasError("Content")" id="editorContainer" style="height:600px;overflow: auto;" data-templates--codehighlighting-target="editor"></div>
<input type="hidden" asp-for="Content" data-templates--codehighlighting-target="textarea" />
<div class="invalid-feedback">@Model.ErrorMessageFor("Content")</div>
<div id="uploadAssets"
Expand Down Expand Up @@ -149,4 +149,6 @@
}))
</div>
<partial name="_InsertVariableMenu.cshtml" model="Model.TemplateVariables" />

<style>
.CodeMirror { height: 100%; }
</style>
10 changes: 5 additions & 5 deletions src/Raytha.Web/wwwroot/raytha_admin/js/dist/main.js

Large diffs are not rendered by default.

Loading

0 comments on commit 45896fd

Please sign in to comment.