Megabit / Blazorise

Blazorise is a component library built on top of Blazor with support for CSS frameworks like Bootstrap, Tailwind, Bulma, AntDesign, and Material.
https://blazorise.com/
Other
3.29k stars 533 forks source link

MarkdownToolbarButton supports `text` #4233

Closed realLiangshiwei closed 2 years ago

realLiangshiwei commented 2 years ago

Is your feature request related to a problem? Please describe.

I'm trying to do custom the markdown toolbar, but there is no text property.

Describe the solution you'd like

https://github.com/Ionaru/easy-markdown-editor#toolbar-customization

const easyMDE = new EasyMDE({
    toolbar: [
        "italic",
        {
            name: "custom",
            text: "Starred",
            title: "Custom Button"
        }
    ]
});

image

Additional context

Add any other context or screenshots about the feature request here.

stsrki commented 2 years ago

Have you tried Toolbar customization for our Markdown component? https://blazorise.com/docs/extensions/markdown

realLiangshiwei commented 2 years ago
<Markdown @bind-Value="@markdownValue" CustomButtonClicked="@OnCustomButtonClicked">
    <Toolbar>
         // Text="Preview"` I want to use text instead of `icon`.
        <MarkdownToolbarButton Name="preview" Title="Preview" Icon="none"/>
    </Toolbar>
</Markdown>

At the easy-markdown-editor, it allows to set text properties.

image

https://github.com/Megabit/Blazorise/blob/2548e7049cb4457fe9fea5148698a62aeab88073/Source/Extensions/Blazorise.Markdown/MarkdownToolbarButton.razor.cs#L85-L110

stsrki commented 2 years ago

So, we're missing a Text property. Thanks for letting us know.