1

I love the Code Snippets plugin and use it a lot.

Of course it has its issues. But the main thing I would like to see is: enable it for all users, even those not logged in. So that customers can see formatted code blocks when using a case ticket in a public project.

Please?

Fog Creek Case FC2185291

flag

2 Answers

1

That's a solid feature request! I've added it to the list of improvements we'd like to make to the Code Snippets plugin.

To show your support for this feature request, please vote up this question (not this answer)!

link|flag
0

In the mean time, I did a customization:

name:          Customer Code
description:   Format [code] blocks (enable for users Not Logged In)
author:        Michel de Ruiter
version:       1.1.0.0

js:
$('.emailBody').each(function() {
  var h = $(this).html();
  var s = h.match(/\[code\]/g);
  var e = h.match(/\[\/code\]/g);
  if (s && e && s.length == e.length)
    $(this).html(h.replace(/\[code\]/g,
               '<div class="customercode codesnippet"><pre class="prettyprint">')
                  .replace(/\[\/code\]/g, '<\/pre></div>'));
});

css:
#bugviewContainer .bugevents .bugevent .email .emailBody div.customercode {
  background-color: #FFD;
  border:           1px solid #DDD;
}
#bugviewContainer .bugevents .bugevent .email .emailBody div.customercode pre {
  font-size:        82%;
  padding:          0 8px 12px;
}
#bugviewContainer .bugevents .bugevent .email .emailBody div.customercode pre br {
  display:          none;
}

But I would prefer to have the full-swing Code Snippets plugin to just be available for users Not Logged In.

link|flag

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.