adds getFontSize to editor
This commit is contained in:
parent
1518a460ae
commit
340f004fd0
2 changed files with 8 additions and 5 deletions
|
|
@ -343,6 +343,14 @@ var Editor = function(renderer, session) {
|
||||||
this.renderer.unsetStyle(style);
|
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.
|
* Set a new font size (in pixels) for the editor text.
|
||||||
* @param {String} size A font size ( _e.g._ "12px")
|
* @param {String} size A font size ( _e.g._ "12px")
|
||||||
|
|
|
||||||
|
|
@ -70,11 +70,6 @@ define(function(require, exports, module) {
|
||||||
// when building the settings menu matching get and set functions
|
// when building the settings menu matching get and set functions
|
||||||
// must be found or the function will be ignored
|
// 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
|
// this allows the settings menu to supply a wrap limit
|
||||||
// using a text input field easily
|
// using a text input field easily
|
||||||
editor.session.setWrapLimit = function (limit) {
|
editor.session.setWrapLimit = function (limit) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue