Support » Fixing WordPress » Is there a getEditContent equivalent function?

  • robertschneiderman

    (@robertschneiderman)


    I was wondering if there is a function that can convert a Gutenberg block in code:

    {
      attributes: {...}
      clientId: "9bede25f-456c-4b00-90d4-83b5a968e0cb"
      innerBlocks: [...]
      name: "rgb/form"
    }

    to a rendered React element:

    
    {
      $$typeof: Symbol(react.element)
      ...
    }
    

    The closest thing I could find is wp.blocks.getSaveElement… but instead of the Save content… is there one for Edit content? This would be really helpful to me.

Viewing 1 replies (of 1 total)
  • I wonder what your goal is with this kind of conversion? Since you’ve been waiting so long for an answer here, your question might be better addressed to the Gutenberg developers. They might be able to make an addition that fulfills your wish as long as your goal is valid.
    https://github.com/WordPress/gutenberg/issues

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.