Is TinyMCE editor compatible with rails 2? - ruby-on-rails

Is TinyMCE editor compatible with rails 2? what are better editors apart from fck editor that can be used in rails, is it compatible with rails 2 as well?
EDIT:
Is TinyMCE editor customizable? html tags can be used in the editor space?

Yes, TinyMCE is compatible with all versions of Rails, because it really has nothing to do with it, all frontend (client-side) editors are just "decorators" for textareas, meaning Rails doesn't care what's in them.
I normally avoid using editors like TinyMCE or FCK, because they force me to "reverse" my development workflow - they come with everything and I need to strip 90% of functionality down. So a better approach would be to use something like markdown and educate users on it's use.
And yes, pretty much all editors are heavily customizable - I recommend you read their respective manuals

Related

Running ruby code in markdown editor

How can I run ruby code in markdown editor? I am using eRuby as templating system for my RoR app. My registration form is in contentful cms where I am using markdown approach.Sample image for contentful markdown approach.
You seem to have a misunderstanding what Contentful is. Contentful is a Content Management System, it's not meant to store application code nor templates. A registration form should be kept out of and content storage so editors don't inadvertently introduce bugs, or worse, security issues into it.
I'd recommend using Contentful only for things that a non-technical editor would want to change, everything else should be part of your Ruby on Rails application.

Does liquid work with wysiwyg editors? - rails

I have just found liquid and watched the Railscasts on it. The video was pretty old but from watching it, it i can see liquid is what im looking for. Problem is I'm not sure if it will work with popular wysiwyg editor gems. I don't really want my users to be using plain input fields to make the templates.
I don't know if the wysiwyg editor has to be special to work with liquid or if liquid can basically work with any wysiwyg editor gem.
Are there recommended wysiwyg editor gems that work well with liquid or if that isn't a thing are there just normal editor gems that work with liquid?
Yes. Please read this blog. You can also use newsly gem to manage your liquid template with wysiwyg editor. I used ckeditor in one of my application. It's quite easy to install.
Basically you will need to parse the content and add your own data. The editor will not automatically figure out the variables and their values. The editor will save the content with tags and later you can parse it with Liquid
Here is an example form Liquid
#template = Liquid::Template.parse("hi {{name}}") # Parses and compiles the template
#template.render('name' => 'tobi') # => "hi topi"
https://github.com/Shopify/liquid#how-to-use-liquid
And here is a blog post on how someone is using a wysiwyg with Liquid
https://customer.io/blog/Email-wysiwyg-editor-inspired-by-jekyll.html
Hope that helps

How do I turn a RoR view to Responsive (html5)

I have a normal view in html in Rails, containing images and links. How do I turn it to be responsive? (I want it to fit also mobile browser sizes, make it html5)
I know I should use fluid, but what is the full command? Or is there another/better way directly from the text editor?
Rails has limited control on the HTML that comes on to the browse.
Try looking at frameworks like Bootstrap or Foundation.
There are some gems that can help you
Foundation-rails
twitter-bootstrap-rails
There is also a railscast episode on Bootstrap basics.
This has nothing much to do with Rails. Rails is a server side language and responsive templates are frontend (html/css) dependent.
However if you are specifically using bootstrap as many beginners do, you could try : https://github.com/seyhunak/twitter-bootstrap-rails gem for a quick integration of things.

WYSIWYG recommendations for my Rails app

I'm working on a Rails project and I'm in need of a user-friendly WYSIWYG. I'll say this about the type of people using it: Whatever you think of as user-friendly, perhaps think one step below that (not an insult, just a realization).
Ideally, I'd like something where one could have basic functionality (lists, links, bold, italic) and see in real-time. Kind of like OH MY GOSH IT'S RIGHT HERE IN STACK OVERFLOW AS I CREATE THIS POST.
So, um, yeah: something like this would be excellent (although I'd prefer the windows be side-by-side rather than this editor-on-top situation, but I won't be picky).
I'd suggest to use gem ckeditor it's really perfect solution, i used it recently in my Rails 3.2 project
A pretty cool and fancy one is Sir Trevor JS. There is also a gem
We use TinyMCE quite a bit.
No unbelievable feature set or anything, but it does have a nice jQuery integration plugin (which goes a long way for us).
The live preview functionality seems very doable.
If your project is non commercial you can use this
Froala
I've been using Bootsy. It's simple and easy to use, however I have not been able to get the "image" upload => carrierwave to store on S3 servers. But everything else with it is fantastic.
Use Trix by Basecamp:
Trix is an open-source project from Basecamp, the creators of Ruby on Rails. Millions of people trust their text to Basecamp, and we built Trix to give them the best possible editing experience.
You can use Mercury its a full featured HTML5 editor
gem 'mercury-rails'
rails generate mercury:install
http://jejacks0n.github.io/mercury/
github: https://github.com/jejacks0n/mercury
Old question but check out froala: https://github.com/froala/wysiwyg-rails
and the plugins main homepage https://www.froala.com/wysiwyg-editor

Help with rails and tinyMce

I have been using tinyMce_hammer plugin to use tinymce in my rails app... but right now I also want a way for my users to upload photos and insert them into their wysiwyg editor.... is there a simple way to get this done??.. is there any other wysiwyg editor that works with rails and comes with this feature built in??... what do you reccomend?
These two plugins claim to offer it - Rails 2.3 - https://github.com/andreferraro/rails_tiny_mce
Rails 3 - https://github.com/sandipransing/rails_tiny_mce
I don't think there's an easy way to do this in any of the common rich text editors. I usually have a separate section where users can upload photos and then choose from a variety of layout options.
TinyMCE has a couple of commercial image and file management plugins, but they are based on PHP and .Net. However, I haven't seen a Rails version. It's not particularly hard to build your own image manager using a plugin like paperclip and hook into TinyMCE.

Resources