Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<Version>9.0.4</Version>
<Version>9.0.5</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
{
<BootstrapLabel required="@Required" for="@Id" ShowLabelTooltip="ShowLabelTooltip" Value="@DisplayText" />
}
<div @attributes="@AdditionalAttributes" id="@Id"></div>
<div @attributes="@AdditionalAttributes" id="@Id" class="@ClassString"></div>
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ public partial class CherryMarkdown
[Parameter]
public string? Language { get; set; }

private string? ClassString => CssBuilder.Default("bb-cherry-markdown")
.AddClass(CssClass)
.AddClass(ValidCss)
.Build();

/// <summary>
/// <inheritdoc/>
/// </summary>
Expand Down Expand Up @@ -101,9 +106,15 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
/// <inheritdoc/>
/// </summary>
/// <returns></returns>
protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop,
new { Value, IsSupportMath, IsViewer, Locale = Language, Editor = EditorSettings ?? new(), Toolbars = ToolbarSettings ?? new() },
nameof(Upload));
protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop, new
{
Value,
IsSupportMath,
IsViewer,
Locale = Language,
Editor = EditorSettings ?? new(),
Toolbars = ToolbarSettings ?? new()
}, nameof(Upload));

/// <summary>
/// 文件上传回调
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '../../js/cherry-markdown.core.js'
import '../../js/cherry-markdown.core.js'
import { addLink, addScript } from '../../../BootstrapBlazor/modules/utility.js'
import Data from '../../../BootstrapBlazor/modules/data.js'

Expand All @@ -8,7 +8,7 @@ export async function init(id, invoke, options, callback) {
return;
}

await addLink('./_content/BootstrapBlazor.CherryMarkdown/css/cherry-markdown.min.css')
await addLink('./_content/BootstrapBlazor.CherryMarkdown/css/cherry-markdown.css')
if (options.isSupportMath) {
await addScript('./_content/BootstrapBlazor.CherryMarkdown/js/katex.min.js')
await addLink('./_content/BootstrapBlazor.CherryMarkdown/css/katex.min.css')
Expand Down Expand Up @@ -42,7 +42,7 @@ export async function init(id, invoke, options, callback) {

options.editor = {
theme: 'Default',
height: '100%',
height: "200px",
defaultModel: 'edit&preview',
convertWhenPaste: true,
...options.editor
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@import url('cherry-markdown.min.css');

.bb-cherry-markdown {
}

.bb-cherry-markdown.is-valid {
border: 1px solid var(--bs-success);
}

.bb-cherry-markdown.is-invalid {
border: 1px solid var(--bs-danger);
}

.bb-cherry-markdown .cherry {
border: 1px solid var(--bs-border-color);
border-radius: var(--bs-border-radius);
overflow: hidden;
}

Large diffs are not rendered by default.

Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Loading