I am building a Rails 3 app with blogging, commenting, and other functionality that require the users to input text.
My question is whether it is a better idea to use a Javascript rich text editor or not. What would be the pros and cons. If it is a recommended approach:
thanks in advance,
Steve
Right-click the rich text box for which you want to enable or disable full rich-text formatting, and then click Rich Text Box Properties on the shortcut menu. Click the Display tab. To enable full rich-text formatting for the selected rich text box, select the Full rich text (images, tables, etc.)
There is no charge. Put Rich Text Editor to the test in your own specific applications.
The Rich Text Editor is a tool that allows you to add or edit content, images, links, and other components on the page without having to know any code. It displays the content and any formatting as it would display in the browser.
1 What is Action Text? Action Text brings rich text content and editing to Rails. It includes the Trix editor that handles everything from formatting to links to quotes to lists to embedded images and galleries.
Most rich text editors for the web use JavaScript. These are some popular ones you could consider
Of course, you could also consider heavy-weight alternatives like TinyMCE or CKEditor, if your needs are such.
Ruby on Rails Solutions
If you need to able add images to your textarea through a Ruby on Rails library, such as Paperclip or Carrierwave, you may consider one of these
The Problem with using a usual JavaScript Editor
Most javascript editors will prompt for a URL when you try to add an image to your textarea, so if you need to do so, you may have to upload the image elsewhere and provide the editor with the URL.
There is however one JavaScript editor I found, http://nicedit.com/, that does an AJAX upload to http://imageshack.us when you add an image. Of course, the images that are served will become totally dependent on imageshack which may or may not work for you. It really depends on your scenario.
I use CKEditor
I would advise you to install the rails_admin gem and follow the instructions in the README to set-up CKEditor
It's really easy to use, looks good and is regularly maintained
If you prefer not to use rails_admin gem, then you can use one of the many rails ckeditor gems
good luck
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With