https://github.com/samuell1/contenteditor-plugin
Edit your content in page - plugin for OctoberCMS
https://github.com/samuell1/contenteditor-plugin
content contenttools editor javascript laravel octobercms octobercms-plugin php
Last synced: about 1 year ago
JSON representation
Edit your content in page - plugin for OctoberCMS
- Host: GitHub
- URL: https://github.com/samuell1/contenteditor-plugin
- Owner: Samuell1
- License: mit
- Created: 2016-04-10T13:10:48.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2024-12-29T09:06:22.000Z (over 1 year ago)
- Last Synced: 2025-03-29T06:06:27.103Z (about 1 year ago)
- Topics: content, contenttools, editor, javascript, laravel, octobercms, octobercms-plugin, php
- Language: PHP
- Homepage: http://octobercms.com/plugin/samuell-contenteditor
- Size: 243 KB
- Stars: 40
- Watchers: 2
- Forks: 18
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#
Content Editor for OctoberCMS
Edit content from front-end.
http://octobercms.com/plugin/samuell-contenteditor

### How to use it? It`s simple.
* Drop the Content Editor component to a CMS page.
* Check if you have `{% framework %}` and `{% scripts %}` inside layout for working ajax requests and `{% styles %}` for additional css
* Use this code in your page code and link the editor to a content file or set name to autocreate new file
*Simple example:*
```twig
{% component 'contenteditor' file="filename_in_content.htm" %}
```
##### Properties
* file - Content block filename to edit, optional. If doesnt exists it will autocreate
* fixture - Fixed name for content block, useful for inline texts (headers, spans...)
* tools - List of enabled tools, comma separated (for all default tools use `*` or leave empty to get all tools defined in settings of Content Editor)
* class - Class for element, mostly useful for fixtures
*Example:*
```twig
{% component 'contenteditor' file="filename_in_content.htm" fixture="h3" tools="bold,italic" class="my-class" %}
```
##### Tools list
* `bold` => Bold (b)
* `italic` => Italic (i)
* `link` => Link (a)
* `small` => Small (small)
* `align-left` => Align left
* `align-center` => Align center
* `align-right` => Align right
* `heading` => Heading (h1)
* `subheading` => Subheading (h2)
* `subheading3` => Subheading3 (h3)
* `subheading4` => Subheading4 (h4)
* `subheading5` => Subheading5 (h5)
* `paragraph` => Paragraph (p)
* `unordered-list` => Unordered list (ul)
* `ordered-list` => Ordered list (ol)
* `table` => Table
* `indent` => Indent
* `unindent` => Unindent
* `line-break` => Line-break (br)
* `image` => Image upload
* `video` => Video
* `preformatted` => Preformatted (pre)
*Inspired by [Editable plugin](http://octobercms.com/plugin/rainlab-editable) and using Content tools editor http://getcontenttools.com.*