Skip to content

Commit

Permalink
Merge pull request #384 from kousu/develop
Browse files Browse the repository at this point in the history
Add explicit installation instructions.
  • Loading branch information
kousu committed Dec 21, 2015
2 parents c3ff91d + e45e3a8 commit 2b69a2f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 10 deletions.
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,17 @@ EpicEditor is easy to implement. Add the script and assets to your page, provide
$ git clone git@github.com:OscarGodson/EpicEditor
```

### Step 2: Create your container element
### Step 2: Install

Copy `EpicEditor/epiceditor/` onto your webserver, for example to `/static/lib/epiceditor`.

```bash
$ scp -r EpicEditor/epiceditor you@webserver:public_html/static/lib/
```

You can of course customize this step for your directory layout.

### Step 3: Create your container element

```html
<div id="epiceditor"></div>
Expand All @@ -36,16 +46,17 @@ Alternately, wrap an existing textarea to load the contents into the EpicEditor
<div id="epiceditor"><textarea id="my-edit-area"></textarea></div>
```

### Step 3: Add the `epiceditor.js` file
### Step 4: Add the `epiceditor.js` file

```html
<script src="epiceditor.min.js"></script>
<script src="/static/lib/epiceditor/js/epiceditor.min.js"></script>
```

### Step 4: Init EpicEditor
### Step 5: Init EpicEditor

EpicEditor needs to know where to find its themes, so it needs to be told its install directory at init.
```javascript
var editor = new EpicEditor().load();
var editor = new EpicEditor({basePath: '/static/lib/epiceditor'}).load();
```

## API
Expand Down
16 changes: 11 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,23 @@ <h3 id="step-1-download">Step 1: Download</h3>
<p><a href="http://epiceditor.com">Download the latest release</a> or clone the repo:</p>
<pre><code class="lang-bash">$ git clone git@github.com:OscarGodson/EpicEditor
</code></pre>
<h3 id="step-2-create-your-container-element">Step 2: Create your container element</h3>
<h3 id="step-2-install">Step 2: Install</h3>
<p>Copy <code>EpicEditor/epiceditor/</code> onto your webserver, for example to <code>/static/lib/epiceditor</code>.</p>
<pre><code class="lang-bash">$ scp -r EpicEditor/epiceditor you@webserver:public_html/static/lib/
</code></pre>
<p>You can of course customize this step for your directory layout.</p>
<h3 id="step-3-create-your-container-element">Step 3: Create your container element</h3>
<pre><code class="lang-html">&lt;div id=&quot;epiceditor&quot;&gt;&lt;/div&gt;
</code></pre>
<p>Alternately, wrap an existing textarea to load the contents into the EpicEditor instance.</p>
<pre><code class="lang-html">&lt;div id=&quot;epiceditor&quot;&gt;&lt;textarea id=&quot;my-edit-area&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
</code></pre>
<h3 id="step-3-add-the-epiceditor-js-file">Step 3: Add the <code>epiceditor.js</code> file</h3>
<pre><code class="lang-html">&lt;script src=&quot;epiceditor.min.js&quot;&gt;&lt;/script&gt;
<h3 id="step-4-add-the-epiceditor-js-file">Step 4: Add the <code>epiceditor.js</code> file</h3>
<pre><code class="lang-html">&lt;script src=&quot;/static/lib/epiceditor/js/epiceditor.min.js&quot;&gt;&lt;/script&gt;
</code></pre>
<h3 id="step-4-init-epiceditor">Step 4: Init EpicEditor</h3>
<pre><code class="lang-javascript">var editor = new EpicEditor().load();
<h3 id="step-5-init-epiceditor">Step 5: Init EpicEditor</h3>
<p>EpicEditor needs to know where to find its themes, so it needs to be told its install directory at init.</p>
<pre><code class="lang-javascript">var editor = new EpicEditor({basePath: &#39;/static/lib/epiceditor&#39;}).load();
</code></pre>
<h2 id="api">API</h2>
<h3 id="epiceditor-_options_-">EpicEditor([<em>options</em>])</h3>
Expand Down

0 comments on commit 2b69a2f

Please sign in to comment.