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
File without changes
|
@@ -0,0 +1,31 @@
|
|
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
|
+
(function(){function z(a){for(var a=a.toUpperCase(),c=A.length,b=0,f=0;f<c;++f)for(var d=A[f],e=d[1].length;a.substr(0,e)==d[1];a=a.substr(e))b+=d[0];return b}function B(a){for(var a=a.toUpperCase(),c=C.length,b=1,f=1;0<a.length;f*=c)b+=C.indexOf(a.charAt(a.length-1))*f,a=a.substr(0,a.length-1);return b}var D=CKEDITOR.htmlParser.fragment.prototype,o=CKEDITOR.htmlParser.element.prototype;D.onlyChild=o.onlyChild=function(){var a=this.children;return 1==a.length&&a[0]||null};o.removeAnyChildWithName=
|
6
|
+
function(a){for(var c=this.children,b=[],f,d=0;d<c.length;d++)f=c[d],f.name&&(f.name==a&&(b.push(f),c.splice(d--,1)),b=b.concat(f.removeAnyChildWithName(a)));return b};o.getAncestor=function(a){for(var c=this.parent;c&&(!c.name||!c.name.match(a));)c=c.parent;return c};D.firstChild=o.firstChild=function(a){for(var c,b=0;b<this.children.length;b++)if(c=this.children[b],a(c)||c.name&&(c=c.firstChild(a)))return c;return null};o.addStyle=function(a,c,b){var f="";if("string"==typeof c)f+=a+":"+c+";";else{if("object"==
|
7
|
+
typeof a)for(var d in a)a.hasOwnProperty(d)&&(f+=d+":"+a[d]+";");else f+=a;b=c}this.attributes||(this.attributes={});a=this.attributes.style||"";a=(b?[f,a]:[a,f]).join(";");this.attributes.style=a.replace(/^;|;(?=;)/,"")};o.getStyle=function(a){var c=this.attributes.style;if(c)return c=CKEDITOR.tools.parseCssText(c,1),c[a]};CKEDITOR.dtd.parentOf=function(a){var c={},b;for(b in this)-1==b.indexOf("$")&&this[b][a]&&(c[b]=1);return c};var H=/^([.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz){1}?/i,
|
8
|
+
E=/^(?:\b0[^\s]*\s*){1,4}$/,y={ol:{decimal:/\d+/,"lower-roman":/^m{0,4}(cm|cd|d?c{0,3})(xc|xl|l?x{0,3})(ix|iv|v?i{0,3})$/,"upper-roman":/^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/,"lower-alpha":/^[a-z]+$/,"upper-alpha":/^[A-Z]+$/},ul:{disc:/[l\u00B7\u2002]/,circle:/[\u006F\u00D8]/,square:/[\u006E\u25C6]/}},A=[[1E3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]],C="ABCDEFGHIJKLMNOPQRSTUVWXYZ",t=0,u=null,x,F=CKEDITOR.plugins.pastefromword=
|
9
|
+
{utils:{createListBulletMarker:function(a,c){var b=new CKEDITOR.htmlParser.element("cke:listbullet");b.attributes={"cke:listsymbol":a[0]};b.add(new CKEDITOR.htmlParser.text(c));return b},isListBulletIndicator:function(a){if(/mso-list\s*:\s*Ignore/i.test(a.attributes&&a.attributes.style))return!0},isContainingOnlySpaces:function(a){var c;return(c=a.onlyChild())&&/^(:?\s| )+$/.test(c.value)},resolveList:function(a){var c=a.attributes,b;if((b=a.removeAnyChildWithName("cke:listbullet"))&&b.length&&
|
10
|
+
(b=b[0]))return a.name="cke:li",c.style&&(c.style=F.filters.stylesFilter([["text-indent"],["line-height"],[/^margin(:?-left)?$/,null,function(a){a=a.split(" ");a=CKEDITOR.tools.convertToPx(a[3]||a[1]||a[0]);!t&&(null!==u&&a>u)&&(t=a-u);u=a;c["cke:indent"]=t&&Math.ceil(a/t)+1||1}],[/^mso-list$/,null,function(a){var a=a.split(" "),b=Number(a[0].match(/\d+/)),a=Number(a[1].match(/\d+/));1==a&&(b!==x&&(c["cke:reset"]=1),x=b);c["cke:indent"]=a}]])(c.style,a)||""),c["cke:indent"]||(u=0,c["cke:indent"]=
|
11
|
+
1),CKEDITOR.tools.extend(c,b.attributes),!0;x=u=t=null;return!1},getStyleComponents:function(){var a=CKEDITOR.dom.element.createFromHtml('<div style="position:absolute;left:-9999px;top:-9999px;"></div>',CKEDITOR.document);CKEDITOR.document.getBody().append(a);return function(c,b,f){a.setStyle(c,b);for(var c={},b=f.length,d=0;d<b;d++)c[f[d]]=a.getStyle(f[d]);return c}}(),listDtdParents:CKEDITOR.dtd.parentOf("ol")},filters:{flattenList:function(a,c){var c="number"==typeof c?c:1,b=a.attributes,f;switch(b.type){case "a":f=
|
12
|
+
"lower-alpha";break;case "1":f="decimal"}for(var d=a.children,e,h=0;h<d.length;h++)if(e=d[h],e.name in CKEDITOR.dtd.$listItem){var j=e.attributes,g=e.children,m=g[g.length-1];m.name in CKEDITOR.dtd.$list&&(a.add(m,h+1),--g.length||d.splice(h--,1));e.name="cke:li";b.start&&!h&&(j.value=b.start);F.filters.stylesFilter([["tab-stops",null,function(a){(a=a.split(" ")[1].match(H))&&(u=CKEDITOR.tools.convertToPx(a[0]))}],1==c?["mso-list",null,function(a){a=a.split(" ");a=Number(a[0].match(/\d+/));a!==x&&
|
13
|
+
(j["cke:reset"]=1);x=a}]:null])(j.style);j["cke:indent"]=c;j["cke:listtype"]=a.name;j["cke:list-style-type"]=f}else if(e.name in CKEDITOR.dtd.$list){arguments.callee.apply(this,[e,c+1]);d=d.slice(0,h).concat(e.children).concat(d.slice(h+1));a.children=[];e=0;for(g=d.length;e<g;e++)a.add(d[e])}delete a.name;b["cke:list"]=1},assembleList:function(a){for(var c=a.children,b,f,d,e,h,j,a=[],g,m,i,l,k,p,n=0;n<c.length;n++)if(b=c[n],"cke:li"==b.name)if(b.name="li",f=b.attributes,i=(i=f["cke:listsymbol"])&&
|
14
|
+
i.match(/^(?:[(]?)([^\s]+?)([.)]?)$/),l=k=p=null,f["cke:ignored"])c.splice(n--,1);else{f["cke:reset"]&&(j=e=h=null);d=Number(f["cke:indent"]);d!=e&&(m=g=null);if(i){if(m&&y[m][g].test(i[1]))l=m,k=g;else for(var r in y)for(var v in y[r])if(y[r][v].test(i[1]))if("ol"==r&&/alpha|roman/.test(v)){if(g=/roman/.test(v)?z(i[1]):B(i[1]),!p||g<p)p=g,l=r,k=v}else{l=r;k=v;break}!l&&(l=i[2]?"ol":"ul")}else l=f["cke:listtype"]||"ol",k=f["cke:list-style-type"];m=l;g=k||("ol"==l?"decimal":"disc");k&&k!=("ol"==l?
|
15
|
+
"decimal":"disc")&&b.addStyle("list-style-type",k);if("ol"==l&&i){switch(k){case "decimal":p=Number(i[1]);break;case "lower-roman":case "upper-roman":p=z(i[1]);break;case "lower-alpha":case "upper-alpha":p=B(i[1])}b.attributes.value=p}if(j){if(d>e)a.push(j=new CKEDITOR.htmlParser.element(l)),j.add(b),h.add(j);else{if(d<e){e-=d;for(var s;e--&&(s=j.parent);)j=s.parent}j.add(b)}c.splice(n--,1)}else a.push(j=new CKEDITOR.htmlParser.element(l)),j.add(b),c[n]=j;h=b;e=d}else j&&(j=e=h=null);for(n=0;n<a.length;n++)if(j=
|
16
|
+
a[n],r=j.children,g=g=void 0,v=j.children.length,s=g=void 0,c=/list-style-type:(.*?)(?:;|$)/,e=CKEDITOR.plugins.pastefromword.filters.stylesFilter,g=j.attributes,!c.exec(g.style)){for(h=0;h<v;h++)if(g=r[h],g.attributes.value&&Number(g.attributes.value)==h+1&&delete g.attributes.value,g=c.exec(g.attributes.style))if(g[1]==s||!s)s=g[1];else{s=null;break}if(s){for(h=0;h<v;h++)g=r[h].attributes,g.style&&(g.style=e([["list-style-type"]])(g.style)||"");j.addStyle("list-style-type",s)}}x=u=t=null},falsyFilter:function(){return!1},
|
17
|
+
stylesFilter:function(a,c){return function(b,f){var d=[];(b||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(b,e,g){e=e.toLowerCase();"font-family"==e&&(g=g.replace(/["']/g,""));for(var m,i,l,k=0;k<a.length;k++)if(a[k]&&(b=a[k][0],m=a[k][1],i=a[k][2],l=a[k][3],e.match(b)&&(!m||g.match(m)))){e=l||e;c&&(i=i||g);"function"==typeof i&&(i=i(g,f,e));i&&i.push&&(e=i[0],i=i[1]);"string"==typeof i&&d.push([e,i]);return}!c&&d.push([e,g])});for(var e=0;e<d.length;e++)d[e]=
|
18
|
+
d[e].join(":");return d.length?d.join(";")+";":!1}},elementMigrateFilter:function(a,c){return a?function(b){var f=c?(new CKEDITOR.style(a,c))._.definition:a;b.name=f.element;CKEDITOR.tools.extend(b.attributes,CKEDITOR.tools.clone(f.attributes));b.addStyle(CKEDITOR.style.getStyleText(f))}:function(){}},styleMigrateFilter:function(a,c){var b=this.elementMigrateFilter;return a?function(f,d){var e=new CKEDITOR.htmlParser.element(null),h={};h[c]=f;b(a,h)(e);e.children=d.children;d.children=[e];e.filter=
|
19
|
+
function(){};e.parent=d}:function(){}},bogusAttrFilter:function(a,c){if(-1==c.name.indexOf("cke:"))return!1},applyStyleFilter:null},getRules:function(a,c){var b=CKEDITOR.dtd,f=CKEDITOR.tools.extend({},b.$block,b.$listItem,b.$tableContent),d=a.config,e=this.filters,h=e.falsyFilter,j=e.stylesFilter,g=e.elementMigrateFilter,m=CKEDITOR.tools.bind(this.filters.styleMigrateFilter,this.filters),i=this.utils.createListBulletMarker,l=e.flattenList,k=e.assembleList,p=this.utils.isListBulletIndicator,n=this.utils.isContainingOnlySpaces,
|
20
|
+
r=this.utils.resolveList,v=function(a){a=CKEDITOR.tools.convertToPx(a);return isNaN(a)?a:a+"px"},s=this.utils.getStyleComponents,u=this.utils.listDtdParents,o=!1!==d.pasteFromWordRemoveFontStyles,t=!1!==d.pasteFromWordRemoveStyles;return{elementNames:[[/meta|link|script/,""]],root:function(a){a.filterChildren(c);k(a)},elements:{"^":function(a){var c;CKEDITOR.env.gecko&&(c=e.applyStyleFilter)&&c(a)},$:function(a){var w=a.name||"",e=a.attributes;w in f&&e.style&&(e.style=j([[/^(:?width|height)$/,null,
|
21
|
+
v]])(e.style)||"");if(w.match(/h\d/)){a.filterChildren(c);if(r(a))return;g(d["format_"+w])(a)}else if(w in b.$inline)a.filterChildren(c),n(a)&&delete a.name;else if(-1!=w.indexOf(":")&&-1==w.indexOf("cke")){a.filterChildren(c);if("v:imagedata"==w){if(w=a.attributes["o:href"])a.attributes.src=w;a.name="img";return}delete a.name}w in u&&(a.filterChildren(c),k(a))},style:function(a){if(CKEDITOR.env.gecko){var a=(a=a.onlyChild().value.match(/\/\* Style Definitions \*\/([\s\S]*?)\/\*/))&&a[1],c={};a&&
|
22
|
+
(a.replace(/[\n\r]/g,"").replace(/(.+?)\{(.+?)\}/g,function(a,b,d){for(var b=b.split(","),a=b.length,q=0;q<a;q++)CKEDITOR.tools.trim(b[q]).replace(/^(\w+)(\.[\w-]+)?$/g,function(a,b,q){b=b||"*";q=q.substring(1,q.length);q.match(/MsoNormal/)||(c[b]||(c[b]={}),q?c[b][q]=d:c[b]=d)})}),e.applyStyleFilter=function(a){var b=c["*"]?"*":a.name,q=a.attributes&&a.attributes["class"];b in c&&(b=c[b],"object"==typeof b&&(b=b[q]),b&&a.addStyle(b,!0))})}return!1},p:function(a){if(/MsoListParagraph/i.exec(a.attributes["class"])||
|
23
|
+
a.getStyle("mso-list")){var b=a.firstChild(function(a){return a.type==CKEDITOR.NODE_TEXT&&!n(a.parent)});(b=b&&b.parent)&&b.addStyle("mso-list","Ignore")}a.filterChildren(c);r(a)||(d.enterMode==CKEDITOR.ENTER_BR?(delete a.name,a.add(new CKEDITOR.htmlParser.element("br"))):g(d["format_"+(d.enterMode==CKEDITOR.ENTER_P?"p":"div")])(a))},div:function(a){var c=a.onlyChild();if(c&&"table"==c.name){var b=a.attributes;c.attributes=CKEDITOR.tools.extend(c.attributes,b);b.style&&c.addStyle(b.style);c=new CKEDITOR.htmlParser.element("div");
|
24
|
+
c.addStyle("clear","both");a.add(c);delete a.name}},td:function(a){a.getAncestor("thead")&&(a.name="th")},ol:l,ul:l,dl:l,font:function(a){if(p(a.parent))delete a.name;else{a.filterChildren(c);var b=a.attributes,d=b.style,e=a.parent;"font"==e.name?(CKEDITOR.tools.extend(e.attributes,a.attributes),d&&e.addStyle(d),delete a.name):(d=d||"",b.color&&("#000000"!=b.color&&(d+="color:"+b.color+";"),delete b.color),b.face&&(d+="font-family:"+b.face+";",delete b.face),b.size&&(d+="font-size:"+(3<b.size?"large":
|
25
|
+
3>b.size?"small":"medium")+";",delete b.size),a.name="span",a.addStyle(d))}},span:function(a){if(p(a.parent))return!1;a.filterChildren(c);if(n(a))return delete a.name,null;if(p(a)){var b=a.firstChild(function(a){return a.value||"img"==a.name}),e=(b=b&&(b.value||"l."))&&b.match(/^(?:[(]?)([^\s]+?)([.)]?)$/);if(e)return b=i(e,b),(a=a.getAncestor("span"))&&/ mso-hide:\s*all|display:\s*none /.test(a.attributes.style)&&(b.attributes["cke:ignored"]=1),b}if(e=(b=a.attributes)&&b.style)b.style=j([["line-height"],
|
26
|
+
[/^font-family$/,null,!o?m(d.font_style,"family"):null],[/^font-size$/,null,!o?m(d.fontSize_style,"size"):null],[/^color$/,null,!o?m(d.colorButton_foreStyle,"color"):null],[/^background-color$/,null,!o?m(d.colorButton_backStyle,"color"):null]])(e,a)||"";b.style||delete b.style;CKEDITOR.tools.isEmpty(b)&&delete a.name;return null},b:g(d.coreStyles_bold),i:g(d.coreStyles_italic),u:g(d.coreStyles_underline),s:g(d.coreStyles_strike),sup:g(d.coreStyles_superscript),sub:g(d.coreStyles_subscript),a:function(a){var b=
|
27
|
+
a.attributes;b&&!b.href&&b.name?delete a.name:CKEDITOR.env.webkit&&(b.href&&b.href.match(/file:\/\/\/[\S]+#/i))&&(b.href=b.href.replace(/file:\/\/\/[^#]+/i,""))},"cke:listbullet":function(a){a.getAncestor(/h\d/)&&!d.pasteFromWordNumberedHeadingToList&&delete a.name}},attributeNames:[[/^onmouse(:?out|over)/,""],[/^onload$/,""],[/(?:v|o):\w+/,""],[/^lang/,""]],attributes:{style:j(t?[[/^list-style-type$/,null],[/^margin$|^margin-(?!bottom|top)/,null,function(a,b,c){if(b.name in{p:1,div:1}){b="ltr"==
|
28
|
+
d.contentsLangDirection?"margin-left":"margin-right";if("margin"==c)a=s(c,a,[b])[b];else if(c!=b)return null;if(a&&!E.test(a))return[b,a]}return null}],[/^clear$/],[/^border.*|margin.*|vertical-align|float$/,null,function(a,b){if("img"==b.name)return a}],[/^width|height$/,null,function(a,b){if(b.name in{table:1,td:1,th:1,img:1})return a}]]:[[/^mso-/],[/-color$/,null,function(a){if("transparent"==a)return!1;if(CKEDITOR.env.gecko)return a.replace(/-moz-use-text-color/g,"transparent")}],[/^margin$/,
|
29
|
+
E],["text-indent","0cm"],["page-break-before"],["tab-stops"],["display","none"],o?[/font-?/]:null],t),width:function(a,c){if(c.name in b.$tableContent)return!1},border:function(a,c){if(c.name in b.$tableContent)return!1},"class":h,bgcolor:h,valign:t?h:function(a,b){b.addStyle("vertical-align",a);return!1}},comment:!CKEDITOR.env.ie?function(a,b){var c=a.match(/<img.*?>/),d=a.match(/^\[if !supportLists\]([\s\S]*?)\[endif\]$/);return d?(d=(c=d[1]||c&&"l.")&&c.match(/>(?:[(]?)([^\s]+?)([.)]?)</),i(d,
|
30
|
+
c)):CKEDITOR.env.gecko&&c?(c=CKEDITOR.htmlParser.fragment.fromHtml(c[0]).children[0],(d=(d=(d=b.previous)&&d.value.match(/<v:imagedata[^>]*o:href=['"](.*?)['"]/))&&d[1])&&(c.attributes.src=d),c):!1}:h}}},G=function(){this.dataFilter=new CKEDITOR.htmlParser.filter};G.prototype={toHtml:function(a){var a=CKEDITOR.htmlParser.fragment.fromHtml(a),c=new CKEDITOR.htmlParser.basicWriter;a.writeHtml(c,this.dataFilter);return c.getHtml(!0)}};CKEDITOR.cleanWord=function(a,c){CKEDITOR.env.gecko&&(a=a.replace(/(<\!--\[if[^<]*?\])--\>([\S\s]*?)<\!--(\[endif\]--\>)/gi,
|
31
|
+
"$1$2$3"));CKEDITOR.env.webkit&&(a=a.replace(/(class="MsoListParagraph[^>]+><\!--\[if !supportLists\]--\>)([^<]+<span[^<]+<\/span>)(<\!--\[endif\]--\>)/gi,"$1<span>$2</span>$3"));var b=new G,f=b.dataFilter;f.addRules(CKEDITOR.plugins.pastefromword.getRules(c,f));c.fire("beforeCleanWord",{filter:f});try{a=b.toHtml(a)}catch(d){alert(c.lang.pastefromword.error)}a=a.replace(/cke:.*?".*?"/g,"");a=a.replace(/style=""/g,"");return a=a.replace(/<span>/g,"")}})();
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,21 @@
|
|
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
|
+
(function(){function r(a){for(var e=0,l=0,k=0,m,g=a.$.rows.length;k<g;k++){m=a.$.rows[k];for(var d=e=0,c,b=m.cells.length;d<b;d++)c=m.cells[d],e+=c.colSpan;e>l&&(l=e)}return l}function o(a){return function(){var e=this.getValue(),e=!!(CKEDITOR.dialog.validate.integer()(e)&&0<e);e||(alert(a),this.select());return e}}function n(a,e){var l=function(g){return new CKEDITOR.dom.element(g,a.document)},n=a.editable(),m=a.plugins.dialogadvtab;return{title:a.lang.table.title,minWidth:310,minHeight:CKEDITOR.env.ie?
|
6
|
+
310:280,onLoad:function(){var g=this,a=g.getContentElement("advanced","advStyles");if(a)a.on("change",function(){var a=this.getStyle("width",""),b=g.getContentElement("info","txtWidth");b&&b.setValue(a,!0);a=this.getStyle("height","");(b=g.getContentElement("info","txtHeight"))&&b.setValue(a,!0)})},onShow:function(){var g=a.getSelection(),d=g.getRanges(),c,b=this.getContentElement("info","txtRows"),h=this.getContentElement("info","txtCols"),p=this.getContentElement("info","txtWidth"),f=this.getContentElement("info",
|
7
|
+
"txtHeight");"tableProperties"==e&&((g=g.getSelectedElement())&&g.is("table")?c=g:0<d.length&&(CKEDITOR.env.webkit&&d[0].shrink(CKEDITOR.NODE_ELEMENT),c=a.elementPath(d[0].getCommonAncestor(!0)).contains("table",1)),this._.selectedElement=c);c?(this.setupContent(c),b&&b.disable(),h&&h.disable()):(b&&b.enable(),h&&h.enable());p&&p.onChange();f&&f.onChange()},onOk:function(){var g=a.getSelection(),d=this._.selectedElement&&g.createBookmarks(),c=this._.selectedElement||l("table"),b={};this.commitContent(b,
|
8
|
+
c);if(b.info){b=b.info;if(!this._.selectedElement)for(var h=c.append(l("tbody")),e=parseInt(b.txtRows,10)||0,f=parseInt(b.txtCols,10)||0,i=0;i<e;i++)for(var j=h.append(l("tr")),k=0;k<f;k++){var m=j.append(l("td"));CKEDITOR.env.ie||m.append(l("br"))}e=b.selHeaders;if(!c.$.tHead&&("row"==e||"both"==e)){j=new CKEDITOR.dom.element(c.$.createTHead());h=c.getElementsByTag("tbody").getItem(0);h=h.getElementsByTag("tr").getItem(0);for(i=0;i<h.getChildCount();i++)f=h.getChild(i),f.type==CKEDITOR.NODE_ELEMENT&&
|
9
|
+
!f.data("cke-bookmark")&&(f.renameNode("th"),f.setAttribute("scope","col"));j.append(h.remove())}if(null!==c.$.tHead&&!("row"==e||"both"==e)){j=new CKEDITOR.dom.element(c.$.tHead);h=c.getElementsByTag("tbody").getItem(0);for(k=h.getFirst();0<j.getChildCount();){h=j.getFirst();for(i=0;i<h.getChildCount();i++)f=h.getChild(i),f.type==CKEDITOR.NODE_ELEMENT&&(f.renameNode("td"),f.removeAttribute("scope"));h.insertBefore(k)}j.remove()}if(!this.hasColumnHeaders&&("col"==e||"both"==e))for(j=0;j<c.$.rows.length;j++)f=
|
10
|
+
new CKEDITOR.dom.element(c.$.rows[j].cells[0]),f.renameNode("th"),f.setAttribute("scope","row");if(this.hasColumnHeaders&&!("col"==e||"both"==e))for(i=0;i<c.$.rows.length;i++)j=new CKEDITOR.dom.element(c.$.rows[i]),"tbody"==j.getParent().getName()&&(f=new CKEDITOR.dom.element(j.$.cells[0]),f.renameNode("td"),f.removeAttribute("scope"));b.txtHeight?c.setStyle("height",b.txtHeight):c.removeStyle("height");b.txtWidth?c.setStyle("width",b.txtWidth):c.removeStyle("width");c.getAttribute("style")||c.removeAttribute("style")}if(this._.selectedElement)try{g.selectBookmarks(d)}catch(n){}else a.insertElement(c),
|
11
|
+
setTimeout(function(){var g=new CKEDITOR.dom.element(c.$.rows[0].cells[0]),b=a.createRange();b.moveToPosition(g,CKEDITOR.POSITION_AFTER_START);b.select()},0)},contents:[{id:"info",label:a.lang.table.title,elements:[{type:"hbox",widths:[null,null],styles:["vertical-align:top"],children:[{type:"vbox",padding:0,children:[{type:"text",id:"txtRows","default":3,label:a.lang.table.rows,required:!0,controlStyle:"width:5em",validate:o(a.lang.table.invalidRows),setup:function(a){this.setValue(a.$.rows.length)},
|
12
|
+
commit:k},{type:"text",id:"txtCols","default":2,label:a.lang.table.columns,required:!0,controlStyle:"width:5em",validate:o(a.lang.table.invalidCols),setup:function(a){this.setValue(r(a))},commit:k},{type:"html",html:" "},{type:"select",id:"selHeaders",requiredContent:"th","default":"",label:a.lang.table.headers,items:[[a.lang.table.headersNone,""],[a.lang.table.headersRow,"row"],[a.lang.table.headersColumn,"col"],[a.lang.table.headersBoth,"both"]],setup:function(a){var d=this.getDialog();d.hasColumnHeaders=
|
13
|
+
!0;for(var c=0;c<a.$.rows.length;c++){var b=a.$.rows[c].cells[0];if(b&&"th"!=b.nodeName.toLowerCase()){d.hasColumnHeaders=!1;break}}null!==a.$.tHead?this.setValue(d.hasColumnHeaders?"both":"row"):this.setValue(d.hasColumnHeaders?"col":"")},commit:k},{type:"text",id:"txtBorder",requiredContent:"table[border]","default":a.filter.check("table[border]")?1:0,label:a.lang.table.border,controlStyle:"width:3em",validate:CKEDITOR.dialog.validate.number(a.lang.table.invalidBorder),setup:function(a){this.setValue(a.getAttribute("border")||
|
14
|
+
"")},commit:function(a,d){this.getValue()?d.setAttribute("border",this.getValue()):d.removeAttribute("border")}},{id:"cmbAlign",type:"select",requiredContent:"table[align]","default":"",label:a.lang.common.align,items:[[a.lang.common.notSet,""],[a.lang.common.alignLeft,"left"],[a.lang.common.alignCenter,"center"],[a.lang.common.alignRight,"right"]],setup:function(a){this.setValue(a.getAttribute("align")||"")},commit:function(a,d){this.getValue()?d.setAttribute("align",this.getValue()):d.removeAttribute("align")}}]},
|
15
|
+
{type:"vbox",padding:0,children:[{type:"hbox",widths:["5em"],children:[{type:"text",id:"txtWidth",requiredContent:"table{width}",controlStyle:"width:5em",label:a.lang.common.width,title:a.lang.common.cssLengthTooltip,"default":a.filter.check("table{width}")?500>n.getSize("width")?"100%":500:0,getValue:q,validate:CKEDITOR.dialog.validate.cssLength(a.lang.common.invalidCssLength.replace("%1",a.lang.common.width)),onChange:function(){var a=this.getDialog().getContentElement("advanced","advStyles");a&&
|
16
|
+
a.updateStyle("width",this.getValue())},setup:function(a){this.setValue(a.getStyle("width"))},commit:k}]},{type:"hbox",widths:["5em"],children:[{type:"text",id:"txtHeight",requiredContent:"table{height}",controlStyle:"width:5em",label:a.lang.common.height,title:a.lang.common.cssLengthTooltip,"default":"",getValue:q,validate:CKEDITOR.dialog.validate.cssLength(a.lang.common.invalidCssLength.replace("%1",a.lang.common.height)),onChange:function(){var a=this.getDialog().getContentElement("advanced","advStyles");
|
17
|
+
a&&a.updateStyle("height",this.getValue())},setup:function(a){(a=a.getStyle("height"))&&this.setValue(a)},commit:k}]},{type:"html",html:" "},{type:"text",id:"txtCellSpace",requiredContent:"table[cellspacing]",controlStyle:"width:3em",label:a.lang.table.cellSpace,"default":a.filter.check("table[cellspacing]")?1:0,validate:CKEDITOR.dialog.validate.number(a.lang.table.invalidCellSpacing),setup:function(a){this.setValue(a.getAttribute("cellSpacing")||"")},commit:function(a,d){this.getValue()?d.setAttribute("cellSpacing",
|
18
|
+
this.getValue()):d.removeAttribute("cellSpacing")}},{type:"text",id:"txtCellPad",requiredContent:"table[cellpadding]",controlStyle:"width:3em",label:a.lang.table.cellPad,"default":a.filter.check("table[cellpadding]")?1:0,validate:CKEDITOR.dialog.validate.number(a.lang.table.invalidCellPadding),setup:function(a){this.setValue(a.getAttribute("cellPadding")||"")},commit:function(a,d){this.getValue()?d.setAttribute("cellPadding",this.getValue()):d.removeAttribute("cellPadding")}}]}]},{type:"html",align:"right",
|
19
|
+
html:""},{type:"vbox",padding:0,children:[{type:"text",id:"txtCaption",requiredContent:"caption",label:a.lang.table.caption,setup:function(a){this.enable();a=a.getElementsByTag("caption");if(0<a.count()){var a=a.getItem(0),d=a.getFirst(CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT));d&&!d.equals(a.getBogus())?(this.disable(),this.setValue(a.getText())):(a=CKEDITOR.tools.trim(a.getText()),this.setValue(a))}},commit:function(e,d){if(this.isEnabled()){var c=this.getValue(),b=d.getElementsByTag("caption");
|
20
|
+
if(c)0<b.count()?(b=b.getItem(0),b.setHtml("")):(b=new CKEDITOR.dom.element("caption",a.document),d.getChildCount()?b.insertBefore(d.getFirst()):b.appendTo(d)),b.append(new CKEDITOR.dom.text(c,a.document));else if(0<b.count())for(c=b.count()-1;0<=c;c--)b.getItem(c).remove()}}},{type:"text",id:"txtSummary",requiredContent:"table[summary]",label:a.lang.table.summary,setup:function(a){this.setValue(a.getAttribute("summary")||"")},commit:function(a,d){this.getValue()?d.setAttribute("summary",this.getValue()):
|
21
|
+
d.removeAttribute("summary")}}]}]},m&&m.createAdvancedTab(a,null,"table")]}}var q=CKEDITOR.tools.cssLength,k=function(a){var e=this.id;a.info||(a.info={});a.info[e]=this.getValue()};CKEDITOR.dialog.add("table",function(a){return n(a,"table")});CKEDITOR.dialog.add("tableProperties",function(a){return n(a,"tableProperties")})})();
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,82 @@
|
|
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>Ajax — CKEditor Sample</title>
|
9
|
+
<meta charset="utf-8">
|
10
|
+
<script src="../ckeditor.js"></script>
|
11
|
+
<link rel="stylesheet" href="sample.css">
|
12
|
+
<script>
|
13
|
+
|
14
|
+
var editor, html = '';
|
15
|
+
|
16
|
+
function createEditor() {
|
17
|
+
if ( editor )
|
18
|
+
return;
|
19
|
+
|
20
|
+
// Create a new editor inside the <div id="editor">, setting its value to html
|
21
|
+
var config = {};
|
22
|
+
editor = CKEDITOR.appendTo( 'editor', config, html );
|
23
|
+
}
|
24
|
+
|
25
|
+
function removeEditor() {
|
26
|
+
if ( !editor )
|
27
|
+
return;
|
28
|
+
|
29
|
+
// Retrieve the editor contents. In an Ajax application, this data would be
|
30
|
+
// sent to the server or used in any other way.
|
31
|
+
document.getElementById( 'editorcontents' ).innerHTML = html = editor.getData();
|
32
|
+
document.getElementById( 'contents' ).style.display = '';
|
33
|
+
|
34
|
+
// Destroy the editor.
|
35
|
+
editor.destroy();
|
36
|
+
editor = null;
|
37
|
+
}
|
38
|
+
|
39
|
+
</script>
|
40
|
+
</head>
|
41
|
+
<body>
|
42
|
+
<h1 class="samples">
|
43
|
+
<a href="index.html">CKEditor Samples</a> » Create and Destroy Editor Instances for Ajax Applications
|
44
|
+
</h1>
|
45
|
+
<div class="description">
|
46
|
+
<p>
|
47
|
+
This sample shows how to create and destroy CKEditor instances on the fly. After the removal of CKEditor the content created inside the editing
|
48
|
+
area will be displayed in a <code><div></code> element.
|
49
|
+
</p>
|
50
|
+
<p>
|
51
|
+
For details of how to create this setup check the source code of this sample page
|
52
|
+
for JavaScript code responsible for the creation and destruction of a CKEditor instance.
|
53
|
+
</p>
|
54
|
+
</div>
|
55
|
+
<p>Click the buttons to create and remove a CKEditor instance.</p>
|
56
|
+
<p>
|
57
|
+
<input onclick="createEditor();" type="button" value="Create Editor">
|
58
|
+
<input onclick="removeEditor();" type="button" value="Remove Editor">
|
59
|
+
</p>
|
60
|
+
<!-- This div will hold the editor. -->
|
61
|
+
<div id="editor">
|
62
|
+
</div>
|
63
|
+
<div id="contents" style="display: none">
|
64
|
+
<p>
|
65
|
+
Edited Contents:
|
66
|
+
</p>
|
67
|
+
<!-- This div will be used to display the editor contents. -->
|
68
|
+
<div id="editorcontents">
|
69
|
+
</div>
|
70
|
+
</div>
|
71
|
+
<div id="footer">
|
72
|
+
<hr>
|
73
|
+
<p>
|
74
|
+
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
75
|
+
</p>
|
76
|
+
<p id="copy">
|
77
|
+
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
78
|
+
Knabben. All rights reserved.
|
79
|
+
</p>
|
80
|
+
</div>
|
81
|
+
</body>
|
82
|
+
</html>
|
@@ -0,0 +1,207 @@
|
|
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
|
+
<meta charset="utf-8">
|
9
|
+
<title>API Usage — CKEditor Sample</title>
|
10
|
+
<script src="../ckeditor.js"></script>
|
11
|
+
<link href="sample.css" rel="stylesheet">
|
12
|
+
<script>
|
13
|
+
|
14
|
+
// The instanceReady event is fired, when an instance of CKEditor has finished
|
15
|
+
// its initialization.
|
16
|
+
CKEDITOR.on( 'instanceReady', function( ev ) {
|
17
|
+
// Show the editor name and description in the browser status bar.
|
18
|
+
document.getElementById( 'eMessage' ).innerHTML = 'Instance <code>' + ev.editor.name + '<\/code> loaded.';
|
19
|
+
|
20
|
+
// Show this sample buttons.
|
21
|
+
document.getElementById( 'eButtons' ).style.display = 'block';
|
22
|
+
});
|
23
|
+
|
24
|
+
function InsertHTML() {
|
25
|
+
// Get the editor instance that we want to interact with.
|
26
|
+
var editor = CKEDITOR.instances.editor1;
|
27
|
+
var value = document.getElementById( 'htmlArea' ).value;
|
28
|
+
|
29
|
+
// Check the active editing mode.
|
30
|
+
if ( editor.mode == 'wysiwyg' )
|
31
|
+
{
|
32
|
+
// Insert HTML code.
|
33
|
+
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertHtml
|
34
|
+
editor.insertHtml( value );
|
35
|
+
}
|
36
|
+
else
|
37
|
+
alert( 'You must be in WYSIWYG mode!' );
|
38
|
+
}
|
39
|
+
|
40
|
+
function InsertText() {
|
41
|
+
// Get the editor instance that we want to interact with.
|
42
|
+
var editor = CKEDITOR.instances.editor1;
|
43
|
+
var value = document.getElementById( 'txtArea' ).value;
|
44
|
+
|
45
|
+
// Check the active editing mode.
|
46
|
+
if ( editor.mode == 'wysiwyg' )
|
47
|
+
{
|
48
|
+
// Insert as plain text.
|
49
|
+
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertText
|
50
|
+
editor.insertText( value );
|
51
|
+
}
|
52
|
+
else
|
53
|
+
alert( 'You must be in WYSIWYG mode!' );
|
54
|
+
}
|
55
|
+
|
56
|
+
function SetContents() {
|
57
|
+
// Get the editor instance that we want to interact with.
|
58
|
+
var editor = CKEDITOR.instances.editor1;
|
59
|
+
var value = document.getElementById( 'htmlArea' ).value;
|
60
|
+
|
61
|
+
// Set editor contents (replace current contents).
|
62
|
+
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setData
|
63
|
+
editor.setData( value );
|
64
|
+
}
|
65
|
+
|
66
|
+
function GetContents() {
|
67
|
+
// Get the editor instance that you want to interact with.
|
68
|
+
var editor = CKEDITOR.instances.editor1;
|
69
|
+
|
70
|
+
// Get editor contents
|
71
|
+
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-getData
|
72
|
+
alert( editor.getData() );
|
73
|
+
}
|
74
|
+
|
75
|
+
function ExecuteCommand( commandName ) {
|
76
|
+
// Get the editor instance that we want to interact with.
|
77
|
+
var editor = CKEDITOR.instances.editor1;
|
78
|
+
|
79
|
+
// Check the active editing mode.
|
80
|
+
if ( editor.mode == 'wysiwyg' )
|
81
|
+
{
|
82
|
+
// Execute the command.
|
83
|
+
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-execCommand
|
84
|
+
editor.execCommand( commandName );
|
85
|
+
}
|
86
|
+
else
|
87
|
+
alert( 'You must be in WYSIWYG mode!' );
|
88
|
+
}
|
89
|
+
|
90
|
+
function CheckDirty() {
|
91
|
+
// Get the editor instance that we want to interact with.
|
92
|
+
var editor = CKEDITOR.instances.editor1;
|
93
|
+
// Checks whether the current editor contents present changes when compared
|
94
|
+
// to the contents loaded into the editor at startup
|
95
|
+
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-checkDirty
|
96
|
+
alert( editor.checkDirty() );
|
97
|
+
}
|
98
|
+
|
99
|
+
function ResetDirty() {
|
100
|
+
// Get the editor instance that we want to interact with.
|
101
|
+
var editor = CKEDITOR.instances.editor1;
|
102
|
+
// Resets the "dirty state" of the editor (see CheckDirty())
|
103
|
+
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-resetDirty
|
104
|
+
editor.resetDirty();
|
105
|
+
alert( 'The "IsDirty" status has been reset' );
|
106
|
+
}
|
107
|
+
|
108
|
+
function Focus() {
|
109
|
+
CKEDITOR.instances.editor1.focus();
|
110
|
+
}
|
111
|
+
|
112
|
+
function onFocus() {
|
113
|
+
document.getElementById( 'eMessage' ).innerHTML = '<b>' + this.name + ' is focused </b>';
|
114
|
+
}
|
115
|
+
|
116
|
+
function onBlur() {
|
117
|
+
document.getElementById( 'eMessage' ).innerHTML = this.name + ' lost focus';
|
118
|
+
}
|
119
|
+
|
120
|
+
</script>
|
121
|
+
|
122
|
+
</head>
|
123
|
+
<body>
|
124
|
+
<h1 class="samples">
|
125
|
+
<a href="index.html">CKEditor Samples</a> » Using CKEditor JavaScript API
|
126
|
+
</h1>
|
127
|
+
<div class="description">
|
128
|
+
<p>
|
129
|
+
This sample shows how to use the
|
130
|
+
<a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.editor">CKEditor JavaScript API</a>
|
131
|
+
to interact with the editor at runtime.
|
132
|
+
</p>
|
133
|
+
<p>
|
134
|
+
For details on how to create this setup check the source code of this sample page.
|
135
|
+
</p>
|
136
|
+
</div>
|
137
|
+
|
138
|
+
<!-- This <div> holds alert messages to be display in the sample page. -->
|
139
|
+
<div id="alerts">
|
140
|
+
<noscript>
|
141
|
+
<p>
|
142
|
+
<strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
|
143
|
+
support, like yours, you should still see the contents (HTML data) and you should
|
144
|
+
be able to edit it normally, without a rich editor interface.
|
145
|
+
</p>
|
146
|
+
</noscript>
|
147
|
+
</div>
|
148
|
+
<form action="../../../samples/sample_posteddata.php" method="post">
|
149
|
+
<textarea cols="100" 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>
|
150
|
+
|
151
|
+
<script>
|
152
|
+
// Replace the <textarea id="editor1"> with an CKEditor instance.
|
153
|
+
CKEDITOR.replace( 'editor1', {
|
154
|
+
on: {
|
155
|
+
focus: onFocus,
|
156
|
+
blur: onBlur,
|
157
|
+
|
158
|
+
// Check for availability of corresponding plugins.
|
159
|
+
pluginsLoaded: function( evt ) {
|
160
|
+
var doc = CKEDITOR.document, ed = evt.editor;
|
161
|
+
if ( !ed.getCommand( 'bold' ) )
|
162
|
+
doc.getById( 'exec-bold' ).hide();
|
163
|
+
if ( !ed.getCommand( 'link' ) )
|
164
|
+
doc.getById( 'exec-link' ).hide();
|
165
|
+
}
|
166
|
+
}
|
167
|
+
});
|
168
|
+
</script>
|
169
|
+
|
170
|
+
<p id="eMessage">
|
171
|
+
</p>
|
172
|
+
|
173
|
+
<div id="eButtons" style="display: none">
|
174
|
+
<input id="exec-bold" onclick="ExecuteCommand('bold');" type="button" value="Execute "bold" Command">
|
175
|
+
<input id="exec-link" onclick="ExecuteCommand('link');" type="button" value="Execute "link" Command">
|
176
|
+
<input onclick="Focus();" type="button" value="Focus">
|
177
|
+
<br><br>
|
178
|
+
<input onclick="InsertHTML();" type="button" value="Insert HTML">
|
179
|
+
<input onclick="SetContents();" type="button" value="Set Editor Contents">
|
180
|
+
<input onclick="GetContents();" type="button" value="Get Editor Contents (XHTML)">
|
181
|
+
<br>
|
182
|
+
<textarea cols="100" id="htmlArea" rows="3"><h2>Test</h2><p>This is some <a href="/Test1.html">sample</a> HTML code.</p></textarea>
|
183
|
+
<br>
|
184
|
+
<br>
|
185
|
+
<input onclick="InsertText();" type="button" value="Insert Text">
|
186
|
+
<br>
|
187
|
+
<textarea cols="100" id="txtArea" rows="3"> First line with some leading whitespaces.
|
188
|
+
|
189
|
+
Second line of text preceded by two line breaks.</textarea>
|
190
|
+
<br>
|
191
|
+
<br>
|
192
|
+
<input onclick="CheckDirty();" type="button" value="checkDirty()">
|
193
|
+
<input onclick="ResetDirty();" type="button" value="resetDirty()">
|
194
|
+
</div>
|
195
|
+
</form>
|
196
|
+
<div id="footer">
|
197
|
+
<hr>
|
198
|
+
<p>
|
199
|
+
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
200
|
+
</p>
|
201
|
+
<p id="copy">
|
202
|
+
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
203
|
+
Knabben. All rights reserved.
|
204
|
+
</p>
|
205
|
+
</div>
|
206
|
+
</body>
|
207
|
+
</html>
|
@@ -0,0 +1,57 @@
|
|
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>CKEDITOR.appendTo — CKEditor Sample</title>
|
9
|
+
<meta charset="utf-8">
|
10
|
+
<script src="../ckeditor.js"></script>
|
11
|
+
<link rel="stylesheet" href="sample.css">
|
12
|
+
</head>
|
13
|
+
<body>
|
14
|
+
<h1 class="samples">
|
15
|
+
<a href="index.html">CKEditor Samples</a> » Append To Page Element Using JavaScript Code
|
16
|
+
</h1>
|
17
|
+
<div id="section1">
|
18
|
+
<div class="description">
|
19
|
+
<p>
|
20
|
+
<code>CKEDITOR.appendTo</code> is basically to place editors
|
21
|
+
inside existing DOM elements. Unlike <code>CKEDITOR.replace</code>,
|
22
|
+
a target container to be replaced is no longer necessary. A new editor
|
23
|
+
instance is inserted directly wherever it is desired.
|
24
|
+
</p>
|
25
|
+
<pre class="samples">CKEDITOR.appendTo( '<em>container_id</em>',
|
26
|
+
{ /* Configuration options to be used. */ }
|
27
|
+
'Editor content to be used.'
|
28
|
+
);</pre>
|
29
|
+
</div>
|
30
|
+
<script>
|
31
|
+
|
32
|
+
// This call can be placed at any point after the
|
33
|
+
// <textarea>, or inside a <head><script> in a
|
34
|
+
// window.onload event handler.
|
35
|
+
|
36
|
+
// Replace the <textarea id="editor"> with an CKEditor
|
37
|
+
// instance, using default configurations.
|
38
|
+
CKEDITOR.appendTo( 'section1',
|
39
|
+
null,
|
40
|
+
'<p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>'
|
41
|
+
);
|
42
|
+
|
43
|
+
</script>
|
44
|
+
</div>
|
45
|
+
<br>
|
46
|
+
<div id="footer">
|
47
|
+
<hr>
|
48
|
+
<p>
|
49
|
+
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
50
|
+
</p>
|
51
|
+
<p id="copy">
|
52
|
+
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
53
|
+
Knabben. All rights reserved.
|
54
|
+
</p>
|
55
|
+
</div>
|
56
|
+
</body>
|
57
|
+
</html>
|
Binary file
|
@@ -0,0 +1,204 @@
|
|
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
|
+
* Styles used by the XHTML 1.1 sample page (xhtml.html).
|
6
|
+
*/
|
7
|
+
|
8
|
+
/**
|
9
|
+
* Basic definitions for the editing area.
|
10
|
+
*/
|
11
|
+
body
|
12
|
+
{
|
13
|
+
font-family: Arial, Verdana, sans-serif;
|
14
|
+
font-size: 80%;
|
15
|
+
color: #000000;
|
16
|
+
background-color: #ffffff;
|
17
|
+
padding: 5px;
|
18
|
+
margin: 0px;
|
19
|
+
}
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Core styles.
|
23
|
+
*/
|
24
|
+
|
25
|
+
.Bold
|
26
|
+
{
|
27
|
+
font-weight: bold;
|
28
|
+
}
|
29
|
+
|
30
|
+
.Italic
|
31
|
+
{
|
32
|
+
font-style: italic;
|
33
|
+
}
|
34
|
+
|
35
|
+
.Underline
|
36
|
+
{
|
37
|
+
text-decoration: underline;
|
38
|
+
}
|
39
|
+
|
40
|
+
.StrikeThrough
|
41
|
+
{
|
42
|
+
text-decoration: line-through;
|
43
|
+
}
|
44
|
+
|
45
|
+
.Subscript
|
46
|
+
{
|
47
|
+
vertical-align: sub;
|
48
|
+
font-size: smaller;
|
49
|
+
}
|
50
|
+
|
51
|
+
.Superscript
|
52
|
+
{
|
53
|
+
vertical-align: super;
|
54
|
+
font-size: smaller;
|
55
|
+
}
|
56
|
+
|
57
|
+
/**
|
58
|
+
* Font faces.
|
59
|
+
*/
|
60
|
+
|
61
|
+
.FontComic
|
62
|
+
{
|
63
|
+
font-family: 'Comic Sans MS';
|
64
|
+
}
|
65
|
+
|
66
|
+
.FontCourier
|
67
|
+
{
|
68
|
+
font-family: 'Courier New';
|
69
|
+
}
|
70
|
+
|
71
|
+
.FontTimes
|
72
|
+
{
|
73
|
+
font-family: 'Times New Roman';
|
74
|
+
}
|
75
|
+
|
76
|
+
/**
|
77
|
+
* Font sizes.
|
78
|
+
*/
|
79
|
+
|
80
|
+
.FontSmaller
|
81
|
+
{
|
82
|
+
font-size: smaller;
|
83
|
+
}
|
84
|
+
|
85
|
+
.FontLarger
|
86
|
+
{
|
87
|
+
font-size: larger;
|
88
|
+
}
|
89
|
+
|
90
|
+
.FontSmall
|
91
|
+
{
|
92
|
+
font-size: 8pt;
|
93
|
+
}
|
94
|
+
|
95
|
+
.FontBig
|
96
|
+
{
|
97
|
+
font-size: 14pt;
|
98
|
+
}
|
99
|
+
|
100
|
+
.FontDouble
|
101
|
+
{
|
102
|
+
font-size: 200%;
|
103
|
+
}
|
104
|
+
|
105
|
+
/**
|
106
|
+
* Font colors.
|
107
|
+
*/
|
108
|
+
.FontColor1
|
109
|
+
{
|
110
|
+
color: #ff9900;
|
111
|
+
}
|
112
|
+
|
113
|
+
.FontColor2
|
114
|
+
{
|
115
|
+
color: #0066cc;
|
116
|
+
}
|
117
|
+
|
118
|
+
.FontColor3
|
119
|
+
{
|
120
|
+
color: #ff0000;
|
121
|
+
}
|
122
|
+
|
123
|
+
.FontColor1BG
|
124
|
+
{
|
125
|
+
background-color: #ff9900;
|
126
|
+
}
|
127
|
+
|
128
|
+
.FontColor2BG
|
129
|
+
{
|
130
|
+
background-color: #0066cc;
|
131
|
+
}
|
132
|
+
|
133
|
+
.FontColor3BG
|
134
|
+
{
|
135
|
+
background-color: #ff0000;
|
136
|
+
}
|
137
|
+
|
138
|
+
/**
|
139
|
+
* Indentation.
|
140
|
+
*/
|
141
|
+
|
142
|
+
.Indent1
|
143
|
+
{
|
144
|
+
margin-left: 40px;
|
145
|
+
}
|
146
|
+
|
147
|
+
.Indent2
|
148
|
+
{
|
149
|
+
margin-left: 80px;
|
150
|
+
}
|
151
|
+
|
152
|
+
.Indent3
|
153
|
+
{
|
154
|
+
margin-left: 120px;
|
155
|
+
}
|
156
|
+
|
157
|
+
/**
|
158
|
+
* Alignment.
|
159
|
+
*/
|
160
|
+
|
161
|
+
.JustifyLeft
|
162
|
+
{
|
163
|
+
text-align: left;
|
164
|
+
}
|
165
|
+
|
166
|
+
.JustifyRight
|
167
|
+
{
|
168
|
+
text-align: right;
|
169
|
+
}
|
170
|
+
|
171
|
+
.JustifyCenter
|
172
|
+
{
|
173
|
+
text-align: center;
|
174
|
+
}
|
175
|
+
|
176
|
+
.JustifyFull
|
177
|
+
{
|
178
|
+
text-align: justify;
|
179
|
+
}
|
180
|
+
|
181
|
+
/**
|
182
|
+
* Other.
|
183
|
+
*/
|
184
|
+
|
185
|
+
code
|
186
|
+
{
|
187
|
+
font-family: courier, monospace;
|
188
|
+
background-color: #eeeeee;
|
189
|
+
padding-left: 1px;
|
190
|
+
padding-right: 1px;
|
191
|
+
border: #c0c0c0 1px solid;
|
192
|
+
}
|
193
|
+
|
194
|
+
kbd
|
195
|
+
{
|
196
|
+
padding: 0px 1px 0px 1px;
|
197
|
+
border-width: 1px 2px 2px 1px;
|
198
|
+
border-style: solid;
|
199
|
+
}
|
200
|
+
|
201
|
+
blockquote
|
202
|
+
{
|
203
|
+
color: #808080;
|
204
|
+
}
|