Froala WYSIWYG Editor on Rails 6

Hello I a trying to add` ```froala WYSIWYG editor ``to my rails 6 project. but i am unable to add this. can any one please tell me how can i add froala WYSIWYG editor to my project?

Thank you

Hard to pass this thread without mentioning Action Text; It is the Rails way of WYSIWYG editor and shipped with Rails 6.

If you know about it already, NVM. As for the question itself, I never heard about Froala until today.

What have ou tried? There’s a gem but I think it’s only intended to be used with Sprockets and not Webpacker, I would start with the readme https://github.com/froala/wysiwyg-editor using the npm package and importing froala as a module https://github.com/froala/wysiwyg-editor#load-froala-editor-as-a-transpiled-es6umd-module

rails 6 includes Trix wysiwyg editor, its easy to setup

The biggest problem with Trix in my eyes is that you can not in an easy way choose what to have for the different text areas. As an example i want users to be able to use the editor, but i dont want them to attache images or files to the actiontext. Also i have a problem with not beeing able to select target blank on links…

Does Trix include support for tables yet? Also does it include the ability to add an alt text to images? We stopped using Trix and Action Text because of those issues.

Please don’t just recommend Trix as a kneejerk reaction without knowing the original poster’s needs. Trix is a very fast and beautiful editor that integrates well with Rails - it’s also very limited in scope, and produces weird markup that’s plainly unsuitable for text-heavy sites with high demands for semantic HTML (notably div instead of p tags as default, and an opinionated use of the figure tag that doesn’t fit with every use case). If my application was different, I might have wanted to use Trix, but it’s pretty obvious that it was developed for a project management application with limited needs for semantic textual content, and not, say, a newspaper or a blogging platform - the div tags alone is a dealbreaker for me.

As for the original poster’s question, can you say something about where in process you’re stuck? I’m unfamiliar with Froala, but it looks very slick and interesting.