adds getFontSize to editor

This commit is contained in:
Matthew Kastor 2013-04-01 15:44:50 -04:00 committed by nightwing
commit 340f004fd0
2 changed files with 8 additions and 5 deletions

View file

@ -343,6 +343,14 @@ var Editor = function(renderer, session) {
this.renderer.unsetStyle(style);
};
/**
* Gets the current font size of the editor text.
*/
this.getFontSize = function () {
return getComputedStyle(
this.container).getPropertyValue('font-size');
};
/**
* Set a new font size (in pixels) for the editor text.
* @param {String} size A font size ( _e.g._ "12px")

View file

@ -70,11 +70,6 @@ define(function(require, exports, module) {
// when building the settings menu matching get and set functions
// must be found or the function will be ignored
editor.getFontSize = function () {
return getComputedStyle(
editor.container).getPropertyValue('font-size');
};
// this allows the settings menu to supply a wrap limit
// using a text input field easily
editor.session.setWrapLimit = function (limit) {