glebtv-ckeditor 4.5.10.3 → 4.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/ckeditor/config.js.erb +1 -1
- data/lib/ckeditor.rb +1 -0
- data/lib/ckeditor/version.rb +2 -2
- data/lib/generators/ckeditor/templates/active_record/carrierwave/migration.rb +1 -1
- data/lib/generators/ckeditor/templates/active_record/dragonfly/migration.rb +1 -1
- data/lib/generators/ckeditor/templates/active_record/paperclip/migration.rb +1 -1
- data/lib/generators/ckeditor/templates/active_record/refile/migration.rb +1 -1
- data/vendor/assets/javascripts/ckeditor/LICENSE.md +2 -2
- data/vendor/assets/javascripts/ckeditor/adapters/jquery.js +1 -1
- data/vendor/assets/javascripts/ckeditor/build-config.js +26 -26
- data/vendor/assets/javascripts/ckeditor/ckeditor.js +605 -576
- data/vendor/assets/javascripts/ckeditor/lang/en.js +2 -2
- data/vendor/assets/javascripts/ckeditor/lang/ru.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/CKCss/css/styles.css +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/CKCss/dialogs/ckcss.js +2 -1
- data/vendor/assets/javascripts/ckeditor/plugins/CKCss/plugin.js +3 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +6 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +3 -4
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +4 -4
- data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +4 -3
- data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/LICENSE.md +21 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.ckeditor.css +183 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.css +341 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/comment/comment.js +206 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/comment/continuecomment.js +85 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/dialog/dialog.css +32 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/dialog/dialog.js +157 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/closebrackets.js +202 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/closetag.js +169 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/continuelist.js +51 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/matchbrackets.js +122 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/matchtags.js +66 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/trailingspace.js +27 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/brace-fold.js +105 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/comment-fold.js +59 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/foldcode.js +150 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/foldgutter.css +20 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/foldgutter.js +146 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/indent-fold.js +44 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/markdown-fold.js +49 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/xml-fold.js +182 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/format/autoFormatAll.js +43 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/format/formatting.js +226 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/anyword-hint.js +41 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/css-hint.js +60 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/html-hint.js +348 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/javascript-hint.js +155 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/show-hint.css +36 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/show-hint.js +438 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/sql-hint.js +271 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/xml-hint.js +110 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/loadmode.js +64 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/multiplex.js +123 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/multiplex_test.js +33 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/overlay.js +85 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/simple.js +213 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/jump-to-line.js +49 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/match-highlighter.js +165 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/matchesonscrollbar.css +8 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/matchesonscrollbar.js +97 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/search.js +252 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/searchcursor.js +189 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/selection/active-line.js +74 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/selection/mark-selection.js +118 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/selection/selection-pointer.js +98 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/beautify-html.js +952 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.js +2087 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.js +9109 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcode/bbcode.js +137 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcode/index.html +73 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcodemixed/bbcodemixed.js +161 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcodemixed/index.html +128 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/clike.js +785 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/index.html +360 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/scala.html +767 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/test.js +55 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/css.js +825 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/gss.html +103 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/gss_test.js +17 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/index.html +75 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/less.html +152 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/less_test.js +54 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/scss.html +157 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/scss_test.js +110 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/test.js +200 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlembedded/htmlembedded.js +28 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlembedded/index.html +60 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlmixed/htmlmixed.js +152 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlmixed/index.html +89 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/index.html +114 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/javascript.js +784 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/json-ld.html +72 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/test.js +247 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/typescript.html +61 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/php/index.html +64 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/php/php.js +234 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/php/test.js +154 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/xml/index.html +61 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/xml/test.js +51 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/xml/xml.js +394 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +30 -24
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/dracula.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/duotone-dark.css +35 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/duotone-light.css +36 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/panda-syntax.css +85 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/pastel-on-dark.css +0 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/solarized.css +21 -15
- data/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +9 -9
- data/vendor/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +12 -12
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +11 -11
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/icons_hidpi.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/iframedialog/plugin.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +28 -28
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/LICENSE +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/README.md +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/lang/LANG.js +3 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/lang/en.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/lang/ru.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/plugin.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/readme.txt +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +25 -23
- data/vendor/assets/javascripts/ckeditor/plugins/link/images/anchor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/notification/lang/en.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/notification/lang/ru.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/notification/plugin.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +40 -29
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +19 -19
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/skins/moono-lisa/scayt.css +20 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/plugin.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/samples/assets/sample.css +70 -0
- data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/samples/stylesheetparser.html +85 -0
- data/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/default.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/css/wordcount.css +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/ru.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +60 -13
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/samples/wordcount.html +61 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/samples/wordcountWithMaxCount.html +110 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +9 -9
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/skins/moono-lisa/wsc.css +43 -0
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/LICENSE.md +15 -0
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/images/icon.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/lang/en.js +3 -1
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/lang/ru.js +1 -0
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/plugin.js +448 -388
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dev/icons16.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dev/icons16.svg +175 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dev/icons32.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dev/icons32.svg +167 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dev/locations.json +145 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog_ie.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog_ie8.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog_iequirks.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_gecko.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_ie.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_ie8.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_iequirks.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/arrow.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/hidpi/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/hidpi/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/hidpi/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/hidpi/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/spinner.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/readme.md +46 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/skin.js +7 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/icons_hidpi.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/anchor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/anchor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/readme.md +3 -3
- data/vendor/assets/javascripts/ckeditor/styles.js +42 -16
- metadata +161 -105
- data/app/assets/javascripts/ckeditor/config_orig.js +0 -58
- data/vendor/assets/javascripts/ckeditor/README.md +0 -39
- data/vendor/assets/javascripts/ckeditor/config.js +0 -10
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/af.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ar.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/bg.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/bn.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/bs.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ca.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/cs.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/cy.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/da.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/de.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/el.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/en-au.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/en-ca.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/en-gb.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/eo.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/es.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/et.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/eu.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/fa.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/fi.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/fo.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/fr-ca.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/fr.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/gl.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/gu.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/he.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/hi.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/hr.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/hu.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/is.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/it.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ja.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ka.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/km.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ko.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ku.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/lt.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/lv.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/mk.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/mn.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ms.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/nb.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/nl.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/no.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/pl.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/pt-br.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/pt.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ro.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/sk.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/sl.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/sr-latn.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/sr.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/sv.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/th.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/tr.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ug.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/uk.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/vi.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/zh-cn.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/zh.js +0 -12
@@ -0,0 +1,110 @@
|
|
1
|
+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
+
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
3
|
+
|
4
|
+
(function() {
|
5
|
+
var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-scss");
|
6
|
+
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), "scss"); }
|
7
|
+
|
8
|
+
MT('url_with_quotation',
|
9
|
+
"[tag foo] { [property background]:[atom url]([string test.jpg]) }");
|
10
|
+
|
11
|
+
MT('url_with_double_quotes',
|
12
|
+
"[tag foo] { [property background]:[atom url]([string \"test.jpg\"]) }");
|
13
|
+
|
14
|
+
MT('url_with_single_quotes',
|
15
|
+
"[tag foo] { [property background]:[atom url]([string \'test.jpg\']) }");
|
16
|
+
|
17
|
+
MT('string',
|
18
|
+
"[def @import] [string \"compass/css3\"]");
|
19
|
+
|
20
|
+
MT('important_keyword',
|
21
|
+
"[tag foo] { [property background]:[atom url]([string \'test.jpg\']) [keyword !important] }");
|
22
|
+
|
23
|
+
MT('variable',
|
24
|
+
"[variable-2 $blue]:[atom #333]");
|
25
|
+
|
26
|
+
MT('variable_as_attribute',
|
27
|
+
"[tag foo] { [property color]:[variable-2 $blue] }");
|
28
|
+
|
29
|
+
MT('numbers',
|
30
|
+
"[tag foo] { [property padding]:[number 10px] [number 10] [number 10em] [number 8in] }");
|
31
|
+
|
32
|
+
MT('number_percentage',
|
33
|
+
"[tag foo] { [property width]:[number 80%] }");
|
34
|
+
|
35
|
+
MT('selector',
|
36
|
+
"[builtin #hello][qualifier .world]{}");
|
37
|
+
|
38
|
+
MT('singleline_comment',
|
39
|
+
"[comment // this is a comment]");
|
40
|
+
|
41
|
+
MT('multiline_comment',
|
42
|
+
"[comment /*foobar*/]");
|
43
|
+
|
44
|
+
MT('attribute_with_hyphen',
|
45
|
+
"[tag foo] { [property font-size]:[number 10px] }");
|
46
|
+
|
47
|
+
MT('string_after_attribute',
|
48
|
+
"[tag foo] { [property content]:[string \"::\"] }");
|
49
|
+
|
50
|
+
MT('directives',
|
51
|
+
"[def @include] [qualifier .mixin]");
|
52
|
+
|
53
|
+
MT('basic_structure',
|
54
|
+
"[tag p] { [property background]:[keyword red]; }");
|
55
|
+
|
56
|
+
MT('nested_structure',
|
57
|
+
"[tag p] { [tag a] { [property color]:[keyword red]; } }");
|
58
|
+
|
59
|
+
MT('mixin',
|
60
|
+
"[def @mixin] [tag table-base] {}");
|
61
|
+
|
62
|
+
MT('number_without_semicolon',
|
63
|
+
"[tag p] {[property width]:[number 12]}",
|
64
|
+
"[tag a] {[property color]:[keyword red];}");
|
65
|
+
|
66
|
+
MT('atom_in_nested_block',
|
67
|
+
"[tag p] { [tag a] { [property color]:[atom #000]; } }");
|
68
|
+
|
69
|
+
MT('interpolation_in_property',
|
70
|
+
"[tag foo] { #{[variable-2 $hello]}:[number 2]; }");
|
71
|
+
|
72
|
+
MT('interpolation_in_selector',
|
73
|
+
"[tag foo]#{[variable-2 $hello]} { [property color]:[atom #000]; }");
|
74
|
+
|
75
|
+
MT('interpolation_error',
|
76
|
+
"[tag foo]#{[variable foo]} { [property color]:[atom #000]; }");
|
77
|
+
|
78
|
+
MT("divide_operator",
|
79
|
+
"[tag foo] { [property width]:[number 4] [operator /] [number 2] }");
|
80
|
+
|
81
|
+
MT('nested_structure_with_id_selector',
|
82
|
+
"[tag p] { [builtin #hello] { [property color]:[keyword red]; } }");
|
83
|
+
|
84
|
+
MT('indent_mixin',
|
85
|
+
"[def @mixin] [tag container] (",
|
86
|
+
" [variable-2 $a]: [number 10],",
|
87
|
+
" [variable-2 $b]: [number 10])",
|
88
|
+
"{}");
|
89
|
+
|
90
|
+
MT('indent_nested',
|
91
|
+
"[tag foo] {",
|
92
|
+
" [tag bar] {",
|
93
|
+
" }",
|
94
|
+
"}");
|
95
|
+
|
96
|
+
MT('indent_parentheses',
|
97
|
+
"[tag foo] {",
|
98
|
+
" [property color]: [atom darken]([variable-2 $blue],",
|
99
|
+
" [number 9%]);",
|
100
|
+
"}");
|
101
|
+
|
102
|
+
MT('indent_vardef',
|
103
|
+
"[variable-2 $name]:",
|
104
|
+
" [string 'val'];",
|
105
|
+
"[tag tag] {",
|
106
|
+
" [tag inner] {",
|
107
|
+
" [property margin]: [number 3px];",
|
108
|
+
" }",
|
109
|
+
"}");
|
110
|
+
})();
|
@@ -0,0 +1,200 @@
|
|
1
|
+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
+
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
3
|
+
|
4
|
+
(function() {
|
5
|
+
var mode = CodeMirror.getMode({indentUnit: 2}, "css");
|
6
|
+
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
|
7
|
+
|
8
|
+
// Error, because "foobarhello" is neither a known type or property, but
|
9
|
+
// property was expected (after "and"), and it should be in parentheses.
|
10
|
+
MT("atMediaUnknownType",
|
11
|
+
"[def @media] [attribute screen] [keyword and] [error foobarhello] { }");
|
12
|
+
|
13
|
+
// Soft error, because "foobarhello" is not a known property or type.
|
14
|
+
MT("atMediaUnknownProperty",
|
15
|
+
"[def @media] [attribute screen] [keyword and] ([error foobarhello]) { }");
|
16
|
+
|
17
|
+
// Make sure nesting works with media queries
|
18
|
+
MT("atMediaMaxWidthNested",
|
19
|
+
"[def @media] [attribute screen] [keyword and] ([property max-width]: [number 25px]) { [tag foo] { } }");
|
20
|
+
|
21
|
+
MT("atMediaFeatureValueKeyword",
|
22
|
+
"[def @media] ([property orientation]: [keyword landscape]) { }");
|
23
|
+
|
24
|
+
MT("atMediaUnknownFeatureValueKeyword",
|
25
|
+
"[def @media] ([property orientation]: [error upsidedown]) { }");
|
26
|
+
|
27
|
+
MT("tagSelector",
|
28
|
+
"[tag foo] { }");
|
29
|
+
|
30
|
+
MT("classSelector",
|
31
|
+
"[qualifier .foo-bar_hello] { }");
|
32
|
+
|
33
|
+
MT("idSelector",
|
34
|
+
"[builtin #foo] { [error #foo] }");
|
35
|
+
|
36
|
+
MT("tagSelectorUnclosed",
|
37
|
+
"[tag foo] { [property margin]: [number 0] } [tag bar] { }");
|
38
|
+
|
39
|
+
MT("tagStringNoQuotes",
|
40
|
+
"[tag foo] { [property font-family]: [variable hello] [variable world]; }");
|
41
|
+
|
42
|
+
MT("tagStringDouble",
|
43
|
+
"[tag foo] { [property font-family]: [string \"hello world\"]; }");
|
44
|
+
|
45
|
+
MT("tagStringSingle",
|
46
|
+
"[tag foo] { [property font-family]: [string 'hello world']; }");
|
47
|
+
|
48
|
+
MT("tagColorKeyword",
|
49
|
+
"[tag foo] {",
|
50
|
+
" [property color]: [keyword black];",
|
51
|
+
" [property color]: [keyword navy];",
|
52
|
+
" [property color]: [keyword yellow];",
|
53
|
+
"}");
|
54
|
+
|
55
|
+
MT("tagColorHex3",
|
56
|
+
"[tag foo] { [property background]: [atom #fff]; }");
|
57
|
+
|
58
|
+
MT("tagColorHex4",
|
59
|
+
"[tag foo] { [property background]: [atom #ffff]; }");
|
60
|
+
|
61
|
+
MT("tagColorHex6",
|
62
|
+
"[tag foo] { [property background]: [atom #ffffff]; }");
|
63
|
+
|
64
|
+
MT("tagColorHex8",
|
65
|
+
"[tag foo] { [property background]: [atom #ffffffff]; }");
|
66
|
+
|
67
|
+
MT("tagColorHex5Invalid",
|
68
|
+
"[tag foo] { [property background]: [atom&error #fffff]; }");
|
69
|
+
|
70
|
+
MT("tagColorHexInvalid",
|
71
|
+
"[tag foo] { [property background]: [atom&error #ffg]; }");
|
72
|
+
|
73
|
+
MT("tagNegativeNumber",
|
74
|
+
"[tag foo] { [property margin]: [number -5px]; }");
|
75
|
+
|
76
|
+
MT("tagPositiveNumber",
|
77
|
+
"[tag foo] { [property padding]: [number 5px]; }");
|
78
|
+
|
79
|
+
MT("tagVendor",
|
80
|
+
"[tag foo] { [meta -foo-][property box-sizing]: [meta -foo-][atom border-box]; }");
|
81
|
+
|
82
|
+
MT("tagBogusProperty",
|
83
|
+
"[tag foo] { [property&error barhelloworld]: [number 0]; }");
|
84
|
+
|
85
|
+
MT("tagTwoProperties",
|
86
|
+
"[tag foo] { [property margin]: [number 0]; [property padding]: [number 0]; }");
|
87
|
+
|
88
|
+
MT("tagTwoPropertiesURL",
|
89
|
+
"[tag foo] { [property background]: [atom url]([string //example.com/foo.png]); [property padding]: [number 0]; }");
|
90
|
+
|
91
|
+
MT("indent_tagSelector",
|
92
|
+
"[tag strong], [tag em] {",
|
93
|
+
" [property background]: [atom rgba](",
|
94
|
+
" [number 255], [number 255], [number 0], [number .2]",
|
95
|
+
" );",
|
96
|
+
"}");
|
97
|
+
|
98
|
+
MT("indent_atMedia",
|
99
|
+
"[def @media] {",
|
100
|
+
" [tag foo] {",
|
101
|
+
" [property color]:",
|
102
|
+
" [keyword yellow];",
|
103
|
+
" }",
|
104
|
+
"}");
|
105
|
+
|
106
|
+
MT("indent_comma",
|
107
|
+
"[tag foo] {",
|
108
|
+
" [property font-family]: [variable verdana],",
|
109
|
+
" [atom sans-serif];",
|
110
|
+
"}");
|
111
|
+
|
112
|
+
MT("indent_parentheses",
|
113
|
+
"[tag foo]:[variable-3 before] {",
|
114
|
+
" [property background]: [atom url](",
|
115
|
+
"[string blahblah]",
|
116
|
+
"[string etc]",
|
117
|
+
"[string ]) [keyword !important];",
|
118
|
+
"}");
|
119
|
+
|
120
|
+
MT("font_face",
|
121
|
+
"[def @font-face] {",
|
122
|
+
" [property font-family]: [string 'myfont'];",
|
123
|
+
" [error nonsense]: [string 'abc'];",
|
124
|
+
" [property src]: [atom url]([string http://blah]),",
|
125
|
+
" [atom url]([string http://foo]);",
|
126
|
+
"}");
|
127
|
+
|
128
|
+
MT("empty_url",
|
129
|
+
"[def @import] [atom url]() [attribute screen];");
|
130
|
+
|
131
|
+
MT("parens",
|
132
|
+
"[qualifier .foo] {",
|
133
|
+
" [property background-image]: [variable fade]([atom #000], [number 20%]);",
|
134
|
+
" [property border-image]: [atom linear-gradient](",
|
135
|
+
" [atom to] [atom bottom],",
|
136
|
+
" [variable fade]([atom #000], [number 20%]) [number 0%],",
|
137
|
+
" [variable fade]([atom #000], [number 20%]) [number 100%]",
|
138
|
+
" );",
|
139
|
+
"}");
|
140
|
+
|
141
|
+
MT("css_variable",
|
142
|
+
":[variable-3 root] {",
|
143
|
+
" [variable-2 --main-color]: [atom #06c];",
|
144
|
+
"}",
|
145
|
+
"[tag h1][builtin #foo] {",
|
146
|
+
" [property color]: [atom var]([variable-2 --main-color]);",
|
147
|
+
"}");
|
148
|
+
|
149
|
+
MT("supports",
|
150
|
+
"[def @supports] ([keyword not] (([property text-align-last]: [atom justify]) [keyword or] ([meta -moz-][property text-align-last]: [atom justify])) {",
|
151
|
+
" [property text-align-last]: [atom justify];",
|
152
|
+
"}");
|
153
|
+
|
154
|
+
MT("document",
|
155
|
+
"[def @document] [tag url]([string http://blah]),",
|
156
|
+
" [tag url-prefix]([string https://]),",
|
157
|
+
" [tag domain]([string blah.com]),",
|
158
|
+
" [tag regexp]([string \".*blah.+\"]) {",
|
159
|
+
" [builtin #id] {",
|
160
|
+
" [property background-color]: [keyword white];",
|
161
|
+
" }",
|
162
|
+
" [tag foo] {",
|
163
|
+
" [property font-family]: [variable Verdana], [atom sans-serif];",
|
164
|
+
" }",
|
165
|
+
"}");
|
166
|
+
|
167
|
+
MT("document_url",
|
168
|
+
"[def @document] [tag url]([string http://blah]) { [qualifier .class] { } }");
|
169
|
+
|
170
|
+
MT("document_urlPrefix",
|
171
|
+
"[def @document] [tag url-prefix]([string https://]) { [builtin #id] { } }");
|
172
|
+
|
173
|
+
MT("document_domain",
|
174
|
+
"[def @document] [tag domain]([string blah.com]) { [tag foo] { } }");
|
175
|
+
|
176
|
+
MT("document_regexp",
|
177
|
+
"[def @document] [tag regexp]([string \".*blah.+\"]) { [builtin #id] { } }");
|
178
|
+
|
179
|
+
MT("counter-style",
|
180
|
+
"[def @counter-style] [variable binary] {",
|
181
|
+
" [property system]: [atom numeric];",
|
182
|
+
" [property symbols]: [number 0] [number 1];",
|
183
|
+
" [property suffix]: [string \".\"];",
|
184
|
+
" [property range]: [atom infinite];",
|
185
|
+
" [property speak-as]: [atom numeric];",
|
186
|
+
"}");
|
187
|
+
|
188
|
+
MT("counter-style-additive-symbols",
|
189
|
+
"[def @counter-style] [variable simple-roman] {",
|
190
|
+
" [property system]: [atom additive];",
|
191
|
+
" [property additive-symbols]: [number 10] [variable X], [number 5] [variable V], [number 1] [variable I];",
|
192
|
+
" [property range]: [number 1] [number 49];",
|
193
|
+
"}");
|
194
|
+
|
195
|
+
MT("counter-style-use",
|
196
|
+
"[tag ol][qualifier .roman] { [property list-style]: [variable simple-roman]; }");
|
197
|
+
|
198
|
+
MT("counter-style-symbols",
|
199
|
+
"[tag ol] { [property list-style]: [atom symbols]([atom cyclic] [string \"*\"] [string \"\\2020\"] [string \"\\2021\"] [string \"\\A7\"]); }");
|
200
|
+
})();
|
data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlembedded/htmlembedded.js
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
+
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
3
|
+
|
4
|
+
(function(mod) {
|
5
|
+
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
6
|
+
mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"),
|
7
|
+
require("../../addon/mode/multiplex"));
|
8
|
+
else if (typeof define == "function" && define.amd) // AMD
|
9
|
+
define(["../../lib/codemirror", "../htmlmixed/htmlmixed",
|
10
|
+
"../../addon/mode/multiplex"], mod);
|
11
|
+
else // Plain browser env
|
12
|
+
mod(CodeMirror);
|
13
|
+
})(function(CodeMirror) {
|
14
|
+
"use strict";
|
15
|
+
|
16
|
+
CodeMirror.defineMode("htmlembedded", function(config, parserConfig) {
|
17
|
+
return CodeMirror.multiplexingMode(CodeMirror.getMode(config, "htmlmixed"), {
|
18
|
+
open: parserConfig.open || parserConfig.scriptStartRegex || "<%",
|
19
|
+
close: parserConfig.close || parserConfig.scriptEndRegex || "%>",
|
20
|
+
mode: CodeMirror.getMode(config, parserConfig.scriptingModeSpec)
|
21
|
+
});
|
22
|
+
}, "htmlmixed");
|
23
|
+
|
24
|
+
CodeMirror.defineMIME("application/x-ejs", {name: "htmlembedded", scriptingModeSpec:"javascript"});
|
25
|
+
CodeMirror.defineMIME("application/x-aspx", {name: "htmlembedded", scriptingModeSpec:"text/x-csharp"});
|
26
|
+
CodeMirror.defineMIME("application/x-jsp", {name: "htmlembedded", scriptingModeSpec:"text/x-java"});
|
27
|
+
CodeMirror.defineMIME("application/x-erb", {name: "htmlembedded", scriptingModeSpec:"ruby"});
|
28
|
+
});
|
@@ -0,0 +1,60 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
|
3
|
+
<title>CodeMirror: Html Embedded Scripts mode</title>
|
4
|
+
<meta charset="utf-8"/>
|
5
|
+
<link rel=stylesheet href="../../doc/docs.css">
|
6
|
+
|
7
|
+
<link rel="stylesheet" href="../../lib/codemirror.css">
|
8
|
+
<script src="../../lib/codemirror.js"></script>
|
9
|
+
<script src="../xml/xml.js"></script>
|
10
|
+
<script src="../javascript/javascript.js"></script>
|
11
|
+
<script src="../css/css.js"></script>
|
12
|
+
<script src="../htmlmixed/htmlmixed.js"></script>
|
13
|
+
<script src="../../addon/mode/multiplex.js"></script>
|
14
|
+
<script src="htmlembedded.js"></script>
|
15
|
+
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
|
16
|
+
<div id=nav>
|
17
|
+
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
|
18
|
+
|
19
|
+
<ul>
|
20
|
+
<li><a href="../../index.html">Home</a>
|
21
|
+
<li><a href="../../doc/manual.html">Manual</a>
|
22
|
+
<li><a href="https://github.com/codemirror/codemirror">Code</a>
|
23
|
+
</ul>
|
24
|
+
<ul>
|
25
|
+
<li><a href="../index.html">Language modes</a>
|
26
|
+
<li><a class=active href="#">Html Embedded Scripts</a>
|
27
|
+
</ul>
|
28
|
+
</div>
|
29
|
+
|
30
|
+
<article>
|
31
|
+
<h2>Html Embedded Scripts mode</h2>
|
32
|
+
<form><textarea id="code" name="code">
|
33
|
+
<%
|
34
|
+
function hello(who) {
|
35
|
+
return "Hello " + who;
|
36
|
+
}
|
37
|
+
%>
|
38
|
+
This is an example of EJS (embedded javascript)
|
39
|
+
<p>The program says <%= hello("world") %>.</p>
|
40
|
+
<script>
|
41
|
+
alert("And here is some normal JS code"); // also colored
|
42
|
+
</script>
|
43
|
+
</textarea></form>
|
44
|
+
|
45
|
+
<script>
|
46
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
47
|
+
lineNumbers: true,
|
48
|
+
mode: "application/x-ejs",
|
49
|
+
indentUnit: 4,
|
50
|
+
indentWithTabs: true
|
51
|
+
});
|
52
|
+
</script>
|
53
|
+
|
54
|
+
<p>Mode for html embedded scripts like JSP and ASP.NET. Depends on multiplex and HtmlMixed which in turn depends on
|
55
|
+
JavaScript, CSS and XML.<br />Other dependencies include those of the scripting language chosen.</p>
|
56
|
+
|
57
|
+
<p><strong>MIME types defined:</strong> <code>application/x-aspx</code> (ASP.NET),
|
58
|
+
<code>application/x-ejs</code> (Embedded Javascript), <code>application/x-jsp</code> (JavaServer Pages)
|
59
|
+
and <code>application/x-erb</code></p>
|
60
|
+
</article>
|
@@ -0,0 +1,152 @@
|
|
1
|
+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
+
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
3
|
+
|
4
|
+
(function(mod) {
|
5
|
+
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
6
|
+
mod(require("../../lib/codemirror"), require("../xml/xml"), require("../javascript/javascript"), require("../css/css"));
|
7
|
+
else if (typeof define == "function" && define.amd) // AMD
|
8
|
+
define(["../../lib/codemirror", "../xml/xml", "../javascript/javascript", "../css/css"], mod);
|
9
|
+
else // Plain browser env
|
10
|
+
mod(CodeMirror);
|
11
|
+
})(function(CodeMirror) {
|
12
|
+
"use strict";
|
13
|
+
|
14
|
+
var defaultTags = {
|
15
|
+
script: [
|
16
|
+
["lang", /(javascript|babel)/i, "javascript"],
|
17
|
+
["type", /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i, "javascript"],
|
18
|
+
["type", /./, "text/plain"],
|
19
|
+
[null, null, "javascript"]
|
20
|
+
],
|
21
|
+
style: [
|
22
|
+
["lang", /^css$/i, "css"],
|
23
|
+
["type", /^(text\/)?(x-)?(stylesheet|css)$/i, "css"],
|
24
|
+
["type", /./, "text/plain"],
|
25
|
+
[null, null, "css"]
|
26
|
+
]
|
27
|
+
};
|
28
|
+
|
29
|
+
function maybeBackup(stream, pat, style) {
|
30
|
+
var cur = stream.current(), close = cur.search(pat);
|
31
|
+
if (close > -1) {
|
32
|
+
stream.backUp(cur.length - close);
|
33
|
+
} else if (cur.match(/<\/?$/)) {
|
34
|
+
stream.backUp(cur.length);
|
35
|
+
if (!stream.match(pat, false)) stream.match(cur);
|
36
|
+
}
|
37
|
+
return style;
|
38
|
+
}
|
39
|
+
|
40
|
+
var attrRegexpCache = {};
|
41
|
+
function getAttrRegexp(attr) {
|
42
|
+
var regexp = attrRegexpCache[attr];
|
43
|
+
if (regexp) return regexp;
|
44
|
+
return attrRegexpCache[attr] = new RegExp("\\s+" + attr + "\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*");
|
45
|
+
}
|
46
|
+
|
47
|
+
function getAttrValue(text, attr) {
|
48
|
+
var match = text.match(getAttrRegexp(attr))
|
49
|
+
return match ? /^\s*(.*?)\s*$/.exec(match[2])[1] : ""
|
50
|
+
}
|
51
|
+
|
52
|
+
function getTagRegexp(tagName, anchored) {
|
53
|
+
return new RegExp((anchored ? "^" : "") + "<\/\s*" + tagName + "\s*>", "i");
|
54
|
+
}
|
55
|
+
|
56
|
+
function addTags(from, to) {
|
57
|
+
for (var tag in from) {
|
58
|
+
var dest = to[tag] || (to[tag] = []);
|
59
|
+
var source = from[tag];
|
60
|
+
for (var i = source.length - 1; i >= 0; i--)
|
61
|
+
dest.unshift(source[i])
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
65
|
+
function findMatchingMode(tagInfo, tagText) {
|
66
|
+
for (var i = 0; i < tagInfo.length; i++) {
|
67
|
+
var spec = tagInfo[i];
|
68
|
+
if (!spec[0] || spec[1].test(getAttrValue(tagText, spec[0]))) return spec[2];
|
69
|
+
}
|
70
|
+
}
|
71
|
+
|
72
|
+
CodeMirror.defineMode("htmlmixed", function (config, parserConfig) {
|
73
|
+
var htmlMode = CodeMirror.getMode(config, {
|
74
|
+
name: "xml",
|
75
|
+
htmlMode: true,
|
76
|
+
multilineTagIndentFactor: parserConfig.multilineTagIndentFactor,
|
77
|
+
multilineTagIndentPastTag: parserConfig.multilineTagIndentPastTag
|
78
|
+
});
|
79
|
+
|
80
|
+
var tags = {};
|
81
|
+
var configTags = parserConfig && parserConfig.tags, configScript = parserConfig && parserConfig.scriptTypes;
|
82
|
+
addTags(defaultTags, tags);
|
83
|
+
if (configTags) addTags(configTags, tags);
|
84
|
+
if (configScript) for (var i = configScript.length - 1; i >= 0; i--)
|
85
|
+
tags.script.unshift(["type", configScript[i].matches, configScript[i].mode])
|
86
|
+
|
87
|
+
function html(stream, state) {
|
88
|
+
var style = htmlMode.token(stream, state.htmlState), tag = /\btag\b/.test(style), tagName
|
89
|
+
if (tag && !/[<>\s\/]/.test(stream.current()) &&
|
90
|
+
(tagName = state.htmlState.tagName && state.htmlState.tagName.toLowerCase()) &&
|
91
|
+
tags.hasOwnProperty(tagName)) {
|
92
|
+
state.inTag = tagName + " "
|
93
|
+
} else if (state.inTag && tag && />$/.test(stream.current())) {
|
94
|
+
var inTag = /^([\S]+) (.*)/.exec(state.inTag)
|
95
|
+
state.inTag = null
|
96
|
+
var modeSpec = stream.current() == ">" && findMatchingMode(tags[inTag[1]], inTag[2])
|
97
|
+
var mode = CodeMirror.getMode(config, modeSpec)
|
98
|
+
var endTagA = getTagRegexp(inTag[1], true), endTag = getTagRegexp(inTag[1], false);
|
99
|
+
state.token = function (stream, state) {
|
100
|
+
if (stream.match(endTagA, false)) {
|
101
|
+
state.token = html;
|
102
|
+
state.localState = state.localMode = null;
|
103
|
+
return null;
|
104
|
+
}
|
105
|
+
return maybeBackup(stream, endTag, state.localMode.token(stream, state.localState));
|
106
|
+
};
|
107
|
+
state.localMode = mode;
|
108
|
+
state.localState = CodeMirror.startState(mode, htmlMode.indent(state.htmlState, ""));
|
109
|
+
} else if (state.inTag) {
|
110
|
+
state.inTag += stream.current()
|
111
|
+
if (stream.eol()) state.inTag += " "
|
112
|
+
}
|
113
|
+
return style;
|
114
|
+
};
|
115
|
+
|
116
|
+
return {
|
117
|
+
startState: function () {
|
118
|
+
var state = CodeMirror.startState(htmlMode);
|
119
|
+
return {token: html, inTag: null, localMode: null, localState: null, htmlState: state};
|
120
|
+
},
|
121
|
+
|
122
|
+
copyState: function (state) {
|
123
|
+
var local;
|
124
|
+
if (state.localState) {
|
125
|
+
local = CodeMirror.copyState(state.localMode, state.localState);
|
126
|
+
}
|
127
|
+
return {token: state.token, inTag: state.inTag,
|
128
|
+
localMode: state.localMode, localState: local,
|
129
|
+
htmlState: CodeMirror.copyState(htmlMode, state.htmlState)};
|
130
|
+
},
|
131
|
+
|
132
|
+
token: function (stream, state) {
|
133
|
+
return state.token(stream, state);
|
134
|
+
},
|
135
|
+
|
136
|
+
indent: function (state, textAfter) {
|
137
|
+
if (!state.localMode || /^\s*<\//.test(textAfter))
|
138
|
+
return htmlMode.indent(state.htmlState, textAfter);
|
139
|
+
else if (state.localMode.indent)
|
140
|
+
return state.localMode.indent(state.localState, textAfter);
|
141
|
+
else
|
142
|
+
return CodeMirror.Pass;
|
143
|
+
},
|
144
|
+
|
145
|
+
innerMode: function (state) {
|
146
|
+
return {state: state.localState || state.htmlState, mode: state.localMode || htmlMode};
|
147
|
+
}
|
148
|
+
};
|
149
|
+
}, "xml", "javascript", "css");
|
150
|
+
|
151
|
+
CodeMirror.defineMIME("text/html", "htmlmixed");
|
152
|
+
});
|