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,122 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<!--
|
3
|
+
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
4
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
5
|
+
-->
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>Inline Editing by Code — CKEditor Sample</title>
|
9
|
+
<meta charset="utf-8">
|
10
|
+
<script src="../ckeditor.js"></script>
|
11
|
+
<link href="sample.css" rel="stylesheet">
|
12
|
+
<style>
|
13
|
+
|
14
|
+
#editable
|
15
|
+
{
|
16
|
+
padding: 10px;
|
17
|
+
float: left;
|
18
|
+
}
|
19
|
+
|
20
|
+
</style>
|
21
|
+
</head>
|
22
|
+
<body>
|
23
|
+
<h1 class="samples">
|
24
|
+
<a href="index.html">CKEditor Samples</a> » Inline Editing by Code
|
25
|
+
</h1>
|
26
|
+
<div class="description">
|
27
|
+
<p>
|
28
|
+
This sample shows how to create an inline editor instance of CKEditor. It is created
|
29
|
+
with a JavaScript call using the following code:
|
30
|
+
</p>
|
31
|
+
<pre class="samples">
|
32
|
+
// This property tells CKEditor to not activate every element with contenteditable=true element.
|
33
|
+
CKEDITOR.disableAutoInline = true;
|
34
|
+
|
35
|
+
var editor = CKEDITOR.inline( document.getElementById( 'editable' ) );
|
36
|
+
</pre>
|
37
|
+
<p>
|
38
|
+
Note that <code>editable</code> in the code above is the <code>id</code>
|
39
|
+
attribute of the <code><div></code> element to be converted into an inline instance.
|
40
|
+
</p>
|
41
|
+
</div>
|
42
|
+
<div id="editable" contenteditable="true">
|
43
|
+
<h1><img alt="Saturn V carrying Apollo 11" class="right" src="assets/sample.jpg" /> Apollo 11</h1>
|
44
|
+
|
45
|
+
<p><b>Apollo 11</b> was the spaceflight that landed the first humans, Americans <a href="http://en.wikipedia.org/wiki/Neil_Armstrong" title="Neil Armstrong">Neil Armstrong</a> and <a href="http://en.wikipedia.org/wiki/Buzz_Aldrin" title="Buzz Aldrin">Buzz Aldrin</a>, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.</p>
|
46
|
+
|
47
|
+
<p>Armstrong spent about <s>three and a half</s> two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5 kg) of lunar material for return to Earth. A third member of the mission, <a href="http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)" title="Michael Collins (astronaut)">Michael Collins</a>, piloted the <a href="http://en.wikipedia.org/wiki/Apollo_Command/Service_Module" title="Apollo Command/Service Module">command</a> spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.</p>
|
48
|
+
|
49
|
+
<h2>Broadcasting and <em>quotes</em> <a id="quotes" name="quotes"></a></h2>
|
50
|
+
|
51
|
+
<p>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:</p>
|
52
|
+
|
53
|
+
<blockquote>
|
54
|
+
<p>One small step for [a] man, one giant leap for mankind.</p>
|
55
|
+
</blockquote>
|
56
|
+
|
57
|
+
<p>Apollo 11 effectively ended the <a href="http://en.wikipedia.org/wiki/Space_Race" title="Space Race">Space Race</a> and fulfilled a national goal proposed in 1961 by the late U.S. President <a href="http://en.wikipedia.org/wiki/John_F._Kennedy" title="John F. Kennedy">John F. Kennedy</a> in a speech before the United States Congress:</p>
|
58
|
+
|
59
|
+
<blockquote>
|
60
|
+
<p>[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.</p>
|
61
|
+
</blockquote>
|
62
|
+
|
63
|
+
<h2>Technical details <a id="tech-details" name="tech-details"></a></h2>
|
64
|
+
|
65
|
+
<table align="right" border="1" bordercolor="#ccc" cellpadding="5" cellspacing="0" style="border-collapse:collapse;margin:10px 0 10px 15px;">
|
66
|
+
<caption><strong>Mission crew</strong></caption>
|
67
|
+
<thead>
|
68
|
+
<tr>
|
69
|
+
<th scope="col">Position</th>
|
70
|
+
<th scope="col">Astronaut</th>
|
71
|
+
</tr>
|
72
|
+
</thead>
|
73
|
+
<tbody>
|
74
|
+
<tr>
|
75
|
+
<td>Commander</td>
|
76
|
+
<td>Neil A. Armstrong</td>
|
77
|
+
</tr>
|
78
|
+
<tr>
|
79
|
+
<td>Command Module Pilot</td>
|
80
|
+
<td>Michael Collins</td>
|
81
|
+
</tr>
|
82
|
+
<tr>
|
83
|
+
<td>Lunar Module Pilot</td>
|
84
|
+
<td>Edwin "Buzz" E. Aldrin, Jr.</td>
|
85
|
+
</tr>
|
86
|
+
</tbody>
|
87
|
+
</table>
|
88
|
+
|
89
|
+
<p>Launched by a <strong>Saturn V</strong> rocket from <a href="http://en.wikipedia.org/wiki/Kennedy_Space_Center" title="Kennedy Space Center">Kennedy Space Center</a> in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of <a href="http://en.wikipedia.org/wiki/NASA" title="NASA">NASA</a>'s Apollo program. The Apollo spacecraft had three parts:</p>
|
90
|
+
|
91
|
+
<ol>
|
92
|
+
<li><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</li>
|
93
|
+
<li><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</li>
|
94
|
+
<li><strong>Lunar Module</strong> for landing on the Moon.</li>
|
95
|
+
</ol>
|
96
|
+
|
97
|
+
<p>After being sent to the Moon by the Saturn V's upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the <a href="http://en.wikipedia.org/wiki/Mare_Tranquillitatis" title="Mare Tranquillitatis">Sea of Tranquility</a>. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the <a href="http://en.wikipedia.org/wiki/Pacific_Ocean" title="Pacific Ocean">Pacific Ocean</a> on July 24.</p>
|
98
|
+
|
99
|
+
<hr />
|
100
|
+
<p style="text-align: right;"><small>Source: <a href="http://en.wikipedia.org/wiki/Apollo_11">Wikipedia.org</a></small></p>
|
101
|
+
</div>
|
102
|
+
<script>
|
103
|
+
|
104
|
+
// We need to turn off the automatic editor creation first.
|
105
|
+
CKEDITOR.disableAutoInline = true;
|
106
|
+
|
107
|
+
var editor = CKEDITOR.inline( 'editable' );
|
108
|
+
|
109
|
+
</script>
|
110
|
+
<div id="footer">
|
111
|
+
<hr>
|
112
|
+
<p contenteditable="true">
|
113
|
+
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">
|
114
|
+
http://ckeditor.com</a>
|
115
|
+
</p>
|
116
|
+
<p id="copy">
|
117
|
+
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a>
|
118
|
+
- Frederico Knabben. All rights reserved.
|
119
|
+
</p>
|
120
|
+
</div>
|
121
|
+
</body>
|
122
|
+
</html>
|
@@ -0,0 +1,48 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
|
6
|
+
CKEDITOR.dialog.add( 'myDialog', function( editor ) {
|
7
|
+
return {
|
8
|
+
title: 'My Dialog',
|
9
|
+
minWidth: 400,
|
10
|
+
minHeight: 200,
|
11
|
+
contents: [
|
12
|
+
{
|
13
|
+
id: 'tab1',
|
14
|
+
label: 'First Tab',
|
15
|
+
title: 'First Tab',
|
16
|
+
elements: [
|
17
|
+
{
|
18
|
+
id: 'input1',
|
19
|
+
type: 'text',
|
20
|
+
label: 'Text Field'
|
21
|
+
},
|
22
|
+
{
|
23
|
+
id: 'select1',
|
24
|
+
type: 'select',
|
25
|
+
label: 'Select Field',
|
26
|
+
items: [
|
27
|
+
[ 'option1', 'value1' ],
|
28
|
+
[ 'option2', 'value2' ]
|
29
|
+
]
|
30
|
+
}
|
31
|
+
]
|
32
|
+
},
|
33
|
+
{
|
34
|
+
id: 'tab2',
|
35
|
+
label: 'Second Tab',
|
36
|
+
title: 'Second Tab',
|
37
|
+
elements: [
|
38
|
+
{
|
39
|
+
id: 'button1',
|
40
|
+
type: 'button',
|
41
|
+
label: 'Button Field'
|
42
|
+
}
|
43
|
+
]
|
44
|
+
}
|
45
|
+
]
|
46
|
+
};
|
47
|
+
});
|
48
|
+
|
@@ -0,0 +1,187 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<!--
|
3
|
+
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
4
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
5
|
+
-->
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>Using API to Customize Dialog Windows — CKEditor Sample</title>
|
9
|
+
<meta charset="utf-8">
|
10
|
+
<script src="../../../ckeditor.js"></script>
|
11
|
+
<link rel="stylesheet" href="../../sample.css">
|
12
|
+
<meta name="ckeditor-sample-name" content="Using the JavaScript API to customize dialog windows">
|
13
|
+
<meta name="ckeditor-sample-group" content="Advanced Samples">
|
14
|
+
<meta name="ckeditor-sample-description" content="Using the dialog windows API to customize dialog windows without changing the original editor code.">
|
15
|
+
<style>
|
16
|
+
|
17
|
+
.cke_button__mybutton_icon
|
18
|
+
{
|
19
|
+
display: none !important;
|
20
|
+
}
|
21
|
+
|
22
|
+
.cke_button__mybutton_label
|
23
|
+
{
|
24
|
+
display: inline !important;
|
25
|
+
}
|
26
|
+
|
27
|
+
</style>
|
28
|
+
<script>
|
29
|
+
|
30
|
+
CKEDITOR.on( 'instanceCreated', function( ev ){
|
31
|
+
var editor = ev.editor;
|
32
|
+
|
33
|
+
// Listen for the "pluginsLoaded" event, so we are sure that the
|
34
|
+
// "dialog" plugin has been loaded and we are able to do our
|
35
|
+
// customizations.
|
36
|
+
editor.on( 'pluginsLoaded', function() {
|
37
|
+
|
38
|
+
// If our custom dialog has not been registered, do that now.
|
39
|
+
if ( !CKEDITOR.dialog.exists( 'myDialog' ) ) {
|
40
|
+
// We need to do the following trick to find out the dialog
|
41
|
+
// definition file URL path. In the real world, you would simply
|
42
|
+
// point to an absolute path directly, like "/mydir/mydialog.js".
|
43
|
+
var href = document.location.href.split( '/' );
|
44
|
+
href.pop();
|
45
|
+
href.push( 'assets/my_dialog.js' );
|
46
|
+
href = href.join( '/' );
|
47
|
+
|
48
|
+
// Finally, register the dialog.
|
49
|
+
CKEDITOR.dialog.add( 'myDialog', href );
|
50
|
+
}
|
51
|
+
|
52
|
+
// Register the command used to open the dialog.
|
53
|
+
editor.addCommand( 'myDialogCmd', new CKEDITOR.dialogCommand( 'myDialog' ) );
|
54
|
+
|
55
|
+
// Add the a custom toolbar buttons, which fires the above
|
56
|
+
// command..
|
57
|
+
editor.ui.add( 'MyButton', CKEDITOR.UI_BUTTON, {
|
58
|
+
label: 'My Dialog',
|
59
|
+
command: 'myDialogCmd'
|
60
|
+
});
|
61
|
+
});
|
62
|
+
});
|
63
|
+
|
64
|
+
// When opening a dialog, its "definition" is created for it, for
|
65
|
+
// each editor instance. The "dialogDefinition" event is then
|
66
|
+
// fired. We should use this event to make customizations to the
|
67
|
+
// definition of existing dialogs.
|
68
|
+
CKEDITOR.on( 'dialogDefinition', function( ev ) {
|
69
|
+
// Take the dialog name and its definition from the event data.
|
70
|
+
var dialogName = ev.data.name;
|
71
|
+
var dialogDefinition = ev.data.definition;
|
72
|
+
|
73
|
+
// Check if the definition is from the dialog we're
|
74
|
+
// interested on (the "Link" dialog).
|
75
|
+
if ( dialogName == 'myDialog' && ev.editor.name == 'editor2' ) {
|
76
|
+
// Get a reference to the "Link Info" tab.
|
77
|
+
var infoTab = dialogDefinition.getContents( 'tab1' );
|
78
|
+
|
79
|
+
// Add a new text field to the "tab1" tab page.
|
80
|
+
infoTab.add( {
|
81
|
+
type: 'text',
|
82
|
+
label: 'My Custom Field',
|
83
|
+
id: 'customField',
|
84
|
+
'default': 'Sample!',
|
85
|
+
validate: function() {
|
86
|
+
if ( ( /\d/ ).test( this.getValue() ) )
|
87
|
+
return 'My Custom Field must not contain digits';
|
88
|
+
}
|
89
|
+
});
|
90
|
+
|
91
|
+
// Remove the "select1" field from the "tab1" tab.
|
92
|
+
infoTab.remove( 'select1' );
|
93
|
+
|
94
|
+
// Set the default value for "input1" field.
|
95
|
+
var input1 = infoTab.get( 'input1' );
|
96
|
+
input1[ 'default' ] = 'www.example.com';
|
97
|
+
|
98
|
+
// Remove the "tab2" tab page.
|
99
|
+
dialogDefinition.removeContents( 'tab2' );
|
100
|
+
|
101
|
+
// Add a new tab to the "Link" dialog.
|
102
|
+
dialogDefinition.addContents( {
|
103
|
+
id: 'customTab',
|
104
|
+
label: 'My Tab',
|
105
|
+
accessKey: 'M',
|
106
|
+
elements: [
|
107
|
+
{
|
108
|
+
id: 'myField1',
|
109
|
+
type: 'text',
|
110
|
+
label: 'My Text Field'
|
111
|
+
},
|
112
|
+
{
|
113
|
+
id: 'myField2',
|
114
|
+
type: 'text',
|
115
|
+
label: 'Another Text Field'
|
116
|
+
}
|
117
|
+
]
|
118
|
+
});
|
119
|
+
|
120
|
+
// Provide the focus handler to start initial focus in "customField" field.
|
121
|
+
dialogDefinition.onFocus = function() {
|
122
|
+
var urlField = this.getContentElement( 'tab1', 'customField' );
|
123
|
+
urlField.select();
|
124
|
+
};
|
125
|
+
}
|
126
|
+
});
|
127
|
+
|
128
|
+
var config = {
|
129
|
+
extraPlugins: 'dialog',
|
130
|
+
toolbar: [ [ 'MyButton' ] ]
|
131
|
+
};
|
132
|
+
|
133
|
+
</script>
|
134
|
+
</head>
|
135
|
+
<body>
|
136
|
+
<h1 class="samples">
|
137
|
+
<a href="../../index.html">CKEditor Samples</a> » Using CKEditor Dialog API
|
138
|
+
</h1>
|
139
|
+
<div class="description">
|
140
|
+
<p>
|
141
|
+
This sample shows how to use the
|
142
|
+
<a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.dialog">CKEditor Dialog API</a>
|
143
|
+
to customize CKEditor dialog windows without changing the original editor code.
|
144
|
+
The following customizations are being done in the example below:
|
145
|
+
</p>
|
146
|
+
<p>
|
147
|
+
For details on how to create this setup check the source code of this sample page.
|
148
|
+
</p>
|
149
|
+
</div>
|
150
|
+
<p>A custom dialog is added to the editors using the <code>pluginsLoaded</code> event, from an external <a target="_blank" href="assets/my_dialog.js">dialog definition file</a>:</p>
|
151
|
+
<ol>
|
152
|
+
<li><strong>Creating a custom dialog window</strong> – "My Dialog" dialog window opened with the "My Dialog" toolbar button.</li>
|
153
|
+
<li><strong>Creating a custom button</strong> – Add button to open the dialog with "My Dialog" toolbar button.</li>
|
154
|
+
</ol>
|
155
|
+
<textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
156
|
+
<script>
|
157
|
+
// Replace the <textarea id="editor1"> with an CKEditor instance.
|
158
|
+
CKEDITOR.replace( 'editor1', config );
|
159
|
+
</script>
|
160
|
+
<p>The below editor modify the dialog definition of the above added dialog using the <code>dialogDefinition</code> event:</p>
|
161
|
+
<ol>
|
162
|
+
<li><strong>Adding dialog tab</strong> – Add new tab "My Tab" to dialog window.</li>
|
163
|
+
<li><strong>Removing a dialog window tab</strong> – Remove "Second Tab" page from the dialog window.</li>
|
164
|
+
<li><strong>Adding dialog window fields</strong> – Add "My Custom Field" to the dialog window.</li>
|
165
|
+
<li><strong>Removing dialog window field</strong> – Remove "Select Field" selection field from the dialog window.</li>
|
166
|
+
<li><strong>Setting default values for dialog window fields</strong> – Set default value of "Text Field" text field. </li>
|
167
|
+
<li><strong>Setup initial focus for dialog window</strong> – Put initial focus on "My Custom Field" text field. </li>
|
168
|
+
</ol>
|
169
|
+
<textarea cols="80" id="editor2" name="editor2" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
170
|
+
<script>
|
171
|
+
|
172
|
+
// Replace the <textarea id="editor1"> with an CKEditor instance.
|
173
|
+
CKEDITOR.replace( 'editor2', config );
|
174
|
+
|
175
|
+
</script>
|
176
|
+
<div id="footer">
|
177
|
+
<hr>
|
178
|
+
<p>
|
179
|
+
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
180
|
+
</p>
|
181
|
+
<p id="copy">
|
182
|
+
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
183
|
+
Knabben. All rights reserved.
|
184
|
+
</p>
|
185
|
+
</div>
|
186
|
+
</body>
|
187
|
+
</html>
|
@@ -0,0 +1,103 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<!--
|
3
|
+
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
4
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
5
|
+
-->
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>ENTER Key Configuration — CKEditor Sample</title>
|
9
|
+
<meta charset="utf-8">
|
10
|
+
<script src="../../../ckeditor.js"></script>
|
11
|
+
<link href="../../sample.css" rel="stylesheet">
|
12
|
+
<meta name="ckeditor-sample-name" content="Using the "Enter" key in CKEditor">
|
13
|
+
<meta name="ckeditor-sample-group" content="Advanced Samples">
|
14
|
+
<meta name="ckeditor-sample-description" content="Configuring the behavior of <em>Enter</em> and <em>Shift+Enter</em> keys.">
|
15
|
+
<script>
|
16
|
+
|
17
|
+
var editor;
|
18
|
+
|
19
|
+
function changeEnter() {
|
20
|
+
// If we already have an editor, let's destroy it first.
|
21
|
+
if ( editor )
|
22
|
+
editor.destroy( true );
|
23
|
+
|
24
|
+
// Create the editor again, with the appropriate settings.
|
25
|
+
editor = CKEDITOR.replace( 'editor1', {
|
26
|
+
extraPlugins: 'enterkey',
|
27
|
+
enterMode: Number( document.getElementById( 'xEnter' ).value ),
|
28
|
+
shiftEnterMode: Number( document.getElementById( 'xShiftEnter' ).value )
|
29
|
+
});
|
30
|
+
}
|
31
|
+
|
32
|
+
window.onload = changeEnter;
|
33
|
+
|
34
|
+
</script>
|
35
|
+
</head>
|
36
|
+
<body>
|
37
|
+
<h1 class="samples">
|
38
|
+
<a href="../../index.html">CKEditor Samples</a> » ENTER Key Configuration
|
39
|
+
</h1>
|
40
|
+
<div class="description">
|
41
|
+
<p>
|
42
|
+
This sample shows how to configure the <em>Enter</em> and <em>Shift+Enter</em> keys
|
43
|
+
to perform actions specified in the
|
44
|
+
<a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-enterMode"><code>enterMode</code></a>
|
45
|
+
and <a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-shiftEnterMode"><code>shiftEnterMode</code></a>
|
46
|
+
parameters, respectively.
|
47
|
+
You can choose from the following options:
|
48
|
+
</p>
|
49
|
+
<ul class="samples">
|
50
|
+
<li><strong><code>ENTER_P</code></strong> – new <code><p></code> paragraphs are created;</li>
|
51
|
+
<li><strong><code>ENTER_BR</code></strong> – lines are broken with <code><br></code> elements;</li>
|
52
|
+
<li><strong><code>ENTER_DIV</code></strong> – new <code><div></code> blocks are created.</li>
|
53
|
+
</ul>
|
54
|
+
<p>
|
55
|
+
The sample code below shows how to configure CKEditor to create a <code><div></code> block when <em>Enter</em> key is pressed.
|
56
|
+
</p>
|
57
|
+
<pre class="samples">
|
58
|
+
CKEDITOR.replace( '<em>textarea_id</em>', {
|
59
|
+
<strong>enterMode: CKEDITOR.ENTER_DIV</strong>
|
60
|
+
});</pre>
|
61
|
+
<p>
|
62
|
+
Note that <code><em>textarea_id</em></code> in the code above is the <code>id</code> attribute of
|
63
|
+
the <code><textarea></code> element to be replaced.
|
64
|
+
</p>
|
65
|
+
</div>
|
66
|
+
<div style="float: left; margin-right: 20px">
|
67
|
+
When <em>Enter</em> is pressed:<br>
|
68
|
+
<select id="xEnter" onchange="changeEnter();">
|
69
|
+
<option selected="selected" value="1">Create a new <P> (recommended)</option>
|
70
|
+
<option value="3">Create a new <DIV></option>
|
71
|
+
<option value="2">Break the line with a <BR></option>
|
72
|
+
</select>
|
73
|
+
</div>
|
74
|
+
<div style="float: left">
|
75
|
+
When <em>Shift+Enter</em> is pressed:<br>
|
76
|
+
<select id="xShiftEnter" onchange="changeEnter();">
|
77
|
+
<option value="1">Create a new <P></option>
|
78
|
+
<option value="3">Create a new <DIV></option>
|
79
|
+
<option selected="selected" value="2">Break the line with a <BR> (recommended)</option>
|
80
|
+
</select>
|
81
|
+
</div>
|
82
|
+
<br style="clear: both">
|
83
|
+
<form action="../../sample_posteddata.php" method="post">
|
84
|
+
<p>
|
85
|
+
<br>
|
86
|
+
<textarea cols="80" id="editor1" name="editor1" rows="10">This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</textarea>
|
87
|
+
</p>
|
88
|
+
<p>
|
89
|
+
<input type="submit" value="Submit">
|
90
|
+
</p>
|
91
|
+
</form>
|
92
|
+
<div id="footer">
|
93
|
+
<hr>
|
94
|
+
<p>
|
95
|
+
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
96
|
+
</p>
|
97
|
+
<p id="copy">
|
98
|
+
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
99
|
+
Knabben. All rights reserved.
|
100
|
+
</p>
|
101
|
+
</div>
|
102
|
+
</body>
|
103
|
+
</html>
|