├── src ├── templates │ ├── panels │ │ ├── history.html │ │ ├── notes.html │ │ └── snippets.html │ ├── snippets │ │ ├── example.html.erb │ │ └── example_options.html.erb │ ├── selects │ │ ├── style.html │ │ └── formatblock.html │ ├── modals │ │ ├── htmleditor.html │ │ ├── sanitizer.html │ │ ├── link.html │ │ ├── table.html │ │ └── media.html │ └── palettes │ │ ├── backcolor.html │ │ └── forecolor.html ├── images │ ├── button.png │ ├── clippy.png │ ├── loading-dark.gif │ ├── loading-light.gif │ ├── search-icon.png │ ├── default-snippet.png │ └── toolbar │ │ ├── primary │ │ ├── redo.png │ │ ├── save.png │ │ ├── undo.png │ │ ├── preview.png │ │ ├── _expander.png │ │ ├── _pressed.png │ │ ├── historypanel.png │ │ ├── insertlink.png │ │ ├── insertmedia.png │ │ ├── inserttable.png │ │ ├── notespanel.png │ │ ├── snippetpanel.png │ │ ├── inspectorpanel.png │ │ └── insertcharacter.png │ │ ├── editable │ │ └── buttons.png │ │ └── snippetable │ │ └── buttons.png ├── demo │ ├── out │ │ ├── script.js │ │ ├── style.css │ │ └── index.html │ └── src │ │ ├── style.less │ │ ├── script.coffee │ │ └── index.html ├── scripts │ ├── loaded.coffee │ ├── dialogs │ │ ├── formatblock.coffee │ │ ├── style.coffee │ │ ├── backcolor.coffee │ │ ├── forecolor.coffee │ │ └── objectspanel.coffee │ ├── modals │ │ ├── insertcharacter.coffee │ │ ├── htmleditor.coffee │ │ ├── insertsnippet.coffee │ │ ├── inserttable.coffee │ │ ├── insertmedia.coffee │ │ └── insertlink.coffee │ ├── statusbar.coffee │ ├── history_buffer.coffee │ ├── palette.coffee │ ├── toolbar.button_group.coffee │ ├── native_extensions.coffee │ ├── select.coffee │ ├── tooltip.coffee │ ├── regions │ │ ├── plain.coffee │ │ ├── rich.coffee │ │ ├── snippetable.coffee │ │ └── markupable.coffee │ ├── toolbar.expander.coffee │ ├── dialog.coffee │ ├── snippet_toolbar.coffee │ ├── editors │ │ ├── inline.coffee │ │ └── iframe.coffee │ ├── jquery_extensions.coffee │ ├── snippet.coffee │ ├── toolbar.coffee │ ├── editor.coffee │ ├── panel.coffee │ ├── region.coffee │ ├── toolbar.button.coffee │ ├── modal.coffee │ ├── uploader.coffee │ ├── table_editor.coffee │ └── mercury.coffee ├── styles │ ├── statusbar.less │ ├── tooltip.less │ ├── mercury.less │ ├── uploader.less │ ├── dialog.less │ ├── modal.less │ └── toolbar.less ├── deps │ ├── liquidmetal.js │ └── jquery.additions.js └── dev.js ├── server.coffee ├── .gitignore ├── DEPS.md ├── LICENSE.md ├── package.json └── README.md /src/templates/panels/history.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/templates/panels/notes.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server.coffee: -------------------------------------------------------------------------------- 1 | # Requires 2 | require 'simple-server' -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .bundle 2 | db/*.sqlite3 3 | log/*.log 4 | tmp/ 5 | .sass-cache 6 | public/system 7 | pkg/ -------------------------------------------------------------------------------- /src/images/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bevry-archive/mercury/HEAD/src/images/button.png -------------------------------------------------------------------------------- /src/images/clippy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bevry-archive/mercury/HEAD/src/images/clippy.png -------------------------------------------------------------------------------- /src/images/loading-dark.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bevry-archive/mercury/HEAD/src/images/loading-dark.gif -------------------------------------------------------------------------------- /src/images/loading-light.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bevry-archive/mercury/HEAD/src/images/loading-light.gif -------------------------------------------------------------------------------- /src/images/search-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bevry-archive/mercury/HEAD/src/images/search-icon.png -------------------------------------------------------------------------------- /src/images/default-snippet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bevry-archive/mercury/HEAD/src/images/default-snippet.png -------------------------------------------------------------------------------- /src/demo/out/script.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | return $('body').bind('mercury-ready', function() { 3 | // blah 4 | }); 5 | }); -------------------------------------------------------------------------------- /src/images/toolbar/primary/redo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bevry-archive/mercury/HEAD/src/images/toolbar/primary/redo.png -------------------------------------------------------------------------------- /src/images/toolbar/primary/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bevry-archive/mercury/HEAD/src/images/toolbar/primary/save.png -------------------------------------------------------------------------------- /src/images/toolbar/primary/undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bevry-archive/mercury/HEAD/src/images/toolbar/primary/undo.png -------------------------------------------------------------------------------- /src/images/toolbar/primary/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bevry-archive/mercury/HEAD/src/images/toolbar/primary/preview.png -------------------------------------------------------------------------------- /src/images/toolbar/editable/buttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bevry-archive/mercury/HEAD/src/images/toolbar/editable/buttons.png -------------------------------------------------------------------------------- /src/images/toolbar/primary/_expander.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bevry-archive/mercury/HEAD/src/images/toolbar/primary/_expander.png -------------------------------------------------------------------------------- /src/images/toolbar/primary/_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bevry-archive/mercury/HEAD/src/images/toolbar/primary/_pressed.png -------------------------------------------------------------------------------- /src/templates/snippets/example.html.erb: -------------------------------------------------------------------------------- 1 | <%= params[:options][:first_name] %> likes<%= params[:options][:favorite_beer] %> -------------------------------------------------------------------------------- /src/images/toolbar/primary/historypanel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bevry-archive/mercury/HEAD/src/images/toolbar/primary/historypanel.png -------------------------------------------------------------------------------- /src/images/toolbar/primary/insertlink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bevry-archive/mercury/HEAD/src/images/toolbar/primary/insertlink.png -------------------------------------------------------------------------------- /src/images/toolbar/primary/insertmedia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bevry-archive/mercury/HEAD/src/images/toolbar/primary/insertmedia.png -------------------------------------------------------------------------------- /src/images/toolbar/primary/inserttable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bevry-archive/mercury/HEAD/src/images/toolbar/primary/inserttable.png -------------------------------------------------------------------------------- /src/images/toolbar/primary/notespanel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bevry-archive/mercury/HEAD/src/images/toolbar/primary/notespanel.png -------------------------------------------------------------------------------- /src/images/toolbar/primary/snippetpanel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bevry-archive/mercury/HEAD/src/images/toolbar/primary/snippetpanel.png -------------------------------------------------------------------------------- /src/images/toolbar/snippetable/buttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bevry-archive/mercury/HEAD/src/images/toolbar/snippetable/buttons.png -------------------------------------------------------------------------------- /src/images/toolbar/primary/inspectorpanel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bevry-archive/mercury/HEAD/src/images/toolbar/primary/inspectorpanel.png -------------------------------------------------------------------------------- /src/images/toolbar/primary/insertcharacter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bevry-archive/mercury/HEAD/src/images/toolbar/primary/insertcharacter.png -------------------------------------------------------------------------------- /src/scripts/loaded.coffee: -------------------------------------------------------------------------------- 1 | @Mercury.loaded = true 2 | $ -> 3 | if window.Mercury.config.editor is 'iframe' 4 | new window.Mercury.IframeEditor() 5 | else 6 | new window.Mercury.InlineEditor() -------------------------------------------------------------------------------- /src/scripts/dialogs/formatblock.coffee: -------------------------------------------------------------------------------- 1 | @Mercury.dialogHandlers.formatblock = -> 2 | @element.find('[data-tag]').click (event) => 3 | tag = jQuery(event.target).data('tag') 4 | Mercury.trigger('action', {action: 'formatblock', value: tag}) 5 | -------------------------------------------------------------------------------- /src/scripts/dialogs/style.coffee: -------------------------------------------------------------------------------- 1 | @Mercury.dialogHandlers.style = -> 2 | @element.find('[data-class]').click (event) => 3 | className = jQuery(event.target).data('class') 4 | Mercury.trigger('action', {action: 'style', value: className}) 5 | -------------------------------------------------------------------------------- /src/scripts/modals/insertcharacter.coffee: -------------------------------------------------------------------------------- 1 | @Mercury.modalHandlers.insertCharacter = -> 2 | @element.find('.character').click -> 3 | Mercury.trigger('action', {action: 'insertHTML', value: "{jQuery(@).attr('data-entity')};"}) 4 | Mercury.modal.hide() 5 | -------------------------------------------------------------------------------- /src/templates/selects/style.html: -------------------------------------------------------------------------------- 1 |
6 | -------------------------------------------------------------------------------- /src/scripts/dialogs/backcolor.coffee: -------------------------------------------------------------------------------- 1 | @Mercury.dialogHandlers.backColor = -> 2 | # needs to be mousedown 3 | @element.find('.picker, .last-picked').mousedown (event) => 4 | color = jQuery(event.target).css('background-color') 5 | @element.find('.last-picked').css({background: color}) 6 | @button.css({backgroundColor: color}) 7 | Mercury.trigger('action', {action: 'backColor', value: color}) 8 | -------------------------------------------------------------------------------- /src/scripts/dialogs/forecolor.coffee: -------------------------------------------------------------------------------- 1 | @Mercury.dialogHandlers.foreColor = -> 2 | # needs to be mousedown 3 | @element.find('.picker, .last-picked').mousedown (event) => 4 | color = jQuery(event.target).css('background-color') 5 | @element.find('.last-picked').css({background: color}) 6 | @button.css({backgroundColor: color}) 7 | Mercury.trigger('action', {action: 'foreColor', value: color}) 8 | -------------------------------------------------------------------------------- /DEPS.md: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | 3 | ## jQuery 1.6.1+ 4 | 5 | ## jQuery UI 1.8+ 6 | 7 | - UI Core 8 | - Core 9 | - Widget 10 | - Mouse 11 | - Position 12 | - Interactions 13 | - Draggable 14 | - Resizable 15 | - Sortable 16 | 17 | Only javascript required, no CSS. 18 | 19 | ## jQuery Additions 20 | 21 | - serializeObject 22 | - Easing 1.3 23 | - JSON 2.1 24 | 25 | ## Liquid Metal 26 | 27 | ## Showdown 28 | 29 | -------------------------------------------------------------------------------- /src/templates/modals/htmleditor.html: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /src/scripts/modals/htmleditor.coffee: -------------------------------------------------------------------------------- 1 | @Mercury.modalHandlers.htmlEditor = -> 2 | # fill the text area with the content 3 | @element.find('textarea').val(Mercury.region.content(null, true, false)) 4 | 5 | # replace the contents on form submit 6 | @element.find('form').submit (event) => 7 | event.preventDefault() 8 | value = @element.find('textarea').val().replace(/\n/g, '') 9 | Mercury.trigger('action', {action: 'replaceHTML', value: value}) 10 | @hide() 11 | -------------------------------------------------------------------------------- /src/templates/panels/snippets.html: -------------------------------------------------------------------------------- 1 |
8 |
link for #bookmark1
141 |
142 |