Skip to content

Latest commit

 

History

History
64 lines (50 loc) · 1.37 KB

README.md

File metadata and controls

64 lines (50 loc) · 1.37 KB

ediblecontent

Very simple rich text editor for contenteditable enabled html elements.

Usage

Download zip file or all files in /dist

HTML

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <meta http-equiv="x-ua-compatible" content="ie=edge, chrome=1" />
  <title>Edible Content</title>
  <link rel="stylesheet" href="path-to/edible.css" />
</head>
<body>
<div class="rich-container" data-edible>
  <div class="rich-controls">
    <button data-tag="bold"><b>Bold</b></button>
    <button data-tag="italic"><em>Italic</em></button>
    <button data-tag="underline"><ins>Underline</ins></button>
    <button data-tag="strikeThrough"><del>Strike</del></button>
    <button data-tag="insertUnorderedList">&bull; Unordered List</button>
    <button data-tag="insertOrderedList">1. Ordered List</button>
    <button data-tag="createLink">Link</button>
    <button data-tag="removeFormat">Remove format</button>
  </div>
  <div class="rich-editor" contenteditable="true"></div>
</div>
<script src="path-to/edible.js"></script>
</body>
</html>

Up and Running

Use Vagrant https://www.vagrantup.com/

cd /path/to/ediblecontent
vagrant up

Visit localhost:8181 in your browser.

or

Serve up the dist directory however you'd like.

Build

git clone
cd /path/to/ediblecontent
npm install
gulp

Make changes to files in src.