What Is the Best Wysiwyg for Rails - Ruby on Rails Blog

What is the best WYSIWYG for Rails - Ruby on Rails Blog

I strongly suggest you give WYSIHAT a try. The biggest problem with the editors mentioned above is its bulky size and "hard-to-customize"(ability). The bad code in most of these editors is a big turn-off. WYSIHAT is more like a framework for a WYSIWYG editor. Extremely easy to customize. Easy to configure. And what more.. Its backed by 37signals. What i would appreiciate about TinyMCE is its paste from word feature which preserves the layout. But if not for that one feature i find the rest really bulky.

Please do read this article: http://37signals.com/svn/posts/1330-introducing-wysihat-an-eventually-better-open-source-wysiwyg-editor

Tutorial on using WYSIHAT:
Part 1: http://jrmehle.com/2009/01/25/wysiwhat-wysihat-part-1/

Part 2: http://jrmehle.com/2009/02/13/wysiwhat-wysihat-part-2/

And to make your life even easier theres an awesome rails-engine developed by Jeff Kreeftmeijer (80beans.com) for the 37signals WYSIHAT editor:
http://github.com/80beans/wysihat-engine

And heres an article by Jeff Kreeftmeijer:
http://www.80beans.com/2009/10/01/wysihat-engine/

WYSIWYG editor gem for Rails?

Though it's certainly not a direct answer, in the past I've found I prefer to use RedCloth (or a Markdown parser if you don't enjoy Textile) and use a simple textarea with an AJAXy preview. Generally speaking, WYSIWYG editors have a long history of creating redundant tags and similar, leading to potentially broken pieces of HTML.

WYSIWYG recommendations for my Rails app

I'd suggest to use gem ckeditor it's really perfect solution, i used it recently in my Rails 3.2 project

Any gem for designing a blog post in Rails with syntax highlighting and inline image attachment?

Obtvse, an open source blog engine inspired by Svbtle does pretty much exactly what you are looking for.

It uses Coderay for syntax highlighting which is a pure ruby library and does not depend on javascript, and Markdown (through Kramdown) for editing posts rather than a WYSIWYG solution like CKEDITOR which IMHO is a more sane choice - especially for technically inclined.

Backend based syntax highlighting plays well with RSS readers as opposed to javascript based solutions.

You can either use the application and customize as per your requirements, or take a look at the implementation and use that to build your own solution.

Alternatively if you are specifically inclined towards using CKEditor you might want to take a look at this plugin which integrates CKEditor with CodeMirror, which is among the most popular solutions for code editing and highlighting in javascript. For displaying the snippets you can also use CodeMirror in a readonly mode as described in this manual. This will ensure that you get the exact same syntax highlighting while editing as well in post view page.

Rails blog - is it a reasonable solution to store posts in partials?

and I'd like to work within my text editor

Nothing could be easier. Have your posts table have column content which will store html. Prepare the html in your local text editor. Copy-paste to a regular textarea in the post creation form. No WYSIWYG, nothing. Raw HTML. Then render content from the database.

WYSIWYG image uploads in Rails App

This is all dependent on the WYSIWYG's file upload API. From there, just build an ImagesController to handle requests from that API, use whatever system (Paperclip is good) to handle those files internally, and you should be good to go. You won't find a plug-and-play solution; you'll have to hand-roll it.

Turns out that, with more targeted Google searching, you can find a preexisting solution. Here's one for TinyMCE and Rails. You may, however, end up finding that it doesn't meet your needs, in which case I would not be surprised to find that creating your own solution would be simpler than you expect :)

Ruby on Rails - Editor only for code

There is some editors such as ace.c9 or codemirror that you can use, but for my use they were too heavy since I was only going to use it for preview.

What I did was to build my own by use of HTML & CSS.

I used <pre> for inserting codes and added some of my own settings such as <var></var>, <param></param>, <val></val> and added my own css:

pre var{color:green;}
pre param{color:blue;}
pre val{color:yellow;}

<pre>
var <var>width</var>: <val>300</val>;
<param>params</param>{
Some code
}
</pre>

Using excisting editors will make it easier and has more options, but if you are looking for using a simple settings, you can do what I did.



Related Topics



Leave a reply



Submit