Viewing 12 replies - 1 through 12 (of 12 total)
  • Hi @jescala,

    Hope you’re doing great today!

    I’m rather sure that can be done using the following:

    function markdown_incsub_wiki() {
        add_post_type_support( 'incsub_wiki', 'wpcom-markdown' );
    }
    add_action('init', 'markdown_incsub_wiki');

    That should allow for support for the wiki post type using the action hook the Markdown feature provides.

    You can easily try it using a plugin like Code Snippets:
    http://wordpress.org/plugins/code-snippets/

    You can simply create a new Snippet, give it a name, copy and paste the above code into it, then Save and Activate it.

    Perhaps that’ll do the trick for you?

    Thanks,
    David

    Thread Starter jescala

    (@jescala)

    Thanks! That worked from the backend, but editing from the front end still doesn’t allow markdown. Is there an additional snippet of code that I need to add to make that work?

    Hi @jescala,

    Hmm, you’re referring to the following plugin, correct?
    https://wordpress.org/plugins/jetpack-markdown/

    Using that with the above code, any markdown included in the Wiki pages is automatically converted. That’s both front-end and back-end. At least that I’ve just tested.

    Is there some specific case where you’re not seeing the same?

    Thanks,
    David

    @david,

    The code you provide seems to work. Writing Markdown in back-end does display it but when you edit the wiki in front-end, it edit html and not the raw markdown you provide first. So you loose the markdown in the process.

    I presume it’s a problem related to the fact that the plugin looks like a wiki but in fact isn’t and so the changes doesn’t populate to the raw post.

    I think that it isnot safe to use markdown with wiki as you will loose it for html when someone edit in front-end ?

    Hi there @dinobib,

    Thanks for posting and I’m really glad you mentioned this again as I just had another look and could see what you mean.

    It doesn’t take effect currently, when posting changes through the front-end. I was able to get that working with a quick update to the plugin code as follows:

    Line 1724 of /wp-content/plugins/wiki/wiki.php:

    Before edit:

    'supports' => array(
    					'title',
    					'editor',
    					'author',
    					'revisions',
    					'comments',
    					'page-attributes',
    					'thumbnail'
    				),

    After edit:

    'supports' => array(
    					'title',
    					'editor',
    					'author',
    					'revisions',
    					'comments',
    					'page-attributes',
    					'thumbnail',
    					'wpcom-markdown'
    				),

    I’ll mention this to the developers though, as it’s a very helpful integration feature. For the moment, it’d require that slight edit.

    Just let me know if you have any trouble with that. 🙂

    Thanks!
    David

    Hi @david

    Sadly, It doesn’t change anything for me.
    Markdown is well executed but when in tab edit in frontend, I always have html markup. Edit in backend is in Markdown but it seems it is not only a different markup, the two edit mode (front and back) aren’t in sync together. If I made change in front edit, it is was is displayed but the back edit show the old version and not the actual one.

    Hi @dinobib,

    Thanks for reporting that, I do see what you mean. When edited from the back-end the original markdown appears to be preserved but it gets converted when editing in the front-end. 🙁

    I’ll see if I can maybe find some sort of workaround for that but I’m not totally sure it’d be possible to easily get it working the same way on both sides. Will see what I can find with that though. 🙂

    Cheers,
    David

    I know this post is marked as resolved, but I am trying to us Markdown as well. I have the backend fine, but when I try to edit from the front end, it is all in html mark up. I would like to be able to use Markdown on the front end as well. Has there been any progress with this issue? Thanks so much!

    Hi @JakeBondo,

    I have the backend fine, but when I try to edit from the front end, it is all in html mark up.

    Could you please share me the screenshot of what you are getting in front end and back end?

    For screenshots, you can simply provide a link to an image through Google Drive, Dropbox, screencast.com, http://imgur.com/ or other image service. 🙂

    I would like to be able to use Markdown on the front end as well.

    Do you want to use the Markdown feature provided by JetPack to edit wiki pages in the front end?

    Has there been any progress with this issue?

    This is not an issue but the feature request and this feature may be added in future version of plugin depending on the number of requests we will receive for it but We don’t publish ETAs to prevent disappointment if a deadline is missed(which in plugin development quite a frequent occurrence!).

    Regards,
    WPMU DEV

    Thanks for the reply. Here is the backend screenshot.
    http://cl.ly/XbPX

    And when I try to edit on the front end I get this:
    http://cl.ly/Xb7r

    I am trying to use the markdown feature provided my jetpack to allow edits via the front end.

    Also, if you view the history the markdown code is not recognized. It is converted to html but not rendered.

    http://cl.ly/Xe9E

    Hi @JakeBondo,

    Thank you for your reply.

    Thanks for the reply. Here is the backend screenshot.
    http://cl.ly/XbPX

    And when I try to edit on the front end I get this:
    http://cl.ly/Xb7r

    I am trying to use the markdown feature provided my jetpack to allow edits via the front end.

    This is working fine on my test site.

    This may be due plugin/theme conflict on your site.

    You can just try on your development site using default WordPress theme like Twenty Thirteen and deactivating all other plugins as displayed in the following flowchart to know which theme/plugin is conflicting if any.

    http://premium.wpmudev.org/wp-content/uploads/2013/12/Support-Process-Support-Process.png

    Also, if you view the history the markdown code is not recognized. It is converted to html but not rendered.

    http://cl.ly/Xe9E

    This is how the revisions work. You can also check it with default post revisions as described on the following page.

    http://en.support.wordpress.com/posts/post-revisions/

    Best Regards,
    WPMU DEV

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Jetpack Markdown Support?’ is closed to new replies.