Forum: Ruby on Rails WYSIWYG Editors and Rails

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3cb5aadfd1626e37759e987c7184e372?d=identicon&s=25 Brendon Muir (spike)
on 2006-05-29 03:08
Hi everyone,

I'm currently investigating re-writing our School CMS application in
Rails and the only drawback I can see is there isn't an ample supply (if
any) of WYSIWYG In-browser editors written with a raw Ruby backend. We
currently use KTML4 which is written with PHP as a base. I'm interested
to hear from anyone who's integrated a PHP based editor into a rails
application and how you interfaced between the two. KTML4 does have
manual integration instructions for how to insert it into the many OS
CMS system's out there so there is some doco available.

Also, if there is something better out there written in Ruby I'd love to
hear about it :)

Cheers,

Brendon Muir
30ee518e6fdc5b07e060775b5a542bdb?d=identicon&s=25 Jón Borgþórsson (jongretar)
on 2006-05-29 03:42
(Received via mailing list)
I would rather recommend a markup language like BlueCloth.
WYSIWYG editors are simply not good enough and leave way too much room
for mistakes. And a messy code that has a great danger of destroying
the look and feel of the page in the wrong hands.
I like Typos solution of using BlueCloth and then a live preview that
is automatically refreshed.

On 5/29/06, Brendon Muir <brendon@spikeinsights.co.nz> wrote:
>
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
D5145c421cd25af6fa577c15219add90?d=identicon&s=25 unknown (Guest)
on 2006-05-29 03:49
(Received via mailing list)
You could just try a plain old JavaScript editor. That sort of thing
doesn't actually require any server-side stuff if you think about it.
Just so long as it's made to support all browsers. TinyMCE should do
the job:
http://tinymce.moxiecode.com/example_full.php?example=true
-N
D5145c421cd25af6fa577c15219add90?d=identicon&s=25 unknown (Guest)
on 2006-05-29 03:52
(Received via mailing list)
Oh, of course, you will need your own validation using regular
expressions to make sure that no-ones sent tags their not allowed to.
Just basically one to match all b, i, u and whatever other tags you
want to give the option of, and strip out anything else which looks
like a tag.
-N
Fd4f7add4445007baedc5d84f9e67ca2?d=identicon&s=25 Ross Riley (Guest)
on 2006-05-29 12:49
(Received via mailing list)
The best one from a point of maintaining markup quality is the dojo
editor, since you can nail down exactly what the user can or cannot
do. There were a few issues involved in integrating with rails but I
believe that this has been sorted now, at least in the latest
revisions.

Check on the dojo list for more details, there's definitely been a few
people there with some experiece of integration.

Ross
E3c79c779c0b390049289cdfe7cb9705?d=identicon&s=25 Bob Hutchison (Guest)
on 2006-05-29 15:45
(Received via mailing list)
On May 28, 2006, at 9:08 PM, Brendon Muir wrote:

> manual integration instructions for how to insert it into the many OS
> CMS system's out there so there is some doco available.
>
> Also, if there is something better out there written in Ruby I'd
> love to
> hear about it :)

TinyMCE and the FCK editor work fine with a ruby back end (both work
okay out of the box). If you want to add more sophisticated stuff
down the road, and if I were you I'd be assuming that will be the
case no matter what you think now :-) then you'll have to implement
some back-end stuff in ruby. This isn't hard for either editor so
don't worry about it.

I've used both and *I* prefer TinyMCE but I know perfectly reasonable
people who prefer FCK.

The Dojo editor looks very promising, but the last time I looked it
wasn't competitive with either tinyMCE or FCK. It is worth watching.

There is also, apparently, an editor that is part of the OpenLaszlo
system but I have not used it.

Cheers,
Bob

> http://lists.rubyonrails.org/mailman/listinfo/rails
----
Bob Hutchison                  -- blogs at <http://www.recursive.ca/
hutch/>
Recursive Design Inc.          -- <http://www.recursive.ca/>
Raconteur                      -- <http://www.raconteur.info/>
xampl for Ruby                 -- <http://rubyforge.org/projects/xampl/>
6805b35d0a8ea3ede0a7da2d4cf5ae77?d=identicon&s=25 Jonathan Weiss (Guest)
on 2006-06-01 14:38
(Received via mailing list)
> Check on the dojo list for more details, there's definitely been a few
> people there with some experiece of integration.

+1 on the Dojo Editor

See

http://blog.innerewut.de/articles/2006/05/22/dojo-...


