This PR sets up the page object for organizers to create and update. Fields for both unpublished_body and published_body are included though only currently the former is being used. The ability to view the page content and the ability to preview and publish will come in future PRs.
WYSIWYG editing for the page content is currently being done with TinyMCE which can be a bit tricky to figure out the best way to install and configure. Trix was considered as an alternative but during the spike some challenges were bumped into the opinionated way that it sanitized and marked up the html. Additionally, TinyMCE has a plugin for editing the html code which may prove valuable to developers skilled with html and css. Unfortunately the html is not syntax highlighted in the code editor but in the spike a way was found to use CodeMirror for that if desired.
StimulusJS is added to provide a more organized way to structure and include javascript driven functionality. This library has become a standard way to work with the front end for Rails developers and seems like a good fit for our purposes going forward.
Changes
adds basic CRUD for event organizers to manage website pages
adds PagePolicy for authorization
adds tinymce editor using tinymce rails gem
installs stimulusjs using webpacker
adds editor_controller for initializing the tinymce editor
Organizer Adds Website Page
Reason for Change
This PR sets up the page object for organizers to create and update. Fields for both
unpublished_body
andpublished_body
are included though only currently the former is being used. The ability to view the page content and the ability to preview and publish will come in future PRs.WYSIWYG editing for the page content is currently being done with TinyMCE which can be a bit tricky to figure out the best way to install and configure. Trix was considered as an alternative but during the spike some challenges were bumped into the opinionated way that it sanitized and marked up the html. Additionally, TinyMCE has a plugin for editing the html code which may prove valuable to developers skilled with html and css. Unfortunately the html is not syntax highlighted in the code editor but in the spike a way was found to use CodeMirror for that if desired.
StimulusJS is added to provide a more organized way to structure and include javascript driven functionality. This library has become a standard way to work with the front end for Rails developers and seems like a good fit for our purposes going forward.
Changes
Mirror Card Heroku PR Review App