changes to allow more menu item class flexibility #4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add a way to append multiple classes to a MenuItem easily.
Add a way to provide the wrapping Prosemirror-menuitem span a class with 'menuItemClass' spec property.
I don't really like that this reaches into the menu elements, which are currently only expected to have a
rendermethod. Why do you need extra classes on the item wrappers?Yeah I don't really like it either. But the CSS designer is asking for it. I pushed back and demanded to know why it's required. Basically they want control over spacing and margin and other things that I don't think of myself, as a programmer. They say the parent's Prosemirror-menuitem's aren't specific enough for them.
I'd be okay with coming up with a different solution where I add the classes programatically on load, but it feels a little disconnected too.
Whoops I didn't mean to close it, yet.
For instance, the type change drop down, they want to add more spacing around it and they don't like using span:nth since they items change based on the state.
Would a margin on the inner element not have the same effect?
In general, this repository should be seen as a proof of concept or example, and, unlike the core ProseMirror modules, I'm not going to make it support all use cases. If you have precise styling requirements, consider just writing your own custom menubar.
Thanks very much for the reply. Design people still think that they need a custom class on the top parent element. I've yet to convince them otherwise. I've already forked your menu module so that's the road we'll take.
Pull request closed