Jonathan
B28d0b9ff630f071d8867aa164f27a80?d=identicon&s=25 Hamza Khan-cheema (hamza)
on 2006-06-01 16:34
I have just got FCKEditor to work under Rails.  So far I am quite
impressed.  I needed an editor which allowed me to upload images using
the same interface. FCK does this quite nicely.

Luckily Michael Moen had already made some code that enabled the FCK
file upload interface to work with Rails.  Here is the link :

http://www.underpantsgnome.com/projects/fckeditor-on-rails/

I hope this helps

Kind Regards
Hamza
3cb5aadfd1626e37759e987c7184e372?d=identicon&s=25 Brendon Muir (spike)
on 2006-06-06 02:22
Thanks everyone for your suggestions :) I forgot enable email
notification and forgot about the post :) I will look into the features
of these editors. I like KTML4's file browser and the ability to upload
as many files as you want at one time using a regular file browsing
window (ctrl + click type selection). Plus it has a built in image
editor!

With regards to using BlueCloth (which I haven't actually looked at yet
- but will), I'm basically selling this software to schools and the
users usually have absolutely no idea about what they're actually doing
in the background (When making a page). And that's the way it's supposed
to be, or they wouldn't have a reason to buy it! :)

Another editor that I have been particularly impressed with (but we
dropped them because they didn't keep up with the bleeding edge of
features) was InnovaStudio. Their editor has the most polished interface
that I've ever seen and acted the most like the evil office applications
that we love to hate (end users love this). So I just thought I'd put
that out there :)

Cheers,

Brendon
3036c74b9c278dc525af5692080a6d80?d=identicon&s=25 Jeff Ward (Guest)
on 2006-06-06 04:51
(Received via mailing list)
I've used innovastudio editor for the last couple of years. It is in
active
development so they release versions fairly regularily. I just
implemented
it for a Rails-based CMS and it is working great. I highly recommend it.

www.innovastudio.com
5a3762de21f1638e6ab4f61327ba9f33?d=identicon&s=25 Blake Watters (Guest)
on 2006-06-06 04:58
(Received via mailing list)
Heh good timing on this discussion.

I wrote and released a Rails plugin for integrating TinyMCE into
Rails applications in roughly 3 lines of code. My friend John Wulff
blogged a tutorial about how to utilize it last week:

http://johnwulff.com/articles/2006/05/31/tinymce-w...

You can fetch the code from https://secure.near-time.com/svn/plugins/
trunk/tiny_mce

I provide Rake tasks to automate the installation of TinyMCE into
your public/javascripts (and will provide an upgrade task after
TinyMCE ships a new build).

Turning on the editor is done via a simple DSL in your controller:

uses_tiny_mce :only => [:new, :edit]

And a two liner in your layout view:

<% # Include TinyMCE before other JS to avoid problems -%>
<%= javascript_include_tiny_mce_if_used %>
<%= tiny_mce if using_tiny_mce? %>

I don't think it could be made much easier. :-)

TinyMCE is excellent, highly customizable, and supports extension
through modular plugins.

I highly recommend it.

Cheers,
Blake
--
Blake Watters
Lead Developer
Near-Time, Inc.
http://www.near-time.net/
5a3762de21f1638e6ab4f61327ba9f33?d=identicon&s=25 Blake Watters (Guest)
on 2006-06-06 05:01
(Received via mailing list)
This is great for technical users, but end-users in the real world
balk at using any sort of markup.

Some editors (like my favorite TinyMCE) emit pretty acceptable XHTML
output and certainly deliver a better experience to the average end
user.

I've been a fan of Textile for some time, but I tell you after
working off of TinyMCE for a couple of weeks its a much more natural
experience.

Cheers,
Blake
5a3762de21f1638e6ab4f61327ba9f33?d=identicon&s=25 Blake Watters (Guest)
on 2006-06-06 05:04
(Received via mailing list)
Safari support is still unusable for _all_ WYSIWYG editors. I'd
provide an alternate editing interface built around Textile or
Markdown if you need to support Safari users.

Or provide links to Camino and Firefox as alternatives and a nice
message explaining that JavascriptCore's design mode is broken and
they should complain to Apple.

Blake
30ee518e6fdc5b07e060775b5a542bdb?d=identicon&s=25 Jón Borgþórsson (jongretar)
on 2006-06-06 05:11
(Received via mailing list)
You don't actually need to complain to Apple. Much better to contact
the developers themselves at http://webkit.opendarwin.org/ (And test
drive the beta version of Safari while you are doing it)

As you can see at
http://webkit.opendarwin.org/projects/compat/hitlist.html they are
well aware of this and are working on it. The dev blog for Safari is
also a great read for those who want to get more info on the web
standards.


On 6/6/06, Blake Watters <blake@near-time.com> wrote:
> On May 28, 2006, at 9:47 PM, njmacinnes@gmail.com wrote:
> >>
> >> CMS system's out there so there is some doco available.
> >> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
47d626d416d9da060a44ed9f684e32cf?d=identicon&s=25 Enrico Franchi (rik0)
on 2006-06-06 11:06
(Received via mailing list)
On Mon, 5 Jun 2006 23:01:30 -0400, Blake Watters wrote:

> Safari support is still unusable for _all_ WYSIWYG editors. I'd
> provide an alternate editing interface built around Textile or
> Markdown if you need to support Safari users.

Actually Dojo works quite well. I'm going to put it in a rails app one
of these days (as soon as I finish some more pressing tasks).

It works perfectly with Safari. However, as I said I've not yet used it
as a developer, therefore I don't know how easy is it to use.
47d626d416d9da060a44ed9f684e32cf?d=identicon&s=25 Enrico Franchi (rik0)
on 2006-06-06 11:31
(Received via mailing list)
On Tue, 6 Jun 2006 11:05:12 +0200, Enrico Franchi wrote:

> Actually Dojo works quite well.

I didn't specify: it works well with Safari.
A2b2f4ee23989dc68529baef9cbddcd6?d=identicon&s=25 Julian 'Julik' Tarkhanov (Guest)
on 2006-06-07 12:20
(Received via mailing list)
On 6-jun-2006, at 11:29, Enrico Franchi wrote:

> On Tue, 6 Jun 2006 11:05:12 +0200, Enrico Franchi wrote:
>
>> Actually Dojo works quite well.
>
> I didn't specify: it works well with Safari.

And there was a fair amount of faithful bitchin' on the part of the
dojo developer about how terribly broken JSCore is :-)

--
Julian 'Julik' Tarkhanov
please send all personal mail to
me at julik.nl
A2b2f4ee23989dc68529baef9cbddcd6?d=identicon&s=25 Julian 'Julik' Tarkhanov (Guest)
on 2006-06-07 13:18
(Received via mailing list)
On 6-jun-2006, at 5:01, Blake Watters wrote:
> Or provide links to Camino and Firefox as alternatives and a nice
> message explaining that JavascriptCore's design mode is broken and
> they should complain to Apple.

Double ugh. Now that's a reason to lock users out, I imagine.

--
Julian 'Julik' Tarkhanov
please send all personal mail to
me at julik.nl
Df5e7adb20adae6c120b04e7cafb15a0?d=identicon&s=25 Rob Sanheim (Guest)
on 2006-06-07 14:36
(Received via mailing list)
On 6/6/06, Enrico Franchi <rik0.py@gmail.com> wrote:
> On Tue, 6 Jun 2006 11:05:12 +0200, Enrico Franchi wrote:
>
> > Actually Dojo works quite well.
>
> I didn't specify: it works well with Safari.

Actually, it doesn't.  The editor loads, but many of the most
important buttons (ie links and images) don't work - this was true w/
0.2.2 and 0.3, it may be different in HEAD, but I doubt it.  I also
ran into strange issues where the Editor would just continually load
in Safari and never complete, until Safari bombed - this only seemed
to happen where I was replacing a text area onload programmatically.

You can see editor 2 for yourself right here, btw - just try it in
Safari:

http://archive.dojotoolkit.org/nightly/tests/widge...

As a previous poster said, design mode in Safari is broken as only a
few pieces of the api are implemented.  So any rich editor will be
broken unless the developers want to do a lot of Safari specific work
arounds (only to have to remove them later when the webcore team
catches up).

- Rob
--
http://www.robsanheim.com
http://www.seekingalpha.com
http://www.ajaxian.com
47d626d416d9da060a44ed9f684e32cf?d=identicon&s=25 Enrico Franchi (rik0)
on 2006-06-07 18:38
(Received via mailing list)
On Tue, 6 Jun 2006 23:25:18 -0500, Rob Sanheim wrote:

> Actually, it doesn't.

The demo I tried worked. However it had no link buttons.
Actually it seems we tried it not enough extensively. Thanks for
pointing it out. You saved us a lot of work, indeed. :)
This topic is locked and can not be replied to.