ckeditor_rails 4.8.0 → 4.16.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +74 -18
- data/ckeditor-rails.gemspec +3 -3
- data/lib/assets/javascripts/ckeditor/basepath.js.erb +1 -6
- data/lib/assets/javascripts/ckeditor-jquery.js +1 -1
- data/lib/ckeditor-rails/asset.rb +2 -2
- data/lib/ckeditor-rails/asset_url_processor.rb +39 -0
- data/lib/ckeditor-rails/engine.rb +12 -0
- data/lib/ckeditor-rails/source_file.rb +13 -0
- data/lib/ckeditor-rails/version.rb +2 -2
- data/lib/ckeditor-rails.rb +28 -2
- data/vendor/assets/images/ckeditor/plugins/copyformatting/cursors/cursor-disabled.svg +25 -0
- data/vendor/assets/images/ckeditor/plugins/copyformatting/cursors/cursor.svg +14 -0
- data/vendor/assets/images/ckeditor/plugins/icons.png +0 -0
- data/vendor/assets/images/ckeditor/plugins/icons_hidpi.png +0 -0
- data/vendor/assets/images/ckeditor/plugins/preview/images/pagebreak.gif +0 -0
- data/vendor/assets/images/ckeditor/plugins/wsc/icons/hidpi/spellchecker.png +0 -0
- data/vendor/assets/images/ckeditor/plugins/wsc/icons/spellchecker.png +0 -0
- data/vendor/assets/images/ckeditor/skins/moono-lisa/icons.png +0 -0
- data/vendor/assets/images/ckeditor/skins/moono-lisa/icons_hidpi.png +0 -0
- data/vendor/assets/javascripts/ckeditor/CHANGES.md +936 -305
- data/vendor/assets/javascripts/ckeditor/LICENSE.md +22 -6
- data/vendor/assets/javascripts/ckeditor/README.md +5 -5
- data/vendor/assets/javascripts/ckeditor/adapters/jquery.js +10 -0
- data/vendor/assets/javascripts/ckeditor/build-config.js +12 -6
- data/vendor/assets/javascripts/ckeditor/ckeditor.js +1139 -1023
- data/vendor/assets/javascripts/ckeditor/config.js +2 -2
- data/vendor/assets/javascripts/ckeditor/lang/af.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/ar.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/az.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/bg.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/bn.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/bs.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/ca.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/cs.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/cy.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/da.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/de-ch.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/de.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/el.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/en-au.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/en-ca.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/en-gb.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/en.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/eo.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/es-mx.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/es.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/et.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/eu.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/fa.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/fi.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/fo.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/fr-ca.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/fr.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/gl.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/gu.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/he.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/hi.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/hr.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/hu.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/id.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/is.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/it.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/ja.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/ka.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/km.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/ko.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/ku.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/lt.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/lv.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/mk.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/mn.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/ms.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/nb.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/nl.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/no.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/oc.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/pl.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/pt-br.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/pt.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/ro.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/ru.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/si.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/sk.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/sl.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/sq.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/sr-latn.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/sr.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/sv.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/th.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/tr.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/tt.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/ug.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/uk.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/vi.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/zh-cn.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/zh.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +6 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/af.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +6 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/az.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +8 -8
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +6 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de-ch.js +10 -9
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en-au.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +5 -4
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es-mx.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +8 -8
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eu.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fo.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +1 -1
- 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 +4 -4
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +2 -2
- 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 +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/oc.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +9 -8
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +9 -8
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +9 -8
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +4 -4
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +4 -4
- data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +11 -11
- data/vendor/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +9 -8
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/CHANGELOG.md +54 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/LICENSE.md +18 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/README.md +102 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/plugindefinition.js +1 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/_helpers/tools.js +5 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/authentication.js +6 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/exportpdf.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/configfilename.html +27 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/configfilename.md +46 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/emptyeditor.html +18 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/emptyeditor.md +34 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/integration.html +148 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/integration.md +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/integrations/easyimage.html +27 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/integrations/easyimage.md +26 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/notifications.html +19 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/notifications.md +36 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/notificationsasync.html +45 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/notificationsasync.md +27 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/paperformat.html +29 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/paperformat.md +18 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/readonly.html +18 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/readonly.md +28 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/stylesheets.html +36 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/stylesheets.md +19 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/tokenfetching.html +23 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/tokenfetching.md +19 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/tokentwoeditorscorrect.html +38 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/tokentwoeditorscorrect.md +14 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/tokentwoeditorswrong.html +38 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/tokentwoeditorswrong.md +14 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/tokenwithouturl.html +19 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/tokenwithouturl.md +31 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/wrongendpoint.html +21 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/wrongendpoint.md +34 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/notification.js +4 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/resourcespaths.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/statistics.js +3 -0
- data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/stylesheets.js +18 -0
- data/vendor/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +22 -22
- data/vendor/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +16 -16
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +4 -4
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +4 -4
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +16 -15
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +6 -5
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +8 -8
- data/vendor/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +8 -7
- data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +34 -34
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +26 -24
- data/vendor/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +7 -7
- data/vendor/assets/javascripts/ckeditor/plugins/pastefromgdocs/filter/default.js +8 -0
- data/vendor/assets/javascripts/ckeditor/plugins/pastefromlibreoffice/filter/default.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +39 -52
- data/vendor/assets/javascripts/ckeditor/plugins/pastetools/filter/common.js +24 -0
- data/vendor/assets/javascripts/ckeditor/plugins/pastetools/filter/image.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/CHANGELOG.md +1 -17
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/README.md +63 -7
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +32 -33
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/af.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ar.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/az.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/bg.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ca.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cs.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cy.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/da.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de-ch.js +6 -6
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/el.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-au.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-ca.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js +1 -1
- 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-mx.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/es.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/et.js +8 -10
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eu.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 +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/gl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/he.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hr.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hu.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/id.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/it.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ja.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/km.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ko.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ku.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lt.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/oc.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pl.js +1 -1
- 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 +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ro.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/si.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sk.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sq.js +4 -4
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sr-latn.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sr.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/tt.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 +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/vi.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +11 -11
- data/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +19 -18
- data/vendor/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +15 -15
- data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/default.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/README.md +84 -25
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +81 -82
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc_ie.js +7 -7
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/af.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/ar.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/bg.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/bn.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/bs.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/ca.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/cs.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/cy.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/da.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/de.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/el.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/en-au.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/en-ca.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/en-gb.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/en.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/eo.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/es.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/et.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/eu.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/fa.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/fi.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/fo.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/fr-ca.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/fr.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/gl.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/gu.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/he.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/hi.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/hr.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/hu.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/is.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/it.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/ja.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/ka.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/km.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/ko.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/ku.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/lt.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/lv.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/mk.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/mn.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/ms.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/nb.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/nl.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/no.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/pl.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/pt-br.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/pt.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/ro.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/ru.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/sk.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/sl.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/sr-latn.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/sr.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/sv.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/th.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/tr.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/ug.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/uk.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/vi.js +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/zh-cn.js +1 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/lang/zh.js +1 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/plugin.js +5 -0
- data/vendor/assets/javascripts/ckeditor/styles.js +3 -3
- data/vendor/assets/javascripts/ckeditor/vendor/promise.js +13 -0
- data/vendor/assets/stylesheets/ckeditor/contents.css +7 -7
- data/vendor/assets/stylesheets/ckeditor/plugins/colordialog/dialogs/colordialog.css +1 -1
- data/vendor/assets/stylesheets/ckeditor/plugins/copyformatting/styles/copyformatting.css +1 -1
- data/vendor/assets/stylesheets/ckeditor/plugins/dialog/styles/dialog.css +18 -0
- data/vendor/assets/stylesheets/ckeditor/plugins/preview/styles/screen.css +10 -0
- data/vendor/assets/stylesheets/ckeditor/plugins/tableselection/styles/tableselection.css +10 -6
- data/vendor/assets/stylesheets/ckeditor/plugins/templates/dialogs/templates.css +1 -1
- data/vendor/assets/stylesheets/ckeditor/skins/moono-lisa/dialog.css +2 -2
- data/vendor/assets/stylesheets/ckeditor/skins/moono-lisa/dialog_ie.css +2 -2
- data/vendor/assets/stylesheets/ckeditor/skins/moono-lisa/dialog_ie8.css +2 -2
- data/vendor/assets/stylesheets/ckeditor/skins/moono-lisa/dialog_iequirks.css +2 -2
- data/vendor/assets/stylesheets/ckeditor/skins/moono-lisa/editor.css +2 -2
- data/vendor/assets/stylesheets/ckeditor/skins/moono-lisa/editor_gecko.css +2 -2
- data/vendor/assets/stylesheets/ckeditor/skins/moono-lisa/editor_ie.css +2 -2
- data/vendor/assets/stylesheets/ckeditor/skins/moono-lisa/editor_ie8.css +2 -2
- data/vendor/assets/stylesheets/ckeditor/skins/moono-lisa/editor_iequirks.css +2 -2
- metadata +126 -8
- data/lib/assets/javascripts/ckeditor/jquery.js +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 962b65a400bbc6fa001fdd3804b8ff11fd719a4e82b43a6aa0cd813345797e40
|
4
|
+
data.tar.gz: 4bc7553ac1f7d7fe98de3f0d0d586c50dd94a3bef77f80da85fc209cbdf2ec2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df23a0f24b77bd2072863da7e8fda7fdd5231a23f7155a7d4f7a60d8e52dc00d9290931eabf60a43422f3b666e33b1ce1c3d2dd9dcc23e36236be7b2e9102696
|
7
|
+
data.tar.gz: 0d6ab662a1c275a58553cdcf8992c5d6e5e295a7fd228592c38cc4e734ed8aa105acc1d8fe4cca8d93ba80f2f3d02754f8c6a11d96660a5d0cad61498fc139a1
|
data/README.md
CHANGED
@@ -64,22 +64,6 @@ CKEDITOR.editorConfig = (config) ->
|
|
64
64
|
true
|
65
65
|
```
|
66
66
|
|
67
|
-
### Include customized CKEDITOR_BASEPATH setting
|
68
|
-
|
69
|
-
Add your `app/assets/javascripts/ckeditor/basepath.js.erb` like
|
70
|
-
|
71
|
-
``` ruby
|
72
|
-
<%
|
73
|
-
base_path = ''
|
74
|
-
if ENV['PROJECT'] =~ /editor/i
|
75
|
-
base_path << "/#{Rails.root.basename.to_s}/"
|
76
|
-
end
|
77
|
-
base_path << Rails.application.config.assets.prefix
|
78
|
-
base_path << '/ckeditor/'
|
79
|
-
%>
|
80
|
-
var CKEDITOR_BASEPATH = '<%= base_path %>';
|
81
|
-
```
|
82
|
-
|
83
67
|
### Include customized stylesheet for contents of CKEditor
|
84
68
|
|
85
69
|
Add your `app/assets/stylesheets/ckeditor/contents.css.scss` like
|
@@ -96,7 +80,48 @@ ol,ul,dl {
|
|
96
80
|
}
|
97
81
|
```
|
98
82
|
|
99
|
-
###
|
83
|
+
### Remove CKEditor addon services
|
84
|
+
|
85
|
+
To avoid see warnings like
|
86
|
+
|
87
|
+
``` js
|
88
|
+
ckeditor.source.js:21 [CKEDITOR] Error code: exportpdf-no-token-url.
|
89
|
+
ckeditor.source.js:21 [CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#exportpdf-no-token-url
|
90
|
+
```
|
91
|
+
|
92
|
+
Edit your `app/assets/javascripts/ckeditor/config.js.coffee` like
|
93
|
+
|
94
|
+
``` coffee
|
95
|
+
CKEDITOR.editorConfig = (config) ->
|
96
|
+
config.removePlugins = 'exportpdf'
|
97
|
+
true
|
98
|
+
```
|
99
|
+
|
100
|
+
Ref: https://ckeditor.com/cke4/addon/exportpdf
|
101
|
+
|
102
|
+
### Configure CKEditor addon services
|
103
|
+
|
104
|
+
Install the plugin manually by copy to Rails asset pathes like
|
105
|
+
|
106
|
+
``` shell
|
107
|
+
vendor/assets/images/ckeditor/plugins/exportpdf/icons
|
108
|
+
vendor/assets/javascripts/ckeditor/plugins/exportpdf/lang
|
109
|
+
vendor/assets/javascripts/ckeditor/plugins/exportpdf/plugin.js
|
110
|
+
vendor/assets/javascripts/ckeditor/plugins/exportpdf/LICENSE.md
|
111
|
+
```
|
112
|
+
|
113
|
+
Edit your `app/assets/javascripts/ckeditor/config.js.coffee` like
|
114
|
+
|
115
|
+
``` coffee
|
116
|
+
CKEDITOR.editorConfig = (config) ->
|
117
|
+
# config.extraPlugins = 'exportpdf'
|
118
|
+
config.exportPdf_tokenUrl = 'https://example.com/cs-token-endpoint'
|
119
|
+
true
|
120
|
+
```
|
121
|
+
|
122
|
+
Ref: https://ckeditor.com/docs/ckeditor4/latest/features/exporttopdf.html#configuration
|
123
|
+
|
124
|
+
### Configure plugins, languages, skins and base_path of CKEditor assets
|
100
125
|
|
101
126
|
Add `ckeditor_rails.rb` to `config/initializers/`
|
102
127
|
|
@@ -112,16 +137,47 @@ Ckeditor::Rails.configure do |config|
|
|
112
137
|
|
113
138
|
# default is nil for all skins, or set as %w[moono-lisa]
|
114
139
|
config.assets_skins = nil
|
140
|
+
|
141
|
+
# default is nil and it will be "#{::Sprockets::Railtie.config.assets.prefix}/ckeditor",
|
142
|
+
# or set as String like '/assets/ckeditor',
|
143
|
+
# or set as Proc / Lambda
|
144
|
+
# no slash in the end
|
145
|
+
config.assets_base_path = nil
|
115
146
|
end
|
116
147
|
```
|
117
148
|
|
149
|
+
### Configure customized CKEDITOR_BASEPATH setting
|
150
|
+
|
151
|
+
It is important to keep these two the same.
|
152
|
+
|
153
|
+
* `Ckeditor::Rails::AssetUrlProcessor` will post process css `url()` attribute in all css files of ckeditor based on `Ckeditor::Rails.assets_base_path`.
|
154
|
+
* `CKEDITOR_BASEPATH` will be defined with `Ckeditor::Rails.assets_base_path` directly.
|
155
|
+
|
156
|
+
Edit your `config/initializers/ckeditor_rails.rb` like
|
157
|
+
|
158
|
+
``` ruby
|
159
|
+
Ckeditor::Rails.configure do |config|
|
160
|
+
config.assets_base_path = Proc.new {
|
161
|
+
base_path = ''
|
162
|
+
if ENV['PROJECT'] =~ /editor/i
|
163
|
+
base_path << "/#{Rails.root.basename.to_s}/"
|
164
|
+
end
|
165
|
+
base_path << Rails.application.config.assets.prefix
|
166
|
+
base_path << '/ckeditor'
|
167
|
+
base_path
|
168
|
+
}
|
169
|
+
end
|
170
|
+
```
|
171
|
+
|
172
|
+
Note: if `Rails.application.config.action_controller.relative_url_root` is set, it will prepend to `Ckeditor::Rails.assets_base_path` automatically.
|
173
|
+
|
118
174
|
## Gem maintenance
|
119
175
|
|
120
176
|
Maintain `ckeditor_rails` gem with `Rake` commands.
|
121
177
|
|
122
178
|
Update origin CKEditor source files.
|
123
179
|
|
124
|
-
rake update_ckeditor VERSION=4.
|
180
|
+
rake update_ckeditor VERSION=4.16.2
|
125
181
|
|
126
182
|
Publish gem.
|
127
183
|
|
data/ckeditor-rails.gemspec
CHANGED
@@ -8,9 +8,9 @@ Gem::Specification.new do |gem|
|
|
8
8
|
gem.summary = %q{Integrate CKEditor javascript library with Rails asset pipeline}
|
9
9
|
gem.homepage = 'https://github.com/tsechingho/ckeditor-rails'
|
10
10
|
|
11
|
-
gem.executables = `git ls-files --
|
12
|
-
gem.files = `git ls-files`.split("\n")
|
13
|
-
gem.test_files = `git ls-files -- {
|
11
|
+
gem.executables = `git ls-files -- exe/*`.split("\n").map { |f| File.basename(f) }
|
12
|
+
gem.files = `git ls-files`.split("\n").reject { |f| f.start_with?('test') }
|
13
|
+
gem.test_files = `git ls-files -- {spec,features}/*`.split("\n")
|
14
14
|
gem.name = 'ckeditor_rails'
|
15
15
|
gem.require_paths = ['lib']
|
16
16
|
gem.version = Ckeditor::Rails::VERSION
|
@@ -1,6 +1 @@
|
|
1
|
-
|
2
|
-
base_path = File.join(Rails.application.config.assets.prefix, 'ckeditor/')
|
3
|
-
base_path = File.join(Rails.application.config.action_controller.relative_url_root, base_path) if Rails.application.config.action_controller.relative_url_root
|
4
|
-
%>
|
5
|
-
|
6
|
-
var CKEDITOR_BASEPATH = "<%= base_path %>";
|
1
|
+
var CKEDITOR_BASEPATH = "<%= "#{::Ckeditor::Rails.assets_base_path}/" %>";
|
data/lib/ckeditor-rails/asset.rb
CHANGED
@@ -11,10 +11,10 @@ module Ckeditor
|
|
11
11
|
|
12
12
|
def image_files
|
13
13
|
path = root.join('images', name)
|
14
|
-
files = Dir.glob(path.join('plugins', '**', '*.{png,gif,jpg}')).reject { |file|
|
14
|
+
files = Dir.glob(path.join('plugins', '**', '*.{png,gif,jpg,svg}')).reject { |file|
|
15
15
|
invalid_plugin_file?(file)
|
16
16
|
}
|
17
|
-
files += Dir.glob(path.join('skins', '**', '*.{png,gif,jpg}')).reject { |file|
|
17
|
+
files += Dir.glob(path.join('skins', '**', '*.{png,gif,jpg,svg}')).reject { |file|
|
18
18
|
invalid_skin_file?(file)
|
19
19
|
}
|
20
20
|
files
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module Ckeditor
|
2
|
+
module Rails
|
3
|
+
# Rewrites urls in CSS files with the digested paths
|
4
|
+
class AssetUrlProcessor
|
5
|
+
REGEX = /url\(\s*["']?(?!(?:\#|data|http))([^"'\s)]+)\s*["']?\)/
|
6
|
+
|
7
|
+
def self.stylesheet_files
|
8
|
+
@stylesheet_files ||= ::Ckeditor::Rails::Asset.new.stylesheet_files
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.assets_base_path(context = nil)
|
12
|
+
return ::Ckeditor::Rails.assets_base_path unless context
|
13
|
+
|
14
|
+
"#{context.assets_prefix}/ckeditor"
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.call(input)
|
18
|
+
return { data: input[:data] } unless stylesheet_files.include?(input[:filename])
|
19
|
+
|
20
|
+
context = input[:environment].context_class.new(input)
|
21
|
+
path_prefix = assets_base_path()
|
22
|
+
matched_folders = input[:filename].match(/\/ckeditor\/(plugins|skins)\/([\w-]+)\//)
|
23
|
+
|
24
|
+
data = input[:data].gsub(REGEX) { |_match|
|
25
|
+
raw_asset_path = context.asset_path($1)
|
26
|
+
if raw_asset_path.starts_with?(path_prefix)
|
27
|
+
"url(#{raw_asset_path})"
|
28
|
+
elsif matched_folders
|
29
|
+
"url(#{path_prefix}/#{matched_folders[1]}/#{matched_folders[2]}#{raw_asset_path.gsub('/..', '')})"
|
30
|
+
else
|
31
|
+
"url(#{path_prefix}#{raw_asset_path})"
|
32
|
+
end
|
33
|
+
}
|
34
|
+
|
35
|
+
{ data: data }
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'ckeditor-rails/asset_url_processor'
|
2
|
+
|
1
3
|
module Ckeditor
|
2
4
|
module Rails
|
3
5
|
class Engine < ::Rails::Engine
|
@@ -5,6 +7,16 @@ module Ckeditor
|
|
5
7
|
app.config.assets.precompile += Ckeditor::Rails::Asset.new.files
|
6
8
|
end
|
7
9
|
|
10
|
+
# Follow sprockets-rails 3.3.0+ to use postprocessor of Sprockets
|
11
|
+
# https://github.com/rails/sprockets-rails/blob/v3.3.0/lib/sprockets/railtie.rb#L121
|
12
|
+
initializer 'ckeditor.asset_url_processor' do |app|
|
13
|
+
# Processors of Sprockets 2.x should inherit from Tilt::Template
|
14
|
+
# Processors of Sprockets 3+ should respond to :call
|
15
|
+
if Gem::Version.new(::Sprockets::VERSION) > Gem::Version.new('3')
|
16
|
+
::Sprockets.register_postprocessor 'text/css', ::Ckeditor::Rails::AssetUrlProcessor
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
8
20
|
rake_tasks do
|
9
21
|
load "ckeditor-rails/tasks.rake"
|
10
22
|
end
|
@@ -26,9 +26,11 @@ class SourceFile < Thor
|
|
26
26
|
def move
|
27
27
|
FileUtils.rm_rf destination_root
|
28
28
|
copy_files_in_source_root
|
29
|
+
copy_adapters
|
29
30
|
copy_langs
|
30
31
|
copy_plugins
|
31
32
|
copy_skins
|
33
|
+
copy_vendors
|
32
34
|
end
|
33
35
|
|
34
36
|
desc 'fix_css', 'fix some css caused precompilation error'
|
@@ -77,6 +79,10 @@ class SourceFile < Thor
|
|
77
79
|
end
|
78
80
|
end
|
79
81
|
|
82
|
+
def copy_adapters
|
83
|
+
directory 'ckeditor/adapters', 'javascripts/ckeditor/adapters'
|
84
|
+
end
|
85
|
+
|
80
86
|
def copy_langs
|
81
87
|
directory 'ckeditor/lang', 'javascripts/ckeditor/lang'
|
82
88
|
end
|
@@ -91,6 +97,8 @@ class SourceFile < Thor
|
|
91
97
|
# ckeditor.js would lookup 'plugins/icons.png'
|
92
98
|
file = 'ckeditor/plugins/icons.png'
|
93
99
|
copy_file file, "images/#{file}"
|
100
|
+
file = 'ckeditor/plugins/icons_hidpi.png'
|
101
|
+
copy_file file, "images/#{file}"
|
94
102
|
end
|
95
103
|
|
96
104
|
def copy_skins
|
@@ -99,12 +107,17 @@ class SourceFile < Thor
|
|
99
107
|
end
|
100
108
|
end
|
101
109
|
|
110
|
+
def copy_vendors
|
111
|
+
directory 'ckeditor/vendor', 'javascripts/ckeditor/vendor'
|
112
|
+
end
|
113
|
+
|
102
114
|
def copy_assets path
|
103
115
|
batch_copy path, 'css', 'stylesheets'
|
104
116
|
batch_copy path, 'js', 'javascripts'
|
105
117
|
batch_copy path, 'png', 'images'
|
106
118
|
batch_copy path, 'gif', 'images'
|
107
119
|
batch_copy path, 'jpg', 'images'
|
120
|
+
batch_copy path, 'svg', 'images'
|
108
121
|
end
|
109
122
|
|
110
123
|
def batch_copy path, type, asset_path, pattern = nil
|
data/lib/ckeditor-rails.rb
CHANGED
@@ -12,6 +12,9 @@ module Ckeditor
|
|
12
12
|
mattr_accessor :assets_skins
|
13
13
|
@@assets_skins = nil
|
14
14
|
|
15
|
+
mattr_writer :assets_base_path
|
16
|
+
@@assets_base_path = nil
|
17
|
+
|
15
18
|
class << self
|
16
19
|
def configure
|
17
20
|
yield self
|
@@ -49,7 +52,30 @@ module Ckeditor
|
|
49
52
|
end
|
50
53
|
|
51
54
|
def default_skins
|
52
|
-
%w[moono]
|
55
|
+
%w[moono-lisa]
|
56
|
+
end
|
57
|
+
|
58
|
+
def default_base_path
|
59
|
+
return "#{::Sprockets::Railtie.config.assets.prefix}/ckeditor" if defined? ::Sprockets
|
60
|
+
|
61
|
+
"#{::Rails.application.config.assets.prefix}/ckeditor"
|
62
|
+
end
|
63
|
+
|
64
|
+
def assets_base_path
|
65
|
+
return @@assets_base_path unless @@assets_base_path.nil?
|
66
|
+
|
67
|
+
if @@assets_base_path.respond_to? :call
|
68
|
+
self.assets_base_path = @@assets_base_path.call
|
69
|
+
elsif !@@assets_base_path.is_a? String
|
70
|
+
self.assets_base_path = default_base_path
|
71
|
+
end
|
72
|
+
|
73
|
+
relative_path = ::Rails.application.config.action_controller.relative_url_root
|
74
|
+
self.assets_base_path = File.join(relative_path, @@assets_base_path) if relative_path && @@assets_base_path
|
75
|
+
|
76
|
+
self.assets_base_path = @@assets_base_path.sub(/\/\z/, '') if @@assets_base_path.ends_with?('/')
|
77
|
+
|
78
|
+
@@assets_base_path
|
53
79
|
end
|
54
80
|
end
|
55
81
|
|
@@ -59,7 +85,7 @@ end
|
|
59
85
|
require 'ckeditor-rails/asset'
|
60
86
|
|
61
87
|
case ::Rails.version.to_s
|
62
|
-
when /^[
|
88
|
+
when /^[456]/
|
63
89
|
require 'ckeditor-rails/engine'
|
64
90
|
when /^3\.[12]/
|
65
91
|
require 'ckeditor-rails/engine3'
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<svg width="16px" height="16px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
+
|
4
|
+
<title>cursor_disabled</title>
|
5
|
+
<desc></desc>
|
6
|
+
<defs></defs>
|
7
|
+
<g id="Page-4" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
8
|
+
<g id="cursor_disabled_5">
|
9
|
+
<g id="cursor_disabled_illustrator" transform="translate(24.000000, 2.000000)">
|
10
|
+
<g id="Layer_1">
|
11
|
+
<path d="M225,14 C227.8,14 230,11.8 230,9 L230,5 C230,2.2 227.8,0 225,0 L127,0 C124.2,0 122,2.2 122,5 L122,9 C122,11.8 124.2,14 127,14 L158,14 L158,26.3 C172.4,34 185,44.6 195,57.4 L195,14 L225,14 L225,14 Z" id="Shape" fill="#000000"></path>
|
12
|
+
<path d="M158,228.7 L158,238 L134.5,238 C130.6,239.1 126.7,239.9 122.6,240.6 C122.2,241.3 121.9,242.1 121.9,243 L121.9,247 C121.9,249.8 124.1,252 126.9,252 L224.9,252 C227.7,252 229.9,249.8 229.9,247 L229.9,243 C229.9,240.2 227.7,238 224.9,238 L194.9,238 L194.9,197.6 C185,210.4 172.4,221 158,228.7 L158,228.7 Z" id="Shape" fill="#000000"></path>
|
13
|
+
<path d="M54.7,107.6 C53.9,110.7 51.1,112.9 41.8,116.1 C35.6,118.3 31.9,121.1 29.5,124.5 C29.5,125.5 29.4,126.4 29.4,127.4 C29.4,134.1 30.3,140.7 32,146.9 L93.9,146.9 L54.7,107.6 L54.7,107.6 Z" id="Shape" fill="#000000"></path>
|
14
|
+
<path d="M70.8,13 C70.7,13 70.6,13.1 70.5,13.3 C65.9,13.7 58.9,15.5 54.6,24.4 C63.2,20.2 72.5,17.1 82.2,15.1 C77.4,12.7 72.6,13 70.8,13 L70.8,13 Z" id="Shape" fill="#000000"></path>
|
15
|
+
<path d="M55,170 L55,183.7 C58.7,187 62.7,189.9 67,192.3 L67,170 L78,170 L78,197.6 C81.9,199.1 85.9,200.2 90,201 L90,170 L101,170 L101,202.4 C102.2,202.5 103.3,202.5 104.5,202.5 C109.4,202.5 114.3,202 119.1,201.1 C119.3,193.5 119.5,182.8 119.6,172.6 L105.1,158 L36.1,158 C38.3,162.8 40.9,167.4 44,171.7 L44,170 L55,170 L55,170 Z" id="Shape" fill="#000000"></path>
|
16
|
+
<path d="M26.3,211.5 C26.3,211.5 24.6,222.6 36.8,222.6 L40.8,222.6 C35.7,219.1 30.8,215.3 26.3,211.1 L26.3,211.5 L26.3,211.5 Z" id="Shape" fill="#000000"></path>
|
17
|
+
<path d="M172.1,159.8 C176.9,149.8 179.4,138.7 179.4,127.5 C179.4,107.1 171.2,88.6 158,75.1 L158,145.7 L172.1,159.8 L172.1,159.8 Z" id="Shape" fill="#000000"></path>
|
18
|
+
<path d="M72.2,59.9 L91.2,78.9 C92.3,73 93.7,65.4 94.1,53.3 C86.5,54.3 79.1,56.6 72.2,59.9 L72.2,59.9 Z" id="Shape" fill="#000000"></path>
|
19
|
+
<path d="M119.7,158 L119.2,158 L119.7,158.5 L119.7,158 L119.7,158 Z" id="Shape" fill="#FF0000"></path>
|
20
|
+
<path d="M195,75.3 C186.1,59.9 173.3,46.9 158,37.8 C142.3,28.4 124,23 104.5,23 C99.7,23 95,23.3 90.4,24 C86.3,24.6 82.3,25.3 78.3,26.4 C73.4,27.7 68.7,29.3 64.1,31.2 C59.6,33.1 55.3,35.3 51.2,37.7 C20.6,55.9 0,89.3 0,127.5 C0,153.8 9.8,177.9 25.9,196.3 C31.3,202.4 37.3,207.9 44,212.6 C47.5,215.1 51.2,217.4 55,219.5 C57,220.6 59,221.6 61.1,222.5 C74.3,228.6 89,231.9 104.5,231.9 C124,231.9 142.3,226.5 158,217.1 C173.3,207.9 186.1,195 195,179.6 C203.9,164.2 209,146.4 209,127.4 C209,108.5 203.9,90.7 195,75.3 L195,75.3 Z M151.2,198.5 C141.4,205 130.4,209.3 118.9,211.3 C114.2,212.1 109.4,212.5 104.5,212.5 C103.3,212.5 102.2,212.5 101,212.4 C97.3,212.2 93.6,211.8 90,211.2 C85.9,210.5 81.9,209.5 78,208.2 C74.2,207 70.5,205.5 67,203.7 C62.8,201.6 58.8,199.2 55,196.5 C51.1,193.7 47.4,190.5 44,187.1 C36,179 29.6,169.2 25.4,158.4 C21.6,148.8 19.6,138.4 19.6,127.5 C19.6,110.8 24.4,94.7 33.6,80.8 L37,75.7 L55.7,94.4 L108.4,147.1 L119.4,158.1 L119.9,158.1 L119.9,158.6 L156.5,195.2 L151.2,198.5 L151.2,198.5 Z M177.7,170.7 L174.4,176.2 L158,159.9 L89.4,91.3 L55.8,57.6 L61.3,54.3 C71.4,48.3 82.6,44.6 94.2,43.1 C97.6,42.7 101,42.5 104.5,42.5 C124.8,42.5 143.4,49.6 158,61.5 C177.2,77.1 189.4,100.8 189.4,127.4 C189.4,142.7 185.4,157.7 177.7,170.7 L177.7,170.7 Z" id="Shape" fill="#FF0000"></path>
|
21
|
+
</g>
|
22
|
+
</g>
|
23
|
+
</g>
|
24
|
+
</g>
|
25
|
+
</svg>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<svg width="16px" height="16px" viewBox="0 0 205 252" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
+
<title>cursor</title>
|
4
|
+
<desc></desc>
|
5
|
+
<defs></defs>
|
6
|
+
<g id="Page-4" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
7
|
+
<g id="Artboard-1" transform="translate(-49.000000, -2.000000)" fill="#000000">
|
8
|
+
<g id="cursor" transform="translate(49.000000, 2.000000)">
|
9
|
+
<path d="M170,14 L200.007537,14 C202.769057,14 205,11.7636493 205,9.00497092 L205,4.99502908 C205,2.23382212 202.764798,0 200.007537,0 L101.992463,0 C99.2309431,0 97,2.23635069 97,4.99502908 L97,9.00497092 C97,11.7661779 99.2352017,14 101.992463,14 L133,14 L133,238 L101.992463,238 C99.2309431,238 97,240.236351 97,242.995029 L97,247.004971 C97,249.766178 99.2352017,252 101.992463,252 L200.007537,252 C202.769057,252 205,249.763649 205,247.004971 L205,242.995029 C205,240.233822 202.764798,238 200.007537,238 L170,238 L170,14 Z" id="Combined-Shape"></path>
|
10
|
+
<path d="M65,222.280829 C60.6131176,222.280829 56.3742162,222.280828 52.9999995,222.280828 L53,170 L42,170 L42,222.560593 C38.6130246,222.560593 34.3763308,222.560593 30.0000005,222.560594 L30,170 L19,170 L19,222.560595 C16.324865,222.560595 13.8463369,222.560595 11.7612725,222.560596 C-0.369586438,222.560599 1.28381746,211.509313 1.28381746,211.509313 C1.28381746,211.509313 0.389689944,177.756 0.396571277,158 L94.7408232,158 C94.7392736,177.793089 93.8535396,211.229548 93.8535396,211.229548 C93.8535396,211.229548 95.5069435,222.280834 83.3760845,222.280831 C81.2553782,222.28083 78.7276415,222.28083 76.0000002,222.28083 L76,170 L65,170 L65,222.280829 Z M0.574534036,147 C0.579768387,146.896149 0.585131638,146.794755 0.590625514,146.695866 C1.28381748,134.218409 -0.797112286,122.434146 16.8792816,116.195422 C34.5556755,109.956698 28.6662536,107.530522 30.3978792,95.7462576 C32.1295048,83.961993 25.8921298,78.069863 25.8921315,44.7966496 C25.892133,17.9607206 38.5169467,13.9220173 45.5220939,13.3637617 C45.6089814,13.1340727 45.7002506,13.0164391 45.7960631,13.0164391 C49.8372056,13.0164389 69.2452237,11.2436713 69.2452255,44.5168847 C69.2452273,77.7900982 63.0078523,83.6822281 64.7394778,95.4664928 C66.4711034,107.250757 60.5816815,109.676933 78.2580754,115.915657 C95.9344693,122.154381 93.8535395,133.938644 94.5467315,146.416101 C94.5570586,146.601989 94.5669242,146.796724 94.5763397,147 L0.574534036,147 Z M47.5,41 C52.1944204,41 56,37.1944204 56,32.5 C56,27.8055796 52.1944204,24 47.5,24 C42.8055796,24 39,27.8055796 39,32.5 C39,37.1944204 42.8055796,41 47.5,41 Z" id="Combined-Shape"></path>
|
11
|
+
</g>
|
12
|
+
</g>
|
13
|
+
</g>
|
14
|
+
</svg>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|