terrylinooo / githuber-md

Markdown editor plugin for WordPress.
GNU General Public License v3.0
616 stars 89 forks source link

Markdown Switcher not Showing until Post Draft is Saved #276

Closed quantum-fries closed 1 year ago

quantum-fries commented 2 years ago

Using Gutenberg / WP 5.8.2 with Markdown as the default for posts, users can’t switch from Markdown to Gutenberg until they save a new post as a draft. The switcher only appears after saving. Could you help me with that?

When creating a new post, the Markdown Switcher only appears after the draft is saved. I would expect the Markdown switcher to be shown right away.

I can make that happen by removing the if-clause here (Markdown.php) but the switcher then doesn't work.

// Only display metabox if current post-type supports Markdown. if ( ! empty( $current_post_type) && post_type_supports( githuber_get_current_post_type(), self::MD_POST_TYPE ) ) { add_action( 'add_meta_boxes', array( $this, 'add_meta_box' ) ); }

Presumably post_type_supports and the Markdown switcher only work once a draft is saved. Would it not be possible, for example, to show the switcher from the start and then save the draft upon switching from Gutenberg to Markdown?

I'm using Markdown Githuber MD Version 1.16.1 with Wordpress 5.9.2

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 2 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.