Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Button Bar Plugin - Code Markdown

edited May 2015 in Vanilla 2.0 - 2.8

Hey dudes!
Why when I select CODE formatting in the buttons bar when I am posting only is written<code></code> instead of <pre><code></code>. Do you know how can I fix that? I'm using prettify and I need the pre tag before code. I've checked the .js of the plugin and I found somthing like that

case 'code': var multiline = $(TextArea).hasSelection().indexOf('\n') >= 0; if (multiline) { var thisOpts = $.extend(htmlOpts, { opentag:'<pre><code>', closetag:'</code></pre>', opener:'', closer:'', closeslice: '' }); $(TextArea).insertRoundTag('',thisOpts); } else { $(TextArea).insertRoundTag('code',htmlOpts); } break;

... any Idea or stable solution for making prettify easier (still more) ? thanksss!


  • Options

    The functionality is correct. If anything you need another button that add code blocks.

    grep is your friend.

  • Options

    The open tag when I press code in the markdown bar while wiritting isn't like that:


    is just


    That's what I mean... because of that, pretiffy is not working.

  • Options
    edited May 2015

    Just I had to make a selection of the text I wanted to Markdown with < pre > < code >. With empty box only < code > is displaying.

Sign In or Register to comment.