https://github.com/Edd-G/cot-editorjs
  
  
    Editor.js plugin for Cotonti CMF - Modern block-style editor 
    https://github.com/Edd-G/cot-editorjs
  
cotonti cotonti-siena editor editorjs
        Last synced: 6 months ago 
        JSON representation
    
Editor.js plugin for Cotonti CMF - Modern block-style editor
- Host: GitHub
 - URL: https://github.com/Edd-G/cot-editorjs
 - Owner: Edd-G
 - Created: 2024-01-06T07:56:43.000Z (almost 2 years ago)
 - Default Branch: master
 - Last Pushed: 2024-03-25T09:23:08.000Z (over 1 year ago)
 - Last Synced: 2024-03-25T13:51:04.993Z (over 1 year ago)
 - Topics: cotonti, cotonti-siena, editor, editorjs
 - Language: PHP
 - Homepage:
 - Size: 33.2 KB
 - Stars: 2
 - Watchers: 2
 - Forks: 1
 - Open Issues: 0
 - 
            Metadata Files:
            
- Readme: README.md
 
 
Awesome Lists containing this project
- awesome-editorjs - Cotonti CMF Editor.js plugin - Content editor plugin for [Cotonti CMF](https://www.cotonti.com) (Libraries / Plugins for CMS)
 
README
          # Editorjs plugin
Editor.js plugin for Cotonti CMF - Modern block-style editor
Content editor and 2 way parser plugin:
- from Editor.js blocks to HTML
- from HTML to Editor.js blocks
Plugin markups created HTML content with special classes.
This classes described in table.
## Currently supported Editor.js Tools:
Package | Key | Main CSS Class
(with default prefix) | Additional / modificator CSS classes
(with default prefix)
--- | --- | --- | ---
`@editorjs/header`
`editorjs-header-with-alignment` | `header` | `.prs-header` | alignment:
`.prs_left`
`.prs_right`
`.prs_center`
`.prs_justify`
`@editorjs/paragraph`
`editorjs-paragraph-with-alignment` | `paragraph` | `.prs-paragraph` | alignment:
`.prs_left`
`.prs_right`
`.prs_center`
`.prs_justify`
`@editorjs/inline-code` |  |  |
`@editorjs/marker` |  |  |
`@editorjs/underline` |  |  |
`@editorjs/list` | `list` | `.prs-list` | additional:
`.prs_ordered`
`@editorjs/raw` | `raw` |  |
`@editorjs/simple-image` | `simpleImage` | `.prs-image` | additional:
`.prs_withborder`
`.prs_withbackground`
`.prs_stretched`
`@editorjs/embed` | `embed` | `.prs-embed` | additional:
`.prs_youtube`
`.prs_codepen`
`.prs_vimeo`
`@editorjs/link` | `linkTool` | `.prs-linktool` | additional:
`.prs_title`
`.prs_description`
`.prs_sitename`
`@editorjs/delimiter` | `delimiter` | `.prs-delimiter` |
`editorjs-alert` | `alert` | `.prs-alert` | alignment:
`.prs_left`
`.prs_right`
`.prs_center`
additional:
`.prs_primary`
`.prs_secondary`
`.prs_info`
`.prs_success`
`.prs_warning`
`.prs_danger`
`.prs_light`
`.prs_dark`
`@editorjs/warning` | `warning` | `.prs-warning` |
`@editorjs/table` | `table` | `.prs-table` | additional:
`.prs_withheadings`
`@editorjs/quote` | `quote` | `.prs-quote` | alignment:
`.prs_left`
`.prs_center`
`@editorjs/code` | `code` | `.prs-code`
## Installation
1. Unpack to plugins directory
2. Enable plugin from admin panel
3. Run `composer install` inside `src` directory plugin (Composer must be installed)
4. Set Editorjs markup parser in configurations Pages module
## Configuration
1. You can turn off unnecessary tools in `editorjs.editor.php`
2. Set sanitize data from client with HTML Purifier rules in `sanitize-blocks-config.json`
3. Set custom prefix (default is `prs`) for generated classes in plugin configuration
For more information on cleaning rules, see: https://github.com/editor-js/editorjs-php
## Generated HTML
### Header
```html
Lorem
```
### Paragraph
```html
    Pellentesque 
    malesuada fames 
    tempus
```
### Ordered List
```html
    - 
 
```
### Unordered List
```html
```
### Table
```html
    
        
            12
        
    
    
        
            ab
        
    
```
### Code
```html
```
### Embed 
###### *(Actually working with Youtube)*
```html
    
    Shrek (2001) Trailer
```
### Delimiter
```html
```
### LinkTool
```html
```
### Image
```html
    
    
```
### Quote
```html
```
### Warning
```html
Title
Message
```
### Alert
```html
    Alert!
```
### Raw
```html
Raw HTML ...
```
For more information about parser, see: [https://github.com/editor-js/editorjs-php](https://github.com/Edd-G/editorjs-simple-html-parser)