Sha256: d90c58b60cf58a5f64dc9bedb37439653f503051d9a8579459454d3a04dd6bbc
Contents?: true
Size: 663 Bytes
Versions: 4
Compression:
Stored size: 663 Bytes
Contents
if (!RedactorPlugins) var RedactorPlugins = {}; RedactorPlugins.fontsize = { init: function() { var fonts = [10, 11, 12, 14, 16, 18, 20, 24, 28, 30]; var that = this; var dropdown = {}; $.each(fonts, function(i, s) { dropdown['s' + i] = { title: s + 'px', callback: function() { that.setFontsize(s); } }; }); dropdown['remove'] = { title: 'Remove font size', callback: function() { that.resetFontsize(); } }; this.buttonAdd( 'fontsize', 'Change font size', false, dropdown); }, setFontsize: function(size) { this.inlineSetStyle('font-size', size + 'px'); }, resetFontsize: function() { this.inlineRemoveStyle('font-size'); } };
Version data entries
4 entries across 4 versions & 1 rubygems