No description, website, or topics provided.
CoffeeScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
demo
LICENSE
README.md
jquery.wysihtml5_size_matters.coffee
jquery.wysihtml5_size_matters.js

README.md

Wysihtml5 Size Matters

With one simple plugin call, Wysihtml5 Size Matters makes your wysihtml5 editor automatically resize to fit the editor's content.

Demo

You can view a demo of the plugin here.

Usage

Assuming you have jQuery in your project, include jquery.wysihtml5_size_matters.js

<script src="path/to/jquery.wysihtml5_size_matters.js">

Initialize the plugin after initializing wysihtml5. You'll need to ensure the editor is loaded (i.e. in the DOM) before calling wysihtml5_size_matters().

Important: wysihtml5_size_matters() expects to be attached to the editor's iframe, available via editor.composer.iframe

var editor = new wysihtml5.Editor("wysiwyg", {
  toolbar:      "toolbarID"
});

editor.on('load', function() {
  // The wysiwyg editor is in the DOM. It's safe to make the plugin call
  $(editor.composer.iframe).wysihtml5_size_matters();
});