Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add autofocus option * Add autoRefresh options * Add autosave option * Add blockStyles option * Add forceSync option * Add indentWithTabs option * Add inputStyle option * Add insertTexts option * Add nativeSpellcheck option * Add parsingConfig option * Add previewClass option EasyMDE allows string and string-array. Since both are used as className, a space separated string is sufficient here. * Add previewImagesInEditor option * Add promptTexts options * Add promptURLs option * Add renderingConfig option There is a `sanitizerFunction`-option in the renderingConfig. This function does not allow to return a Promise - thus, `dotNetObjectRef.invokeMethodAsync` cannot be used here and the current dispatcher does not support synchronous calls from JS to .NET. * Add scrollbarStyle option * Add shortcuts option Solves #3297 * Add sideBySideFullscreen option In contrast to EasyMDE, this defaults to `false` here. * Add spellChecker option EasyMDE allows a custom spellChecker function.. This is not supported, yet. * Add status option EasyMDE allows custom status bar items. This is not supported, yet. * Add styleSelectedText option * Add syncSideBySidePreviewScroll option * Add unorderedListStyle option * Fix: Property UploadImage exists but is never used as an option In contrast to EasyMDE, the default value is `true`. * Shortcut example Co-authored-by: Wolfgang Kluge <wolfgang.kluge@klugesoftware.de> Co-authored-by: Mladen Macanović <mladen.macanovic@gmail.com>
- Loading branch information
1 parent
35d8520
commit 5ab36ca
Showing
16 changed files
with
582 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...tion/Blazorise.Docs/Pages/Docs/Extensions/Markdown/Code/MarkdownShortcutsExampleCode.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<div class="blazorise-codeblock"> | ||
<div class="html"><pre> | ||
<span class="htmlTagDelimiter"><</span><span class="htmlElementName">Markdown</span> <span class="htmlAttributeName">Shortcuts</span><span class="htmlOperator">=</span><span class="quot">"</span><span class="htmlAttributeValue"><span class="atSign">@</span>(new MarkdownShortcuts{ CleanBlock = null, ToggleCodeBlock = "Cmd+E" })</span><span class="quot">"</span> <span class="htmlTagDelimiter">/></span> | ||
</pre></div> | ||
</div> |
3 changes: 3 additions & 0 deletions
3
...ion/Blazorise.Docs/Pages/Docs/Extensions/Markdown/Examples/MarkdownShortcutsExample.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@namespace Blazorise.Docs.Docs.Examples | ||
|
||
<Markdown Shortcuts="@(new MarkdownShortcuts{ CleanBlock = null, ToggleCodeBlock = "Cmd+E" })" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
Source/Extensions/Blazorise.Markdown/MarkdownAutoRefresh.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace Blazorise.Markdown | ||
{ | ||
/// <summary> | ||
/// Useful, when initializing the editor in a hidden DOM node. If set to { delay: 300 }, | ||
/// it will check every 300 ms if the editor is visible and if positive, call CodeMirror's refresh(). | ||
/// </summary> | ||
public class MarkdownAutoRefresh | ||
{ | ||
public int Delay { get; set; } = 300; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#region Using directives | ||
using System.Text.Json.Serialization; | ||
#endregion | ||
|
||
namespace Blazorise.Markdown | ||
{ | ||
/// <summary> | ||
/// Saves the text that's being written and will load it back in the future. | ||
/// It will forget the text when the form it's contained in is submitted. | ||
/// </summary> | ||
public class MarkdownAutosave | ||
{ | ||
/// <summary> | ||
/// If set to true, saves the text automatically. | ||
/// Defaults to false. | ||
/// </summary> | ||
public bool Enabled { get; set; } | ||
|
||
/// <summary> | ||
/// Delay between saves, in milliseconds. | ||
/// Defaults to 10000 (10s). | ||
/// </summary> | ||
public int Delay { get; set; } = 10000; | ||
|
||
/// <summary> | ||
/// Delay before assuming that submit of the form failed and saving the text, in milliseconds. | ||
/// Defaults to autosave.delay or 10000 (10s). | ||
/// </summary> | ||
[JsonPropertyName( "submit_delay" )] | ||
public int? SubmitDelay { get; set; } | ||
|
||
/// <summary> | ||
/// You must set a unique string identifier so that EasyMDE can autosave. | ||
/// Something that separates this from other instances of EasyMDE elsewhere on your website. | ||
/// </summary> | ||
public string UniqueId { get; set; } | ||
|
||
/// <summary> | ||
/// Set text for autosave. | ||
/// </summary> | ||
public string Text { get; set; } | ||
|
||
/// <summary> | ||
/// Set DateTimeFormat. More information see DateTimeFormat instances. | ||
/// Default locale: en-US, format: hour:minute. | ||
/// </summary> | ||
public MarkdownAutosaveTimeFormat TimeFormat { get; set; } | ||
} | ||
} |
Oops, something went wrong.