Automattic / pym-shortcode

A WordPress solution to embed iframes that are responsive horizontally and vertically using the NPR Visuals Team's https://blog.apps.npr.org/pym.js/
https://wordpress.org/plugins/pym-shortcode/
GNU General Public License v2.0
14 stars 7 forks source link

Use Gutenberg's native `anchor` support for setting the pym parent element ID #36

Open benlk opened 6 years ago

benlk commented 6 years ago

We didn't do this in the initial implementation of Gutenberg blocks in #34 because, at the time, it appeared as if there was no way to use Gutenberg's anchor property with a block that was dynamically rendered.

For more history, see the following comments:

Elements of this ticket:

benlk commented 6 years ago

After https://github.com/INN/pym-shortcode/commit/2613c2557e797cd797b44da73f15a7f58d49832e, we have a save method that does store some things in the post_content directly, so it's worth rechecking to see if we can grab that.

benlk commented 6 years ago

in progress on 35-anchor-redux, but still no idea how to get the anchor value passed to the shortcode, even when trying to pull it from the post_content.