WARNING!
This is just a sandbox at the moment. Security checks are not in place and things are probably not done the proper way. Use at your own risk!
Drupal 7 version can be found here... it is more up-to-date than this one at this time. The JavaScripts and plugins on the Drupal 7 version are a bit more complete.
To Install & Configure:
- Place module in modules folder.
- Download grapesjs (https://github.com/artf/grapesjs/tree/master) and place it in the libs/ and name the folder grapesjs.
- Install module from the extend menu.
- Go to Config -> Text Formats and Editors
- Add or Configure One
- Select "GrapeJS" from the Text editor dropdown.
To use:
- Go to an entity with text field and select the format you set GrapesJS to as the Text Editor.
- Click the "Open Editor" Button and enjoy!
Quirks/Bugs
- If you are editing an element and exit before clicking off of the element, the update:component event doesn't fire and the new changes are not sent to the text area to be saved.
- File uploads are very hackie (but functioning) and are not done the proper way I am sure.
- Theme and other settings are hard coded at the moment.
- Newly added display of the page is causing errors with drag and dropping, and editing tags are being ignored.
- And many more to come... lol
Roadmap
- Currently working on showing the entire page... and preventing it from being editable
- Finish drupal blocks and have the values set as a setting instead of ajaxed in.
- Keep breaking apart the default plugin into smaller more manageable plugins.
- Add in call to switch to an image style using traits.
- Figure out what is the best way to load assets for Admins since they have access to all files.
- Add security to current features.
- Create new blocks to import views, blocks, and other entities and make sure they are secure.
- Find a way to display an actual rendered page inside the editor with the header, footer, and other regions and make them non-editable. Then remove on header elements on store. (May only be available to saved entities.)
- Add the ability to select a blank page template or use default one.
- Clean up other found plugins to match the same programming patterns.
- Move the grapesjs library to the proper location. Possibly the /vendors directory.