Skip to content

Commit

Permalink
build: v2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-D committed Apr 10, 2016
1 parent b8d39f4 commit 308117e
Show file tree
Hide file tree
Showing 14 changed files with 71 additions and 48 deletions.
2 changes: 1 addition & 1 deletion dist/langs/fr.min.js

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

6 changes: 3 additions & 3 deletions dist/plugins/colors/trumbowyg.colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@
// add free color btn
var freeColorButtonName = fn + 'Free',
freeColorBtnDef = {
fn: function (params, tbw) {
tbw.openModalInsert(tbw.lang[fn],
fn: function () {
trumbowyg.openModalInsert(trumbowyg.lang[fn],
{
color: {
label: fn,
Expand All @@ -147,7 +147,7 @@
},
// callback
function (values) {
tbw.execCmd(fn, values.color);
trumbowyg.execCmd(fn, values.color);
return true;
}
);
Expand Down
2 changes: 1 addition & 1 deletion dist/plugins/colors/trumbowyg.colors.min.js

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

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.0.0-beta.8 - A lightweight WYSIWYG editor
* Trumbowyg v2.0.0 - A lightweight WYSIWYG editor
* Colors plugin stylesheet for Trumbowyg editor
* ------------------------
* @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.0.0-beta.8 - A lightweight WYSIWYG editor
* Trumbowyg v2.0.0 - A lightweight WYSIWYG editor
* Colors plugin stylesheet for Trumbowyg editor
* ------------------------
* @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.

3 changes: 1 addition & 2 deletions dist/plugins/noembed/trumbowyg.noembed.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@
});
}
);
},
ico: 'insertImage'
}
};

trumbowyg.addBtnDef('noembed', btnDef);
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.

28 changes: 23 additions & 5 deletions dist/trumbowyg.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Trumbowyg v2.0.0-beta.8 - A lightweight WYSIWYG editor
* Trumbowyg v2.0.0 - A lightweight WYSIWYG editor
* Trumbowyg core file
* ------------------------
* @link http://alex-d.github.io/Trumbowyg
Expand All @@ -14,6 +14,9 @@ jQuery.trumbowyg = {
en: {
viewHTML: 'View HTML',

undo: 'Undo',
redo: 'Redo',

formatting: 'Formatting',
p: 'Paragraph',
blockquote: 'Quote',
Expand Down Expand Up @@ -190,12 +193,24 @@ jQuery.trumbowyg = {
* title: this.lang.foo
* }
*/
var h = t.lang.header; // Header translation
var h = t.lang.header, // Header translation
isBlinkFunction = function () {
return (window.chrome || (window.Intl && Intl.v8BreakIterator)) && 'CSS' in window;
};
t.btnsDef = {
viewHTML: {
fn: 'toggle'
},

undo: {
isSupported: isBlinkFunction,
key: 'Z'
},
redo: {
isSupported: isBlinkFunction,
key: 'Y'
},

p: {
fn: 'formatBlock'
},
Expand Down Expand Up @@ -331,6 +346,7 @@ jQuery.trumbowyg = {
},
btns: [
['viewHTML'],
['undo', 'redo'],
['formatting'],
'btnGrp-semantic',
['superscript', 'subscript'],
Expand Down Expand Up @@ -426,7 +442,9 @@ jQuery.trumbowyg = {

t.buildOverlay();

t.$c.trigger('tbwinit');
setTimeout(function () {
t.$c.trigger('tbwinit');
});
},

addBtnDef: function (btnName, btnDef) {
Expand Down Expand Up @@ -732,7 +750,7 @@ jQuery.trumbowyg = {
// Check if button is supported
isSupportedBtn: function (b) {
try {
return this.o.btnsDef[b].isSupported();
return this.btnsDef[b].isSupported();
} catch (c) {
}
return true;
Expand Down Expand Up @@ -1144,7 +1162,7 @@ jQuery.trumbowyg = {
cmd(param);
} catch (e2) {
if (cmd === 'insertHorizontalRule') {
param = null;
param = undefined;
} else if (cmd === 'formatBlock' && (navigator.userAgent.indexOf('MSIE') !== -1 || navigator.appVersion.indexOf('Trident/') !== -1)) {
param = '<' + param + '>';
}
Expand Down
4 changes: 2 additions & 2 deletions dist/trumbowyg.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 308117e

Please sign in to comment.