Skip to content

Commit

Permalink
Tighten installation instruction wording
Browse files Browse the repository at this point in the history
  • Loading branch information
kousu committed Dec 21, 2015
1 parent edcabe4 commit e45e3a8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 41 deletions.
26 changes: 4 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,13 @@ $ git clone git@github.com:OscarGodson/EpicEditor

### Step 2: Install

Copy `EpicEditor/epiceditor/` onto your webserver at the same depth as the page you intend to use it in.
Copy `EpicEditor/epiceditor/` onto your webserver, for example to `/static/lib/epiceditor`.

```bash
$ ls -l
[user@site public_html/new_stuff/my_blog]$ ls -l
total 8
drwxr-xr-x 4 user www 4096 Dec 20 05:10 epiceditor
-rwxr-xr-x 5 user www 4096 Dec 20 06:23 editor.html
[user@site public_html/new_stuff/my_blog]$ ls -l epiceditor/
total 8
drwxr-xr-x 2 user www 4096 Dec 20 05:10 js
drwxr-xr-x 5 user www 4096 Dec 20 05:10 themes
$ scp -r EpicEditor/epiceditor you@webserver:public_html/static/lib/
```

Alternately you can install it globally, say in `/static/lib/epiceditor`, and
set the `basePath` option to the same to point EpicEditor in the right direction.
You can of course customize this step for your directory layout.

### Step 3: Create your container element

Expand All @@ -57,22 +48,13 @@ Alternately, wrap an existing textarea to load the contents into the EpicEditor

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

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

Or, if you installed globally, do
```html
<script src="/static/lib/epiceditor/js/epiceditor.min.js"></script>
```

### Step 5: Init EpicEditor

```javascript
var editor = new EpicEditor().load();
```

Or, if you installed globally, do
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({basePath: '/static/lib/epiceditor'}).load();
```
Expand Down
24 changes: 5 additions & 19 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,35 +38,21 @@ <h3 id="step-1-download">Step 1: Download</h3>
<pre><code class="lang-bash">$ git clone git@github.com:OscarGodson/EpicEditor
</code></pre>
<h3 id="step-2-install">Step 2: Install</h3>
<p>Copy <code>EpicEditor/epiceditor/</code> onto your webserver at the same depth as the page you intend to use it in.</p>
<pre><code class="lang-bash">$ ls -l
[user@site public_html/new_stuff/my_blog]$ ls -l
total 8
drwxr-xr-x 4 user www 4096 Dec 20 05:10 epiceditor
-rwxr-xr-x 5 user www 4096 Dec 20 06:23 editor.html
[user@site public_html/new_stuff/my_blog]$ ls -l epiceditor/
total 8
drwxr-xr-x 2 user www 4096 Dec 20 05:10 js
drwxr-xr-x 5 user www 4096 Dec 20 05:10 themes
</code></pre>
<p>Alternately you can install it globally, say in <code>/static/lib/epiceditor</code>, and
set the <code>basePath</code> option to the same to point EpicEditor in the right direction.</p>
<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-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;epiceditor/js/epiceditor.min.js&quot;&gt;&lt;/script&gt;
</code></pre>
<p>Or, if you installed globally, do</p>
<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-5-init-epiceditor">Step 5: Init EpicEditor</h3>
<pre><code class="lang-javascript">var editor = new EpicEditor().load();
</code></pre>
<p>Or, if you installed globally, do</p>
<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>
Expand Down

0 comments on commit e45e3a8

Please sign in to comment.