Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rich Editor Improvements #2005

Closed
18 tasks done
daftspunk opened this issue May 12, 2016 · 8 comments
Closed
18 tasks done

Rich Editor Improvements #2005

daftspunk opened this issue May 12, 2016 · 8 comments

Comments

@daftspunk
Copy link
Member

daftspunk commented May 12, 2016

🏆 We did it! This enhancement has been fully funded!

Thank-you to all the backers who helped make this happen. This feature has been implemented and is available in Build 340+

Funds raised: Bountysource / $799

This is a proposal to improve the Rich Editor form widget (richeditor). There are some limitations with the Redactor plugin used. Primarily the product is no longer supported, since the latest Redactor II version requires a new OEM license.

Known issues

Wish list

  • Ability to define "Custom CSS classes" to style elements in the Rich Editor
  • Maintain the integrity of markup, as opposed to stripping out tags and attributes
  • Toolbar buttons can be customized using the form field definition
  • Code mode should use the native code editor
  • The markup output should be suitable for humans (beautified)
  • "Quick Upload" feature where uploads are dumped in a special folder in the media manager

Proposed technology

Updating to Redactor II has a cost of $1495 USD for an OEM license. There is an alternative product called Froala Editor that has an equivalent cost of $799 USD. The Froala editor is cheaper and appears to be more polished overall, in terms of features and the editing precision.

Discovery notes

  • Most of the items on the wish list are supported by Froala out of the box.
  • Plugin development is required for using Ace Editor code mode.
  • Plugin development is required for the Predefined Page Links feature.
  • The Froala editor appears to suffer from memory leaks due to detached nodes in the DOM tree.

Action items

  • Perform discovery R&D
  • Resolve detached node / memory issues
  • Raise funds for OEM license
  • Convert from Redactor to Froala
  • Restyle the toolbar appearance
  • Refit the Snippets implementation
  • Refit the Media Manager implementation
  • Refit the Predefined Page Links implementation
  • Refit the Multi-Lingual Rich Editor widget
  • Implement items on the wish list
  • Confirm known issues are fixed
  • Native Rich Editor messages should remain multi-lingual
@daftspunk
Copy link
Member Author

Proposed UI

Developers can supply a custom CSS stylesheet to appear in the Rich Editor

oc-editor-ui-tab1

The styles can then be made available to various element types

oc-editor-ui-tab2

More granular control over the editor "clean up" behavior

oc-editor-ui-tab3

@pedzed
Copy link

pedzed commented May 16, 2016

Shouldn't the tags be a multi-selectbox? And of course more tags should be addable to the list.

daftspunk added a commit that referenced this issue May 19, 2016
daftspunk added a commit that referenced this issue May 21, 2016
daftspunk added a commit that referenced this issue May 21, 2016
daftspunk added a commit that referenced this issue May 21, 2016
Refs #2005
Remove the active state on media manager table data for consistency with other view modes
daftspunk added a commit that referenced this issue May 23, 2016
Define allowed tags, allowed empty, do not wrap, remove tags
Refs #2005
@daftspunk
Copy link
Member Author

Update: These changes have been merged in to the develop branch and are available for testing in Build 336+.

@daftspunk
Copy link
Member Author

daftspunk commented May 24, 2016

This implementation is now complete. To obtain the very latest changes, enable the config setting cms.edgeUpdates and perform an update. All the features are available in Build 337 and beyond.

We now need to enable the license by accepting the claim, if you have submitted a bounty for this issue, please confirm it is complete to release the funds.

Thanks to everyone who contributed to making this improvement possible.

<3

@gabsource
Copy link
Contributor

@daftspunk with the previous editor we could somehow extend the JS code inside a plugin to add buttons to the rich editor toolbar. Do you have any hint on adding custom button (froala plugins) without modifying OctoberCMS editor code ?

@daftspunk
Copy link
Member Author

Take a look at the froala documentation on how to define a new button. At this point the button would have to be added using the form field definition (toolbarButtons) although we should probably allow the default set to be modified also, please log as a separate issue and it will be flagged as high priority.

@jonpxpx
Copy link

jonpxpx commented Jun 4, 2016

Still seems we are unable to save while in code view, changes are not saved.

@daftspunk
Copy link
Member Author

Please create a new issue for any further issues. Thanks!

@octobercms octobercms locked and limited conversation to collaborators Jun 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

4 participants