You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're in the process of trying to style the prosemirror menu effectively, and we've encountered a couple small usability issues with menu 0.17.x
We want to add multple classes to our MenuItem without having to do anything too drastic. I found that I couldn't easy do that with the current implementation of classes being added via classList.add. Array of strings or string with spaces would not work. I patched that by just appending to the element's className property.
We want to be able to add a class property to the parent 'Prosemirror-menuitem' span also, for styling purposes. I couldn't find a way with the current implementation. My solution was to add a new spec property called 'menuItemClass' that I append to the parent span's class in renderGrouped.
I don't know if what I've done fits into your framework or not, but I've submitted my minor pull request with my basic changes #4
I'd appreciate if you could comment on how I can get around this or if prosemirror can accommodate my use cases.
Thanks
The text was updated successfully, but these errors were encountered:
jonsutherland
changed the title
MenuItem a way to add multiple classes to MenuItem and class to outside Prosemirror-menuitem
A way to add multiple CSS classes to MenuItem and CSS class to outside Prosemirror-menuitem
Feb 7, 2017
#Hello,
We're in the process of trying to style the prosemirror menu effectively, and we've encountered a couple small usability issues with menu 0.17.x
We want to add multple classes to our MenuItem without having to do anything too drastic. I found that I couldn't easy do that with the current implementation of classes being added via classList.add. Array of strings or string with spaces would not work. I patched that by just appending to the element's className property.
We want to be able to add a class property to the parent 'Prosemirror-menuitem' span also, for styling purposes. I couldn't find a way with the current implementation. My solution was to add a new spec property called 'menuItemClass' that I append to the parent span's class in renderGrouped.
I don't know if what I've done fits into your framework or not, but I've submitted my minor pull request with my basic changes #4
I'd appreciate if you could comment on how I can get around this or if prosemirror can accommodate my use cases.
Thanks
The text was updated successfully, but these errors were encountered: