Questions tagged [mercury-editor]

Mercury is a full featured HTML5 editor. It was built from the ground up to help your team get the most out of content editing in modern browsers.

Mercury Editor is a fully featured editor much like TinyMCE or CKEditor, but with a different usage paradigm. It expects that an entire page is something that can be editable, and allows different types of editable regions to be specified. It displays a single toolbar for every region on the page, and uses the HTML5 contentEditable features on block elements, instead of iframes, which allows for CSS to be applied in ways that many other editors can't handle.

Mercury has been written using CoffeeScript and jQuery for the JavaScript portions, and is written on top of Rails 3.2.

Mercury has been written for the future, and thus doesn't support legacy browsers or browsers that don't follow the W3C specifications for content editing. Any browser will be supported if they support the W3C specification in the future, but there aren't plans currently for adding support for alternate implementations at this time.

Supported Browsers:

  • Chrome 10+
  • Firefox 4+
  • Safari 5+
  • Opera 11.64+
  • Mobile Safari (iOS 5+)

The feature list is actually pretty long, so here's a short list that should be highlighted.

  • Previewing: Preview content while you're working to see exactly how it'll look.
  • Link Tools: Insert and edit links, including TOC/Bookmark links.
  • Media Tools: Insert and edit images, youtube videos, and vimeo videos.
  • Image Uploading: Drag images from your desktop and they'll be automatically uploaded and inserted.
  • Table Editing: Advanced table editing and creation, including support for multiple column and rows spans.
  • Snippets: Insert and edit predefined and reusable bits of markup/code using drag and drop.
  • Custom Regions: We provide Full HTML, Markdown, Snippet, Image, and Simple region types by default.
  • I18n: Built in low profile translation and internationalization system.
35 questions
23
votes
2 answers

What does the "mount" instruction mean in Rails routing?

I cannot find the meaning of the keyword "mount" in Rails routing system. I have set up Mercury to use within my Rails application. It added this line to my routes.rb config file: Appname::Application.routes.draw do mount Mercury::Engine =>…
Gabriel S.
  • 1,961
  • 2
  • 20
  • 30
8
votes
1 answer

Mercury Editor in Rails not saving changes

I want to improve my pages with some Visual Editor and have find this railcast about Mercury editor. All Done's, but when i pressed SAVE, I had redirected to my page without any changes. No errors, no warnings, just UNSAVED FORMATTING. Can anybody…
Extazystas
  • 488
  • 2
  • 11
6
votes
2 answers

authentication with mercury-rails

How do you add authentication checks on the /editor/.* routes in Mercury via the mercury-rails gem? I mean, I know you can: hide the link to the editor when not authenticated. refuse updates from the editor when not authenticated. But I'd prefer…
docwhat
  • 11,435
  • 6
  • 55
  • 54
5
votes
3 answers

mercury-rails no editable area js error 'Uncaught TypeError: Cannot read property 'konqueror' of undefined '

I cannot for the life of me figure out why this isn't working! I'm working through the railscast for mercury and I can't get the editable area to show up. gemfile source 'https://rubygems.org' gem 'rails', '3.2.13' gem 'mercury-rails', git:…
Patrick Dougall
  • 346
  • 2
  • 12
5
votes
2 answers

How do I get Mercury Editor to redirect to a new resource?

After watching RailsCast #296 about Mercury Editor, I am trying to get the editor to redirect to a newly created resource. I can already redirect on the client-side using JS and window.location.href=. But for a new resource, I cannot "guess" its URL…
awendt
  • 13,195
  • 5
  • 48
  • 66
4
votes
2 answers

HTML5 editor (contentEditable) with pages like Google Docs

I'm trying to build a word processor web app, similar to Google Docs. I've started using Mercury Editor (which relies on the contentEditable attribute) and I've created an editable div element that looks like a paper page (as Google Docs does). Now…
jävi
  • 4,571
  • 1
  • 24
  • 32
4
votes
4 answers

Mercury Editor with rails4

i'm wondering how to use mercury gem with rails4. i tried to follow guide http://asciicasts.com/episodes/296-mercury-editor if i load page within editor ( /editor/pages/1) i see error in javascript console: Uncaught TypeError: Cannot read property…
Danil
  • 2,497
  • 2
  • 19
  • 27
4
votes
1 answer

Is there a way to separate the mercury code from all the bundled third party libraries?

I suppose it is for the simplicity of installation and distribution that mercury is bundled together with third party libraries in the same .js file. This is good for small projects i guess, that will not have many dependencies to third party…
Luis Muñiz
  • 4,649
  • 1
  • 27
  • 43
3
votes
1 answer

How to embed mercury in new action without losing ability to use select fields?

I want to use the Mercury editor that was presented in railscast lately => http://railscasts.com/episodes/296-mercury-editor but Ive got a problem with it. I have a model that contains several fields that need to be selected. So I cant use Mercury…
2
votes
1 answer

rails 3.2 and mercury editor cant find object through edit/ route

My routes.rb: DigitalizmAdmin::Application.routes.draw do ## Admin routes namespace :mercury do resources :images end mount Mercury::Engine => '/' devise_for :admins #, :skip => [:registrations, :passwords] namespace :admin do …
2
votes
1 answer

scope on routes with mercury editor + rails 3

I'm checking mercury editor https://github.com/jejacks0n/mercury on small project. These is my routes.rb file Myapp::Application.routes.draw do mount Mercury::Engine => '/' scope '(:locale)' do resources :post end end My post url…
hyperrjas
  • 10,666
  • 25
  • 99
  • 198
2
votes
2 answers

Mercury editor (0.9.0) cannot save changes in Rails 3.2.11

I am adding mercury to a simple blogging application and would like to use the newest version, but I have not been able to get it to save updates. Here is my code: Gemfile: gem 'rails', '3.2.11' gem "thin", "~> 1.3.1" gem 'mercury-rails' gem…
thatdankent
  • 950
  • 8
  • 15
1
vote
1 answer

How to save using the Mercury editor

I want to get the save function in the Mercury editor working but to no avail. I have a model to save the page, title and content. mercury.js: $(window).bind('mercury:ready', function() { var link =…
1
vote
0 answers

Flash[:notice] not working with Mercury Editor authentication

In my lib/mercury/authentication.rb file I have module Mercury module Authentication def can_edit? if user_signed_in? and current_user.role == 'admin' true else #flash[:notice] = "You are not authorized to view…
1
vote
1 answer

Rails 4 Mercur-Rails dependency error railties

I am getting this error when doing a bundle update. How do I resolve this. I know mercury can work on new version of railties, I just don't know how to resolve this issue. [root@sxxx xxx]# bundle update Fetching gem metadata from…
user2434674
  • 520
  • 1
  • 8
  • 19
1
2 3