From d5d9dbdc5cb1a6ae374293210adac7eac1a98e1c Mon Sep 17 00:00:00 2001 From: Hariharan Srinath Date: Mon, 29 Dec 2014 07:38:30 +0530 Subject: [PATCH] Added write-ups on setting the editor content and refreshing the editor. Added link to font file 1. If you are self-hosting the Editor vs. linking to it, you additionally need the icon font file if you are using the toolbar. Added link 2. To set the content programmatically instead of picking up from text area, we can use editor.codemirror.setValue 3. If there are changes in sizes or hiding/unhiding of editor, we need to call editor.codemirror.refresh to make things look correct --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index b616ac7..154939c 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ You can also use [jsdelivr CDN](http://www.jsdelivr.com/#!editor): ``` +If you are self-hosting the files and want to support the toolbar, you also should download the [icon font file](http://lab.lepture.com/editor/fonts/icomoon.woff) and save it in a sub-folder named `fonts` relative to wherever you have placed the `editor.css` stylesheet Having done this, an editor instance can be created: @@ -33,6 +34,17 @@ editor.render(); The editor will take the position of the first `