ep_font_size
Advanced tools
Comparing version 0.0.5 to 0.0.6
{ | ||
"description": "Change the font size", | ||
"name": "ep_font_size", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "John McLear", |
@@ -36,3 +36,2 @@ var _, $, jQuery; | ||
function applyFontSize(context, size){ | ||
console.log(size); | ||
context.ace.callWithAce(function(ace){ | ||
@@ -46,2 +45,6 @@ ace.ace_doInsertSizes(size); | ||
function aceAttribsToClasses(hook, context){ | ||
if(context.key.indexOf("sizes:") !== -1){ | ||
var size = /(?:^| )sizes:([A-Za-z0-9]*)/.exec(context.key); | ||
return ['sizes:' + size[1] ]; | ||
} | ||
if(context.key == 'sizes'){ | ||
@@ -48,0 +51,0 @@ return ['sizes:' + context.value ]; |
@@ -6,9 +6,5 @@ var _ = require('ep_etherpad-lite/static/js/underscore'); | ||
var collectContentPre = function(hook, context){ | ||
var tname = context.tname; | ||
var state = context.state; | ||
var lineAttributes = state.lineAttributes | ||
var tagIndex = _.indexOf(sizes, tname); | ||
if(tagIndex >= 0){ | ||
lineAttributes['size'] = sizes[tagIndex]; | ||
var sizes = /(?:^| )sizes:([A-Za-z0-9]*)/.exec(context.cls); | ||
if(sizes && sizes[1]){ | ||
context.cc.doAttrib(context.state, sizes[0]); | ||
} | ||
@@ -15,0 +11,0 @@ }; |
9119