• Resolved volpik

    (@volpik)


    Hello,

    I am usign postie to import wordpress arthicle by email.

    I have tried to use your plugin, but unfortunately the article is not processed by the markdown engine.

    Is it possible to use your plug in in combination with the postie plugin?

    Many thank in advance

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Pierre-Henri Lavigne

    (@peter202202)

    Hello @volpik

    First thank you for using my plugin, at least giving a try. I appreciate 🙂

    After testing on my side, I had to modify a bit the setup for both of them to work together. Some div tags and breaklines inside the post_content were prevented the text to be parsed properly as markdown.

    For the PostIE plugin

    From the settings panel, under the “Message” tab, I choosed
    Preferred Text Type : Plain Text
    And later at the bottom
    Filter newlines : No

    Theme custom filter

    Inside my theme’s functions.php file I added a quick filter to remove all the default html postie tags:

    add_filter( 'wp_insert_post_data' , 'filter_post_data' , 99, 2 );
    function filter_post_data( $data , $postarr ) {
    	$data[ 'post_content' ] = preg_replace( '#(<div class="postie-[a-zA-Z0-9-_]+">|<\/div>)#', '', $data[ 'post_content' ] );
    	return $data;
    }

    You may have to adjust the filter to your needs.

    Email

    I haven’t tested all the features, I performed my tests by sending emails using Thunderbird and a Gmail account. Basically I was typing raw markdown inside the body of my email:

    Using the tweaks explained earlier should be enough to save the data in a more appropriate format and be parsed as markdown. The render was :

    Hope that will work for you as well.

    Kind regards,

    Peter

    Plugin Author Pierre-Henri Lavigne

    (@peter202202)

    @volpik I hope this message finds you well. I haven’t heard from you for a while so I’m gonna closed this ticket for now. Feel free to open a new one if you are still stuck with PostIE.

    Kind Regards,

    Peter

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Markup Markdown + Postie’ is closed to new replies.