jejacks0n / mercury

Mercury Editor: The Rails WYSIWYG editor that allows embedding full page editing capabilities directly inline.
http://jejacks0n.github.com/mercury
Other
2.63k stars 530 forks source link

Mercury.PageEditor failed to load: "Full" is unknown #465

Closed cannikin closed 10 years ago

cannikin commented 10 years ago

This seems like the most basic function, but whenever I set a section type to "full" for the editor I get this alert message:

Mercury.PageEditor failed to load: Region type is malformed, no data-type provided, or "Full" is unknown for the "body" region.

Please try refreshing.

"simple" and "markdown" work just fine, and I haven't edited mercury.js at all. Is the fact that "Full" is capitalized in the alert message, but I'm using data-mercury="full" in the code any clue?

cannikin commented 10 years ago

Got it: I was using the latest jQuery (1.9) instead of the default 1.7. There are several browser checks in the definition of the Full region that were crapping out because jquery.browser was removed in 1.9. This line specifically:

@supported: document.designMode && !jQuery.browser.konqueror && (!jQuery.browser.msie || (jQuery.browser.msie && parseFloat(jQuery.browser.version, 10) >= 10))