Coder Social home page Coder Social logo

Comments (4)

adamdonahue avatar adamdonahue commented on July 18, 2024

Also note that the MenuElement interface definition of render isn't consistent with the MenuItem definition. So this is confusing all around:

  • Is render supported in MenuItem now, at all?
  • If it is, should it return a dom element alone (as the docs still indicate)?
  • Or should it return an object with a dom property and an update one. In that case, is there a default, and reasonable, update function?

I was able to "fix" this (assuming it's not just a mistake on my part) locally by check for render in addition to label and icon, and having render of the item return a single DOM element, but this is just a quick-and-dirty fix.

from prosemirror-menu.

marijnh avatar marijnh commented on July 18, 2024

Why are you using 0.24 when there's a 1.0.1? That one should have docs that are consistent with its code. And yeah, using dom and update is how the menu works now.

from prosemirror-menu.

adamdonahue avatar adamdonahue commented on July 18, 2024

The code looked the same, but I'll give it a shot.

from prosemirror-menu.

adamdonahue avatar adamdonahue commented on July 18, 2024

Nope, that didn't work (despite following the documentation). I hadn't noticed the experimental nature of this repository, though, so we'll just clone and work on our own customized implementation. Thanks.

from prosemirror-menu.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.