Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gutenberg integration #204

Closed
lkraav opened this issue Jun 30, 2017 · 4 comments
Closed

Gutenberg integration #204

lkraav opened this issue Jun 30, 2017 · 4 comments

Comments

@lkraav
Copy link

lkraav commented Jun 30, 2017

Hey Kyle. You think we could add a button in the list row that opens the post editor in Gutenberg mode (if it's installed)? It's a bit of a hassle to switch out of Nested mode.

@kylephillips
Copy link
Owner

I would suggest using the nestedpages_edit_link filter for this.

Here is an example

@lkraav
Copy link
Author

lkraav commented Jun 30, 2017

Well, this would lose the ability to pick the editor on the go. Here's a super crude hack for app/Views/partials/row.php:

<a href="<?php echo str_replace( [ 'post=', 'action=edit' ], [ 'post_id=', 'page=gutenberg' ], apply_filters('nestedpages_edit_link', get_edit_post_link(), $this->post) ); ?>" class="page-link page-title">
            <span class="title"><em>Gutenberg</em></span>
</a>

Based on the learnings here, it'd really be useful if Edit span would be its own separate link, perhaps controlled by a filterable $actions variable, so people could add their own (although not sure at all how widely used this feature would be). Still, LOC difference would be negligible and nothing would really regress.

I could look to whip something up at a PR level.

@kylephillips
Copy link
Owner

I may look into adding a separate filter for the edit link, but since Gutenberg is still in dev/testing mode, and slated for core eventually, I'd rather not hard-code a link/button in the NP interface.

@lkraav
Copy link
Author

lkraav commented Jul 13, 2017

PS Gutenberg 0.5.0 is soon going to take yet another step towards becoming the main editor WordPress/gutenberg#1797

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants