ckeditor 4.0.4 → 4.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +192 -0
- data/app/assets/javascripts/ckeditor/init.js.erb +8 -0
- data/app/helpers/ckeditor/application_helper.rb +11 -0
- data/app/views/layouts/ckeditor/application.html.erb +17 -17
- data/config/locales/hu.ckeditor.yml +8 -0
- data/config/locales/pt-PT.ckeditor.yml +8 -0
- data/lib/ckeditor.rb +1 -0
- data/lib/ckeditor/helpers/controllers.rb +1 -1
- data/lib/ckeditor/helpers/form_helper.rb +1 -13
- data/lib/ckeditor/helpers/view_helper.rb +1 -12
- data/lib/ckeditor/hooks/cancan.rb +2 -2
- data/lib/ckeditor/http.rb +1 -0
- data/lib/ckeditor/text_area.rb +52 -0
- data/lib/ckeditor/version.rb +2 -2
- data/lib/generators/ckeditor/templates/ckeditor.rb +14 -16
- data/test/dummy/app/views/posts/index.html.erb +1 -1
- data/test/dummy/log/test.log +1010 -12590
- data/test/functional/posts_controller_test.rb +2 -2
- data/test/tmp/config/initializers/ckeditor.rb +14 -16
- data/vendor/assets/javascripts/ckeditor/CHANGES.md +65 -0
- data/vendor/assets/javascripts/ckeditor/adapters/jquery.js +10 -0
- data/vendor/assets/javascripts/ckeditor/build-config.js +6 -1
- data/vendor/assets/javascripts/ckeditor/ckeditor.js +589 -575
- data/vendor/assets/javascripts/ckeditor/contents.css +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/af.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ar.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/bg.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/bn.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/bs.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ca.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/cs.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/cy.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/da.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/de.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/el.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/en-au.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/en-ca.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/en-gb.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/en.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/eo.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/es.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/et.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/eu.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/fa.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/fi.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/fo.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/fr-ca.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/fr.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/gl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/gu.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/he.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/hi.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/hr.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/hu.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/id.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/is.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/it.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ja.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ka.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/km.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ko.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ku.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/lt.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/lv.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/mk.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/mn.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ms.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/nb.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/nl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/no.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/pl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/pt-br.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/pt.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ro.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ru.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/si.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/sk.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/sl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/sq.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/sr-latn.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/sr.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/sv.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/th.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/tr.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ug.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/uk.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/vi.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/zh-cn.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/zh.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +7 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +6 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +8 -7
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +6 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +7 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +6 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +4 -3
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +7 -7
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +7 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +6 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +8 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +7 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +6 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +7 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +6 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +4 -3
- data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +8 -8
- data/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +7 -7
- data/vendor/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/icons_hidpi.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/link/images/anchor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +24 -24
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ar.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/bg.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ca.js +11 -10
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cs.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cy.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/el.js +9 -9
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eo.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/es.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/et.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fa.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fi.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/gl.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/he.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hr.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hu.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/id.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/it.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ja.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ku.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lv.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nb.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/no.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pl.js +9 -9
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/si.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sk.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sl.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sq.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sv.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/th.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tr.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ug.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/uk.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/vi.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/default.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +17 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmp.html +131 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +63 -7
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc_ie.js +11 -0
- data/vendor/assets/javascripts/ckeditor/samples/ajax.html +82 -0
- data/vendor/assets/javascripts/ckeditor/samples/api.html +207 -0
- data/vendor/assets/javascripts/ckeditor/samples/appendto.html +57 -0
- data/vendor/assets/javascripts/ckeditor/samples/assets/inlineall/logo.png +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/assets/outputxhtml/outputxhtml.css +204 -0
- data/vendor/assets/javascripts/ckeditor/samples/assets/posteddata.php +59 -0
- data/vendor/assets/javascripts/ckeditor/samples/assets/sample.css +3 -0
- data/vendor/assets/javascripts/ckeditor/samples/assets/sample.jpg +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/assets/uilanguages/languages.js +7 -0
- data/vendor/assets/javascripts/ckeditor/samples/datafiltering.html +401 -0
- data/vendor/assets/javascripts/ckeditor/samples/divreplace.html +141 -0
- data/vendor/assets/javascripts/ckeditor/samples/index.html +128 -0
- data/vendor/assets/javascripts/ckeditor/samples/inlineall.html +311 -0
- data/vendor/assets/javascripts/ckeditor/samples/inlinebycode.html +121 -0
- data/vendor/assets/javascripts/ckeditor/samples/inlinetextarea.html +110 -0
- data/vendor/assets/javascripts/ckeditor/samples/jquery.html +97 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/dialog/assets/my_dialog.js +48 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/dialog/dialog.html +187 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/enterkey/enterkey.html +103 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.fla +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.swf +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/swfobject.js +18 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/outputforflash.html +280 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/outputhtml.html +221 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/magicline/magicline.html +207 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/toolbar/toolbar.html +232 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/wysiwygarea/fullpage.html +77 -0
- data/vendor/assets/javascripts/ckeditor/samples/readonly.html +73 -0
- data/vendor/assets/javascripts/ckeditor/samples/replacebyclass.html +57 -0
- data/vendor/assets/javascripts/ckeditor/samples/replacebycode.html +56 -0
- data/vendor/assets/javascripts/ckeditor/samples/sample.css +339 -0
- data/vendor/assets/javascripts/ckeditor/samples/sample.js +33 -0
- data/vendor/assets/javascripts/ckeditor/samples/sample_posteddata.php +16 -0
- data/vendor/assets/javascripts/ckeditor/samples/tabindex.html +75 -0
- data/vendor/assets/javascripts/ckeditor/samples/uicolor.html +69 -0
- data/vendor/assets/javascripts/ckeditor/samples/uilanguages.html +119 -0
- data/vendor/assets/javascripts/ckeditor/samples/xhtmlstyle.html +231 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_opera.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/icons_hidpi.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/styles.js +1 -1
- metadata +513 -433
- data/README.rdoc +0 -156
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/mini.png +0 -0
data/README.md
ADDED
@@ -0,0 +1,192 @@
|
|
1
|
+
# Ckeditor
|
2
|
+
|
3
|
+
CKEditor is a ready-for-use HTML text editor designed to simplify web content creation. It's a WYSIWYG editor that brings common word processor features directly to your web pages. Enhance your website experience with our community maintained editor.
|
4
|
+
[ckeditor.com](http://ckeditor.com/)
|
5
|
+
|
6
|
+
## Features
|
7
|
+
|
8
|
+
* Ckeditor version 4.2 (full)
|
9
|
+
* Rails 4 integration
|
10
|
+
* Files browser
|
11
|
+
* HTML5 files uploader
|
12
|
+
* Hooks for formtastic and simple_form forms generators
|
13
|
+
|
14
|
+
## Installation
|
15
|
+
|
16
|
+
For basic usage just include ckeditor gem:
|
17
|
+
|
18
|
+
```
|
19
|
+
gem "ckeditor"
|
20
|
+
```
|
21
|
+
|
22
|
+
For files uploading support you need generage models for file storage.
|
23
|
+
Currently supported next backends:
|
24
|
+
|
25
|
+
* ActiveRecord (paperclip, carrierwave, dragonfly)
|
26
|
+
* Mongoid (paperclip, carrierwave, dragonfly)
|
27
|
+
|
28
|
+
### How generate models for store uploading files
|
29
|
+
|
30
|
+
#### ActiveRecord + paperclip
|
31
|
+
|
32
|
+
For active_record orm is used paperclip gem (it's by default).
|
33
|
+
|
34
|
+
```
|
35
|
+
gem "paperclip"
|
36
|
+
|
37
|
+
rails generate ckeditor:install --orm=active_record --backend=paperclip
|
38
|
+
```
|
39
|
+
|
40
|
+
#### ActiveRecord + carrierwave
|
41
|
+
|
42
|
+
```
|
43
|
+
gem "carrierwave"
|
44
|
+
gem "mini_magick"
|
45
|
+
|
46
|
+
rails generate ckeditor:install --orm=active_record --backend=carrierwave
|
47
|
+
```
|
48
|
+
|
49
|
+
#### Mongoid + paperclip
|
50
|
+
|
51
|
+
```
|
52
|
+
gem 'mongoid-paperclip', :require => 'mongoid_paperclip'
|
53
|
+
|
54
|
+
rails generate ckeditor:install --orm=mongoid --backend=paperclip
|
55
|
+
```
|
56
|
+
|
57
|
+
#### Mongoid + carrierwave
|
58
|
+
|
59
|
+
```
|
60
|
+
gem "carrierwave-mongoid", :require => 'carrierwave/mongoid'
|
61
|
+
gem "mini_magick"
|
62
|
+
|
63
|
+
rails generate ckeditor:install --orm=mongoid --backend=carrierwave
|
64
|
+
```
|
65
|
+
|
66
|
+
#### Load generated models
|
67
|
+
|
68
|
+
All ckeditor models will be generated into app/models/ckeditor folder.
|
69
|
+
Autoload ckeditor models folder (application.rb):
|
70
|
+
|
71
|
+
```ruby
|
72
|
+
config.autoload_paths += %W(#{config.root}/app/models/ckeditor)
|
73
|
+
```
|
74
|
+
|
75
|
+
Mount engine in your routes (config/routes.rb):
|
76
|
+
|
77
|
+
```ruby
|
78
|
+
mount Ckeditor::Engine => "/ckeditor"
|
79
|
+
```
|
80
|
+
|
81
|
+
## Usage
|
82
|
+
|
83
|
+
Include ckeditor javascripts rails 3.2 (application.js):
|
84
|
+
|
85
|
+
```
|
86
|
+
//= require ckeditor/init
|
87
|
+
```
|
88
|
+
|
89
|
+
Form helpers:
|
90
|
+
|
91
|
+
```erb
|
92
|
+
<%= form_for @page do |form| -%>
|
93
|
+
...
|
94
|
+
<%= form.cktext_area :notes, :class => "someclass", :ckeditor => {:language => "uk"} %>
|
95
|
+
...
|
96
|
+
<%= form.cktext_area :content, :value => "Default value", :id => "sometext" %>
|
97
|
+
...
|
98
|
+
<%= cktext_area :page, :info, :cols => 40, :ckeditor => {:uiColor => "#AADC6E", :toolbar => "mini"} %>
|
99
|
+
...
|
100
|
+
<% end -%>
|
101
|
+
```
|
102
|
+
|
103
|
+
All ckeditor options [here](http://docs.ckeditor.com/#!/api/CKEDITOR.config)
|
104
|
+
|
105
|
+
In order to configure the ckeditor default options, create files:
|
106
|
+
|
107
|
+
```
|
108
|
+
app/assets/javascripts/ckeditor/config.js
|
109
|
+
|
110
|
+
app/assets/javascripts/ckeditor/contents.css
|
111
|
+
```
|
112
|
+
|
113
|
+
### AJAX
|
114
|
+
|
115
|
+
jQuery sample:
|
116
|
+
|
117
|
+
```html
|
118
|
+
<script type='text/javascript' charset='UTF-8'>
|
119
|
+
$(document).ready(function(){
|
120
|
+
$('form[data-remote]').bind("ajax:before", function(){
|
121
|
+
for (instance in CKEDITOR.instances){
|
122
|
+
CKEDITOR.instances[instance].updateElement();
|
123
|
+
}
|
124
|
+
});
|
125
|
+
});
|
126
|
+
</script>
|
127
|
+
```
|
128
|
+
|
129
|
+
### Formtastic integration
|
130
|
+
|
131
|
+
```erb
|
132
|
+
<%= form.input :content, :as => :ckeditor %>
|
133
|
+
<%= form.input :content, :as => :ckeditor, :input_html => { :ckeditor => { :height => 400 } } %>
|
134
|
+
```
|
135
|
+
|
136
|
+
### SimpleForm integration
|
137
|
+
|
138
|
+
```erb
|
139
|
+
<%= form.input :content, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Full'} } %>
|
140
|
+
```
|
141
|
+
|
142
|
+
### CanCan integration
|
143
|
+
|
144
|
+
To use cancan with Ckeditor, add this to an initializer.
|
145
|
+
|
146
|
+
```ruby
|
147
|
+
# in config/initializers/ckeditor.rb
|
148
|
+
|
149
|
+
Ckeditor.setup do |config|
|
150
|
+
config.authorize_with :cancan
|
151
|
+
end
|
152
|
+
```
|
153
|
+
|
154
|
+
At this point, all authorization will fail and no one will be able to access the filebrowser pages.
|
155
|
+
To grant access, add this to Ability#initialize
|
156
|
+
|
157
|
+
```ruby
|
158
|
+
# Always performed
|
159
|
+
can :access, :ckeditor # needed to access Ckeditor filebrowser
|
160
|
+
|
161
|
+
# Performed checks for actions:
|
162
|
+
can [:read, :create, :destroy], Ckeditor::Picture
|
163
|
+
can [:read, :create, :destroy], Ckeditor::AttachmentFile
|
164
|
+
```
|
165
|
+
|
166
|
+
## I18n
|
167
|
+
|
168
|
+
```yml
|
169
|
+
en:
|
170
|
+
ckeditor:
|
171
|
+
page_title: "CKEditor Files Manager"
|
172
|
+
confirm_delete: "Delete file?"
|
173
|
+
buttons:
|
174
|
+
cancel: "Cancel"
|
175
|
+
upload: "Upload"
|
176
|
+
delete: "Delete"
|
177
|
+
```
|
178
|
+
|
179
|
+
## Tests
|
180
|
+
|
181
|
+
```bash
|
182
|
+
$> rake test
|
183
|
+
$> rake test CKEDITOR_ORM=mongoid
|
184
|
+
$> rake test CKEDITOR_BACKEND=carrierwave
|
185
|
+
|
186
|
+
$> rake test:controllers
|
187
|
+
$> rake test:generators
|
188
|
+
$> rake test:integration
|
189
|
+
$> rake test:models
|
190
|
+
```
|
191
|
+
|
192
|
+
This project rocks and uses MIT-LICENSE.
|
@@ -6,3 +6,11 @@
|
|
6
6
|
window['CKEDITOR_BASEPATH'] = "<%= config.relative_url_root %>/assets/ckeditor/";
|
7
7
|
}
|
8
8
|
}).call(this);
|
9
|
+
|
10
|
+
function ck_load() {
|
11
|
+
$('.ckeditor').each(function(){
|
12
|
+
CKEDITOR.replace( $(this).attr('name') );
|
13
|
+
});
|
14
|
+
}
|
15
|
+
|
16
|
+
$(document).on('page:load', ck_load);
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module Ckeditor::ApplicationHelper
|
2
|
+
def assets_pipeline_enabled?
|
3
|
+
if Gem::Version.new(::Rails.version.to_s) >= Gem::Version.new('4.0.0')
|
4
|
+
defined?(Sprockets::Rails)
|
5
|
+
elsif Gem::Version.new(::Rails.version.to_s) >= Gem::Version.new('3.0.0')
|
6
|
+
Rails.application.config.assets.enabled
|
7
|
+
else
|
8
|
+
false
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -3,29 +3,29 @@
|
|
3
3
|
<head>
|
4
4
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
5
5
|
<meta name="robots" content="noindex, nofollow">
|
6
|
-
|
7
|
-
|
6
|
+
<%= csrf_meta_tag %>
|
7
|
+
<%= tag(:meta, :name => "ckeditor-path", :content => Ckeditor.relative_path) %>
|
8
8
|
<title><%= I18n.t('page_title', :scope => [:ckeditor]) %></title>
|
9
|
-
|
10
|
-
<% if
|
11
|
-
|
12
|
-
|
13
|
-
<% else
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
<% end
|
9
|
+
|
10
|
+
<% if assets_pipeline_enabled? -%>
|
11
|
+
<%= stylesheet_link_tag "ckeditor/application" %>
|
12
|
+
<%= javascript_include_tag "ckeditor/application" %>
|
13
|
+
<% else -%>
|
14
|
+
<link href="/javascripts/ckeditor/filebrowser/stylesheets/uploader.css" type="text/css" rel="stylesheet">
|
15
|
+
<% ["jquery.js", "jquery.tmpl.js", "fileuploader.js", "rails.js", "application.js"].each do |js| -%>
|
16
|
+
<script src="/javascripts/ckeditor/filebrowser/javascripts/<%= js %>" type="text/javascript"></script>
|
17
|
+
<% end -%>
|
18
|
+
<% end -%>
|
19
19
|
|
20
20
|
<script type="text/javascript">
|
21
21
|
var CKEditorFuncNum = $.QueryString["CKEditorFuncNum"];
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
var CKEditorName = $.QueryString["CKEditor"];
|
23
|
+
var CKEDITOR = window.opener.CKEDITOR;
|
24
|
+
var EDITOR = CKEDITOR.instances[CKEditorName];
|
25
25
|
</script>
|
26
26
|
</head>
|
27
27
|
<body>
|
28
|
-
|
29
|
-
|
28
|
+
<%= yield %>
|
29
|
+
<%= render :partial => 'ckeditor/shared/asset_tmpl' %>
|
30
30
|
</body>
|
31
31
|
</html>
|
data/lib/ckeditor.rb
CHANGED
@@ -3,20 +3,8 @@ module Ckeditor
|
|
3
3
|
module FormHelper
|
4
4
|
extend ActiveSupport::Concern
|
5
5
|
|
6
|
-
include ActionView::Helpers::TagHelper
|
7
|
-
include ActionView::Helpers::JavaScriptHelper
|
8
|
-
|
9
6
|
def cktext_area(object_name, method, options = {})
|
10
|
-
options
|
11
|
-
ck_options = (options.delete('ckeditor') || {}).stringify_keys
|
12
|
-
|
13
|
-
instance_tag = ActionView::Base::InstanceTag.new(object_name, method, self, options.delete('object'))
|
14
|
-
instance_tag.send(:add_default_name_and_id, options) if options['id'].blank?
|
15
|
-
|
16
|
-
output_buffer = ActiveSupport::SafeBuffer.new
|
17
|
-
output_buffer << instance_tag.to_text_area_tag(options)
|
18
|
-
output_buffer << javascript_tag(Utils.js_replace(options['id'], ck_options))
|
19
|
-
output_buffer
|
7
|
+
TextArea.new(self, options).render_instance_tag(object_name, method)
|
20
8
|
end
|
21
9
|
end
|
22
10
|
end
|
@@ -4,18 +4,7 @@ module Ckeditor
|
|
4
4
|
extend ActiveSupport::Concern
|
5
5
|
|
6
6
|
def cktext_area_tag(name, content = nil, options = {})
|
7
|
-
|
8
|
-
options = { :language => I18n.locale.to_s }.merge(options)
|
9
|
-
input_html = { :id => element_id }.merge( options.delete(:input_html) || {} )
|
10
|
-
js_content_for_section = options.delete(:js_content_for)
|
11
|
-
|
12
|
-
output_buffer = ActiveSupport::SafeBuffer.new
|
13
|
-
output_buffer << text_area_tag(name, content, input_html)
|
14
|
-
|
15
|
-
js = Utils.js_replace(element_id, options)
|
16
|
-
|
17
|
-
output_buffer << (js_content_for_section ? content_for(js_content_for_section, js) : javascript_tag(js))
|
18
|
-
output_buffer
|
7
|
+
TextArea.new(self, options).render_tag(name, content)
|
19
8
|
end
|
20
9
|
end
|
21
10
|
end
|
@@ -19,7 +19,7 @@ module Ckeditor
|
|
19
19
|
# action as a symbol (:create, :destroy, etc.). The second argument is the actual model
|
20
20
|
# instance if it is available.
|
21
21
|
def authorize(action, model_object = nil)
|
22
|
-
@controller.
|
22
|
+
@controller.authorize!(action.to_sym, model_object) if action
|
23
23
|
end
|
24
24
|
|
25
25
|
# This method is called primarily from the view to determine whether the given user
|
@@ -43,4 +43,4 @@ module Ckeditor
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
|
-
Ckeditor::AUTHORIZATION_ADAPTERS[:cancan] = Ckeditor::Hooks::CanCanAuthorization
|
46
|
+
Ckeditor::AUTHORIZATION_ADAPTERS[:cancan] = Ckeditor::Hooks::CanCanAuthorization
|
data/lib/ckeditor/http.rb
CHANGED
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'active_support'
|
2
|
+
require 'action_view/helpers/tag_helper'
|
3
|
+
require 'action_view/helpers/form_tag_helper'
|
4
|
+
|
5
|
+
module Ckeditor
|
6
|
+
class TextArea
|
7
|
+
include ActionView::Helpers::TagHelper
|
8
|
+
include ActionView::Helpers::FormTagHelper
|
9
|
+
include ActionView::Helpers::JavaScriptHelper
|
10
|
+
|
11
|
+
attr_reader :template, :options, :ck_options
|
12
|
+
|
13
|
+
def initialize(template, options)
|
14
|
+
@template = template
|
15
|
+
@options = options.stringify_keys
|
16
|
+
@ck_options = (@options.delete('ckeditor') || {}).stringify_keys
|
17
|
+
end
|
18
|
+
|
19
|
+
def render_instance_tag(object_name, method)
|
20
|
+
tag = build_tag(object_name, method)
|
21
|
+
tag.send(:add_default_name_and_id, options) if options['id'].blank?
|
22
|
+
|
23
|
+
render tag.respond_to?(:to_text_area_tag) ? tag.to_text_area_tag(options) : tag.render
|
24
|
+
end
|
25
|
+
|
26
|
+
def render_tag(name, content)
|
27
|
+
options['id'] = sanitize_to_id(options['id'] || name)
|
28
|
+
|
29
|
+
render text_area_tag(name, content, options)
|
30
|
+
end
|
31
|
+
|
32
|
+
protected
|
33
|
+
|
34
|
+
def render(input)
|
35
|
+
output_buffer << input
|
36
|
+
output_buffer << javascript_tag(Utils.js_replace(options['id'], ck_options))
|
37
|
+
output_buffer
|
38
|
+
end
|
39
|
+
|
40
|
+
def output_buffer
|
41
|
+
@output_buffer ||= ActiveSupport::SafeBuffer.new
|
42
|
+
end
|
43
|
+
|
44
|
+
def build_tag(object_name, method)
|
45
|
+
if defined?(ActionView::Base::Tags::TextArea)
|
46
|
+
ActionView::Base::Tags::TextArea.new(object_name, method, template, options.symbolize_keys)
|
47
|
+
else
|
48
|
+
ActionView::Base::InstanceTag.new(object_name, method, template, options.delete('object'))
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
data/lib/ckeditor/version.rb
CHANGED
@@ -1,21 +1,19 @@
|
|
1
1
|
# Use this hook to configure ckeditor
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
require "ckeditor/orm/<%= options[:orm] %>"
|
2
|
+
Ckeditor.setup do |config|
|
3
|
+
# ==> ORM configuration
|
4
|
+
# Load and configure the ORM. Supports :active_record (default), :mongo_mapper and
|
5
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
6
|
+
# available as additional gems.
|
7
|
+
require "ckeditor/orm/<%= options[:orm] %>"
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
# Allowed image file types for upload.
|
10
|
+
# Set to nil or [] (empty array) for all file types
|
11
|
+
# config.image_file_types = ["jpg", "jpeg", "png", "gif", "tiff"]
|
13
12
|
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
# Allowed attachment file types for upload.
|
14
|
+
# Set to nil or [] (empty array) for all file types
|
15
|
+
# config.attachment_file_types = ["doc", "docx", "xls", "odt", "ods", "pdf", "rar", "zip", "tar", "swf"]
|
17
16
|
|
18
|
-
|
19
|
-
|
20
|
-
end
|
17
|
+
# Setup authorization to be run as a before filter
|
18
|
+
# config.authorize_with :cancan
|
21
19
|
end
|