From bfcebd5d092b595c6af5395d1ca73919e283db73 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Mon, 21 Oct 2013 15:39:51 +0000 Subject: [PATCH] Use Redactor in linebreaks mode Linebreaks mode will result in <Enter> key adding a <br/> element to the HTML markup rather than starting a new paragraph <p> element. This patch also changes the behavior of the <Tab> key to change focus away from the Redactor editor rather than indenting the current block. --- js/redactor-osticket.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/redactor-osticket.js b/js/redactor-osticket.js index 0fd53146f..486cadd72 100644 --- a/js/redactor-osticket.js +++ b/js/redactor-osticket.js @@ -134,7 +134,9 @@ $(function() { 'focus': false, 'plugins': ['fontcolor','fontfamily'], 'imageGetJson': 'ajax.php/draft/images/browse', - 'syncBeforeCallback': captureImageSizes + 'syncBeforeCallback': captureImageSizes, + 'linebreaks': true, + 'tabFocus': false }; if (el.data('redactor')) return; if (el.hasClass('draft')) { -- GitLab