Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MarkdownToolbarButton supports text #4233

Closed
realLiangshiwei opened this issue Oct 26, 2022 · 3 comments · Fixed by #4235
Closed

MarkdownToolbarButton supports text #4233

realLiangshiwei opened this issue Oct 26, 2022 · 3 comments · Fixed by #4235
Assignees
Labels
Type: Feature ⚙ Request or idea for a new feature.
Projects
Milestone

Comments

@realLiangshiwei
Copy link

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.

@realLiangshiwei realLiangshiwei added the Type: Feature ⚙ Request or idea for a new feature. label Oct 26, 2022
@stsrki
Copy link
Collaborator

stsrki commented Oct 26, 2022

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

@realLiangshiwei
Copy link
Author

realLiangshiwei commented Oct 26, 2022

<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

[Parameter] public string Name { get; set; }
/// <summary>
/// Gets or sets the custom value corresponding to the action.
/// </summary>
[Parameter] public object Value { get; set; }
/// <summary>
/// Gets or sets the custom icon name corresponding to the action.
/// </summary>
[Parameter] public string Icon { get; set; }
/// <summary>
/// Gets or sets the small tooltip that appears via the <c>title=""</c> attribute.
/// </summary>
[Parameter] public string Title { get; set; }
/// <summary>
/// If true, separator will be placed before the button.
/// </summary>
[Parameter] public bool Separator { get; set; }
/// <summary>
/// Gets or sets the parent markdown instance.
/// </summary>
[CascadingParameter] protected Markdown ParentMarkdown { get; set; }

@stsrki
Copy link
Collaborator

stsrki commented Oct 26, 2022

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

@stsrki stsrki self-assigned this Oct 26, 2022
@stsrki stsrki added this to 🔙 Backlog in Development via automation Oct 26, 2022
@stsrki stsrki added this to the 1.2 milestone Oct 26, 2022
@stsrki stsrki moved this from 🔙 Backlog to ⚙In progress in Development Oct 26, 2022
@stsrki stsrki moved this from ⚙In progress to ⏳ Review in Development Oct 26, 2022
Development automation moved this from ⏳ Review to ✔ Done Oct 26, 2022
@stsrki stsrki mentioned this issue Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature ⚙ Request or idea for a new feature.
Projects
Development
  
✔ Done
Development

Successfully merging a pull request may close this issue.

2 participants