Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Added 'dimensions' option.
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown committed Jul 18, 2010
1 parent d1ed4b4 commit 7790ae4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Docs/MooEditable/MooEditable.md
Expand Up @@ -49,6 +49,8 @@ MooEditable Method: constructor {#MooEditable:constructor}
<body>{CONTENT}</body>
</html>
* rootElement - (*string*: defaults to 'p') A string indicating the root element of the editor content.
* baseURL - (*string*: defaults to null) A string indicating the editor content's base URL for resolving relative URLs.
* dimensions - (*object*: defaults to null) An object with x/y values indicating the width and height of the editor. Useful when the editor is not displayed when initialized.

### Events:

Expand Down
5 changes: 3 additions & 2 deletions Source/MooEditable/MooEditable.js
Expand Up @@ -65,7 +65,8 @@ this.MooEditable = new Class({
externalCSS: '',
html: '<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">{BASEHREF}<style>{BASECSS} {EXTRACSS}</style>{EXTERNALCSS}</head><body></body></html>',
rootElement: 'p',
baseURL: ''
baseURL: '',
dimensions: null
},

initialize: function(el, options){
Expand Down Expand Up @@ -108,7 +109,7 @@ this.MooEditable = new Class({
var self = this;

// Dimensions
var dimensions = this.textarea.getSize();
var dimensions = this.options.dimensions || this.textarea.getSize();

// Build the container
this.container = new Element('div', {
Expand Down

0 comments on commit 7790ae4

Please sign in to comment.