Skip to content

Commit

Permalink
Avoid the editor eat tabs in code blocks
Browse files Browse the repository at this point in the history
Signed-off-by: emanuele <emanuele45@gmail.com>
  • Loading branch information
scripple authored and emanuele45 committed Mar 15, 2014
1 parent 81f0a85 commit 2f985f6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion themes/default/GenericControls.template.php
Expand Up @@ -133,7 +133,10 @@ function template_control_richedit($editor_id, $smileyContainer = null, $bbcCont
});
$("#', $editor_id, '").data("sceditor").createPermanentDropDown();
$(".sceditor-container").width("100%").height("100%");', $editor_context['rich_active'] ? '' : '
$("#' . $editor_id . '").data("sceditor").setTextMode();', '
$("#' . $editor_id . '").data("sceditor").setTextMode();';
// The white-space: pre is necessary to avoid the editor mess with tabs in code blocks
echo '
$("#' . $editor_id . '").data("sceditor").css(\'code {white-space: pre;}\');', '
if (!(is_ie || is_ff || is_opera || is_safari || is_chrome))
$(".sceditor-button-source").hide();
', isset($context['post_error']['no_message']) || isset($context['post_error']['long_message']) ? '
Expand Down

0 comments on commit 2f985f6

Please sign in to comment.