Page Editor Using contenteditble Attribute - jQuery Content Editor

File Size: 73.6 KB
Views Total: 1289
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Page Editor Using contenteditble Attribute - jQuery Content Editor

The jQuery Content Editor plugin makes any elements within a container element editable using the contenteditable attribute.

Ideal for the dynamic web page that makes it easier to edit any elements on the client side.

How to use it:

1. Install & download the content editor plugin.

$ npm install @ryan.holton/content-editor --save

2. Import the JavaScript file content-editor-min.js into the web page.

<script src="" 
<script src="dist/js/content-editor.js"></script>

3. Call the function on the target container to make all the child elements editable.

<div id="editable-area">
  <h2>Edit this title</h2>
  <h3>Edit this subtitle</h3>
    Quisque id tellus non est porttitor viverra. Phasellus porttitor ut ligula quis mollis. Morbi eros risus, vulputate eu congue quis, interdum nec nisi. Donec ex purus, ullamcorper placerat tellus non, volutpat luctus sem. Curabitur facilisis enim vitae magna porta, non ullamcorper metus viverra. Donec et vulputate est. Donec nulla ligula, vehicula vitae dolor a, fermentum blandit nisl. Nam pulvinar neque quis mollis pulvinar.
$(function() {

4. Remove the border when focused. Default: false.

  removeFocus: true

5. Specify a set of element to exclude.

  excludeItems: 'button, a'

6. Allows content editingwhen the URL query is enabled. Default: false.

  enableUrlQuery: true

7. Specify the query to enter into the URL for editing content.

  urlQuery: 'contentEditable'

This awesome jQuery plugin is developed by sts-ryan-holton. For more Advanced Usages, please check the demo page or visit the official website.