X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/093eded47b5e88eb6831737ea8ab6d98f3ec190b..02265a761a933bfcabd7895301443497976d6f68:/apps/toolbar/fixtures/przyciski.xml

diff --git a/apps/toolbar/fixtures/przyciski.xml b/apps/toolbar/fixtures/przyciski.xml
index 737ef313..8dc5f27a 100755
--- a/apps/toolbar/fixtures/przyciski.xml
+++ b/apps/toolbar/fixtures/przyciski.xml
@@ -1023,6 +1023,7 @@ for (var attr in params.attrs) {
 start_tag += '>';
 var end_tag = '</'+params.tag+'>';
 
+if(text.length > 0) {
 // tokenize
 var output = ''
 var token = ''
@@ -1044,8 +1045,11 @@ if( output[output.length-1] == '\\' ) {
 } else {
     output += end_tag;
 }
-
 output += token;
+}
+else {
+ output = start_tag + end_tag;
+}
 
 texteditor.replaceSelection(output);