Skip to content

Commit 791b8b0

Browse files
authored
📝 cleanup & improve documentation (#51)
1 parent a0728e9 commit 791b8b0

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

src/Spillgebees.Blazor.RichTextEditor.Assets/src/styles.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
@import '../node_modules/quill/dist/quill.bubble.css';
22
@import '../node_modules/quill/dist/quill.snow.css';
3-
@import '../node_modules/quill/dist/quill.snow.css';
43
@import '../node_modules/@enzedonline/quill-blot-formatter2/dist/css/quill-blot-formatter2.css';
54

65
.rich-text-editor-container.rich-text-editor-container-disabled {

src/Spillgebees.Blazor.RichTextEditor/Components/RichTextEditor.razor.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
using Microsoft.AspNetCore.Components;
2-
using Microsoft.Extensions.Logging;
3-
using Microsoft.JSInterop;
4-
51
namespace Spillgebees.Blazor.RichTextEditor.Components;
62

73
public partial class RichTextEditor : BaseRichTextEditor

src/Spillgebees.Blazor.RichTextEditor/Components/Toolbar/ToolbarOptions.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ public record ToolbarOptions(
2525
string ToolbarContainerDisabledClass = "rich-text-editor-toolbar-container-disabled",
2626
string ToolbarContainerHiddenClass = "rich-text-editor-toolbar-container-hidden")
2727
{
28-
private static readonly List<string> _defaultFonts = new()
29-
{
28+
private static readonly List<string> _defaultFonts =
29+
[
3030
"",
3131
"serif",
3232
"monospace"
33-
};
33+
];
3434

3535
public string ToolbarContainerHtmlId { get; init; } = ToolbarContainerHtmlId ?? $"rich-text-editor-toolbar-container-{Guid.NewGuid()}";
3636
public List<string> Fonts { get; init; } = Fonts ?? _defaultFonts;

src/Spillgebees.Blazor.RichTextEditor/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ The only difference between these two is that `RichTextEditor` will immediately
4545
`RichTextEditor` example:
4646

4747
```html
48+
@using Spillgebees.Blazor.RichTextEditor.Components
49+
@using Spillgebees.Blazor.RichTextEditor.Components.Toolbar
50+
4851
<RichTextEditor @bind-Content="@_content"
4952
@bind-Text="@_text"
5053
@bind-Selection="@_selection"
@@ -57,6 +60,9 @@ The only difference between these two is that `RichTextEditor` will immediately
5760
`PassiveRichTextEditor` example:
5861

5962
```html
63+
@using Spillgebees.Blazor.RichTextEditor.Components
64+
@using Spillgebees.Blazor.RichTextEditor.Components.Toolbar
65+
6066
<PassiveRichTextEditor @bind-Content="@_content"
6167
ToolbarOptions="ToolbarOptions.FullToolbarOptions"
6268
@ref="@_editorReference" />
@@ -70,6 +76,10 @@ Note that in the previous example the displayed content for the user is instant,
7076
You can completely customize the toolbar:
7177

7278
```html
79+
@using Spillgebees.Blazor.RichTextEditor.Components
80+
@using Spillgebees.Blazor.RichTextEditor.Components.Toolbar
81+
@using Spillgebees.Blazor.RichTextEditor.Components.Toolbar.Controls
82+
7383
<RichTextEditor @bind-Content="@_content"
7484
ToolbarOptions="@(ToolbarOptions.FullToolbarOptions with { Fonts = new List<string> { "Sans Serif", "RobotoMono" } })">
7585
<ToolbarContent>

0 commit comments

Comments
 (0)