glebtv-ckeditor 4.0.2.7 → 4.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.rdoc +5 -195
- data/{vendor → app}/assets/javascripts/ckeditor/CHANGES.md +56 -0
- data/{vendor → app}/assets/javascripts/ckeditor/LICENSE.md +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/README.md +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/build-config.js +0 -0
- data/app/assets/javascripts/ckeditor/ckeditor.js +881 -0
- data/{vendor → app}/assets/javascripts/ckeditor/config.js.erb +0 -0
- data/app/assets/javascripts/ckeditor/contents.css +103 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/gal_add.jpg +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/gal_add.png +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/gal_del.png +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/gal_more.gif +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/preloader.gif +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/thumbs/avi.gif +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/thumbs/ckfnothumb.gif +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/thumbs/doc.gif +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/thumbs/docx.gif +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/thumbs/exe.gif +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/thumbs/gz.gif +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/thumbs/htm.gif +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/thumbs/jpg.gif +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/thumbs/mp3.gif +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/thumbs/mpg.gif +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/thumbs/pdf.gif +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/thumbs/psd.gif +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/thumbs/rar.gif +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/thumbs/swf.gif +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/thumbs/tar.gif +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/thumbs/txt.gif +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/thumbs/unknown.gif +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/thumbs/wmv.gif +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/thumbs/xls.gif +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/thumbs/xlsx.gif +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/images/thumbs/zip.gif +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/javascripts/application.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/javascripts/fileuploader.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.min.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.tmpl.min.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/filebrowser/javascripts/rails.js +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/stylesheets/uploader.css +118 -0
- data/app/assets/javascripts/ckeditor/{init.js → init.js.erb} +1 -1
- data/{vendor → app}/assets/javascripts/ckeditor/lang/en.js +1 -1
- data/{vendor → app}/assets/javascripts/ckeditor/lang/ru.js +1 -1
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/CKCss/ckcss.png +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/CKCss/css/styles.css +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/CKCss/dialogs/ckcss.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/CKCss/lang/en.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/CKCss/lang/ru.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/CKCss/plugin.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/LoremIpsum/images/icon.png +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/LoremIpsum/images/icon1.png +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/LoremIpsum/plugin.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.ckeditor.css +38 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.css +246 -245
- data/app/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/icons/AutoComplete.png +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/icons/AutoFormat.png +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/icons/CommentSelectedRange.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/icons/SearchCode.png +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/icons/UncommentSelectedRange.png +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/js/addon/dialog/dialog.js +81 -76
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/closebrackets.js +52 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/closetag.js +1 -2
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/continuecomment.js +44 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/continuelist.js +25 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/matchbrackets.js +0 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/brace-fold.js +31 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/foldcode.js +32 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/xml-fold.js +64 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/js/addon/format/autoFormatAll.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/js/addon/format/formatting.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/match-highlighter.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/search.js +131 -131
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/searchcursor.js +8 -9
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +1 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.js +264 -132
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +1 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.modes.min.js +1 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.search-addons.min.js +1 -0
- data/{vendor/assets/javascripts/ckeditor/plugins/codemirror/js → app/assets/javascripts/ckeditor/plugins/codemirror/js/mode}/css.js +337 -235
- data/{vendor/assets/javascripts/ckeditor/plugins/codemirror/js → app/assets/javascripts/ckeditor/plugins/codemirror/js/mode}/htmlmixed.js +0 -0
- data/{vendor/assets/javascripts/ckeditor/plugins/codemirror/js → app/assets/javascripts/ckeditor/plugins/codemirror/js/mode}/javascript.js +17 -6
- data/{vendor/assets/javascripts/ckeditor/plugins/codemirror/js → app/assets/javascripts/ckeditor/plugins/codemirror/js/mode}/xml.js +9 -5
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/lang/en.js +4 -2
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/lang/ru.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +146 -34
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance-mobile.css +0 -1
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance.css +0 -1
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/theme/blackboard.css +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/theme/cobalt.css +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/theme/eclipse.css +1 -1
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/theme/elegant.css +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/theme/erlang-dark.css +5 -5
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/theme/lesser-dark.css +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/theme/monokai.css +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/theme/neat.css +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/theme/night.css +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/theme/rubyblue.css +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/theme/solarized.css +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/theme/twilight.css +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/theme/vibrant-ink.css +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-dark.css +0 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-light.css +43 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/colorbutton/icons/bgcolor.png +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/colorbutton/icons/textcolor.png +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/colorbutton/lang/en.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/colorbutton/lang/ru.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/colorbutton/plugin.js +6 -2
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/colordialog/lang/en.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/colordialog/lang/ru.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/colordialog/plugin.js +1 -1
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/fakeobjects/images/spacer.gif +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +10 -9
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/flash/images/placeholder.png +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/font/lang/en.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/font/lang/ru.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/font/plugin.js +5 -2
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/highslide/dialogs/hs.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/highslide/icon.png +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/highslide/lang/en.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/highslide/lang/ru.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/highslide/plugin.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/highslide/readme.txt +0 -0
- data/app/assets/javascripts/ckeditor/plugins/icons.png +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/iframedialog/plugin.js +0 -0
- data/app/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +43 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/image/images/noimage.png +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +15 -15
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/link/images/anchor.png +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/magicline/images/icon.png +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/mediaembed/images/icon.png +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/oembed/images/icon.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/oembed/libs/jquery.oembed.js +68 -0
- data/app/assets/javascripts/ckeditor/plugins/oembed/libs/jquery.oembed.min.js +68 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/panelbutton/plugin.js +0 -0
- data/app/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +31 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/scayt/LICENSE.md +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/scayt/README.md +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +0 -0
- data/app/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +21 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/wsc/LICENSE.md +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/wsc/README.md +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.css +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +0 -0
- data/app/assets/javascripts/ckeditor/samples/ajax.html +82 -0
- data/app/assets/javascripts/ckeditor/samples/api.html +207 -0
- data/app/assets/javascripts/ckeditor/samples/appendto.html +57 -0
- data/app/assets/javascripts/ckeditor/samples/assets/inlineall/logo.png +0 -0
- data/app/assets/javascripts/ckeditor/samples/assets/outputxhtml/outputxhtml.css +204 -0
- data/app/assets/javascripts/ckeditor/samples/assets/posteddata.php +59 -0
- data/app/assets/javascripts/ckeditor/samples/assets/sample.css +3 -0
- data/app/assets/javascripts/ckeditor/samples/assets/sample.jpg +0 -0
- data/app/assets/javascripts/ckeditor/samples/assets/uilanguages/languages.js +7 -0
- data/app/assets/javascripts/ckeditor/samples/datafiltering.html +401 -0
- data/app/assets/javascripts/ckeditor/samples/divreplace.html +141 -0
- data/app/assets/javascripts/ckeditor/samples/index.html +125 -0
- data/app/assets/javascripts/ckeditor/samples/inlineall.html +311 -0
- data/app/assets/javascripts/ckeditor/samples/inlinebycode.html +122 -0
- data/app/assets/javascripts/ckeditor/samples/plugins/dialog/assets/my_dialog.js +48 -0
- data/app/assets/javascripts/ckeditor/samples/plugins/dialog/dialog.html +187 -0
- data/app/assets/javascripts/ckeditor/samples/plugins/enterkey/enterkey.html +103 -0
- data/app/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.fla +0 -0
- data/app/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.swf +0 -0
- data/app/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/swfobject.js +18 -0
- data/app/assets/javascripts/ckeditor/samples/plugins/htmlwriter/outputforflash.html +280 -0
- data/app/assets/javascripts/ckeditor/samples/plugins/htmlwriter/outputhtml.html +221 -0
- data/app/assets/javascripts/ckeditor/samples/plugins/magicline/magicline.html +207 -0
- data/{vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/samples → app/assets/javascripts/ckeditor/samples/plugins/stylesheetparser}/assets/sample.css +70 -70
- data/{vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/samples → app/assets/javascripts/ckeditor/samples/plugins/stylesheetparser}/stylesheetparser.html +82 -82
- data/app/assets/javascripts/ckeditor/samples/plugins/toolbar/toolbar.html +232 -0
- data/app/assets/javascripts/ckeditor/samples/plugins/wysiwygarea/fullpage.html +77 -0
- data/app/assets/javascripts/ckeditor/samples/readonly.html +73 -0
- data/app/assets/javascripts/ckeditor/samples/replacebyclass.html +57 -0
- data/app/assets/javascripts/ckeditor/samples/replacebycode.html +56 -0
- data/app/assets/javascripts/ckeditor/samples/sample.css +339 -0
- data/app/assets/javascripts/ckeditor/samples/sample.js +33 -0
- data/app/assets/javascripts/ckeditor/samples/sample_posteddata.php +16 -0
- data/app/assets/javascripts/ckeditor/samples/tabindex.html +75 -0
- data/app/assets/javascripts/ckeditor/samples/uicolor.html +69 -0
- data/app/assets/javascripts/ckeditor/samples/uilanguages.html +119 -0
- data/app/assets/javascripts/ckeditor/samples/xhtmlstyle.html +231 -0
- data/{vendor → app}/assets/javascripts/ckeditor/skins/moono/dialog.css +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/skins/moono/dialog_ie.css +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css +0 -0
- data/app/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +5 -0
- data/{vendor → app}/assets/javascripts/ckeditor/skins/moono/dialog_opera.css +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/skins/moono/editor.css +1 -1
- data/{vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css → app/assets/javascripts/ckeditor/skins/moono/editor_gecko.css} +1 -1
- data/{vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css → app/assets/javascripts/ckeditor/skins/moono/editor_ie.css} +1 -1
- data/{vendor → app}/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +1 -1
- data/app/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +5 -0
- data/{vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css → app/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css} +1 -1
- data/app/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/skins/moono/images/arrow.png +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/skins/moono/images/close.png +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/skins/moono/images/mini.png +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/skins/moono/readme.md +0 -0
- data/{vendor → app}/assets/javascripts/ckeditor/styles.js +1 -2
- data/app/controllers/ckeditor/application_controller.rb +6 -12
- data/app/controllers/ckeditor/attachment_files_controller.rb +6 -2
- data/app/controllers/ckeditor/pictures_controller.rb +6 -2
- data/app/views/ckeditor/shared/_asset.html.erb +4 -4
- data/app/views/ckeditor/shared/_asset_tmpl.html.erb +1 -1
- data/lib/ckeditor.rb +91 -19
- data/lib/ckeditor/engine.rb +5 -8
- data/lib/ckeditor/helpers/controllers.rb +7 -3
- data/lib/ckeditor/helpers/form_builder.rb +1 -1
- data/lib/ckeditor/helpers/form_helper.rb +12 -15
- data/lib/ckeditor/helpers/view_helper.rb +1 -1
- data/lib/ckeditor/hooks/cancan.rb +46 -0
- data/lib/ckeditor/hooks/simple_form.rb +11 -0
- data/lib/ckeditor/orm/active_record.rb +1 -3
- data/lib/ckeditor/orm/base.rb +4 -0
- data/lib/ckeditor/orm/mongoid.rb +1 -3
- data/lib/ckeditor/utils.rb +25 -8
- data/lib/ckeditor/version.rb +2 -2
- data/lib/generators/ckeditor/install_generator.rb +2 -2
- data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/asset.rb +2 -2
- data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/attachment_file.rb +4 -4
- data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/picture.rb +4 -4
- data/lib/generators/ckeditor/templates/active_record/carrierwave/migration.rb +1 -1
- data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/attachment_file.rb +4 -4
- data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/picture.rb +8 -8
- data/lib/generators/ckeditor/templates/active_record/paperclip/migration.rb +6 -6
- data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_attachment_file_uploader.rb +1 -7
- data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_picture_uploader.rb +1 -7
- data/lib/generators/ckeditor/templates/base/dragonfly/initializer.rb +3 -3
- data/lib/generators/ckeditor/templates/ckeditor.rb +3 -0
- data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/asset.rb +1 -1
- data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/attachment_file.rb +4 -4
- data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/picture.rb +4 -4
- data/test/dummy/app/views/posts/_form.html.erb +3 -3
- data/test/dummy/script/rails +0 -0
- data/test/functional/posts_controller_test.rb +3 -3
- metadata +346 -321
- data/vendor/assets/javascripts/ckeditor/ckeditor.js +0 -830
- data/vendor/assets/javascripts/ckeditor/filebrowser/stylesheets/uploader.css.sass +0 -102
- data/vendor/assets/javascripts/ckeditor/plugins/code/code/code.js +0 -48
- data/vendor/assets/javascripts/ckeditor/plugins/code/images/code.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/code/plugin.js +0 -17
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +0 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/closebrackets.js +0 -29
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/continuelist.js +0 -28
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/foldcode/foldcode.js +0 -183
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +0 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +0 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.modes.min.js +0 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.search-addons.min.js +0 -1
- data/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +0 -41
- data/vendor/assets/javascripts/ckeditor/plugins/mediaembed/plugin.js +0 -67
- data/vendor/assets/javascripts/ckeditor/plugins/oembed/lang/de.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/oembed/lang/en.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/oembed/lang/fr.js +0 -14
- data/vendor/assets/javascripts/ckeditor/plugins/oembed/lang/nl.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/oembed/lang/ru.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/oembed/libs/jquery.oembed.js +0 -912
- data/vendor/assets/javascripts/ckeditor/plugins/oembed/libs/jquery.oembed.min.js +0 -1
- data/vendor/assets/javascripts/ckeditor/plugins/oembed/plugin.js +0 -102
- data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +0 -31
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +0 -13
- data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/plugin.js +0 -138
- data/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +0 -20
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +0 -689
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +0 -1245
- data/vendor/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
.CodeMirror{font-family:monospace;height:300px}.CodeMirror-scroll{overflow:auto}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7}.CodeMirror-linenumbers{}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid #000;z-index:3}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7;z-index:1}.CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite{}.cm-tab{display:inline-block}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable{color:#000}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-property{color:#000}.cm-s-default .cm-operator{color:#000}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-error{color:red}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-invalidchar{color:red}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror{line-height:1;position:relative;overflow:hidden;background:#fff;color:#000}.CodeMirror-scroll{margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;padding-right:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0;z-index:6}.CodeMirror-gutters{position:absolute;left:0;top:0;height:100%;padding-bottom:30px;z-index:3}.CodeMirror-gutter{height:100%;padding-bottom:30px;margin-bottom:-32px;display:inline-block;*zoom:1;*display:inline}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-widget{display:inline-block}.CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;visibility:hidden;border-right:none;width:0}.CodeMirror-focused div.CodeMirror-cursor{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.CodeMirror span{*vertical-align:text-bottom}@media print{.CodeMirror div.CodeMirror-cursor{visibility:hidden}}.CodeMirror{font:13px/1.4em monospace}.CodeMirror .activeline{background:#e8f2ff}.CodeMirror .CodeMirror-foldmarker{color:blue;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.cm-s-cobalt .CodeMirror-selected{background:#b36539!important}.cm-s-erlang-dark .CodeMirror-selected{background:#b36539!important}.cm-s-lesser-dark .CodeMirror-selected{background:#45443b!important}.cm-s-monokai .CodeMirror-selected{background:#49483e!important}.cm-s-night .CodeMirror-selected{background:#447!important}.cm-s-rubyblue .CodeMirror-selected{background:#38566f!important}.cm-s-twilight .CodeMirror-selected{background:#323232!important}.cm-s-xq-dark .CodeMirror-selected{background:#a8f!important}.cm-s-blackboard .activeline,.cm-s-cobalt .activeline,.cm-s-erlang-dark .activeline,.cm-s-lesser-dark .activeline,.cm-s-monokai .activeline,.cm-s-night .activeline,.cm-s-rubyblue .activeline,.cm-s-vibrant-ink .activeline,.cm-s-xq-dark .activeline{background:#757575}.cm-s-twilight .activeline{background:#494949}.CodeMirror-focused .cm-matchhighlight{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);background-position:bottom;background-repeat:repeat-x}.CodeMirror-dialog{position:absolute;left:0;right:0;background:#fff;z-index:15;padding:.1em .8em;overflow:hidden;color:#333}.CodeMirror-dialog-top{border-bottom:1px solid #eee;top:0}.CodeMirror-dialog-bottom{border-top:1px solid #eee;bottom:0}.CodeMirror-dialog input{border:none;outline:none;background:transparent;width:20em;color:inherit;font-family:monospace}.CodeMirror-dialog button{font-size:70%}.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:#000;cursor:pointer}.CodeMirror-hint-active{background:#08f;color:#fff}
|
File without changes
|
data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/icons/CommentSelectedRange.png
RENAMED
File without changes
|
data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/icons/UncommentSelectedRange.png
RENAMED
File without changes
|
data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/js/addon/dialog/dialog.js
RENAMED
@@ -1,76 +1,81 @@
|
|
1
|
-
// Open simple dialogs on top of an editor. Relies on dialog.css.
|
2
|
-
|
3
|
-
(function() {
|
4
|
-
function dialogDiv(cm, template, bottom) {
|
5
|
-
var wrap = cm.getWrapperElement();
|
6
|
-
var dialog;
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
var
|
20
|
-
|
21
|
-
|
22
|
-
closed
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
CodeMirror.on(button, "
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
(
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
1
|
+
// Open simple dialogs on top of an editor. Relies on dialog.css.
|
2
|
+
|
3
|
+
(function() {
|
4
|
+
function dialogDiv(cm, template, bottom) {
|
5
|
+
var wrap = cm.getWrapperElement();
|
6
|
+
var dialog;
|
7
|
+
|
8
|
+
dialog = wrap.appendChild(document.createElement("div"));
|
9
|
+
if (bottom) {
|
10
|
+
dialog.className = "CodeMirror-dialog CodeMirror-dialog-bottom";
|
11
|
+
} else {
|
12
|
+
dialog.className = "CodeMirror-dialog CodeMirror-dialog-top";
|
13
|
+
}
|
14
|
+
dialog.innerHTML = template;
|
15
|
+
return dialog;
|
16
|
+
}
|
17
|
+
|
18
|
+
CodeMirror.defineExtension("openDialog", function(template, callback, options) {
|
19
|
+
var dialog = dialogDiv(this, template, options && options.bottom);
|
20
|
+
var closed = false, me = this;
|
21
|
+
function close() {
|
22
|
+
if (closed) return;
|
23
|
+
closed = true;
|
24
|
+
dialog.parentNode.removeChild(dialog);
|
25
|
+
}
|
26
|
+
var inp = dialog.getElementsByTagName("input")[0], button;
|
27
|
+
if (inp) {
|
28
|
+
CodeMirror.on(inp, "keydown", function(e) {
|
29
|
+
if (options && options.onKeyDown && options.onKeyDown(e, inp.value, close)) { return; }
|
30
|
+
if (e.keyCode == 13 || e.keyCode == 27) {
|
31
|
+
CodeMirror.e_stop(e);
|
32
|
+
close();
|
33
|
+
me.focus();
|
34
|
+
if (e.keyCode == 13) callback(inp.value);
|
35
|
+
}
|
36
|
+
});
|
37
|
+
if (options && options.onKeyUp) {
|
38
|
+
CodeMirror.on(inp, "keyup", function(e) {options.onKeyUp(e, inp.value, close);});
|
39
|
+
}
|
40
|
+
if (options && options.value) inp.value = options.value;
|
41
|
+
inp.focus();
|
42
|
+
CodeMirror.on(inp, "blur", close);
|
43
|
+
} else if (button = dialog.getElementsByTagName("button")[0]) {
|
44
|
+
CodeMirror.on(button, "click", function() {
|
45
|
+
close();
|
46
|
+
me.focus();
|
47
|
+
});
|
48
|
+
button.focus();
|
49
|
+
CodeMirror.on(button, "blur", close);
|
50
|
+
}
|
51
|
+
return close;
|
52
|
+
});
|
53
|
+
|
54
|
+
CodeMirror.defineExtension("openConfirm", function(template, callbacks, options) {
|
55
|
+
var dialog = dialogDiv(this, template, options && options.bottom);
|
56
|
+
var buttons = dialog.getElementsByTagName("button");
|
57
|
+
var closed = false, me = this, blurring = 1;
|
58
|
+
function close() {
|
59
|
+
if (closed) return;
|
60
|
+
closed = true;
|
61
|
+
dialog.parentNode.removeChild(dialog);
|
62
|
+
me.focus();
|
63
|
+
}
|
64
|
+
buttons[0].focus();
|
65
|
+
for (var i = 0; i < buttons.length; ++i) {
|
66
|
+
var b = buttons[i];
|
67
|
+
(function(callback) {
|
68
|
+
CodeMirror.on(b, "click", function(e) {
|
69
|
+
CodeMirror.e_preventDefault(e);
|
70
|
+
close();
|
71
|
+
if (callback) callback(me);
|
72
|
+
});
|
73
|
+
})(callbacks[i]);
|
74
|
+
CodeMirror.on(b, "blur", function() {
|
75
|
+
--blurring;
|
76
|
+
setTimeout(function() { if (blurring <= 0) close(); }, 200);
|
77
|
+
});
|
78
|
+
CodeMirror.on(b, "focus", function() { ++blurring; });
|
79
|
+
}
|
80
|
+
});
|
81
|
+
})();
|
@@ -0,0 +1,52 @@
|
|
1
|
+
(function() {
|
2
|
+
var DEFAULT_BRACKETS = "()[]{}''\"\"";
|
3
|
+
var SPACE_CHAR_REGEX = /\s/;
|
4
|
+
|
5
|
+
CodeMirror.defineOption("autoCloseBrackets", false, function(cm, val, old) {
|
6
|
+
var wasOn = old && old != CodeMirror.Init;
|
7
|
+
if (val && !wasOn)
|
8
|
+
cm.addKeyMap(buildKeymap(typeof val == "string" ? val : DEFAULT_BRACKETS));
|
9
|
+
else if (!val && wasOn)
|
10
|
+
cm.removeKeyMap("autoCloseBrackets");
|
11
|
+
});
|
12
|
+
|
13
|
+
function buildKeymap(pairs) {
|
14
|
+
var map = {
|
15
|
+
name : "autoCloseBrackets",
|
16
|
+
Backspace: function(cm) {
|
17
|
+
if (cm.somethingSelected()) return CodeMirror.Pass;
|
18
|
+
var cur = cm.getCursor(), line = cm.getLine(cur.line);
|
19
|
+
if (cur.ch && cur.ch < line.length &&
|
20
|
+
pairs.indexOf(line.slice(cur.ch - 1, cur.ch + 1)) % 2 == 0)
|
21
|
+
cm.replaceRange("", CodeMirror.Pos(cur.line, cur.ch - 1), CodeMirror.Pos(cur.line, cur.ch + 1));
|
22
|
+
else
|
23
|
+
return CodeMirror.Pass;
|
24
|
+
}
|
25
|
+
};
|
26
|
+
var closingBrackets = [];
|
27
|
+
for (var i = 0; i < pairs.length; i += 2) (function(left, right) {
|
28
|
+
if (left != right) closingBrackets.push(right);
|
29
|
+
function surround(cm) {
|
30
|
+
var selection = cm.getSelection();
|
31
|
+
cm.replaceSelection(left + selection + right);
|
32
|
+
}
|
33
|
+
function maybeOverwrite(cm) {
|
34
|
+
var cur = cm.getCursor(), ahead = cm.getRange(cur, CodeMirror.Pos(cur.line, cur.ch + 1));
|
35
|
+
if (ahead != right || cm.somethingSelected()) return CodeMirror.Pass;
|
36
|
+
else cm.execCommand("goCharRight");
|
37
|
+
}
|
38
|
+
map["'" + left + "'"] = function(cm) {
|
39
|
+
if (cm.somethingSelected()) return surround(cm);
|
40
|
+
if (left == right && maybeOverwrite(cm) != CodeMirror.Pass) return;
|
41
|
+
var cur = cm.getCursor(), ahead = CodeMirror.Pos(cur.line, cur.ch + 1);
|
42
|
+
var line = cm.getLine(cur.line), nextChar = line.charAt(cur.ch);
|
43
|
+
if (line.length == cur.ch || closingBrackets.indexOf(nextChar) >= 0 || SPACE_CHAR_REGEX.test(nextChar))
|
44
|
+
cm.replaceSelection(left + right, {head: ahead, anchor: ahead});
|
45
|
+
else
|
46
|
+
return CodeMirror.Pass;
|
47
|
+
};
|
48
|
+
if (left != right) map["'" + right + "'"] = maybeOverwrite;
|
49
|
+
})(pairs.charAt(i), pairs.charAt(i + 1));
|
50
|
+
return map;
|
51
|
+
}
|
52
|
+
})();
|
data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/closetag.js
RENAMED
@@ -55,8 +55,7 @@
|
|
55
55
|
if (tok.end > pos.ch) tagName = tagName.slice(0, tagName.length - tok.end + pos.ch);
|
56
56
|
var lowerTagName = tagName.toLowerCase();
|
57
57
|
// Don't process the '>' at the end of an end-tag or self-closing tag
|
58
|
-
if (tok.type == "tag" && state.type == "closeTag" ||
|
59
|
-
/\/\s*$/.test(tok.string) ||
|
58
|
+
if (tok.type == "tag" && state.type == "closeTag" || tok.string.indexOf("/") > -1 ||
|
60
59
|
dontCloseTags && indexOf(dontCloseTags, lowerTagName) > -1)
|
61
60
|
return CodeMirror.Pass;
|
62
61
|
|
@@ -0,0 +1,44 @@
|
|
1
|
+
(function() {
|
2
|
+
var modes = ["clike", "css", "javascript"];
|
3
|
+
for (var i = 0; i < modes.length; ++i)
|
4
|
+
CodeMirror.extendMode(modes[i], {blockCommentStart: "/*",
|
5
|
+
blockCommentEnd: "*/",
|
6
|
+
blockCommentContinue: " * "});
|
7
|
+
|
8
|
+
function continueComment(cm) {
|
9
|
+
var pos = cm.getCursor(), token = cm.getTokenAt(pos);
|
10
|
+
var mode = CodeMirror.innerMode(cm.getMode(), token.state).mode;
|
11
|
+
var space;
|
12
|
+
|
13
|
+
if (token.type == "comment" && mode.blockCommentStart) {
|
14
|
+
var end = token.string.indexOf(mode.blockCommentEnd);
|
15
|
+
var full = cm.getRange(CodeMirror.Pos(pos.line, 0), CodeMirror.Pos(pos.line, token.end)), found;
|
16
|
+
if (end != -1 && end == token.string.length - mode.blockCommentEnd.length) {
|
17
|
+
// Comment ended, don't continue it
|
18
|
+
} else if (token.string.indexOf(mode.blockCommentStart) == 0) {
|
19
|
+
space = full.slice(0, token.start);
|
20
|
+
if (!/^\s*$/.test(space)) {
|
21
|
+
space = "";
|
22
|
+
for (var i = 0; i < token.start; ++i) space += " ";
|
23
|
+
}
|
24
|
+
} else if ((found = full.indexOf(mode.blockCommentContinue)) != -1 &&
|
25
|
+
found + mode.blockCommentContinue.length > token.start &&
|
26
|
+
/^\s*$/.test(full.slice(0, found))) {
|
27
|
+
space = full.slice(0, found);
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
if (space != null)
|
32
|
+
cm.replaceSelection("\n" + space + mode.blockCommentContinue, "end");
|
33
|
+
else
|
34
|
+
return CodeMirror.Pass;
|
35
|
+
}
|
36
|
+
|
37
|
+
CodeMirror.defineOption("continueComments", null, function(cm, val, prev) {
|
38
|
+
if (prev && prev != CodeMirror.Init)
|
39
|
+
cm.removeKeyMap("continueComment");
|
40
|
+
var map = {name: "continueComment"};
|
41
|
+
map[typeof val == "string" ? val : "Enter"] = continueComment;
|
42
|
+
cm.addKeyMap(map);
|
43
|
+
});
|
44
|
+
})();
|
@@ -0,0 +1,25 @@
|
|
1
|
+
(function() {
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
var listRE = /^(\s*)([*+-]|(\d+)\.)(\s*)/,
|
5
|
+
unorderedBullets = '*+-';
|
6
|
+
|
7
|
+
CodeMirror.commands.newlineAndIndentContinueMarkdownList = function(cm) {
|
8
|
+
var pos = cm.getCursor(),
|
9
|
+
inList = cm.getStateAfter(pos.line).list,
|
10
|
+
match;
|
11
|
+
|
12
|
+
if (!inList || !(match = cm.getLine(pos.line).match(listRE))) {
|
13
|
+
cm.execCommand('newlineAndIndent');
|
14
|
+
return;
|
15
|
+
}
|
16
|
+
|
17
|
+
var indent = match[1], after = match[4];
|
18
|
+
var bullet = unorderedBullets.indexOf(match[2]) >= 0
|
19
|
+
? match[2]
|
20
|
+
: (parseInt(match[3], 10) + 1) + '.';
|
21
|
+
|
22
|
+
cm.replaceSelection('\n' + indent + bullet + after, 'end');
|
23
|
+
};
|
24
|
+
|
25
|
+
}());
|
data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/matchbrackets.js
RENAMED
File without changes
|
@@ -0,0 +1,31 @@
|
|
1
|
+
CodeMirror.braceRangeFinder = function(cm, start) {
|
2
|
+
var line = start.line, lineText = cm.getLine(line);
|
3
|
+
var at = lineText.length, startChar, tokenType;
|
4
|
+
for (;;) {
|
5
|
+
var found = lineText.lastIndexOf("{", at);
|
6
|
+
if (found < start.ch) break;
|
7
|
+
tokenType = cm.getTokenAt(CodeMirror.Pos(line, found + 1)).type;
|
8
|
+
if (!/^(comment|string)/.test(tokenType)) { startChar = found; break; }
|
9
|
+
at = found - 1;
|
10
|
+
}
|
11
|
+
if (startChar == null || lineText.lastIndexOf("}") > startChar) return;
|
12
|
+
var count = 1, lastLine = cm.lineCount(), end, endCh;
|
13
|
+
outer: for (var i = line + 1; i < lastLine; ++i) {
|
14
|
+
var text = cm.getLine(i), pos = 0;
|
15
|
+
for (;;) {
|
16
|
+
var nextOpen = text.indexOf("{", pos), nextClose = text.indexOf("}", pos);
|
17
|
+
if (nextOpen < 0) nextOpen = text.length;
|
18
|
+
if (nextClose < 0) nextClose = text.length;
|
19
|
+
pos = Math.min(nextOpen, nextClose);
|
20
|
+
if (pos == text.length) break;
|
21
|
+
if (cm.getTokenAt(CodeMirror.Pos(i, pos + 1)).type == tokenType) {
|
22
|
+
if (pos == nextOpen) ++count;
|
23
|
+
else if (!--count) { end = i; endCh = pos; break outer; }
|
24
|
+
}
|
25
|
+
++pos;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
if (end == null || end == line + 1) return;
|
29
|
+
return {from: CodeMirror.Pos(line, startChar + 1),
|
30
|
+
to: CodeMirror.Pos(end, endCh)};
|
31
|
+
};
|
@@ -0,0 +1,32 @@
|
|
1
|
+
CodeMirror.newFoldFunction = function(rangeFinder, widget) {
|
2
|
+
if (widget == null) widget = "\u2194";
|
3
|
+
if (typeof widget == "string") {
|
4
|
+
var text = document.createTextNode(widget);
|
5
|
+
widget = document.createElement("span");
|
6
|
+
widget.appendChild(text);
|
7
|
+
widget.className = "CodeMirror-foldmarker";
|
8
|
+
}
|
9
|
+
|
10
|
+
return function(cm, pos) {
|
11
|
+
if (typeof pos == "number") pos = CodeMirror.Pos(pos, 0);
|
12
|
+
var range = rangeFinder(cm, pos);
|
13
|
+
if (!range) return;
|
14
|
+
|
15
|
+
var present = cm.findMarksAt(range.from), cleared = 0;
|
16
|
+
for (var i = 0; i < present.length; ++i) {
|
17
|
+
if (present[i].__isFold) {
|
18
|
+
++cleared;
|
19
|
+
present[i].clear();
|
20
|
+
}
|
21
|
+
}
|
22
|
+
if (cleared) return;
|
23
|
+
|
24
|
+
var myWidget = widget.cloneNode(true);
|
25
|
+
CodeMirror.on(myWidget, "mousedown", function() {myRange.clear();});
|
26
|
+
var myRange = cm.markText(range.from, range.to, {
|
27
|
+
replacedWith: myWidget,
|
28
|
+
clearOnEnter: true,
|
29
|
+
__isFold: true
|
30
|
+
});
|
31
|
+
};
|
32
|
+
};
|
@@ -0,0 +1,64 @@
|
|
1
|
+
CodeMirror.tagRangeFinder = (function() {
|
2
|
+
var nameStartChar = "A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
|
3
|
+
var nameChar = nameStartChar + "\-\:\.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
|
4
|
+
var xmlTagStart = new RegExp("<(/?)([" + nameStartChar + "][" + nameChar + "]*)", "g");
|
5
|
+
|
6
|
+
return function(cm, start) {
|
7
|
+
var line = start.line, ch = start.ch, lineText = cm.getLine(line);
|
8
|
+
|
9
|
+
function nextLine() {
|
10
|
+
if (line >= cm.lastLine()) return;
|
11
|
+
ch = 0;
|
12
|
+
lineText = cm.getLine(++line);
|
13
|
+
return true;
|
14
|
+
}
|
15
|
+
function toTagEnd() {
|
16
|
+
for (;;) {
|
17
|
+
var gt = lineText.indexOf(">", ch);
|
18
|
+
if (gt == -1) { if (nextLine()) continue; else return; }
|
19
|
+
var lastSlash = lineText.lastIndexOf("/", gt);
|
20
|
+
var selfClose = lastSlash > -1 && /^\s*$/.test(lineText.slice(lastSlash + 1, gt));
|
21
|
+
ch = gt + 1;
|
22
|
+
return selfClose ? "selfClose" : "regular";
|
23
|
+
}
|
24
|
+
}
|
25
|
+
function toNextTag() {
|
26
|
+
for (;;) {
|
27
|
+
xmlTagStart.lastIndex = ch;
|
28
|
+
var found = xmlTagStart.exec(lineText);
|
29
|
+
if (!found) { if (nextLine()) continue; else return; }
|
30
|
+
ch = found.index + found[0].length;
|
31
|
+
return found;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
var stack = [], startCh;
|
36
|
+
for (;;) {
|
37
|
+
var openTag = toNextTag(), end;
|
38
|
+
if (!openTag || line != start.line || !(end = toTagEnd())) return;
|
39
|
+
if (!openTag[1] && end != "selfClose") {
|
40
|
+
stack.push(openTag[2]);
|
41
|
+
startCh = ch;
|
42
|
+
break;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
for (;;) {
|
47
|
+
var next = toNextTag(), end, tagLine = line, tagCh = ch - (next ? next[0].length : 0);
|
48
|
+
if (!next || !(end = toTagEnd())) return;
|
49
|
+
if (end == "selfClose") continue;
|
50
|
+
if (next[1]) { // closing tag
|
51
|
+
for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == next[2]) {
|
52
|
+
stack.length = i;
|
53
|
+
break;
|
54
|
+
}
|
55
|
+
if (!stack.length) return {
|
56
|
+
from: CodeMirror.Pos(start.line, startCh),
|
57
|
+
to: CodeMirror.Pos(tagLine, tagCh)
|
58
|
+
};
|
59
|
+
} else { // opening tag
|
60
|
+
stack.push(next[2]);
|
61
|
+
}
|
62
|
+
}
|
63
|
+
};
|
64
|
+
})();
|
data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/js/addon/format/autoFormatAll.js
RENAMED
File without changes
|
data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/js/addon/format/formatting.js
RENAMED
File without changes
|
File without changes
|
data/{vendor → app}/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/search.js
RENAMED
@@ -1,131 +1,131 @@
|
|
1
|
-
// Define search commands. Depends on dialog.js or another
|
2
|
-
// implementation of the openDialog method.
|
3
|
-
|
4
|
-
// Replace works a little oddly -- it will do the replace on the next
|
5
|
-
// Ctrl-G (or whatever is bound to findNext) press. You prevent a
|
6
|
-
// replace by making sure the match is no longer selected when hitting
|
7
|
-
// Ctrl-G.
|
8
|
-
|
9
|
-
(function() {
|
10
|
-
function searchOverlay(query) {
|
11
|
-
if (typeof query == "string") return {token: function(stream) {
|
12
|
-
if (stream.match(query)) return "searching";
|
13
|
-
stream.next();
|
14
|
-
stream.skipTo(query.charAt(0)) || stream.skipToEnd();
|
15
|
-
}};
|
16
|
-
return {token: function(stream) {
|
17
|
-
if (stream.match(query)) return "searching";
|
18
|
-
while (!stream.eol()) {
|
19
|
-
stream.next();
|
20
|
-
if (stream.match(query, false)) break;
|
21
|
-
}
|
22
|
-
}};
|
23
|
-
}
|
24
|
-
|
25
|
-
function SearchState() {
|
26
|
-
this.posFrom = this.posTo = this.query = null;
|
27
|
-
this.overlay = null;
|
28
|
-
}
|
29
|
-
function getSearchState(cm) {
|
30
|
-
return cm._searchState || (cm._searchState = new SearchState());
|
31
|
-
}
|
32
|
-
function getSearchCursor(cm, query, pos) {
|
33
|
-
// Heuristic: if the query string is all lowercase, do a case insensitive search.
|
34
|
-
return cm.getSearchCursor(query, pos, typeof query == "string" && query == query.toLowerCase());
|
35
|
-
}
|
36
|
-
function dialog(cm, text, shortText, f) {
|
37
|
-
if (cm.openDialog) cm.openDialog(text, f);
|
38
|
-
else f(prompt(shortText, ""));
|
39
|
-
}
|
40
|
-
function confirmDialog(cm, text, shortText, fs) {
|
41
|
-
if (cm.openConfirm) cm.openConfirm(text, fs);
|
42
|
-
else if (confirm(shortText)) fs[0]();
|
43
|
-
}
|
44
|
-
function parseQuery(query) {
|
45
|
-
var isRE = query.match(/^\/(.*)\/([a-z]*)$/);
|
46
|
-
return isRE ? new RegExp(isRE[1], isRE[2].indexOf("i") == -1 ? "" : "i") : query;
|
47
|
-
}
|
48
|
-
var queryDialog =
|
49
|
-
'Search: <input type="text" style="width: 10em"/> <span style="color: #888">(Use /re/ syntax for regexp search)</span>';
|
50
|
-
function doSearch(cm, rev) {
|
51
|
-
var state = getSearchState(cm);
|
52
|
-
if (state.query) return findNext(cm, rev);
|
53
|
-
dialog(cm, queryDialog, "Search for:", function(query) {
|
54
|
-
cm.operation(function() {
|
55
|
-
if (!query || state.query) return;
|
56
|
-
state.query = parseQuery(query);
|
57
|
-
cm.removeOverlay(state.overlay);
|
58
|
-
state.overlay = searchOverlay(query);
|
59
|
-
|
60
|
-
state.posFrom = state.posTo = cm.getCursor();
|
61
|
-
findNext(cm, rev);
|
62
|
-
});
|
63
|
-
});
|
64
|
-
}
|
65
|
-
function findNext(cm, rev) {cm.operation(function() {
|
66
|
-
var state = getSearchState(cm);
|
67
|
-
var cursor = getSearchCursor(cm, state.query, rev ? state.posFrom : state.posTo);
|
68
|
-
if (!cursor.find(rev)) {
|
69
|
-
cursor = getSearchCursor(cm, state.query, rev ? CodeMirror.Pos(cm.lastLine()) : CodeMirror.Pos(cm.firstLine(), 0));
|
70
|
-
if (!cursor.find(rev)) return;
|
71
|
-
}
|
72
|
-
cm.setSelection(cursor.from(), cursor.to());
|
73
|
-
state.posFrom = cursor.from(); state.posTo = cursor.to();
|
74
|
-
});}
|
75
|
-
function clearSearch(cm) {cm.operation(function() {
|
76
|
-
var state = getSearchState(cm);
|
77
|
-
if (!state.query) return;
|
78
|
-
state.query = null;
|
79
|
-
cm.removeOverlay(state.overlay);
|
80
|
-
});}
|
81
|
-
|
82
|
-
var replaceQueryDialog =
|
83
|
-
'Replace: <input type="text" style="width: 10em"/> <span style="color: #888">(Use /re/ syntax for regexp search)</span>';
|
84
|
-
var replacementQueryDialog = 'With: <input type="text" style="width: 10em"/>';
|
85
|
-
var doReplaceConfirm = "Replace? <button>Yes</button> <button>No</button> <button>Stop</button>";
|
86
|
-
function replace(cm, all) {
|
87
|
-
dialog(cm, replaceQueryDialog, "Replace:", function(query) {
|
88
|
-
if (!query) return;
|
89
|
-
query = parseQuery(query);
|
90
|
-
dialog(cm, replacementQueryDialog, "Replace with:", function(text) {
|
91
|
-
if (all) {
|
92
|
-
cm.operation(function() {
|
93
|
-
for (var cursor = getSearchCursor(cm, query); cursor.findNext();) {
|
94
|
-
if (typeof query != "string") {
|
95
|
-
var match = cm.getRange(cursor.from(), cursor.to()).match(query);
|
96
|
-
cursor.replace(text.replace(/\$(\d)/, function(_, i) {return match[i];}));
|
97
|
-
} else cursor.replace(text);
|
98
|
-
}
|
99
|
-
});
|
100
|
-
} else {
|
101
|
-
clearSearch(cm);
|
102
|
-
var cursor = getSearchCursor(cm, query, cm.getCursor());
|
103
|
-
var advance = function() {
|
104
|
-
var start = cursor.from(), match;
|
105
|
-
if (!(match = cursor.findNext())) {
|
106
|
-
cursor = getSearchCursor(cm, query);
|
107
|
-
if (!(match = cursor.findNext()) ||
|
108
|
-
(start && cursor.from().line == start.line && cursor.from().ch == start.ch)) return;
|
109
|
-
}
|
110
|
-
cm.setSelection(cursor.from(), cursor.to());
|
111
|
-
confirmDialog(cm, doReplaceConfirm, "Replace?",
|
112
|
-
[function() {doReplace(match);}, advance]);
|
113
|
-
};
|
114
|
-
var doReplace = function(match) {
|
115
|
-
cursor.replace(typeof query == "string" ? text :
|
116
|
-
text.replace(/\$(\d)/, function(_, i) {return match[i];}));
|
117
|
-
advance();
|
118
|
-
};
|
119
|
-
advance();
|
120
|
-
}
|
121
|
-
});
|
122
|
-
});
|
123
|
-
}
|
124
|
-
|
125
|
-
CodeMirror.commands.find = function(cm) {clearSearch(cm); doSearch(cm);};
|
126
|
-
CodeMirror.commands.findNext = doSearch;
|
127
|
-
CodeMirror.commands.findPrev = function(cm) {doSearch(cm, true);};
|
128
|
-
CodeMirror.commands.clearSearch = clearSearch;
|
129
|
-
CodeMirror.commands.replace = replace;
|
130
|
-
CodeMirror.commands.replaceAll = function(cm) {replace(cm, true);};
|
131
|
-
})();
|
1
|
+
// Define search commands. Depends on dialog.js or another
|
2
|
+
// implementation of the openDialog method.
|
3
|
+
|
4
|
+
// Replace works a little oddly -- it will do the replace on the next
|
5
|
+
// Ctrl-G (or whatever is bound to findNext) press. You prevent a
|
6
|
+
// replace by making sure the match is no longer selected when hitting
|
7
|
+
// Ctrl-G.
|
8
|
+
|
9
|
+
(function() {
|
10
|
+
function searchOverlay(query) {
|
11
|
+
if (typeof query == "string") return {token: function(stream) {
|
12
|
+
if (stream.match(query)) return "searching";
|
13
|
+
stream.next();
|
14
|
+
stream.skipTo(query.charAt(0)) || stream.skipToEnd();
|
15
|
+
}};
|
16
|
+
return {token: function(stream) {
|
17
|
+
if (stream.match(query)) return "searching";
|
18
|
+
while (!stream.eol()) {
|
19
|
+
stream.next();
|
20
|
+
if (stream.match(query, false)) break;
|
21
|
+
}
|
22
|
+
}};
|
23
|
+
}
|
24
|
+
|
25
|
+
function SearchState() {
|
26
|
+
this.posFrom = this.posTo = this.query = null;
|
27
|
+
this.overlay = null;
|
28
|
+
}
|
29
|
+
function getSearchState(cm) {
|
30
|
+
return cm._searchState || (cm._searchState = new SearchState());
|
31
|
+
}
|
32
|
+
function getSearchCursor(cm, query, pos) {
|
33
|
+
// Heuristic: if the query string is all lowercase, do a case insensitive search.
|
34
|
+
return cm.getSearchCursor(query, pos, typeof query == "string" && query == query.toLowerCase());
|
35
|
+
}
|
36
|
+
function dialog(cm, text, shortText, f) {
|
37
|
+
if (cm.openDialog) cm.openDialog(text, f);
|
38
|
+
else f(prompt(shortText, ""));
|
39
|
+
}
|
40
|
+
function confirmDialog(cm, text, shortText, fs) {
|
41
|
+
if (cm.openConfirm) cm.openConfirm(text, fs);
|
42
|
+
else if (confirm(shortText)) fs[0]();
|
43
|
+
}
|
44
|
+
function parseQuery(query) {
|
45
|
+
var isRE = query.match(/^\/(.*)\/([a-z]*)$/);
|
46
|
+
return isRE ? new RegExp(isRE[1], isRE[2].indexOf("i") == -1 ? "" : "i") : query;
|
47
|
+
}
|
48
|
+
var queryDialog =
|
49
|
+
'Search: <input type="text" style="width: 10em"/> <span style="color: #888">(Use /re/ syntax for regexp search)</span>';
|
50
|
+
function doSearch(cm, rev) {
|
51
|
+
var state = getSearchState(cm);
|
52
|
+
if (state.query) return findNext(cm, rev);
|
53
|
+
dialog(cm, queryDialog, "Search for:", function(query) {
|
54
|
+
cm.operation(function() {
|
55
|
+
if (!query || state.query) return;
|
56
|
+
state.query = parseQuery(query);
|
57
|
+
cm.removeOverlay(state.overlay);
|
58
|
+
state.overlay = searchOverlay(query);
|
59
|
+
cm.addOverlay(state.overlay);
|
60
|
+
state.posFrom = state.posTo = cm.getCursor();
|
61
|
+
findNext(cm, rev);
|
62
|
+
});
|
63
|
+
});
|
64
|
+
}
|
65
|
+
function findNext(cm, rev) {cm.operation(function() {
|
66
|
+
var state = getSearchState(cm);
|
67
|
+
var cursor = getSearchCursor(cm, state.query, rev ? state.posFrom : state.posTo);
|
68
|
+
if (!cursor.find(rev)) {
|
69
|
+
cursor = getSearchCursor(cm, state.query, rev ? CodeMirror.Pos(cm.lastLine()) : CodeMirror.Pos(cm.firstLine(), 0));
|
70
|
+
if (!cursor.find(rev)) return;
|
71
|
+
}
|
72
|
+
cm.setSelection(cursor.from(), cursor.to());
|
73
|
+
state.posFrom = cursor.from(); state.posTo = cursor.to();
|
74
|
+
});}
|
75
|
+
function clearSearch(cm) {cm.operation(function() {
|
76
|
+
var state = getSearchState(cm);
|
77
|
+
if (!state.query) return;
|
78
|
+
state.query = null;
|
79
|
+
cm.removeOverlay(state.overlay);
|
80
|
+
});}
|
81
|
+
|
82
|
+
var replaceQueryDialog =
|
83
|
+
'Replace: <input type="text" style="width: 10em"/> <span style="color: #888">(Use /re/ syntax for regexp search)</span>';
|
84
|
+
var replacementQueryDialog = 'With: <input type="text" style="width: 10em"/>';
|
85
|
+
var doReplaceConfirm = "Replace? <button>Yes</button> <button>No</button> <button>Stop</button>";
|
86
|
+
function replace(cm, all) {
|
87
|
+
dialog(cm, replaceQueryDialog, "Replace:", function(query) {
|
88
|
+
if (!query) return;
|
89
|
+
query = parseQuery(query);
|
90
|
+
dialog(cm, replacementQueryDialog, "Replace with:", function(text) {
|
91
|
+
if (all) {
|
92
|
+
cm.operation(function() {
|
93
|
+
for (var cursor = getSearchCursor(cm, query); cursor.findNext();) {
|
94
|
+
if (typeof query != "string") {
|
95
|
+
var match = cm.getRange(cursor.from(), cursor.to()).match(query);
|
96
|
+
cursor.replace(text.replace(/\$(\d)/, function(_, i) {return match[i];}));
|
97
|
+
} else cursor.replace(text);
|
98
|
+
}
|
99
|
+
});
|
100
|
+
} else {
|
101
|
+
clearSearch(cm);
|
102
|
+
var cursor = getSearchCursor(cm, query, cm.getCursor());
|
103
|
+
var advance = function() {
|
104
|
+
var start = cursor.from(), match;
|
105
|
+
if (!(match = cursor.findNext())) {
|
106
|
+
cursor = getSearchCursor(cm, query);
|
107
|
+
if (!(match = cursor.findNext()) ||
|
108
|
+
(start && cursor.from().line == start.line && cursor.from().ch == start.ch)) return;
|
109
|
+
}
|
110
|
+
cm.setSelection(cursor.from(), cursor.to());
|
111
|
+
confirmDialog(cm, doReplaceConfirm, "Replace?",
|
112
|
+
[function() {doReplace(match);}, advance]);
|
113
|
+
};
|
114
|
+
var doReplace = function(match) {
|
115
|
+
cursor.replace(typeof query == "string" ? text :
|
116
|
+
text.replace(/\$(\d)/, function(_, i) {return match[i];}));
|
117
|
+
advance();
|
118
|
+
};
|
119
|
+
advance();
|
120
|
+
}
|
121
|
+
});
|
122
|
+
});
|
123
|
+
}
|
124
|
+
|
125
|
+
CodeMirror.commands.find = function(cm) {clearSearch(cm); doSearch(cm);};
|
126
|
+
CodeMirror.commands.findNext = doSearch;
|
127
|
+
CodeMirror.commands.findPrev = function(cm) {doSearch(cm, true);};
|
128
|
+
CodeMirror.commands.clearSearch = clearSearch;
|
129
|
+
CodeMirror.commands.replace = replace;
|
130
|
+
CodeMirror.commands.replaceAll = function(cm) {replace(cm, true);};
|
131
|
+
})();
|