Button Bar Plugin - Code Markdown
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!
Answers
The functionality is correct. If anything you need another button that add code blocks.
grep is your friend.
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.
Just I had to make a selection of the text I wanted to Markdown with < pre > < code >. With empty box only < code > is displaying.
Solved