mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
updated to add advanced extensions to markdown
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
@using Markdig
|
||||
|
||||
@using Management.Web.Shared.Components
|
||||
|
||||
@inject CoursePlanner planner
|
||||
@@ -59,7 +59,13 @@
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private MarkupString preview { get => (MarkupString)Markdown.ToHtml(assignmentContext?.Assignment?.Description ?? ""); }
|
||||
private MarkupString preview { get
|
||||
{
|
||||
var pipeline = new MarkdownPipelineBuilder()
|
||||
.UsePipeTables().Build();
|
||||
return (MarkupString)Markdown.ToHtml(assignmentContext?.Assignment?.Description ?? "", pipeline);
|
||||
}
|
||||
}
|
||||
private string HelpText()
|
||||
{
|
||||
var groupNames = string.Join("\n- " , planner.LocalCourse?.Settings.AssignmentGroups.Select(g => g.Name) ?? []);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
}
|
||||
|
||||
|
||||
Console.WriteLine(Navigation.BaseUri + "SignalRHub");
|
||||
@* Console.WriteLine(Navigation.BaseUri + "SignalRHub"); *@
|
||||
hubConnection = new HubConnectionBuilder()
|
||||
.WithUrl(Navigation.BaseUri + "SignalRHub")
|
||||
.WithAutomaticReconnect()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
@using Markdig
|
||||
@using Management.Web.Shared.Components
|
||||
|
||||
@inject CoursePlanner planner
|
||||
|
||||
@@ -79,4 +79,3 @@
|
||||
<br>
|
||||
|
||||
|
||||
@* <MonacoEditorDemo /> *@
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
@using Markdig
|
||||
|
||||
@code {
|
||||
[Parameter, EditorRequired]
|
||||
@@ -40,7 +39,7 @@ else
|
||||
{
|
||||
@foreach(var answer in Question.Answers)
|
||||
{
|
||||
string answerPreview = answer.HtmlText.StartsWith("<p>")
|
||||
string answerPreview = answer.HtmlText.StartsWith("<p>")
|
||||
? answer.HtmlText.Replace("<p>", "<p class='m-0'>")
|
||||
: answer.HtmlText;
|
||||
|
||||
@@ -48,16 +47,16 @@ else
|
||||
@if(answer.Correct)
|
||||
{
|
||||
<svg
|
||||
style="width: 1em;"
|
||||
style="width: 1em;"
|
||||
class="me-1 my-auto"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
>
|
||||
<path
|
||||
d="M4 12.6111L8.92308 17.5L20 6.5"
|
||||
stroke="var(--bs-success)"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
<path
|
||||
d="M4 12.6111L8.92308 17.5L20 6.5"
|
||||
stroke="var(--bs-success)"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
/>
|
||||
</svg>
|
||||
@@ -66,7 +65,7 @@ else
|
||||
{
|
||||
<div
|
||||
class="me-1 my-auto"
|
||||
style="width: 1em;"
|
||||
style="width: 1em;"
|
||||
>
|
||||
@if(Question.QuestionType == QuestionType.MULTIPLE_ANSWERS)
|
||||
{
|
||||
@@ -78,5 +77,5 @@ else
|
||||
@((MarkupString)answerPreview)
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user