RaythaHQ / raytha

Raytha is a powerful CMS with an easy-to-use interface and fast performance. It offers custom content types, a template engine, and various access controls. It supports multiple storage providers and an automatically generated REST API. Upgrade your development workflow with Raytha.
MIT License
155 stars 30 forks source link

New field type: Editor #67

Closed apexdodge closed 1 year ago

apexdodge commented 1 year ago

Discussed in https://github.com/RaythaHQ/raytha/discussions/16

Originally posted by **apexdodge** December 31, 2022 We currently use the [Trix Editor](https://github.com/basecamp/trix) by Basecamp, which is a very effective editor for writing and blogging. However, it lacks advanced features that may be desired by some users. Some of the limitations of the Trix Editor include: - Lack of ability to modify the dimensions of image uploads - Links cannot be set to open in new tabs - No table support - Limited options for font, font size, background color, etc. - Cannot embed videos To address these limitations, we propose adding an additional field type called "Editor" or "WYSIWYG" to our system. This field type would include the full suite of features that users expect in an editor, such as the ability to modify image dimensions, create tables, and embed videos. System admins would still have the option to use the Long Text field type, but the Editor field type would provide additional functionality for those who need it. As a side note, we were previously unaware that the TinyMCE editor is licensed under the MIT license. This could potentially be an alternative option to consider as well.

We are going with TinyMCE since it is the best WYSIWYG with an MIT license.

Will try to implement in a minor release since I do not believe a database migration is required for this implementation.

apexdodge commented 1 year ago

Implemented in v1.0.2

Limitation on image uploads is that it ignores the FILE_STORAGE_USE_DIRECT_UPLOAD_TO_CLOUD flag in appsettings.json for now. I was unsuccessful in getting it to work w/ uppy for some reason. We'll have to revisit in the future.