WordPress.org

Ready to get started?Download WordPress

Forums

WP-Markdown
[resolved] Breaks visual editor for pages/posts (3 posts)

  1. Travis Ballard
    Member
    Posted 1 year ago #

    I am using WP-Markdown mainly for my bbPress forum, but when I go into the settings and enable it for posts and pages, it does the job well until I go to edit a post. Then my visual editor is MIA and I'm left with only the HTML editor. I've disabled all plugins but WP-Markdown and switched to the TwentyEleven theme and the issue still persists. If I go back into the settings and disable it for posts/pages, my visual editor returns.

    http://wordpress.org/extend/plugins/wp-markdown/

  2. Travis Ballard
    Member
    Posted 1 year ago #

    Isolated it to WordPress_Markdown::can_richedit()

    If I return true there instead of fetching the current screen it gives me my rich editor back for 'posts' and 'pages' when WP-Markdown is enabled on those post types.

    public function can_richedit($bool){
            return true;
    		$screen = get_current_screen();
    		$post_type = $screen->post_type;
    		if($this->is_Markdownable($post_type))
    			return false;
    
    		return $bool;
    	}
  3. Stephen Harris
    Member
    Plugin Author

    Posted 1 year ago #

    This is disabled on purpose since switching between HTML and Visual modes, from memory, breaks the Markdown code.

    As you can see above - if you don't select Markdown for posts/pages then you'll still able to use the visual editor.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic