An example Custom HTML plugin for JCE
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
plugins/jce/editor-custom
README.md
editor-custom.xml

README.md

JCE Custom HTML

A simple example plugin for inserting a custom HTML string into JCE

Download

Click here to download, or the Download Zip button on the right.

Installation

Install using the Joomla Extensions Installer - https://docs.joomla.org/Installing_an_extension

After installation, assign the plugin to an Editor Profile in Editor Profiles -> Features & Layout.

Customization

This plugin is intended as a jumping off point for creating your own simple JCE plugin. This example inserts a simple HTML string which is declared on line 8 of the plugin's editor_plugin.js file:

https://github.com/widgetfactory/jce-custom/blob/master/plugins/jce/editor-custom/editor_plugin.js#L8

var html = '<span class="custom">Some HTML</span>';                  

ed.execCommand('mceInsertContent', false, html);

This string can be edited to insert your own HTML, or the plugin expanded through the addition of custom functions.