Skip to content

Commit

Permalink
2.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-D committed Sep 19, 2017
1 parent b677cbc commit 2e06ad7
Show file tree
Hide file tree
Showing 18 changed files with 268 additions and 158 deletions.
2 changes: 1 addition & 1 deletion dist/plugins/colors/ui/sass/trumbowyg.colors.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Trumbowyg v2.7.2 - A lightweight WYSIWYG editor
* Trumbowyg v2.8.0 - A lightweight WYSIWYG editor
* Default stylesheet for Trumbowyg editor plugin
* ------------------------
* @link http://alex-d.github.io/Trumbowyg
Expand Down
2 changes: 1 addition & 1 deletion dist/plugins/colors/ui/trumbowyg.colors.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Trumbowyg v2.7.2 - A lightweight WYSIWYG editor
* Trumbowyg v2.8.0 - A lightweight WYSIWYG editor
* Trumbowyg plugin stylesheet
* ------------------------
* @link http://alex-d.github.io/Trumbowyg
Expand Down
2 changes: 1 addition & 1 deletion dist/plugins/colors/ui/trumbowyg.colors.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 13 additions & 10 deletions dist/plugins/emoji/trumbowyg.emoji.js
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,6 @@
':white_medium_small_square:',
':black_medium_square:',
':white_medium_square:',
':black_large_square:',
':white_large_square:',
':white_check_mark:',
':black_square_button:',
Expand Down Expand Up @@ -930,27 +929,31 @@
var emojiCode = emoji[0],
emojiUrl = emoji[1],
emojiHtml = '<img src="' + emojiUrl + '" alt="' + emojiCode + '">',
btnDef = {
customEmojiBtnName = 'emoji-' + emojiCode.replace(/:/g, ''),
customEmojiBtnDef = {
hasIcon: false,
param: emojiHtml,
text: emojiHtml,
fn: function () {
trumbowyg.execCmd('insertImage', emojiUrl, false, true);
return true;
}
};
trumbowyg.addBtnDef(emojiHtml, btnDef);
dropdown.push(emojiHtml);

trumbowyg.addBtnDef(customEmojiBtnName, customEmojiBtnDef);
dropdown.push(customEmojiBtnName);
} else { // Default behaviour
var btn = emoji,
btnDef = {
param: emoji,
var btn = emoji.replace(/:/g, ''),
defaultEmojiBtnName = 'emoji-' + btn,
defaultEmojiBtnDef = {
text: emoji,
fn: function () {
trumbowyg.execCmd('insertText', emoji);
return true;
}
};
trumbowyg.addBtnDef(btn, btnDef);
dropdown.push(btn);

trumbowyg.addBtnDef(defaultEmojiBtnName, defaultEmojiBtnDef);
dropdown.push(defaultEmojiBtnName);
}
});

Expand Down
2 changes: 1 addition & 1 deletion dist/plugins/emoji/trumbowyg.emoji.min.js

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions dist/plugins/emoji/ui/sass/trumbowyg.emoji.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/**
* Trumbowyg v2.8.0 - A lightweight WYSIWYG editor
* Default stylesheet for Trumbowyg editor plugin
* ------------------------
* @link http://alex-d.github.io/Trumbowyg
* @license MIT
* @author Alexandre Demode (Alex-D)
* Twitter : @AlexandreDemode
* Website : alex-d.fr
*/

.trumbowyg-dropdown-emoji {
width: 265px;
padding: 7px 0 7px 5px;
height: 200px;
overflow-y: scroll;
overflow-x: hidden;
}

.trumbowyg-dropdown-emoji svg {
display: none !important;
}

.trumbowyg-dropdown-emoji button {
display: block;
position: relative;
float: left;
height: 26px;
width: 26px;
padding: 0;
margin: 2px;
line-height: 24px;
text-align: center;

&:hover,
&:focus {
&::after {
display: block;
position: absolute;
top: -5px;
left: -5px;
height: 27px;
width: 27px;
background: inherit;
box-shadow: #000 0 0 2px;
z-index: 10;
background-color: transparent;
}
}
}

.trumbowyg .emoji {
width: 22px;
height: 22px;
display: inline-block;
}
47 changes: 47 additions & 0 deletions dist/plugins/emoji/ui/trumbowyg.emoji.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/**
* Trumbowyg v2.8.0 - A lightweight WYSIWYG editor
* Trumbowyg plugin stylesheet
* ------------------------
* @link http://alex-d.github.io/Trumbowyg
* @license MIT
* @author Alexandre Demode (Alex-D)
* Twitter : @AlexandreDemode
* Website : alex-d.fr
*/

.trumbowyg-dropdown-emoji {
width: 265px;
padding: 7px 0 7px 5px;
height: 200px;
overflow-y: scroll;
overflow-x: hidden; }

.trumbowyg-dropdown-emoji svg {
display: none !important; }

.trumbowyg-dropdown-emoji button {
display: block;
position: relative;
float: left;
height: 26px;
width: 26px;
padding: 0;
margin: 2px;
line-height: 24px;
text-align: center; }
.trumbowyg-dropdown-emoji button:hover::after, .trumbowyg-dropdown-emoji button:focus::after {
display: block;
position: absolute;
top: -5px;
left: -5px;
height: 27px;
width: 27px;
background: inherit;
box-shadow: #000 0 0 2px;
z-index: 10;
background-color: transparent; }

.trumbowyg .emoji {
width: 22px;
height: 22px;
display: inline-block; }
2 changes: 2 additions & 0 deletions dist/plugins/emoji/ui/trumbowyg.emoji.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions dist/plugins/noembed/trumbowyg.noembed.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,19 @@
$.extend(true, $.trumbowyg, {
langs: {
en: {
noembed: 'noEmbed',
noembed: 'Noembed',
noembedError: 'Error'
},
sk: {
noembedError: 'Chyba'
},
fr: {
noembed: 'noEmbed',
noembedError: 'Erreur'
},
cs: {
noembedError: 'Chyba'
},
ja: {
noembed: 'noEmbed',
noembedError: 'エラー'
}
},
Expand Down
2 changes: 1 addition & 1 deletion dist/plugins/noembed/trumbowyg.noembed.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions dist/plugins/upload/trumbowyg.upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'use strict';

var defaultOptions = {
serverPath: './src/plugins/upload/trumbowyg.upload.php',
serverPath: '',
fileFieldName: 'fileToUpload',
data: [], // Additional data for ajax [{name: 'key', value: 'value'}]
headers: {}, // Additional headers
Expand Down Expand Up @@ -165,9 +165,7 @@
contentType: false,

progressUpload: function (e) {
$('.' + prefix + 'progress-bar').stop().animate({
width: Math.round(e.loaded * 100 / e.total) + '%'
}, 200);
$('.' + prefix + 'progress-bar').css('width', Math.round(e.loaded * 100 / e.total) + '%');
},

success: function (data) {
Expand Down Expand Up @@ -223,7 +221,7 @@


function addXhrProgressEvent() {
if (!$.trumbowyg && !$.trumbowyg.addedXhrProgressEvent) { // Avoid adding progress event multiple times
if (!$.trumbowyg.addedXhrProgressEvent) { // Avoid adding progress event multiple times
var originalXhr = $.ajaxSettings.xhr;
$.ajaxSetup({
xhr: function () {
Expand Down
2 changes: 1 addition & 1 deletion dist/plugins/upload/trumbowyg.upload.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2e06ad7

Please sign in to comment.