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

Breaking change with SimpleMDE in toolbar icons #41

Closed
1 of 2 tasks
ChrisRast opened this issue Jan 3, 2019 · 3 comments
Closed
1 of 2 tasks

Breaking change with SimpleMDE in toolbar icons #41

ChrisRast opened this issue Jan 3, 2019 · 3 comments
Labels

Comments

@ChrisRast
Copy link

ChrisRast commented Jan 3, 2019

I'm submitting a...

  • Bug report
  • Feature request

Reproduction steps

When passing custom toolbar icons, the no-disable class previously used in SimpleMDE is not respected.
Check this JSFiddle: https://jsfiddle.net/myv5wgh0/.

Due to a change in early v2 (7b147b3#diff-510834ebe67771ad1adc3336cb7fd314R16116), element.classList is now used instead of the element.className previously in use which results in a loss of classnames.

Also, the changes in v2 resulted in changes in the shape of the toolbar objects, which makes it a breaking change with SimpleMDE (need to add the noDisableproperty in EasyMDE).

So, no big bad breaking change, but I think it's worth mentioning it.

I found this "bug" because in a project of ours we use a different set of toolbar icons (material) and we needed to customize the actions.

Version information

EasyMDE version: >2.0.0

@Ionaru Ionaru added the Bug label Jan 25, 2019
@Ionaru
Copy link
Owner

Ionaru commented Jan 25, 2019

Your JSFiddle doesn't work, but I see what you mean.
I'm going to consider this a bug and try to restore compatibility.

@ChrisRast
Copy link
Author

Hot damn! Sorry for the fiddle, I don't understand why it doesn't show what I prepared.

I'm going to consider this a bug and try to restore compatibility.

Great to see that, thank you ! =)

@mike-jewell
Copy link

I'm hitting the same problem for a different reason. Do you have a timeline for when the typings will be updated so the noDisable and noMobile booleans will be added to the interface ToolbarIcon?

    interface ToolbarIcon {
        name: string;
        action: string|((editor: EasyMDE) => void);
        className: string;
        title: string;
        noDisable?: boolean;
        noMobile?: boolean;
    }

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants