ckeditor_rails 4.6.2 → 4.16.1
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 +10 -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/about/dialogs/hidpi/logo_ckeditor.png +0 -0
- data/vendor/assets/images/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- 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/widget/images/handle.png +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 +1615 -789
- data/vendor/assets/javascripts/ckeditor/LICENSE.md +23 -7
- 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 +62 -52
- data/vendor/assets/javascripts/ckeditor/ckeditor.js +1204 -916
- data/vendor/assets/javascripts/ckeditor/config.js +2 -2
- data/vendor/assets/javascripts/ckeditor/lang/af.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/ar.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/az.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/bg.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/bn.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/bs.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/ca.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/cs.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/cy.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/da.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/de-ch.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/de.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/el.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/en-au.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/en-ca.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/en-gb.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/en.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/eo.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/es-mx.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/es.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/et.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/eu.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/fa.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/fi.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/fo.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/fr-ca.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/fr.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/gl.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/gu.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/he.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/hi.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/hr.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/hu.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/id.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/is.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/it.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/ja.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/ka.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/km.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/ko.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/ku.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/lt.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/lv.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/mk.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/mn.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/ms.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/nb.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/nl.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/no.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/oc.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/pl.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/pt-br.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/pt.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/ro.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/ru.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/si.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/sk.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/sl.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/sq.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/sr-latn.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/sr.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/sv.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/th.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/tr.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/tt.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/ug.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/uk.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/vi.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/zh-cn.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/zh.js +4 -4
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +7 -7
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/af.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +7 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/az.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +9 -8
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +6 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +6 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +7 -7
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de-ch.js +11 -9
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +10 -8
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +8 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en-au.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js +5 -4
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +5 -4
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +6 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es-mx.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +6 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +9 -8
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eu.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +6 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fo.js +5 -4
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +9 -8
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +5 -4
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +5 -4
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +5 -4
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +7 -7
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +7 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +6 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +5 -4
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +6 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +5 -4
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +6 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +5 -4
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +6 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/oc.js +5 -5
- 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 +6 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +6 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +10 -9
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +10 -9
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +10 -8
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +10 -8
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +5 -4
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +6 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +8 -9
- data/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +12 -12
- data/vendor/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +2 -2
- 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 +23 -23
- data/vendor/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +17 -17
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +6 -6
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +6 -6
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +7 -7
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +17 -16
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +7 -6
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +9 -9
- data/vendor/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +9 -8
- data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +35 -35
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +6 -5
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +27 -25
- data/vendor/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +8 -8
- 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 +40 -41
- 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 -19
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/af.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ar.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/az.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/bg.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ca.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cs.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cy.js +2 -2
- 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 +7 -7
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/el.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-au.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-ca.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eo.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/es-mx.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/es.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/et.js +9 -11
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eu.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fa.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fi.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/gl.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/he.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hr.js +11 -11
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hu.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/id.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/it.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ja.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/km.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ko.js +8 -8
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ku.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lt.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lv.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nb.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nl.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/no.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/oc.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pl.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ro.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/si.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sk.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sl.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sq.js +5 -5
- 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 +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/th.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tr.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tt.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ug.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/uk.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/vi.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +12 -12
- data/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +20 -19
- data/vendor/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +16 -15
- data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/default.js +2 -2
- 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 +84 -86
- 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 +4 -4
- 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 +2 -2
- data/vendor/assets/stylesheets/ckeditor/plugins/copyformatting/styles/copyformatting.css +2 -2
- 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/scayt/dialogs/dialog.css +23 -0
- data/vendor/assets/stylesheets/ckeditor/plugins/scayt/skins/moono-lisa/scayt.css +6 -1
- data/vendor/assets/stylesheets/ckeditor/plugins/tableselection/styles/tableselection.css +36 -0
- data/vendor/assets/stylesheets/ckeditor/plugins/templates/dialogs/templates.css +2 -2
- data/vendor/assets/stylesheets/ckeditor/skins/moono-lisa/dialog.css +3 -3
- data/vendor/assets/stylesheets/ckeditor/skins/moono-lisa/dialog_ie.css +3 -3
- data/vendor/assets/stylesheets/ckeditor/skins/moono-lisa/dialog_ie8.css +3 -3
- data/vendor/assets/stylesheets/ckeditor/skins/moono-lisa/dialog_iequirks.css +3 -3
- data/vendor/assets/stylesheets/ckeditor/skins/moono-lisa/editor.css +3 -3
- data/vendor/assets/stylesheets/ckeditor/skins/moono-lisa/editor_gecko.css +3 -3
- data/vendor/assets/stylesheets/ckeditor/skins/moono-lisa/editor_ie.css +3 -3
- data/vendor/assets/stylesheets/ckeditor/skins/moono-lisa/editor_ie8.css +3 -3
- data/vendor/assets/stylesheets/ckeditor/skins/moono-lisa/editor_iequirks.css +3 -3
- metadata +135 -8
- data/lib/assets/javascripts/ckeditor/jquery.js +0 -10
@@ -0,0 +1,18 @@
|
|
1
|
+
@bender-tags: exportpdf, bug, 24
|
2
|
+
@bender-ui: collapsed
|
3
|
+
@bender-include: ../_helpers/tools.js
|
4
|
+
@bender-ckeditor-plugins: wysiwygarea, toolbar, basicstyles, notification
|
5
|
+
|
6
|
+
1. Click `Export to PDF` button (the one next to the `Source` button) in the first editor.
|
7
|
+
1. Wait for the file to download.
|
8
|
+
1. Do the same in the second editor.
|
9
|
+
1. Compare paper format in files.
|
10
|
+
|
11
|
+
**Expected:**
|
12
|
+
|
13
|
+
* First editor produced file in `A4` format (`8.27in x 11.7in`);
|
14
|
+
* Second editor produced file in `A6` format (`4.13in x 5.83in`).
|
15
|
+
|
16
|
+
**Unexpected:**
|
17
|
+
|
18
|
+
Any file is in different format than intended (e.g. `Letter` - `8.5in x 11in`).
|
@@ -0,0 +1,18 @@
|
|
1
|
+
|
2
|
+
<div id="editor">
|
3
|
+
<p>This editor is read-only.</p>
|
4
|
+
</div>
|
5
|
+
|
6
|
+
<button id="toggle">Toggle read-only mode</button>
|
7
|
+
|
8
|
+
<script>
|
9
|
+
exportPdfUtils.initManualTest();
|
10
|
+
|
11
|
+
var editor = CKEDITOR.replace( 'editor', exportPdfUtils.getDefaultConfig( 'manual', {
|
12
|
+
readOnly: true
|
13
|
+
} ) );
|
14
|
+
|
15
|
+
CKEDITOR.document.getById( 'toggle' ).on( 'click', function() {
|
16
|
+
editor.setReadOnly( !editor.readOnly );
|
17
|
+
} );
|
18
|
+
</script>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
@bender-tags: exportpdf, feature, 1
|
2
|
+
@bender-ui: collapsed
|
3
|
+
@bender-include: ../_helpers/tools.js
|
4
|
+
@bender-ckeditor-plugins: wysiwygarea, toolbar, basicstyles, notification
|
5
|
+
|
6
|
+
1. Examine `Export to PDF` button (the one next to the `Source` button).
|
7
|
+
|
8
|
+
**Expected:**
|
9
|
+
|
10
|
+
Button is clickable.
|
11
|
+
|
12
|
+
**Unexpected:**
|
13
|
+
|
14
|
+
Button is inactive.
|
15
|
+
|
16
|
+
1. Click the button.
|
17
|
+
1. Wait for the file to download.
|
18
|
+
|
19
|
+
**Expected:**
|
20
|
+
|
21
|
+
File with correct content was downloaded.
|
22
|
+
|
23
|
+
**Unexpected:**
|
24
|
+
|
25
|
+
File was not downloaded or its content is incorrect.
|
26
|
+
|
27
|
+
1. Click `Toggle read-only mode` button.
|
28
|
+
1. Repeat steps 1-3.
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<h2>Classic Editor</h2>
|
2
|
+
<textarea id="editor1">
|
3
|
+
<span class="badge badge-success">Classic Editor</span>
|
4
|
+
</textarea>
|
5
|
+
|
6
|
+
<h2>Divarea Editor</h2>
|
7
|
+
<div id="editor2">
|
8
|
+
<span class="badge badge-success">Divarea Editor</span>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<h2>Inline Editor</h2>
|
12
|
+
<div id="editor3" contenteditable="true">
|
13
|
+
<span class="badge badge-success">Inline Editor</span>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<script>
|
17
|
+
exportPdfUtils.initManualTest();
|
18
|
+
|
19
|
+
CKEDITOR.replace( 'editor1', exportPdfUtils.getDefaultConfig( 'manual', {
|
20
|
+
exportPdf_stylesheets: [ 'https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css' ],
|
21
|
+
extraPlugins: 'wysiwygarea,exportpdf',
|
22
|
+
allowedContent: true
|
23
|
+
} ) );
|
24
|
+
|
25
|
+
CKEDITOR.replace( 'editor2', exportPdfUtils.getDefaultConfig( 'manual', {
|
26
|
+
exportPdf_stylesheets: [ 'https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css' ],
|
27
|
+
extraPlugins: 'divarea,exportpdf',
|
28
|
+
allowedContent: true
|
29
|
+
} ) );
|
30
|
+
|
31
|
+
CKEDITOR.inline( 'editor3', exportPdfUtils.getDefaultConfig( 'manual', {
|
32
|
+
exportPdf_stylesheets: [ 'https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css' ],
|
33
|
+
extraPlugins: 'floatingspace,exportpdf',
|
34
|
+
allowedContent: true
|
35
|
+
} ) );
|
36
|
+
</script>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
@bender-tags: exportpdf, feature, 31
|
2
|
+
@bender-ui: collapsed
|
3
|
+
@bender-include: ../_helpers/tools.js
|
4
|
+
@bender-ckeditor-plugins: toolbar, basicstyles, notification
|
5
|
+
|
6
|
+
**Note:** This test uses <a href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" target="_blank">Bootstrap CDN</a>. If something goes wrong, check if the link works correctly first.
|
7
|
+
|
8
|
+
1. Use `Export to PDF` button in the first editor.
|
9
|
+
1. Open generated file.
|
10
|
+
|
11
|
+
**Expected:**
|
12
|
+
|
13
|
+
Text from editor was converted to a green badge.
|
14
|
+
|
15
|
+
**Unexpected:**
|
16
|
+
|
17
|
+
Content is the same as in the editor.
|
18
|
+
|
19
|
+
1. Repeat the same steps for the second and third editor.
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<div id="editor">
|
2
|
+
<p>Foo bar</p>
|
3
|
+
</div>
|
4
|
+
|
5
|
+
<div id="tokenValue" style="word-break:break-all;border:1px solid red;"></div>
|
6
|
+
|
7
|
+
<script>
|
8
|
+
exportPdfUtils.initManualTest();
|
9
|
+
|
10
|
+
var editor = CKEDITOR.replace( 'editor', exportPdfUtils.getDefaultConfig( 'manual' ) );
|
11
|
+
|
12
|
+
editor.on( 'instanceReady', function() {
|
13
|
+
if ( !CKEDITOR.config.exportPdf_tokenUrl ) {
|
14
|
+
bender.ignore();
|
15
|
+
}
|
16
|
+
} );
|
17
|
+
|
18
|
+
editor.on( 'exportPdf', function( evt ) {
|
19
|
+
var value = CKEDITOR.document.findOne( '#tokenValue' );
|
20
|
+
|
21
|
+
value.setHtml( evt.data.token );
|
22
|
+
}, null, null, 17 );
|
23
|
+
</script>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
@bender-tags: exportpdf, feature, 77
|
2
|
+
@bender-ui: collapsed
|
3
|
+
@bender-include: ../_helpers/tools.js
|
4
|
+
@bender-ckeditor-plugins: wysiwygarea, toolbar, basicstyles, notification, format
|
5
|
+
|
6
|
+
Note: You need the Internet connection to run this test.
|
7
|
+
|
8
|
+
1. Click `Export to PDF` toolbar button.
|
9
|
+
1. Examine the area in the red frame below.
|
10
|
+
|
11
|
+
**Expected:** There is a long token string in the frame.
|
12
|
+
|
13
|
+
**Unexpected:** Frame is empty or says 'undefined'.
|
14
|
+
|
15
|
+
1. Wait for the file to download and open it.
|
16
|
+
|
17
|
+
**Expected:** No information about being created with CKEditor was added.
|
18
|
+
|
19
|
+
**Unexpected:** There is an additional note about CKEditor at the bottom of page.
|
data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/tokentwoeditorscorrect.html
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
<h3>Editor 1</h3>
|
2
|
+
<div id="editor1">
|
3
|
+
<p>Foo bar</p>
|
4
|
+
</div>
|
5
|
+
<div id="tokenValue1" style="word-break:break-all;border:1px solid red;"></div>
|
6
|
+
|
7
|
+
<h3>Editor 2</h3>
|
8
|
+
<div id="editor2">
|
9
|
+
<p>Foo bar</p>
|
10
|
+
</div>
|
11
|
+
<div id="tokenValue2" style="word-break:break-all;border:1px solid red;"></div>
|
12
|
+
|
13
|
+
<script>
|
14
|
+
exportPdfUtils.initManualTest();
|
15
|
+
|
16
|
+
var editor1 = CKEDITOR.replace( 'editor1', exportPdfUtils.getDefaultConfig( 'manual', { height: 100 } ) ),
|
17
|
+
editor2 = CKEDITOR.replace( 'editor2', exportPdfUtils.getDefaultConfig( 'manual', { height: 100 } ) );
|
18
|
+
|
19
|
+
editor1.on( 'instanceReady', function() {
|
20
|
+
if ( !CKEDITOR.config.exportPdf_tokenUrl ) {
|
21
|
+
bender.ignore();
|
22
|
+
}
|
23
|
+
} );
|
24
|
+
|
25
|
+
editor1.on( 'exportPdf', function( evt ) {
|
26
|
+
var value = CKEDITOR.document.findOne( '#tokenValue1' );
|
27
|
+
|
28
|
+
value.setHtml( evt.data.token );
|
29
|
+
evt.cancel();
|
30
|
+
}, null, null, 17 );
|
31
|
+
|
32
|
+
editor2.on( 'exportPdf', function( evt ) {
|
33
|
+
var value = CKEDITOR.document.findOne( '#tokenValue2' );
|
34
|
+
|
35
|
+
value.setHtml( evt.data.token );
|
36
|
+
evt.cancel();
|
37
|
+
}, null, null, 17 );
|
38
|
+
</script>
|
data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/tokentwoeditorscorrect.md
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
@bender-tags: exportpdf, feature, 77
|
2
|
+
@bender-ui: collapsed
|
3
|
+
@bender-include: ../_helpers/tools.js
|
4
|
+
@bender-ckeditor-plugins: wysiwygarea, toolbar, basicstyles, notification, format
|
5
|
+
|
6
|
+
Note: You need the Internet connection to run this test.
|
7
|
+
|
8
|
+
1. Click `Export to PDF` button in both editors.
|
9
|
+
|
10
|
+
1. Examine the area in the red frames below each editor.
|
11
|
+
|
12
|
+
**Expected:** Content of two boxes are two different long strings.
|
13
|
+
|
14
|
+
**Unexpected:** Values in both boxes are the same or one of them says `undefined`.
|
data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/tokentwoeditorswrong.html
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
<h3>Editor 1</h3>
|
2
|
+
<div id="editor1">
|
3
|
+
<p>Foo bar</p>
|
4
|
+
</div>
|
5
|
+
<div id="tokenValue1" style="word-break:break-all;border:1px solid red;"></div>
|
6
|
+
|
7
|
+
<h3>Editor 2</h3>
|
8
|
+
<div id="editor2">
|
9
|
+
<p>Foo bar</p>
|
10
|
+
</div>
|
11
|
+
<div id="tokenValue2" style="word-break:break-all;border:1px solid red;"></div>
|
12
|
+
|
13
|
+
<script>
|
14
|
+
exportPdfUtils.initManualTest();
|
15
|
+
|
16
|
+
var editor1 = CKEDITOR.replace( 'editor1', exportPdfUtils.getDefaultConfig( 'manual', { height: 100 } ) ),
|
17
|
+
editor2 = CKEDITOR.replace( 'editor2', exportPdfUtils.getDefaultConfig( 'manual', { exportPdf_tokenUrl: '', height: 100 } ) );
|
18
|
+
|
19
|
+
editor1.on( 'instanceReady', function() {
|
20
|
+
if ( !CKEDITOR.config.exportPdf_tokenUrl ) {
|
21
|
+
bender.ignore();
|
22
|
+
}
|
23
|
+
} );
|
24
|
+
|
25
|
+
editor1.on( 'exportPdf', function( evt ) {
|
26
|
+
var value = CKEDITOR.document.findOne( '#tokenValue1' );
|
27
|
+
|
28
|
+
value.setHtml( evt.data.token );
|
29
|
+
evt.cancel();
|
30
|
+
}, null, null, 17 );
|
31
|
+
|
32
|
+
editor2.on( 'exportPdf', function( evt ) {
|
33
|
+
var value = CKEDITOR.document.findOne( '#tokenValue2' );
|
34
|
+
|
35
|
+
value.setHtml( evt.data.token );
|
36
|
+
evt.cancel();
|
37
|
+
}, null, null, 17 );
|
38
|
+
</script>
|
data/vendor/assets/javascripts/ckeditor/plugins/exportpdf/tests/manual/tokentwoeditorswrong.md
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
@bender-tags: exportpdf, feature, 77
|
2
|
+
@bender-ui: collapsed
|
3
|
+
@bender-include: ../_helpers/tools.js
|
4
|
+
@bender-ckeditor-plugins: wysiwygarea, toolbar, basicstyles, notification, format
|
5
|
+
|
6
|
+
Note: You need the Internet connection to run this test.
|
7
|
+
|
8
|
+
1. Click `Export to PDF` button in both editors.
|
9
|
+
|
10
|
+
1. Examine the area in the red frames below each editor.
|
11
|
+
|
12
|
+
**Expected:** First box contains token value and the second one `undefined`.
|
13
|
+
|
14
|
+
**Unexpected:** Values in both boxes are the same or none of them is `undefined`.
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<div id="editor">
|
2
|
+
<p>Foo bar</p>
|
3
|
+
</div>
|
4
|
+
|
5
|
+
<div id="tokenValue" style="word-break:break-all;border:1px solid red;"></div>
|
6
|
+
|
7
|
+
<script>
|
8
|
+
exportPdfUtils.initManualTest();
|
9
|
+
|
10
|
+
var editor = CKEDITOR.replace( 'editor', exportPdfUtils.getDefaultConfig( 'manual', {
|
11
|
+
exportPdf_tokenUrl: ''
|
12
|
+
} ) );
|
13
|
+
|
14
|
+
editor.on( 'exportPdf', function( evt ) {
|
15
|
+
var value = CKEDITOR.document.findOne( '#tokenValue' );
|
16
|
+
|
17
|
+
value.setHtml( evt.data.token );
|
18
|
+
}, null, null, 17 );
|
19
|
+
</script>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
@bender-tags: exportpdf, feature, 77
|
2
|
+
@bender-ui: collapsed
|
3
|
+
@bender-include: ../_helpers/tools.js
|
4
|
+
@bender-ckeditor-plugins: wysiwygarea, toolbar, basicstyles, notification, format
|
5
|
+
|
6
|
+
Note: You need the Internet connection to run this test.
|
7
|
+
|
8
|
+
1. Open and examine console.
|
9
|
+
|
10
|
+
**Expected:** `exportpdf-no-token-url` warning appeared.
|
11
|
+
|
12
|
+
**Unexpected:** No warning.
|
13
|
+
|
14
|
+
1. Click `Export to PDF` button in the editor.
|
15
|
+
1. Examine the area in the red frame below.
|
16
|
+
|
17
|
+
**Expected:** Frame has text `undefined`.
|
18
|
+
|
19
|
+
**Unexpected:** There is a long token string in the frame.
|
20
|
+
|
21
|
+
1. Examine console.
|
22
|
+
|
23
|
+
**Expected:** `exportpdf-no-token` warning appeared.
|
24
|
+
|
25
|
+
**Unexpected:** No warning.
|
26
|
+
|
27
|
+
1. Wait for the file to download and open it.
|
28
|
+
|
29
|
+
**Expected:** File contains info about being created with CKEditor.
|
30
|
+
|
31
|
+
**Unexpected:** No copyright info was added.
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<div id="editor1">
|
2
|
+
<p>Hello world!</p>
|
3
|
+
</div>
|
4
|
+
|
5
|
+
<div id="editor2">
|
6
|
+
<p>Hello world!</p>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
<script>
|
10
|
+
exportPdfUtils.initManualTest();
|
11
|
+
|
12
|
+
CKEDITOR.replace( 'editor1', exportPdfUtils.getDefaultConfig( 'manual', {
|
13
|
+
extraPlugins: 'exportpdf',
|
14
|
+
exportPdf_service: 'https://cksource.com'
|
15
|
+
} ) );
|
16
|
+
|
17
|
+
CKEDITOR.replace( 'editor2', exportPdfUtils.getDefaultConfig( 'manual', {
|
18
|
+
removePlugins: 'notification',
|
19
|
+
exportPdf_service: 'https://cksource.com'
|
20
|
+
} ) );
|
21
|
+
</script>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
@bender-tags: exportpdf, feature, 4
|
2
|
+
@bender-ui: collapsed
|
3
|
+
@bender-include: ../_helpers/tools.js
|
4
|
+
@bender-ckeditor-plugins: wysiwygarea, toolbar, notification
|
5
|
+
|
6
|
+
**Note:** Errors in console during this test are allowed.
|
7
|
+
|
8
|
+
1. Click `Export to PDF` button in the first editor.
|
9
|
+
|
10
|
+
**Expected:**
|
11
|
+
|
12
|
+
* Warning notification with `Error occured.` message appeared.
|
13
|
+
* Button is clickable.
|
14
|
+
* File wasn't downloaded.
|
15
|
+
|
16
|
+
**Unexpected:**
|
17
|
+
|
18
|
+
* Notification didn't show up.
|
19
|
+
* Button wasn't reenabled.
|
20
|
+
* File was downloaded.
|
21
|
+
|
22
|
+
2. Click `Export to PDF` button in the second editor.
|
23
|
+
|
24
|
+
**Expected:**
|
25
|
+
|
26
|
+
* Alert appeared instead of notification.
|
27
|
+
* Button is clickable.
|
28
|
+
* File wasn't downloaded.
|
29
|
+
|
30
|
+
**Unexpected:**
|
31
|
+
|
32
|
+
* Notification didn't show up.
|
33
|
+
* Button wasn't reenabled.
|
34
|
+
* File was downloaded.
|
@@ -0,0 +1,4 @@
|
|
1
|
+
(function(){bender.loadExternalPlugin("exportpdf","/apps/plugin/");CKEDITOR.plugins.load("exportpdf",function(){function c(a,b){var c=a._.notificationArea.notifications[0];assert.areSame(b.message,c.message,"Message should be the same.");assert.areSame(b.type,c.type,"Type should be the same.");assert.areSame(b.progress,c.progress,"Progress should be the same.")}bender.editors={successEditor:{config:exportPdfUtils.getDefaultConfig("unit")},errorEditor:{config:exportPdfUtils.getDefaultConfig("unit")}};
|
2
|
+
bender.test({setUp:function(){bender.tools.ignoreUnsupportedEnvironment("exportpdf");sinon.stub(CKEDITOR.plugins.exportpdf,"downloadFile")},tearDown:function(){CKEDITOR.plugins.exportpdf.downloadFile.restore()},"test notifications and progress steps are correct in happy path":function(){var a=this.editors.successEditor;this.editorBots.successEditor.setHtmlWithSelection('\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e^');a.once("exportPdf",function(){c(a,{message:"Processing PDF document...",type:"progress",
|
3
|
+
progress:0})});a.once("exportPdf",function(){c(a,{message:"Processing PDF document...",type:"progress",progress:.2})},null,null,16);exportPdfUtils.useXHR(a,function(b){b.addEventListener("progress",function(){c(a,{message:"Processing PDF document...",type:"progress",progress:.8})});b.addEventListener("loadend",function(){c(a,{message:"Document is ready!",type:"success",progress:1})});b.respond(200,{},"")})},"test notifications and progress steps are correct in sad path":function(){var a=this.editors.errorEditor;
|
4
|
+
this.editorBots.errorEditor.setHtmlWithSelection('\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e^');exportPdfUtils.useXHR(a,function(b){var d=sinon.stub(console,"error",function(a){assert.areSame("Validation failed.",a.message,"Message from endpoint is incorrect.");d.restore()});b.addEventListener("loadend",function(){c(a,{message:"Error occurred.",type:"warning"})});b.respond(400,{},'{ "message": "Validation failed." }')})}})})})();
|
@@ -0,0 +1,9 @@
|
|
1
|
+
(function(){bender.loadExternalPlugin("exportpdf","/apps/plugin/");CKEDITOR.plugins.load("exportpdf",function(){function a(a,d,b){b=exportPdfUtils.getDefaultConfig("unit",b||{});bender.editorBot.create({name:"editor"+Date.now(),config:b},function(b){var c=b.editor;b.setHtmlWithSelection(a);c.once("exportPdf",function(b){assert.areEqual(a,b.data.html)},null,null,10);c.once("exportPdf",function(a){a.cancel();assert.areEqual('\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e'+d+"\x3c/div\x3e",a.data.html)},
|
2
|
+
null,null,16);c.execCommand("exportPdf")})}function b(a,b){a=a.replace(/\/$/g,"");b&&0<b&&(a=a.split("/").slice(0,-b).join("/"));return a}bender.test({setUp:function(){bender.tools.ignoreUnsupportedEnvironment("exportpdf");this.paths={relative0:b(bender.testDir),relative1:b(bender.testDir,1),relative3:b(bender.testDir,3)}},"test absolute image urls are not changed":function(){a('\x3cp\x3eFoo \x3cimg src\x3d"https://ckeditor.com/img/image1.jpg" /\x3e\x3cimg src\x3d"https://ckeditor.com/img/image2.png" /\x3e\x3c/p\x3e',
|
3
|
+
'\x3cp\x3eFoo \x3cimg src\x3d"https://ckeditor.com/img/image1.jpg" /\x3e\x3cimg src\x3d"https://ckeditor.com/img/image2.png" /\x3e\x3c/p\x3e')},"test relative (to root) image urls are changed to absolute":function(){a('\x3cp\x3e\x3cimg src\x3d"/img/image1.jpg" /\x3e Bar \x3cimg src\x3d"/img/big/image2.png" /\x3e\x3c/p\x3e','\x3cp\x3e\x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl("/img/image1.jpg")+'" /\x3e Bar \x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl("/img/big/image2.png")+'" /\x3e\x3c/p\x3e')},
|
4
|
+
'test relative (to root) image urls with ".." are changed to absolute':function(){a('\x3cp\x3e\x3cimg src\x3d"/../img/image1.jpg" /\x3e Bar \x3cimg src\x3d"/../../img/big/image2.png" /\x3e\x3c/p\x3e','\x3cp\x3e\x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl("/img/image1.jpg")+'" /\x3e Bar \x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl("/img/big/image2.png")+'" /\x3e\x3c/p\x3e')},"test relative (to root) image urls with custom baseHref are changed to absolute":function(){a('\x3cp\x3e\x3cimg src\x3d"/img/image1.jpg" /\x3e Bar \x3cimg src\x3d"/img/big/image2.png" /\x3e\x3c/p\x3e',
|
5
|
+
'\x3cp\x3e\x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl("/img/image1.jpg","http://ckeditor.com")+'" /\x3e Bar \x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl("/img/big/image2.png","http://ckeditor.com")+'" /\x3e\x3c/p\x3e',{baseHref:"http://ckeditor.com/ckeditor4/"})},'test relative (to root) image urls with custom baseHref and ".." are changed to absolute':function(){a('\x3cp\x3e\x3cimg src\x3d"/../img/image1.jpg" /\x3e Bar \x3cimg src\x3d"/../../img/big/image2.png" /\x3e\x3c/p\x3e','\x3cp\x3e\x3cimg src\x3d"'+
|
6
|
+
exportPdfUtils.toAbsoluteUrl("/img/image1.jpg","http://ckeditor.com")+'" /\x3e Bar \x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl("/img/big/image2.png","http://ckeditor.com")+'" /\x3e\x3c/p\x3e',{baseHref:"http://ckeditor.com/ckeditor4/"})},"test relative (to current url) image urls are changed to absolute":function(){a('\x3cp\x3e\x3cimg src\x3d"img/image1.jpg" /\x3e Bar \x3cimg src\x3d"img/big/image2.png" /\x3e\x3c/p\x3e','\x3cp\x3e\x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl(this.paths.relative0+
|
7
|
+
"/img/image1.jpg")+'" /\x3e Bar \x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl(this.paths.relative0+"/img/big/image2.png")+'" /\x3e\x3c/p\x3e')},'test relative (to current url) image urls with ".." are changed to absolute':function(){a('\x3cp\x3e\x3cimg src\x3d"../img/image1.jpg" /\x3e Bar \x3cimg src\x3d"../../../img/big/image2.png" /\x3e\x3c/p\x3e','\x3cp\x3e\x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl(this.paths.relative1+"/img/image1.jpg")+'" /\x3e Bar \x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl(this.paths.relative3+
|
8
|
+
"/img/big/image2.png")+'" /\x3e\x3c/p\x3e')},"test relative (to current url) image urls with custom baseHref are changed to absolute":function(){a('\x3cp\x3e\x3cimg src\x3d"img/image1.jpg" /\x3e Bar \x3cimg src\x3d"img/big/image2.png" /\x3e\x3c/p\x3e','\x3cp\x3e\x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl("img/image1.jpg","http://ckeditor.com/ckeditor4/")+'" /\x3e Bar \x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl("img/big/image2.png","http://ckeditor.com/ckeditor4/")+'" /\x3e\x3c/p\x3e',{baseHref:"http://ckeditor.com/ckeditor4/"})},
|
9
|
+
'test relative (to current url) image urls with custom baseHref and ".." are changed to absolute':function(){a('\x3cp\x3e\x3cimg src\x3d"../img/image1.jpg" /\x3e Bar \x3cimg src\x3d"../../img/big/image2.png" /\x3e\x3c/p\x3e','\x3cp\x3e\x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl("img/image1.jpg","https://ckeditor.com/ckeditor4/")+'" /\x3e Bar \x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl("img/big/image2.png","https://ckeditor.com/")+'" /\x3e\x3c/p\x3e',{baseHref:"https://ckeditor.com/ckeditor4/demo/"})}})})})();
|
@@ -0,0 +1,3 @@
|
|
1
|
+
(function(){bender.loadExternalPlugin("exportpdf","/apps/plugin/");CKEDITOR.plugins.load("exportpdf",function(){bender.editors={defaultHeader:{config:{extraPlugins:"exportpdf"}},customHeader:{config:exportPdfUtils.getDefaultConfig("unit")}};bender.test({setUp:function(){bender.tools.ignoreUnsupportedEnvironment("exportpdf");sinon.stub(CKEDITOR.plugins.exportpdf,"downloadFile")},tearDown:function(){CKEDITOR.plugins.exportpdf.downloadFile.restore()},"test default statistics header":function(){var a=
|
2
|
+
this.editors.defaultHeader;this.editorBots.defaultHeader.setHtmlWithSelection('\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e^');exportPdfUtils.useXHR(a,function(a){assert.areEqual(a.requestHeaders["x-cs-app-id"],"cke4","Default stats header is wrong.")})},"test custom statistics header":function(){var a=this.editors.customHeader;this.editorBots.customHeader.setHtmlWithSelection('\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e^');exportPdfUtils.useXHR(a,function(a){assert.areEqual(a.requestHeaders["x-cs-app-id"],
|
3
|
+
"cke4-tests-unit","Custom stats header was not set properly.")})}})})})();
|
@@ -0,0 +1,18 @@
|
|
1
|
+
(function(){bender.loadExternalPlugin("exportpdf","/apps/plugin/");CKEDITOR.plugins.load("exportpdf",function(){function a(a){var e=exportPdfUtils.getDefaultConfig("unit",a.extraConfig||{});bender.editorBot.create({name:"editor"+Date.now(),config:e,creator:a.creator},function(d){var c=d.editor;d.setHtmlWithSelection(a.initialHtml);c.once("exportPdf",function(b){assert.areEqual(a.initialHtml,b.data.html)},null,null,10);c.once("exportPdf",function(b){b.cancel();a.expectCss?assert.isNotUndefined(b.data.css,
|
2
|
+
"Some CSS should be sent."):assert.isUndefined(b.data.css,"No CSS should be sent.");assert.areEqual(a.expectedHtml,b.data.html,"HTML is incorrect.")},null,null,16);c.execCommand("exportPdf")})}bender.test({setUp:function(){bender.tools.ignoreUnsupportedEnvironment("exportpdf")},"test no custom stylesheets attached to divarea editor":function(){a({creator:"replace",initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',
|
3
|
+
expectCss:!1})},"test one absolute path custom stylesheet attached to divarea editor":function(){a({creator:"replace",initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"https://ckeditor.com/"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!1,extraConfig:{exportPdf_stylesheets:["https://ckeditor.com"]}})},"test two absolute path custom stylesheets attached to divarea editor":function(){a({creator:"replace",
|
4
|
+
initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"https://ckeditor.css/"\x3e\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"https://cksource.css/"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!1,extraConfig:{exportPdf_stylesheets:["https://ckeditor.css","https://cksource.css"]}})},"test one relative path custom stylesheet attached to divarea editor":function(){a({creator:"replace",
|
5
|
+
initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+exportPdfUtils.toAbsoluteUrl("/css/ckeditor.css")+'"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!1,extraConfig:{exportPdf_stylesheets:["/css/ckeditor.css"]}})},"test two relative path custom stylesheets attached to divarea editor":function(){a({creator:"replace",initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',
|
6
|
+
expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+exportPdfUtils.toAbsoluteUrl("/css/ckeditor.css")+'"\x3e\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+exportPdfUtils.toAbsoluteUrl("/css/cksource.css")+'"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!1,extraConfig:{exportPdf_stylesheets:["/css/ckeditor.css","/css/cksource.css"]}})},"test one relative and one absolute path custom stylesheets attached to divarea editor":function(){a({creator:"replace",
|
7
|
+
initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+exportPdfUtils.toAbsoluteUrl("/css/ckeditor.css")+'"\x3e\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"https://ckeditor.com/"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!1,extraConfig:{exportPdf_stylesheets:["/css/ckeditor.css","https://ckeditor.com"]}})},"test no custom stylesheets attached to inline editor":function(){a({creator:"inline",
|
8
|
+
initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!1})},"test one absolute path custom stylesheet attached to inline editor":function(){a({creator:"inline",initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"https://ckeditor.com/"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',
|
9
|
+
expectCss:!1,extraConfig:{exportPdf_stylesheets:["https://ckeditor.com"]}})},"test two absolute path custom stylesheets attached to inline editor":function(){a({creator:"inline",initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"https://ckeditor.css/"\x3e\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"https://cksource.css/"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',
|
10
|
+
expectCss:!1,extraConfig:{exportPdf_stylesheets:["https://ckeditor.css","https://cksource.css"]}})},"test one relative path custom stylesheet attached to inline editor":function(){a({creator:"inline",initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+exportPdfUtils.toAbsoluteUrl("/css/ckeditor.css")+'"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!1,
|
11
|
+
extraConfig:{exportPdf_stylesheets:["/css/ckeditor.css"]}})},"test two relative path custom stylesheets attached to inline editor":function(){a({creator:"inline",initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+exportPdfUtils.toAbsoluteUrl("/css/ckeditor.css")+'"\x3e\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+exportPdfUtils.toAbsoluteUrl("/css/cksource.css")+'"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',
|
12
|
+
expectCss:!1,extraConfig:{exportPdf_stylesheets:["/css/ckeditor.css","/css/cksource.css"]}})},"test one relative and one absolute path custom stylesheets attached to inline editor":function(){a({creator:"inline",initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+exportPdfUtils.toAbsoluteUrl("/css/ckeditor.css")+'"\x3e\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"https://ckeditor.com/"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',
|
13
|
+
expectCss:!1,extraConfig:{exportPdf_stylesheets:["/css/ckeditor.css","https://ckeditor.com"]}})},"test no custom stylesheets attached to classic editor":function(){a({creator:"replace",initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!0,extraConfig:{removePlugins:"divarea"}})},"test one absolute path custom stylesheet attached to classic editor":function(){a({creator:"replace",
|
14
|
+
initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"https://ckeditor.com/"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!1,extraConfig:{removePlugins:"divarea",exportPdf_stylesheets:["https://ckeditor.com"]}})},"test two absolute path custom stylesheets attached to classic editor":function(){a({creator:"replace",initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',
|
15
|
+
expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"https://ckeditor.css/"\x3e\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"https://cksource.css/"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!1,extraConfig:{removePlugins:"divarea",exportPdf_stylesheets:["https://ckeditor.css","https://cksource.css"]}})},"test one relative path custom stylesheet attached to classic editor":function(){a({creator:"replace",
|
16
|
+
initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+exportPdfUtils.toAbsoluteUrl("/css/ckeditor.css")+'"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!1,extraConfig:{removePlugins:"divarea",exportPdf_stylesheets:["/css/ckeditor.css"]}})},"test two relative path custom stylesheets attached to classic editor":function(){a({creator:"replace",initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',
|
17
|
+
expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+exportPdfUtils.toAbsoluteUrl("/css/ckeditor.css")+'"\x3e\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+exportPdfUtils.toAbsoluteUrl("/css/cksource.css")+'"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!1,extraConfig:{removePlugins:"divarea",exportPdf_stylesheets:["/css/ckeditor.css","/css/cksource.css"]}})},"test one relative and one absolute path custom stylesheets attached to classic editor":function(){a({creator:"replace",
|
18
|
+
initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+exportPdfUtils.toAbsoluteUrl("/css/ckeditor.css")+'"\x3e\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"https://ckeditor.com/"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!1,extraConfig:{removePlugins:"divarea",exportPdf_stylesheets:["/css/ckeditor.css","https://ckeditor.com"]}})}})})})();
|
@@ -1,25 +1,25 @@
|
|
1
1
|
/*
|
2
|
-
Copyright (c) 2003-
|
3
|
-
For licensing, see LICENSE.md or
|
2
|
+
Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
|
-
(function(){function C(c){return c.type==CKEDITOR.NODE_TEXT&&0<c.getLength()&&(!
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
for(var c=0;c<a.length;c++)for(d.push(d[c]+1);0<d[c+1]&&a.charAt(c)!=a.charAt(d[c+1]-1);)d[c+1]=d[d[c+1]-1]+1;this._={overlap:d,
|
13
|
-
A=function(a){
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
label:
|
20
|
-
|
21
|
-
"
|
22
|
-
label:
|
23
|
-
|
24
|
-
e.
|
25
|
-
|
5
|
+
(function(){function C(c){return c.type==CKEDITOR.NODE_TEXT&&0<c.getLength()&&(!m||!c.isReadOnly())}function v(c){return!(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary(CKEDITOR.tools.extend({},CKEDITOR.dtd.$empty,CKEDITOR.dtd.$nonEditable)))}var m,w=function(){return{textNode:this.textNode,offset:this.offset,character:this.textNode?this.textNode.getText().charAt(this.offset):null,hitMatchBoundary:this._.matchBoundary}},x=["find","replace"],q=[["txtFindFind","txtFindReplace"],["txtFindCaseChk",
|
6
|
+
"txtReplaceCaseChk"],["txtFindWordChk","txtReplaceWordChk"],["txtFindCyclic","txtReplaceCyclic"]];CKEDITOR.dialog.add("find",function(c){function n(a,b){var d=this,c=new CKEDITOR.dom.walker(a);c.guard=b?v:function(a){!v(a)&&(d._.matchBoundary=!0)};c.evaluator=C;c.breakOnFalse=1;a.startContainer.type==CKEDITOR.NODE_TEXT&&(this.textNode=a.startContainer,this.offset=a.startOffset-1);this._={matchWord:b,walker:c,matchBoundary:!1}}function y(a,b){var d=c.createRange();d.setStart(a.textNode,b?a.offset:
|
7
|
+
a.offset+1);d.setEndAt(c.editable(),CKEDITOR.POSITION_BEFORE_END);return d}function r(a){var b=c.getSelection().getRanges()[0],d=c.editable();b&&!a?(a=b.clone(),a.collapse(!0)):(a=c.createRange(),a.setStartAt(d,CKEDITOR.POSITION_AFTER_START));a.setEndAt(d,CKEDITOR.POSITION_BEFORE_END);return a}var z=new CKEDITOR.style(CKEDITOR.tools.extend({attributes:{"data-cke-highlight":1},fullMatch:1,ignoreReadonly:1,childRule:function(){return 0}},c.config.find_highlight,!0));n.prototype={next:function(){return this.move()},
|
8
|
+
back:function(){return this.move(!0)},move:function(a){var b=this.textNode;if(null===b)return w.call(this);this._.matchBoundary=!1;if(b&&a&&0<this.offset)this.offset--;else if(b&&this.offset<b.getLength()-1)this.offset++;else{for(b=null;!b&&!(b=this._.walker[a?"previous":"next"].call(this._.walker),this._.matchWord&&!b||this._.walker._.end););this.offset=(this.textNode=b)?a?b.getLength()-1:0:0}return w.call(this)}};var t=function(a,b){this._={walker:a,cursors:[],rangeLength:b,highlightRange:null,
|
9
|
+
isMatched:0}};t.prototype={toDomRange:function(){var a=c.createRange(),b=this._.cursors;if(1>b.length){var d=this._.walker.textNode;if(d)a.setStartAfter(d);else return null}else d=b[0],b=b[b.length-1],a.setStart(d.textNode,d.offset),a.setEnd(b.textNode,b.offset+1);return a},updateFromDomRange:function(a){var b=new n(a);this._.cursors=[];do a=b.next(),a.character&&this._.cursors.push(a);while(a.character);this._.rangeLength=this._.cursors.length},setMatched:function(){this._.isMatched=!0},clearMatched:function(){this._.isMatched=
|
10
|
+
!1},isMatched:function(){return this._.isMatched},highlight:function(){if(!(1>this._.cursors.length)){this._.highlightRange&&this.removeHighlight();var a=this.toDomRange(),b=a.createBookmark();z.applyToRange(a,c);a.moveToBookmark(b);this._.highlightRange=a;b=a.startContainer;b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());b.scrollIntoView();this.updateFromDomRange(a)}},removeHighlight:function(){if(this._.highlightRange){var a=this._.highlightRange.createBookmark();z.removeFromRange(this._.highlightRange,
|
11
|
+
c);this._.highlightRange.moveToBookmark(a);this.updateFromDomRange(this._.highlightRange);this._.highlightRange=null}},isReadOnly:function(){return this._.highlightRange?this._.highlightRange.startContainer.isReadOnly():0},moveBack:function(){var a=this._.walker.back(),b=this._.cursors;a.hitMatchBoundary&&(this._.cursors=b=[]);b.unshift(a);b.length>this._.rangeLength&&b.pop();return a},moveNext:function(){var a=this._.walker.next(),b=this._.cursors;a.hitMatchBoundary&&(this._.cursors=b=[]);b.push(a);
|
12
|
+
b.length>this._.rangeLength&&b.shift();return a},getEndCharacter:function(){var a=this._.cursors;return 1>a.length?null:a[a.length-1].character},getNextCharacterRange:function(a){var b,d;d=this._.cursors;d=(b=d[d.length-1])&&b.textNode?new n(y(b)):this._.walker;return new t(d,a)},getCursors:function(){return this._.cursors}};var A=function(a,b){var d=[-1];b&&(a=a.toLowerCase());for(var c=0;c<a.length;c++)for(d.push(d[c]+1);0<d[c+1]&&a.charAt(c)!=a.charAt(d[c+1]-1);)d[c+1]=d[d[c+1]-1]+1;this._={overlap:d,
|
13
|
+
state:0,ignoreCase:!!b,pattern:a}};A.prototype={feedCharacter:function(a){for(this._.ignoreCase&&(a=a.toLowerCase());;){if(a==this._.pattern.charAt(this._.state))return this._.state++,this._.state==this._.pattern.length?(this._.state=0,2):1;if(this._.state)this._.state=this._.overlap[this._.state];else return 0}},reset:function(){this._.state=0}};var E=/[.,"'?!;: \u0085\u00a0\u1680\u280e\u2028\u2029\u202f\u205f\u3000]/,B=function(a){if(!a)return!0;var b=a.charCodeAt(0);return 9<=b&&13>=b||8192<=b&&
|
14
|
+
8202>=b||E.test(a)},f={searchRange:null,matchRange:null,find:function(a,b,d,e,D,u){this.matchRange?(this.matchRange.removeHighlight(),this.matchRange=this.matchRange.getNextCharacterRange(a.length)):this.matchRange=new t(new n(this.searchRange),a.length);for(var h=new A(a,!b),k=0,l="%";null!==l;){for(this.matchRange.moveNext();l=this.matchRange.getEndCharacter();){k=h.feedCharacter(l);if(2==k)break;this.matchRange.moveNext().hitMatchBoundary&&h.reset()}if(2==k){if(d){var g=this.matchRange.getCursors(),
|
15
|
+
p=g[g.length-1],g=g[0],m=c.createRange();m.setStartAt(c.editable(),CKEDITOR.POSITION_AFTER_START);m.setEnd(g.textNode,g.offset);g=m;p=y(p);g.trim();p.trim();g=new n(g,!0);p=new n(p,!0);if(!B(g.back().character)||!B(p.next().character))continue}this.matchRange.setMatched();!1!==D&&this.matchRange.highlight();return!0}}this.matchRange.clearMatched();this.matchRange.removeHighlight();return e&&!u?(this.searchRange=r(1),this.matchRange=null,f.find.apply(this,Array.prototype.slice.call(arguments).concat([!0]))):
|
16
|
+
!1},replaceCounter:0,replace:function(a,b,d,e,f,u,h){m=1;a=0;a=this.hasMatchOptionsChanged(b,e,f);if(!this.matchRange||!this.matchRange.isMatched()||this.matchRange._.isReplaced||this.matchRange.isReadOnly()||a)a&&this.matchRange&&(this.matchRange.clearMatched(),this.matchRange.removeHighlight(),this.matchRange=null),a=this.find(b,e,f,u,!h);else{this.matchRange.removeHighlight();b=this.matchRange.toDomRange();d=c.document.createText(d);if(!h){var k=c.getSelection();k.selectRanges([b]);c.fire("saveSnapshot")}b.deleteContents();
|
17
|
+
b.insertNode(d);h||(k.selectRanges([b]),c.fire("saveSnapshot"));this.matchRange.updateFromDomRange(b);h||this.matchRange.highlight();this.matchRange._.isReplaced=!0;this.replaceCounter++;a=1}m=0;return a},matchOptions:null,hasMatchOptionsChanged:function(a,b,d){a=[a,b,d].join(".");b=this.matchOptions&&this.matchOptions!=a;this.matchOptions=a;return b}},e=c.lang.find;return{title:e.title,resizable:CKEDITOR.DIALOG_RESIZE_NONE,minWidth:350,minHeight:170,buttons:[CKEDITOR.dialog.cancelButton(c,{label:c.lang.common.close})],
|
18
|
+
contents:[{id:"find",label:e.find,title:e.find,accessKey:"",elements:[{type:"hbox",widths:["230px","90px"],children:[{type:"text",id:"txtFindFind",label:e.findWhat,isChanged:!1,labelLayout:"horizontal",accessKey:"F"},{type:"button",id:"btnFind",align:"left",style:"width:100%",label:e.find,onClick:function(){var a=this.getDialog();f.find(a.getValueOf("find","txtFindFind"),a.getValueOf("find","txtFindCaseChk"),a.getValueOf("find","txtFindWordChk"),a.getValueOf("find","txtFindCyclic"))||alert(e.notFoundMsg)}}]},
|
19
|
+
{type:"fieldset",className:"cke_dialog_find_fieldset",label:CKEDITOR.tools.htmlEncode(e.findOptions),style:"margin-top:29px",children:[{type:"vbox",padding:0,children:[{type:"checkbox",id:"txtFindCaseChk",isChanged:!1,label:e.matchCase},{type:"checkbox",id:"txtFindWordChk",isChanged:!1,label:e.matchWord},{type:"checkbox",id:"txtFindCyclic",isChanged:!1,"default":!0,label:e.matchCyclic}]}]}]},{id:"replace",label:e.replace,accessKey:"M",elements:[{type:"hbox",widths:["230px","90px"],children:[{type:"text",
|
20
|
+
id:"txtFindReplace",label:e.findWhat,isChanged:!1,labelLayout:"horizontal",accessKey:"F"},{type:"button",id:"btnFindReplace",align:"left",style:"width:100%",label:e.replace,onClick:function(){var a=this.getDialog();f.replace(a,a.getValueOf("replace","txtFindReplace"),a.getValueOf("replace","txtReplace"),a.getValueOf("replace","txtReplaceCaseChk"),a.getValueOf("replace","txtReplaceWordChk"),a.getValueOf("replace","txtReplaceCyclic"))||alert(e.notFoundMsg)}}]},{type:"hbox",widths:["230px","90px"],children:[{type:"text",
|
21
|
+
id:"txtReplace",label:e.replaceWith,isChanged:!1,labelLayout:"horizontal",accessKey:"R"},{type:"button",id:"btnReplaceAll",align:"left",style:"width:100%",label:e.replaceAll,isChanged:!1,onClick:function(){var a=this.getDialog();f.replaceCounter=0;f.searchRange=r(1);f.matchRange&&(f.matchRange.removeHighlight(),f.matchRange=null);for(c.fire("saveSnapshot");f.replace(a,a.getValueOf("replace","txtFindReplace"),a.getValueOf("replace","txtReplace"),a.getValueOf("replace","txtReplaceCaseChk"),a.getValueOf("replace",
|
22
|
+
"txtReplaceWordChk"),!1,!0););f.replaceCounter?(alert(e.replaceSuccessMsg.replace(/%1/,f.replaceCounter)),c.fire("saveSnapshot")):alert(e.notFoundMsg)}}]},{type:"fieldset",label:CKEDITOR.tools.htmlEncode(e.findOptions),children:[{type:"vbox",padding:0,children:[{type:"checkbox",id:"txtReplaceCaseChk",isChanged:!1,label:e.matchCase},{type:"checkbox",id:"txtReplaceWordChk",isChanged:!1,label:e.matchWord},{type:"checkbox",id:"txtReplaceCyclic",isChanged:!1,"default":!0,label:e.matchCyclic}]}]}]}],onLoad:function(){var a=
|
23
|
+
this,b,d=0;this.on("hide",function(){d=0});this.on("show",function(){d=1});this.selectPage=CKEDITOR.tools.override(this.selectPage,function(c){return function(e){c.call(a,e);var f=a._.tabs[e],h;h="find"===e?"txtFindWordChk":"txtReplaceWordChk";b=a.getContentElement(e,"find"===e?"txtFindFind":"txtFindReplace");a.getContentElement(e,h);f.initialized||(CKEDITOR.document.getById(b._.inputId),f.initialized=!0);if(d){var k;e="find"===e?1:0;var f=1-e,l,g=q.length;for(l=0;l<g;l++)h=this.getContentElement(x[e],
|
24
|
+
q[l][e]),k=this.getContentElement(x[f],q[l][f]),k.setValue(h.getValue())}}})},onShow:function(){f.searchRange=r();var a=this._.currentTabId,b=this.getParentEditor().getSelection().getSelectedText(),c=this.getContentElement(a,"find"==a?"txtFindFind":"txtFindReplace");c.setValue(b);c.select();this[("find"==a&&this._.editor.readOnly?"hide":"show")+"Page"]("replace")},onHide:function(){var a;f.matchRange&&f.matchRange.isMatched()&&(f.matchRange.removeHighlight(),(a=f.matchRange.toDomRange())&&c.getSelection().selectRanges([a]),
|
25
|
+
c.focus());delete f.matchRange},onFocus:function(){return"replace"==this._.currentTabId?this.getContentElement("replace","txtFindReplace"):this.getContentElement("find","txtFindFind")}}})})();
|