Skip to content

Commit 6aabd84

Browse files
authored
Merge pull request #7184 from syncfusion-content/990340-MD-Format
990340: Added the UG documentation for enable mark down auto format
2 parents f059e80 + a774935 commit 6aabd84

File tree

4 files changed

+46
-2
lines changed

4 files changed

+46
-2
lines changed
-1.4 MB
Loading
-4.26 MB
Loading
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@using Syncfusion.Blazor.RichTextEditor
2+
3+
<SfRichTextEditor EnableMarkdownAutoFormat="true">
4+
<h3><span style="font-size: x-large;"><b>Auto Formatting - Write Faster, Format Smarter</b></span></h3><p><span style="font-size: inherit;">Boost your productivity with Auto Formatting, a powerful feature that lets you style content instantly using simple, familiar Markdown-style shortcuts. No need to reach for the toolbar - just type and watch your content transform in real time.</span></p><div style="font-family: &quot;Segoe UI&quot;; font-size: 14px; font-style: normal; line-height: 20px;"><p style="font-weight: 400;">The following Markdown shortcuts can be used:</p><ul style=""><li style="font-weight: 400;">Use <code>_</code> or <code>*</code> around text for <em>italic formatting</em>.</li><li style="">Use <code style="font-weight: 400;">__</code> or <code style="font-weight: 400;">**</code> around text for <b>bold</b> formatting.</li></ul></div>
5+
</SfRichTextEditor>

blazor/rich-text-editor/tools/text-formatting.md

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ Use the `HorizontalLine` tool in the editor below to see the feature in action.
298298

299299
![Blazor RichTextEditor with Custom Format](../images/blazor-richtexteditor-horizontal-line.png)
300300

301-
# Format Painter in Blazor Rich Text Editor
301+
## Format Painter in Blazor Rich Text Editor
302302

303303
The format painter tool enables users to replicate formatting from one text segment and apply it to another. It can be accessed through the toolbar or via keyboard shortcuts, allowing the transfer of styles from individual words to entire paragraphs. Customization options are available through the Rich Text Editor[FormatPainterSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.RichTextEditor.RichTextEditorFormatPainterSettings.html) property.
304304

@@ -368,4 +368,43 @@ Using `Clear Format` makes it easy to undo styling changes and keep your text lo
368368
{% endhighlight %}
369369
{% endtabs %}
370370

371-
![Blazor RichTextEditor with Clear Format](../images/blazor-richtexteditor-using-clear-format.gif)
371+
![Blazor RichTextEditor with Clear Format](../images/blazor-richtexteditor-using-clear-format.gif)
372+
373+
## Markdown Auto Format
374+
375+
The Rich Text Editor supports automatic conversion of Markdown syntax into HTML using the `EnableMarkdownAutoFormat` property. This feature simplifies content creation by transforming Markdown elements into their corresponding HTML tags, ensuring consistency and improving efficiency.
376+
377+
By default, Markdown Auto-Format is enabled. The editor supports both inline formatting and block-level elements. As you type, Markdown syntax is automatically converted into semantic HTML tags, ensuring a smooth and efficient editing experience.
378+
379+
## Inline Formatting
380+
381+
The following inline formatting options are available:
382+
383+
- Bold – Use `**text**` or `__text__`.
384+
- Italic – Use `*text*` or `_text_`.
385+
- Inline Code – Use `text`.
386+
- Strikethrough – Use `~~text~~`.
387+
388+
## Block formatting
389+
390+
The following block formatting options are available:
391+
392+
- **Bulleted list** – Start a line with `*` or `-` followed by a space.
393+
- **Numbered list** – Start a line with `1.` followed by a space.
394+
- **Check List** – Start a line with `[ ]` or `[x]` followed by a space to insert an unchecked or checked list item, respectively.
395+
- **Headings** – Start a line with `#`, `##`, or `###` followed by a space to create Heading 1, Heading 2, or Heading 3. You can use up to six levels of headings
396+
- **Block quote** – Start a line with `>` followed by a space.
397+
- **Code block** – Start a line with ` ``` ` followed by a space.
398+
- **Horizontal line** – Start a line with `---` followed by a space.
399+
400+
Use the `EnableMarkdownAutoFormat` tool in the editor below to see the feature in action.
401+
402+
{% tabs %}
403+
{% highlight razor %}
404+
405+
{% include_relative code-snippet/markdown-auto-format.razor %}
406+
407+
{% endhighlight %}
408+
{% endtabs %}
409+
410+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BjLyiLWtWPuHotIn?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}

0 commit comments

Comments
 (0)