-
-
Notifications
You must be signed in to change notification settings - Fork 615
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
|
||
/* =========================================================== | ||
* trumbowyg.indent.js v1.0 | ||
* Indent or Outdent plugin for Trumbowyg | ||
* http://alex-d.github.com/Trumbowyg | ||
* =========================================================== | ||
* Author : Fabacks | ||
* Website : https://github.com/Fabacks | ||
*/ | ||
|
||
(function ($) { | ||
'use strict'; | ||
|
||
$.extend(true, $.trumbowyg, { | ||
langs: { | ||
en: { | ||
indent: 'Indent', | ||
outdent: 'Outdent' | ||
}, | ||
fr: { | ||
indent: 'Augmenter le retrait', | ||
outdent: 'Diminuer le retrait' | ||
} | ||
} | ||
}); | ||
|
||
// Adds the extra button definition | ||
$.extend(true, $.trumbowyg, { | ||
plugins: { | ||
paragraph: { | ||
init: function (trumbowyg) { | ||
var indentBtnDef = { | ||
fn: 'indent', | ||
title: trumbowyg.lang.indent, | ||
isSupported: function () { | ||
return !!document.queryCommandSupported && !!document.queryCommandSupported('indent'); | ||
}, | ||
ico: 'indent' | ||
}; | ||
|
||
var outdentBtnDef = { | ||
fn: 'outdent', | ||
title: trumbowyg.lang.outdent, | ||
isSupported: function () { | ||
return !!document.queryCommandSupported && !!document.queryCommandSupported('outdent'); | ||
}, | ||
ico: 'outdent' | ||
}; | ||
|
||
trumbowyg.addBtnDef('indent', indentBtnDef); | ||
trumbowyg.addBtnDef('outdent', outdentBtnDef); | ||
} | ||
} | ||
} | ||
}); | ||
})(jQuery); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Large diffs are not rendered by default.