漏网之鱼*2

This commit is contained in:
跨越晨昏 2024-09-18 18:22:54 +08:00
parent e557c8e120
commit 82519d9007
140 changed files with 1945 additions and 2 deletions

View File

@ -1,7 +1,13 @@
@charset "gb2312";
@charset "UTF-8";
/* css */
* { margin: 0; padding: 0 }
body { font: 15px "Microsoft YaHei", Arial, Helvetica, sans-serif; color: #555; background: #efefef; line-height: 1.5; }
body {
font: 15px "Microsoft YaHei", Arial, Helvetica, sans-serif; /* 设置字体大小和字体族 */
background-image: url('../images/盐湖.png'); /* 设置背景图片 */
line-height: 1.5; /* 设置行高为字体大小的1.5倍 */
background-size: cover; /* 背景图片覆盖整个元素区域,可能会被裁剪以保持宽高比 */
background-repeat: no-repeat; /* 背景图片不重复 */
}
img { border: 0; display: block }
ul, li { list-style: none; }
a { text-decoration: none; color: #555 }

View File

Before

Width:  |  Height:  |  Size: 8.9 MiB

After

Width:  |  Height:  |  Size: 8.9 MiB

View File

@ -0,0 +1,130 @@
@media (prefers-color-scheme: dark) {
:root {
--primary: #264b5d;
--primary-fg: #f7f7f7;
--body-fg: #eeeeee;
--body-bg: #121212;
--body-quiet-color: #d0d0d0;
--body-medium-color: #e0e0e0;
--body-loud-color: #ffffff;
--breadcrumbs-link-fg: #e0e0e0;
--breadcrumbs-bg: var(--primary);
--link-fg: #81d4fa;
--link-hover-color: #4ac1f7;
--link-selected-fg: #6f94c6;
--hairline-color: #272727;
--border-color: #353535;
--error-fg: #e35f5f;
--message-success-bg: #006b1b;
--message-warning-bg: #583305;
--message-error-bg: #570808;
--darkened-bg: #212121;
--selected-bg: #1b1b1b;
--selected-row: #00363a;
--close-button-bg: #333333;
--close-button-hover-bg: #666666;
color-scheme: dark;
}
}
html[data-theme="dark"] {
--primary: #264b5d;
--primary-fg: #f7f7f7;
--body-fg: #eeeeee;
--body-bg: #121212;
--body-quiet-color: #d0d0d0;
--body-medium-color: #e0e0e0;
--body-loud-color: #ffffff;
--breadcrumbs-link-fg: #e0e0e0;
--breadcrumbs-bg: var(--primary);
--link-fg: #81d4fa;
--link-hover-color: #4ac1f7;
--link-selected-fg: #6f94c6;
--hairline-color: #272727;
--border-color: #353535;
--error-fg: #e35f5f;
--message-success-bg: #006b1b;
--message-warning-bg: #583305;
--message-error-bg: #570808;
--darkened-bg: #212121;
--selected-bg: #1b1b1b;
--selected-row: #00363a;
--close-button-bg: #333333;
--close-button-hover-bg: #666666;
color-scheme: dark;
}
/* THEME SWITCH */
.theme-toggle {
cursor: pointer;
border: none;
padding: 0;
background: transparent;
vertical-align: middle;
margin-inline-start: 5px;
margin-top: -1px;
}
.theme-toggle svg {
vertical-align: middle;
height: 1rem;
width: 1rem;
display: none;
}
/*
Fully hide screen reader text so we only show the one matching the current
theme.
*/
.theme-toggle .visually-hidden {
display: none;
}
html[data-theme="auto"] .theme-toggle .theme-label-when-auto {
display: block;
}
html[data-theme="dark"] .theme-toggle .theme-label-when-dark {
display: block;
}
html[data-theme="light"] .theme-toggle .theme-label-when-light {
display: block;
}
/* ICONS */
.theme-toggle svg.theme-icon-when-auto,
.theme-toggle svg.theme-icon-when-dark,
.theme-toggle svg.theme-icon-when-light {
fill: var(--header-link-color);
color: var(--header-bg);
}
html[data-theme="auto"] .theme-toggle svg.theme-icon-when-auto {
display: block;
}
html[data-theme="dark"] .theme-toggle svg.theme-icon-when-dark {
display: block;
}
html[data-theme="light"] .theme-toggle svg.theme-icon-when-light {
display: block;
}

View File

@ -0,0 +1,150 @@
.sticky {
position: sticky;
top: 0;
max-height: 100vh;
}
.toggle-nav-sidebar {
z-index: 20;
left: 0;
display: flex;
align-items: center;
justify-content: center;
flex: 0 0 23px;
width: 23px;
border: 0;
border-right: 1px solid var(--hairline-color);
background-color: var(--body-bg);
cursor: pointer;
font-size: 1.25rem;
color: var(--link-fg);
padding: 0;
}
[dir="rtl"] .toggle-nav-sidebar {
border-left: 1px solid var(--hairline-color);
border-right: 0;
}
.toggle-nav-sidebar:hover,
.toggle-nav-sidebar:focus {
background-color: var(--darkened-bg);
}
#nav-sidebar {
z-index: 15;
flex: 0 0 275px;
left: -276px;
margin-left: -276px;
border-top: 1px solid transparent;
border-right: 1px solid var(--hairline-color);
background-color: var(--body-bg);
overflow: auto;
}
[dir="rtl"] #nav-sidebar {
border-left: 1px solid var(--hairline-color);
border-right: 0;
left: 0;
margin-left: 0;
right: -276px;
margin-right: -276px;
}
.toggle-nav-sidebar::before {
content: '\00BB';
}
.main.shifted .toggle-nav-sidebar::before {
content: '\00AB';
}
.main > #nav-sidebar {
visibility: hidden;
}
.main.shifted > #nav-sidebar {
margin-left: 0;
visibility: visible;
}
[dir="rtl"] .main.shifted > #nav-sidebar {
margin-right: 0;
}
#nav-sidebar .module th {
width: 100%;
overflow-wrap: anywhere;
}
#nav-sidebar .module th,
#nav-sidebar .module caption {
padding-left: 16px;
}
#nav-sidebar .module td {
white-space: nowrap;
}
[dir="rtl"] #nav-sidebar .module th,
[dir="rtl"] #nav-sidebar .module caption {
padding-left: 8px;
padding-right: 16px;
}
#nav-sidebar .current-app .section:link,
#nav-sidebar .current-app .section:visited {
color: var(--header-color);
font-weight: bold;
}
#nav-sidebar .current-model {
background: var(--selected-row);
}
@media (forced-colors: active) {
#nav-sidebar .current-model {
background-color: SelectedItem;
}
}
.main > #nav-sidebar + .content {
max-width: calc(100% - 23px);
}
.main.shifted > #nav-sidebar + .content {
max-width: calc(100% - 299px);
}
@media (max-width: 767px) {
#nav-sidebar, #toggle-nav-sidebar {
display: none;
}
.main > #nav-sidebar + .content,
.main.shifted > #nav-sidebar + .content {
max-width: 100%;
}
}
#nav-filter {
width: 100%;
box-sizing: border-box;
padding: 2px 5px;
margin: 5px 0;
border: 1px solid var(--border-color);
background-color: var(--darkened-bg);
color: var(--body-fg);
}
#nav-filter:focus {
border-color: var(--body-quiet-color);
}
#nav-filter.no-results {
background: var(--message-error-bg);
}
#nav-sidebar table {
width: 100%;
}

View File

@ -0,0 +1,19 @@
/* Hide warnings fields if usable password is selected */
form:has(#id_usable_password input[value="true"]:checked) .messagelist {
display: none;
}
/* Hide password fields if unusable password is selected */
form:has(#id_usable_password input[value="false"]:checked) .field-password1,
form:has(#id_usable_password input[value="false"]:checked) .field-password2 {
display: none;
}
/* Select appropriate submit button */
form:has(#id_usable_password input[value="true"]:checked) input[type="submit"].unset-password {
display: none;
}
form:has(#id_usable_password input[value="false"]:checked) input[type="submit"].set-password {
display: none;
}

View File

@ -0,0 +1,3 @@
<svg width="13" height="13" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
<path fill="#2b70bf" d="m555 1335 78-141q-87-63-136-159t-49-203q0-121 61-225-229 117-381 353 167 258 427 375zm389-759q0-20-14-34t-34-14q-125 0-214.5 89.5T592 832q0 20 14 34t34 14 34-14 14-34q0-86 61-147t147-61q20 0 34-14t14-34zm363-191q0 7-1 9-105 188-315 566t-316 567l-49 89q-10 16-28 16-12 0-134-70-16-10-16-28 0-12 44-87-143-65-263.5-173T20 1029Q0 998 0 960t20-69q153-235 380-371t496-136q89 0 180 17l54-97q10-16 28-16 5 0 18 6t31 15.5 33 18.5 31.5 18.5T1291 358q16 10 16 27zm37 447q0 139-79 253.5T1056 1250l280-502q8 45 8 84zm448 128q0 35-20 69-39 64-109 145-150 172-347.5 267T896 1536l74-132q212-18 392.5-137T1664 960q-115-179-282-294l63-112q95 64 182.5 153T1772 891q20 34 20 69z"/>
</svg>

After

Width:  |  Height:  |  Size: 784 B

View File

@ -0,0 +1,30 @@
/**
* Persist changelist filters state (collapsed/expanded).
*/
'use strict';
{
// Init filters.
let filters = JSON.parse(sessionStorage.getItem('django.admin.filtersState'));
if (!filters) {
filters = {};
}
Object.entries(filters).forEach(([key, value]) => {
const detailElement = document.querySelector(`[data-filter-title='${CSS.escape(key)}']`);
// Check if the filter is present, it could be from other view.
if (detailElement) {
value ? detailElement.setAttribute('open', '') : detailElement.removeAttribute('open');
}
});
// Save filter state when clicks.
const details = document.querySelectorAll('details');
details.forEach(detail => {
detail.addEventListener('toggle', event => {
filters[`${event.target.dataset.filterTitle}`] = detail.open;
sessionStorage.setItem('django.admin.filtersState', JSON.stringify(filters));
});
});
}

View File

@ -0,0 +1,79 @@
'use strict';
{
const toggleNavSidebar = document.getElementById('toggle-nav-sidebar');
if (toggleNavSidebar !== null) {
const navSidebar = document.getElementById('nav-sidebar');
const main = document.getElementById('main');
let navSidebarIsOpen = localStorage.getItem('django.admin.navSidebarIsOpen');
if (navSidebarIsOpen === null) {
navSidebarIsOpen = 'true';
}
main.classList.toggle('shifted', navSidebarIsOpen === 'true');
navSidebar.setAttribute('aria-expanded', navSidebarIsOpen);
toggleNavSidebar.addEventListener('click', function() {
if (navSidebarIsOpen === 'true') {
navSidebarIsOpen = 'false';
} else {
navSidebarIsOpen = 'true';
}
localStorage.setItem('django.admin.navSidebarIsOpen', navSidebarIsOpen);
main.classList.toggle('shifted');
navSidebar.setAttribute('aria-expanded', navSidebarIsOpen);
});
}
function initSidebarQuickFilter() {
const options = [];
const navSidebar = document.getElementById('nav-sidebar');
if (!navSidebar) {
return;
}
navSidebar.querySelectorAll('th[scope=row] a').forEach((container) => {
options.push({title: container.innerHTML, node: container});
});
function checkValue(event) {
let filterValue = event.target.value;
if (filterValue) {
filterValue = filterValue.toLowerCase();
}
if (event.key === 'Escape') {
filterValue = '';
event.target.value = ''; // clear input
}
let matches = false;
for (const o of options) {
let displayValue = '';
if (filterValue) {
if (o.title.toLowerCase().indexOf(filterValue) === -1) {
displayValue = 'none';
} else {
matches = true;
}
}
// show/hide parent <TR>
o.node.parentNode.parentNode.style.display = displayValue;
}
if (!filterValue || matches) {
event.target.classList.remove('no-results');
} else {
event.target.classList.add('no-results');
}
sessionStorage.setItem('django.admin.navSidebarFilterValue', filterValue);
}
const nav = document.getElementById('nav-filter');
nav.addEventListener('change', checkValue, false);
nav.addEventListener('input', checkValue, false);
nav.addEventListener('keyup', checkValue, false);
const storedValue = sessionStorage.getItem('django.admin.navSidebarFilterValue');
if (storedValue) {
nav.value = storedValue;
checkValue({target: nav, key: ''});
}
}
window.initSidebarQuickFilter = initSidebarQuickFilter;
initSidebarQuickFilter();
}

View File

@ -0,0 +1,51 @@
'use strict';
{
function setTheme(mode) {
if (mode !== "light" && mode !== "dark" && mode !== "auto") {
console.error(`Got invalid theme mode: ${mode}. Resetting to auto.`);
mode = "auto";
}
document.documentElement.dataset.theme = mode;
localStorage.setItem("theme", mode);
}
function cycleTheme() {
const currentTheme = localStorage.getItem("theme") || "auto";
const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
if (prefersDark) {
// Auto (dark) -> Light -> Dark
if (currentTheme === "auto") {
setTheme("light");
} else if (currentTheme === "light") {
setTheme("dark");
} else {
setTheme("auto");
}
} else {
// Auto (light) -> Dark -> Light
if (currentTheme === "auto") {
setTheme("dark");
} else if (currentTheme === "dark") {
setTheme("light");
} else {
setTheme("auto");
}
}
}
function initTheme() {
// set theme defined in localStorage if there is one, or fallback to auto mode
const currentTheme = localStorage.getItem("theme");
currentTheme ? setTheme(currentTheme) : setTheme("auto");
}
window.addEventListener('load', function(_) {
const buttons = document.getElementsByClassName("theme-toggle");
Array.from(buttons).forEach((btn) => {
btn.addEventListener("click", cycleTheme);
});
});
initTheme();
}

View File

@ -0,0 +1,29 @@
"use strict";
// Fallback JS for browsers which do not support :has selector used in
// admin/css/unusable_password_fields.css
// Remove file once all supported browsers support :has selector
try {
// If browser does not support :has selector this will raise an error
document.querySelector("form:has(input)");
} catch (error) {
console.log("Defaulting to javascript for usable password form management: " + error);
// JS replacement for unsupported :has selector
document.querySelectorAll('input[name="usable_password"]').forEach(option => {
option.addEventListener('change', function() {
const usablePassword = (this.value === "true" ? this.checked : !this.checked);
const submit1 = document.querySelector('input[type="submit"].set-password');
const submit2 = document.querySelector('input[type="submit"].unset-password');
const messages = document.querySelector('#id_unusable_warning');
document.getElementById('id_password1').closest('.form-row').hidden = !usablePassword;
document.getElementById('id_password2').closest('.form-row').hidden = !usablePassword;
if (messages) {
messages.hidden = usablePassword;
}
if (submit1 && submit2) {
submit1.hidden = !usablePassword;
submit2.hidden = usablePassword;
}
});
option.dispatchEvent(new Event('change'));
});
}

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/af",[],function(){return{errorLoading:function(){return"Die resultate kon nie gelaai word nie."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Verwyders asseblief "+n+" character";return 1!=n&&(r+="s"),r},inputTooShort:function(e){return"Voer asseblief "+(e.minimum-e.input.length)+" of meer karakters"},loadingMore:function(){return"Meer resultate word gelaai…"},maximumSelected:function(e){var n="Kies asseblief net "+e.maximum+" item";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"Geen resultate gevind"},searching:function(){return"Besig…"},removeAllItems:function(){return"Verwyder alle items"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/bn",[],function(){return{errorLoading:function(){return"ফলাফলগুলি লোড করা যায়নি।"},inputTooLong:function(n){var e=n.input.length-n.maximum,u="অনুগ্রহ করে "+e+" টি অক্ষর মুছে দিন।";return 1!=e&&(u="অনুগ্রহ করে "+e+" টি অক্ষর মুছে দিন।"),u},inputTooShort:function(n){return n.minimum-n.input.length+" টি অক্ষর অথবা অধিক অক্ষর লিখুন।"},loadingMore:function(){return"আরো ফলাফল লোড হচ্ছে ..."},maximumSelected:function(n){var e=n.maximum+" টি আইটেম নির্বাচন করতে পারবেন।";return 1!=n.maximum&&(e=n.maximum+" টি আইটেম নির্বাচন করতে পারবেন।"),e},noResults:function(){return"কোন ফলাফল পাওয়া যায়নি।"},searching:function(){return"অনুসন্ধান করা হচ্ছে ..."}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/bs",[],function(){function e(e,n,r,t){return e%10==1&&e%100!=11?n:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?r:t}return{errorLoading:function(){return"Preuzimanje nije uspijelo."},inputTooLong:function(n){var r=n.input.length-n.maximum,t="Obrišite "+r+" simbol";return t+=e(r,"","a","a")},inputTooShort:function(n){var r=n.minimum-n.input.length,t="Ukucajte bar još "+r+" simbol";return t+=e(r,"","a","a")},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(n){var r="Možete izabrati samo "+n.maximum+" stavk";return r+=e(n.maximum,"u","e","i")},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Uklonite sve stavke"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/dsb",[],function(){var n=["znamuško","znamušce","znamuška","znamuškow"],e=["zapisk","zapiska","zapiski","zapiskow"],u=function(n,e){return 1===n?e[0]:2===n?e[1]:n>2&&n<=4?e[2]:n>=5?e[3]:void 0};return{errorLoading:function(){return"Wuslědki njejsu se dali zacytaś."},inputTooLong:function(e){var a=e.input.length-e.maximum;return"Pšosym lašuj "+a+" "+u(a,n)},inputTooShort:function(e){var a=e.minimum-e.input.length;return"Pšosym zapódaj nanejmjenjej "+a+" "+u(a,n)},loadingMore:function(){return"Dalšne wuslědki se zacytaju…"},maximumSelected:function(n){return"Móžoš jano "+n.maximum+" "+u(n.maximum,e)+"wubraś."},noResults:function(){return"Žedne wuslědki namakane"},searching:function(){return"Pyta se…"},removeAllItems:function(){return"Remove all items"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hsb",[],function(){var n=["znamješko","znamješce","znamješka","znamješkow"],e=["zapisk","zapiskaj","zapiski","zapiskow"],u=function(n,e){return 1===n?e[0]:2===n?e[1]:n>2&&n<=4?e[2]:n>=5?e[3]:void 0};return{errorLoading:function(){return"Wuslědki njedachu so začitać."},inputTooLong:function(e){var a=e.input.length-e.maximum;return"Prošu zhašej "+a+" "+u(a,n)},inputTooShort:function(e){var a=e.minimum-e.input.length;return"Prošu zapodaj znajmjeńša "+a+" "+u(a,n)},loadingMore:function(){return"Dalše wuslědki so začitaja…"},maximumSelected:function(n){return"Móžeš jenož "+n.maximum+" "+u(n.maximum,e)+"wubrać"},noResults:function(){return"Žane wuslědki namakane"},searching:function(){return"Pyta so…"},removeAllItems:function(){return"Remove all items"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hy",[],function(){return{errorLoading:function(){return"Արդյունքները հնարավոր չէ բեռնել։"},inputTooLong:function(n){return"Խնդրում ենք հեռացնել "+(n.input.length-n.maximum)+" նշան"},inputTooShort:function(n){return"Խնդրում ենք մուտքագրել "+(n.minimum-n.input.length)+" կամ ավել նշաններ"},loadingMore:function(){return"Բեռնվում են նոր արդյունքներ․․․"},maximumSelected:function(n){return"Դուք կարող եք ընտրել առավելագույնը "+n.maximum+" կետ"},noResults:function(){return"Արդյունքներ չեն գտնվել"},searching:function(){return"Որոնում․․․"},removeAllItems:function(){return"Հեռացնել բոլոր տարրերը"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ka",[],function(){return{errorLoading:function(){return"მონაცემების ჩატვირთვა შეუძლებელია."},inputTooLong:function(n){return"გთხოვთ აკრიფეთ "+(n.input.length-n.maximum)+" სიმბოლოთი ნაკლები"},inputTooShort:function(n){return"გთხოვთ აკრიფეთ "+(n.minimum-n.input.length)+" სიმბოლო ან მეტი"},loadingMore:function(){return"მონაცემების ჩატვირთვა…"},maximumSelected:function(n){return"თქვენ შეგიძლიათ აირჩიოთ არაუმეტეს "+n.maximum+" ელემენტი"},noResults:function(){return"რეზულტატი არ მოიძებნა"},searching:function(){return"ძიება…"},removeAllItems:function(){return"ამოიღე ყველა ელემენტი"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ne",[],function(){return{errorLoading:function(){return"नतिजाहरु देखाउन सकिएन।"},inputTooLong:function(n){var e=n.input.length-n.maximum,u="कृपया "+e+" अक्षर मेटाउनुहोस्।";return 1!=e&&(u+="कृपया "+e+" अक्षरहरु मेटाउनुहोस्।"),u},inputTooShort:function(n){return"कृपया बाँकी रहेका "+(n.minimum-n.input.length)+" वा अरु धेरै अक्षरहरु भर्नुहोस्।"},loadingMore:function(){return"अरु नतिजाहरु भरिँदैछन् …"},maximumSelected:function(n){var e="तँपाई "+n.maximum+" वस्तु मात्र छान्न पाउँनुहुन्छ।";return 1!=n.maximum&&(e="तँपाई "+n.maximum+" वस्तुहरु मात्र छान्न पाउँनुहुन्छ।"),e},noResults:function(){return"कुनै पनि नतिजा भेटिएन।"},searching:function(){return"खोजि हुँदैछ…"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ps",[],function(){return{errorLoading:function(){return"پايلي نه سي ترلاسه کېدای"},inputTooLong:function(n){var e=n.input.length-n.maximum,r="د مهربانۍ لمخي "+e+" توری ړنګ کړئ";return 1!=e&&(r=r.replace("توری","توري")),r},inputTooShort:function(n){return"لږ تر لږه "+(n.minimum-n.input.length)+" يا ډېر توري وليکئ"},loadingMore:function(){return"نوري پايلي ترلاسه کيږي..."},maximumSelected:function(n){var e="تاسو يوازي "+n.maximum+" قلم په نښه کولای سی";return 1!=n.maximum&&(e=e.replace("قلم","قلمونه")),e},noResults:function(){return"پايلي و نه موندل سوې"},searching:function(){return"لټول کيږي..."},removeAllItems:function(){return"ټول توکي لرې کړئ"}}}),n.define,n.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sl",[],function(){return{errorLoading:function(){return"Zadetkov iskanja ni bilo mogoče naložiti."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Prosim zbrišite "+n+" znak";return 2==n?t+="a":1!=n&&(t+="e"),t},inputTooShort:function(e){var n=e.minimum-e.input.length,t="Prosim vpišite še "+n+" znak";return 2==n?t+="a":1!=n&&(t+="e"),t},loadingMore:function(){return"Nalagam več zadetkov…"},maximumSelected:function(e){var n="Označite lahko največ "+e.maximum+" predmet";return 2==e.maximum?n+="a":1!=e.maximum&&(n+="e"),n},noResults:function(){return"Ni zadetkov."},searching:function(){return"Iščem…"},removeAllItems:function(){return"Odstranite vse elemente"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sq",[],function(){return{errorLoading:function(){return"Rezultatet nuk mund të ngarkoheshin."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Të lutem fshi "+n+" karakter";return 1!=n&&(t+="e"),t},inputTooShort:function(e){return"Të lutem shkruaj "+(e.minimum-e.input.length)+" ose më shumë karaktere"},loadingMore:function(){return"Duke ngarkuar më shumë rezultate…"},maximumSelected:function(e){var n="Mund të zgjedhësh vetëm "+e.maximum+" element";return 1!=e.maximum&&(n+="e"),n},noResults:function(){return"Nuk u gjet asnjë rezultat"},searching:function(){return"Duke kërkuar…"},removeAllItems:function(){return"Hiq të gjitha sendet"}}}),e.define,e.require}();

View File

@ -0,0 +1,3 @@
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/tk",[],function(){return{errorLoading:function(){return"Netije ýüklenmedi."},inputTooLong:function(e){return e.input.length-e.maximum+" harp bozuň."},inputTooShort:function(e){return"Ýene-de iň az "+(e.minimum-e.input.length)+" harp ýazyň."},loadingMore:function(){return"Köpräk netije görkezilýär…"},maximumSelected:function(e){return"Diňe "+e.maximum+" sanysyny saýlaň."},noResults:function(){return"Netije tapylmady."},searching:function(){return"Gözlenýär…"},removeAllItems:function(){return"Remove all items"}}}),e.define,e.require}();

View File

@ -0,0 +1,19 @@
/* Fix for Django dark theme background */
/* See https://github.com/django-ckeditor/django-ckeditor/issues/670 */
.cke_reset_all tr:nth-child(even),
.cke_reset_all tr:nth-child(odd),
.cke_reset_all .row-form-errors,
.cke_reset_all tr:nth-child(even) .errorlist,
.cke_reset_all tr:nth-child(odd) + .row-form-errors,
.cke_reset_all tr:nth-child(odd) + .row-form-errors .errorlist,
.cke_reset_all input[type="text"],
.cke_reset_all input[type="password"] {
background: inherit;
color: inherit;
}
/* Fix for CKEditor source editor with Django dark theme */
/* See https://github.com/django-ckeditor/django-ckeditor/issues/741 */
textarea.cke_source {
color: revert;
}

View File

@ -0,0 +1,10 @@
# Reporting a security issues
If you believe you have found a security issue in the CKEditor 4 software, please contact us immediately.
When reporting a potential security problem, please bear this in mind:
* Make sure to provide as many details as possible about the vulnerability.
* Please do not disclose publicly any security issues until we fix them and publish security releases.
Contact the security team at security@cksource.com. As soon as we receive the security report, we will work promptly to confirm the issue and then to provide a security fix.

View File

@ -0,0 +1,16 @@
{
"bender": {
"port": 9001
},
"server": {
"port": 9002
},
"paths": {
"ckeditor4": "../ckeditor4/",
"runner": "./src/runner.html"
},
"browsers": {
"linux": [ "chrome", "firefox" ],
"macos": [ "safari" ]
}
}

View File

@ -0,0 +1,18 @@
.cke_dialog_open {
overflow: hidden;
}
.cke_dialog_container {
position: fixed;
overflow-y: auto;
overflow-x: auto;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 10010;
}
.cke_dialog_body {
position: relative;
}

View File

@ -0,0 +1,72 @@
# CKEditor 4 Export to PDF Plugin Changelog
## ckeditor4-plugin-exportpdf 1.0.6
Other Changes:
* Updated changelog.
## ckeditor4-plugin-exportpdf 1.0.5
Other Changes:
* Updated year and company name in license headers.
## ckeditor4-plugin-exportpdf 1.0.4
Other Changes:
* Updated test files.
## ckeditor4-plugin-exportpdf 1.0.3
Other Changes:
* Updated test files.
## ckeditor4-plugin-exportpdf 1.0.2
Other Changes:
* Updated year in license headers.
## ckeditor4-plugin-exportpdf 1.0.1
Other Changes:
* Improved external CSS support for [Classic Editor](https://ckeditor.com/docs/ckeditor4/latest/examples/classic.html) by handling exceptions and displaying convenient [error messages](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#exportpdf-stylesheets-incaccessible).
## ckeditor4-plugin-exportpdf 1.0.0
The first stable release of the CKEditor 4 WYSIWYG Editor Export to PDF plugin. After a few months of the beta phase, testing and listening to community feedback, the CKEditor 4 Export to PDF plugin is stable and can be used with full confidence. Enjoy!
New Features:
* Introduced access control mechanism. The plugin now can be configured with additional [exportPdf_tokenUrl](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-exportPdf_tokenUrl) option to allow commercial use.
## ckeditor4-plugin-exportpdf 0.1.2
Other Changes:
* Improved [plugin API documentation](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-exportPdf_fileName).
* Updated Export to PDF plugin npm readme to link to the [official plugin documentation](https://ckeditor.com/docs/ckeditor4/latest/features/exporttopdf.html).
## ckeditor4-plugin-exportpdf 0.1.1
Other Changes:
* Renamed the Export to PDF plugin button from `exportPdf` to `ExportPdf`. The `ExportPdf` name should now be used while setting up a custom toolbar with the [CKEDITOR.config.toolbar](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-toolbar) configuration option.
## ckeditor4-plugin-exportpdf 0.1.0
The first beta release of the CKEditor 4 Export to PDF plugin.
This plugin allows you to easily print your WYSIWYG editor content to a PDF file. When enabled, this feature sends the content of your editor together with the styles that are used to display it to the CKEditor Cloud Services HTML to PDF converter service. The service then generates a PDF document that can be downloaded by the user.
Available features:
* Exporting HTML content from CKEditor 4 WYSIWYG editor to PDF with a single click.
* Setting a custom name for the generated PDF file.
* Handling relative image paths.
* Changing the appearance of the PDF document (like margins, text styling, custom headers and footers etc.) with custom CSS styles.
* Pre-processing HTML content via synchronous and asynchronous code before the generation of the PDF file.

View File

@ -0,0 +1,18 @@
Software License Agreement
==========================
**CKEditor 4 Export to PDF plugin** (https://ckeditor.com/ckeditor-4/)<br>
Copyright (c) 2003-2022, [CKSource](http://cksource.com) Holding sp. z o.o. All rights reserved.
CKEditor 4 Export to PDF plugin is licensed under a commercial license and is protected by copyright law.
For more details about available licensing options please contact us at sales@cksource.com.
Sources of Intellectual Property Included in CKEditor 4 export to PDF
---------------------------------------------------------------------
Where not otherwise indicated, all CKEditor 4 Export to PDF plugin content is authored by CKSource engineers and consists of CKSource-owned intellectual property.
Trademarks
----------
**CKEditor** is a trademark of [CKSource](http://cksource.com) Holding sp. z o.o. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.

View File

@ -0,0 +1,102 @@
# CKEditor 4 Export to PDF Plugin
The **Export to PDF** CKEditor 4 plugin allows you to easily print the WYSIWYG editor content to a PDF file. When enabled, this feature sends the content of your editor together with the styles that are used to display it to the CKEditor Cloud Services HTML to PDF converter service. The service then generates a PDF document that can be downloaded by the user.
Thanks to this plugin, it takes exactly one button click to get a PDF file with content formatted in the same way as the one visible in CKEditor 4.
CKEditor 4 **Export to PDF** also allows various customizations like changing the page size and margin, setting additional styling, adding custom headers and footers and pre-processing content. This gives great flexibility and control over the PDF output and allows to keep all the PDF documents consistent when it comes to styling.
This is a premium feature. Please [contact us](https://ckeditor.com/contact/) if you would like to purchase a license. Let us know if you have any feedback or questions! You can also sign up for the [CKEditor Premium Features 30-day Free Trial](https://orders.ckeditor.com/trial/premium-features).
If this feature is used without authorization, the resulting documents will be watermarked.
![](https://c.cksource.com/a/1/img/npm/ckeditor4-pdf-export.gif)
## Getting Started
### Using with official CKEditor 4 presets
Starting with CKEditor 4 version `4.15.0`, **Export to PDF** plugin is included in `standard-all`, `full` and `full-all` official presets. The `full` and `full-all` presets have the plugin active by default while for `standard-all` it needs to be enabled with the [`config.extraPlugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-extraPlugins) configuration option:
```js
CKEDITOR.replace( 'editor', {
extraPlugins: 'exportpdf'
} );
```
### Installation from npm
To instal the plugin via npm, simply run:
```bash
npm i ckeditor4-plugin-exportpdf
```
Then add the plugin to your CKEditor 4 instance with the [`addExternal()` method](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins.html#method-addExternal):
```js
CKEDITOR.plugins.addExternal( 'exportpdf', './node_modules/ckeditor4-plugin-exportpdf/' );
```
If you prefer not to link to the `node_modules` folder directly, you may simply copy the entire `./node_modules/ckeditor4-plugin-exportpdf/` directory as `ckeditor/plugins/exportpdf/` and add it with the [`config.extraPlugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-extraPlugins) configuration option:
```js
CKEDITOR.replace( 'editor', {
extraPlugins: 'exportpdf'
} );
```
### Other Installation Methods
You can also use the [CKEditor 4 Add-ons repository](https://ckeditor.com/cke4/addons/plugins/all) to obtain the plugin via:
* [Custom build with online builder](https://ckeditor.com/cke4/builder)
* [Manual download](https://ckeditor.com/cke4/addon/exportpdf)
Refer to [Export to PDF installation documentation](https://ckeditor.com/docs/ckeditor4/latest/features/exporttopdf.html#installation) for more details. If you are having trouble setting up the Export to PDF plugin, please [contact us](https://ckeditor.com/contact/).
### Setting up a license key
If you have a commercial license for **Export to PDF** plugin, [exportPdf_tokenUrl](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-exportPdf_tokenUrl) configuration option should be set to remove watermark from generated documents:
```js
CKEDITOR.replace( 'editor', {
exportPdf_tokenUrl: 'https://example.com/cs-token-endpoint'
} );
```
This value is unique for each customer and can be found in the [CKEditor Ecosystem dashboard](https://dashboard.ckeditor.com).
This is all. If you are having trouble in setting up Export to PDF plugin, please [contact us](https://ckeditor.com/contact/).
## Features
The CKEditor 4 Export to PDF plugin is really simple to use and works out-of-the-box. It does not require any additional configuration and due to its flexible nature, it covers a lot of cases internally while also providing an easy way to [customize output PDF files](https://ckeditor.com/docs/ckeditor4/latest/features/exporttopdf.html#configuration).
The most important features are:
* Exporting HTML content from CKEditor 4 WYSIWYG editor to PDF with a single click.
* [Setting a custom name](https://ckeditor.com/docs/ckeditor4/latest/features/exporttopdf.html#setting-dynamic-file-name) for the generated PDF file.
* [Handling relative image paths](https://ckeditor.com/docs/ckeditor4/latest/features/exporttopdf.html#relative-vs-absolute-urls).
* [Changing the appearance of the PDF document](https://ckeditor.com/docs/ckeditor4/latest/features/exporttopdf.html#custom-css-rules) (like margins, text styling, custom headers and footers etc.) with custom CSS styles.
* [Pre-processing HTML content](https://ckeditor.com/docs/ckeditor4/latest/features/exporttopdf.html#data-preprocessing) via synchronous and asynchronous code before the generation of the PDF file.
## Browser and CKEditor 4 Support
The CKEditor 4 Export to PDF plugin works in all the browsers [supported by CKEditor 4](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_browsers.html) except for Internet Explorer versions older than version 11. The plugin is compatible with CKEditor 4 versions starting from `4.6.1`.
## Demo
See the working ["Exporting editor content to PDF"](https://ckeditor.com/docs/ckeditor4/latest/examples/exporttopdf.html) sample that showcases printing your HTML content to a PDF file.
## License
**CKEditor 4 Export to PDF plugin** (https://ckeditor.com/ckeditor-4/)<br>
Copyright (c) 2003-2022, [CKSource](http://cksource.com) Holding sp. z o.o. All rights reserved.
CKEditor 4 export to PDF plugin is licensed under a commercial license and is protected by copyright law.
For more details about available licensing options please contact us at sales@cksource.com.
### Trademarks
**CKEditor** is a trademark of [CKSource](http://cksource.com) Holding sp. z o.o. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.

View File

@ -0,0 +1,5 @@
/*
Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
(function(){window.exportPdfUtils={useXHR:function(b,a){var c=sinon.useFakeXMLHttpRequest(),d;c.onCreate=function(a){d=a};b.execCommand("exportPdf");a&&a(d);c.restore()},getDefaultConfig:function(b,a){return CKEDITOR.tools.object.merge({extraPlugins:"exportpdf",exportPdf_appId:"cke4-tests-"+b},a)},initManualTest:function(){bender.loadExternalPlugin("exportpdf","/apps/plugin/");bender.tools.ignoreUnsupportedEnvironment("exportpdf")},toAbsoluteUrl:function(b,a){return(a?a:window.location.origin)+b}}})();

View File

@ -0,0 +1,6 @@
(function(){bender.loadExternalPlugin("exportpdf","/apps/plugin/");CKEDITOR.plugins.load("exportpdf",function(){function d(a,c){var b=exportPdfUtils.getDefaultConfig("unit",a||{});bender.editorBot.create({name:"editor"+Date.now(),config:b,startupData:"\x3cp\x3eHello World!\x3c/p\x3e"},function(a){c&&c(a.editor)})}var b=function(){var a=sinon.fakeServer.create(),c=0;a.respondWith(function(a){"/incremental_token"===a.url?(a.respond(200,{},"sample-token-value"+c),c+=1):"/empty-token"===a.url?a.respond(200,
{},""):a.respond(200,{},"sample-token-value")});return a}(),e;bender.test({setUp:function(){bender.tools.ignoreUnsupportedEnvironment("exportpdf");e=sinon.stub(CKEDITOR.plugins.exportpdf,"downloadFile")},tearDown:function(){e.restore()},"test token is fetched if tokenUrl is correct":function(){d({exportPdf_tokenUrl:"/custom-url"},function(a){a.on("exportPdf",function(a){assert.areEqual(a.data.token,"sample-token-value","Token value is incorrect.")},null,null,17);b.respond();a.execCommand("exportPdf");
b.respond()})},"test authentication header is added if token is provided":function(){d({exportPdf_tokenUrl:"/custom-url"},function(a){b.respond();a.execCommand("exportPdf");b.respond();assert.areEqual("sample-token-value",b.requests[b.requests.length-1].requestHeaders.Authorization,"Authorization token was not set properly.")})},"test console.warn is called if tokenUrl is not provided":function(){CKEDITOR.once("log",function(a){a.cancel();assert.areEqual("exportpdf-no-token-url",a.data.errorCode,
"There should be URL error log.")});d({exportPdf_tokenUrl:""})},"test console.warn is called on POST request if token is empty":function(){var a=CKEDITOR.on("log",function(c){"exportpdf-no-token"===c.data.errorCode&&(c.cancel(),CKEDITOR.removeListener("log",a),assert.areEqual("exportpdf-no-token",c.data.errorCode,"`exportpdf-no-token` should occur."))});d({exportPdf_tokenUrl:"/empty-token"},function(a){b.respond();a.execCommand("exportPdf");b.respond()})},"test console.warn is called on POST request if token was not fetched at all":function(){var a=
CKEDITOR.on("log",function(c){"exportpdf-no-token"===c.data.errorCode&&(c.cancel(),CKEDITOR.removeListener("log",a),assert.areEqual("exportpdf-no-token",c.data.errorCode,"`exportpdf-no-token` should occur."))});d({exportPdf_tokenUrl:"/custom-url"},function(a){a.execCommand("exportPdf");b.respond()})},"test token refreshes in the declared intervals":function(){CKEDITOR.once("instanceCreated",function(a){a.editor.exportPdfTokenInterval=200});d({exportPdf_tokenUrl:"/incremental_token"},function(a){b.respond();
setTimeout(function(){resume(function(){b.respond();a.on("exportPdf",function(a){assert.areNotSame(a.data.token,"sample-token-value0","Token was not refreshed.")},null,null,17);a.execCommand("exportPdf");b.respond()})},500);wait()})},"test file is downloaded also without token":function(){d({exportPdf_tokenUrl:"/empty-token"},function(a){b.respond();a.execCommand("exportPdf");b.respond();sinon.assert.calledOnce(e);assert.pass()})}})})})();

View File

@ -0,0 +1,10 @@
(function(){bender.loadExternalPlugin("exportpdf","/apps/plugin/");CKEDITOR.plugins.load("exportpdf",function(){bender.test({setUp:function(){bender.tools.ignoreUnsupportedEnvironment("exportpdf")},"test data is correct at read and send stages":function(){bender.editorBot.create({name:"editor1",config:exportPdfUtils.getDefaultConfig("unit")},function(c){var b=c.editor;c.setHtmlWithSelection('\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e^');b.once("exportPdf",function(a){assert.areEqual(a.data.html,
b.getData(),"Data from editor is incorrect.");assert.isTrue(CKEDITOR.tools.isEmpty(a.data.options),"`options` object should be initially empty.")});b.once("exportPdf",function(a){a.cancel();assert.areEqual('\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e'+b.getData()+"\x3c/div\x3e",a.data.html,"Preprocessed data sent to endpoint is incorrect.");assert.isNotNull(a.data.css,"CSS should be attached.")},null,null,16);b.execCommand("exportPdf")})},"test options provided via config":function(){bender.editorBot.create({name:"editor2",
config:exportPdfUtils.getDefaultConfig("unit",{exportPdf_options:{format:"A6"}})},function(c){var b=c.editor;c.setHtmlWithSelection('\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e^');b.once("exportPdf",function(a){a.cancel();assert.areEqual(a.data.options.format,"A6")});b.execCommand("exportPdf")})},"test html changed via event":function(){bender.editorBot.create({name:"editor3",config:exportPdfUtils.getDefaultConfig("unit")},function(c){var b=c.editor;c.setHtmlWithSelection('\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e^');
b.once("exportPdf",function(a){a.cancel();assert.areEqual(a.data.html,"")});b.once("exportPdf",function(a){assert.areNotEqual(a.data.html,"");a.data.html=""},null,null,1);b.execCommand("exportPdf")})},"test options changed via event":function(){bender.editorBot.create({name:"editor4",config:exportPdfUtils.getDefaultConfig("unit")},function(c){var b=c.editor;c.setHtmlWithSelection('\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e^');b.once("exportPdf",function(a){a.cancel();assert.areEqual(a.data.options.format,
"A5")});b.once("exportPdf",function(a){a.data.options.format="A5"},null,null,1);b.execCommand("exportPdf")})},"test html changed via event asynchronously":function(){bender.editorBot.create({name:"editor5",config:exportPdfUtils.getDefaultConfig("unit")},function(c){var b=c.editor;c.setHtmlWithSelection('\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e^');b.on("exportPdf",function(a){a.cancel();a.data.asyncDone&&(resume(),assert.areEqual(a.data.html,"\x3cp\x3eContent filtered!\x3c/p\x3e"),delete a.data.asyncDone,
assert.isUndefined(a.data.asyncDone))});b.on("exportPdf",function(a){a.data.asyncDone||setTimeout(function(){a.data.html="\x3cp\x3eContent filtered!\x3c/p\x3e";a.data.asyncDone=!0;b.fire("exportPdf",a.data)},1E3)},null,null,1);b.execCommand("exportPdf");wait()})},"test options changed via event asynchronously":function(){bender.editorBot.create({name:"editor6",config:exportPdfUtils.getDefaultConfig("unit",{exportPdf_options:{format:"A5"}})},function(c){var b=c.editor;c.setHtmlWithSelection('\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e^');
b.on("exportPdf",function(a){a.cancel();a.data.asyncDone&&(resume(),assert.areEqual(a.data.options.format,"A4"),delete a.data.asyncDone,assert.isUndefined(a.data.asyncDone))});b.on("exportPdf",function(a){a.data.asyncDone||setTimeout(function(){a.data.options.format="A4";a.data.asyncDone=!0;b.fire("exportPdf",a.data)},1E3)},null,null,1);b.execCommand("exportPdf");wait()})},"test default CKEditor config":function(){bender.editorBot.create({name:"editor7",config:exportPdfUtils.getDefaultConfig("unit")},
function(c){CKEDITOR.config.exportPdf_isDev?assert.areEqual(c.editor.config.exportPdf_service,"https://pdf-converter.cke-cs-staging.com/v1/convert","Default dev endpoint is incorrect."):assert.areEqual(c.editor.config.exportPdf_service,"https://pdf-converter.cke-cs.com/v1/convert","Default prod endpoint is incorrect.");assert.areEqual(c.editor.config.exportPdf_fileName,"ckeditor4-export-pdf.pdf","Default file name is incorrect.")})},"test inaccessible stylesheets are handled correctly":function(){bender.editorBot.create({name:"editor8",
config:exportPdfUtils.getDefaultConfig("unit",{contentsCss:"https://cdn.ckeditor.com/4.16.0/full-all/samples/css/samples.css"})},function(c){var b=c.editor,a=!1,d=CKEDITOR.on("log",function(b){"exportpdf-stylesheets-inaccessible"===b.data.errorCode&&(b.cancel(),CKEDITOR.removeListener("log",d),a=!0)});c.setHtmlWithSelection('\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e^');b.once("exportPdf",function(b){b.cancel();resume(function(){a?assert.pass():assert.fail("No errors thrown while accessing stylesheets rules.")})},
null,null,19);CKEDITOR.tools.setTimeout(function(){b.execCommand("exportPdf")},1E3);wait()})}})})})();

View File

@ -0,0 +1,27 @@
<div id="editor1">
<p>My filename should be 'ckeditor4-export-pdf.pdf'.</p>
</div>
<div id="editor2">
<p>And mine - 'different-name.pdf'.</p>
</div>
<div id="editor3">
<h1>Beautiful title</h1>
</div>
<script>
exportPdfUtils.initManualTest();
CKEDITOR.replace( 'editor1', exportPdfUtils.getDefaultConfig( 'manual' ) );
CKEDITOR.replace( 'editor2', exportPdfUtils.getDefaultConfig( 'manual', {
exportPdf_fileName: 'different-name.pdf',
} ) );
var editor3 = CKEDITOR.replace( 'editor3', exportPdfUtils.getDefaultConfig( 'manual', {
exportPdf_fileName: function() {
return editor3.editable().findOne( 'h1' ).getText() + '.pdf';
}
} ) );
</script>

View File

@ -0,0 +1,46 @@
@bender-tags: exportpdf, feature, 1
@bender-ui: collapsed
@bender-include: ../_helpers/tools.js
@bender-ckeditor-plugins: wysiwygarea, toolbar, basicstyles, notification, format
1. Click `Export to PDF` button (the one next to the `Source` button) in the first editor.
1. Wait for the file to download.
**Expected:**
File with `ckeditor4-export-pdf.pdf` name (possibly with number if file already existed) was downloaded.
**Unexpected:**
File was not downloaded or its name is incorrect.
1. Do the same in the second editor.
**Expected:**
File with `different-name.pdf` name (possibly with number if file already existed) was downloaded.
**Unexpected:**
File was not downloaded or its name is incorrect.
1. Repeat for the third editor.
**Expected:**
File with 'Beautiful title.pdf' name (possibly with number if file already existed) was downloaded.
**Unexpected:**
File was not downloaded or its name is incorrect.
1. Change text in the third editor to `New title` (**important:** it has to remain a `<h1>` element).
1. Click and download PDF again.
**Expected:**
Name of a new file is 'New title.pdf'.
**Unexpected:**
Name is the same as before or there is an error.

View File

@ -0,0 +1,18 @@
<div id="editor1">
</div>
<div id="editor2">
<p>My content and wrapper will be deleted.</p>
</div>
<script>
exportPdfUtils.initManualTest();
CKEDITOR.replace( 'editor1', exportPdfUtils.getDefaultConfig( 'manual' ) );
var editor2 = CKEDITOR.replace( 'editor2', exportPdfUtils.getDefaultConfig( 'manual' ) );
editor2.on( 'exportPdf', function( evt ) {
evt.data.html = '';
}, null, null, 16 );
</script>

View File

@ -0,0 +1,34 @@
@bender-tags: exportpdf, feature, 11
@bender-ui: collapsed
@bender-include: ../_helpers/tools.js
@bender-ckeditor-plugins: wysiwygarea, toolbar, basicstyles, notification
**Note:** At the beginning open the console.
1. Click `Export to PDF` button (the one next to the `Source` button) in the first editor.
1. Wait for the file to download.
1. Open the file.
**Expected:**
* Empty file was downloaded.
* No errors in console.
**Unexpected:**
* File wasn't downloaded.
* File was downloaded but can't be opened.
* Error in the console appeared.
1. Click `Export to PDF` button in the second editor.
**Expected:**
* File wasn't downloaded.
* The notification with error appeared in the editor.
* There is an error message in the console.
**Unexpected:**
* File was downloaded and can't be opened.
* Success notification was displayed.

View File

@ -0,0 +1,148 @@
<div id="editor">
<h1 style="text-align:center"><img alt="Bilancino Hotel logo" src="https://ckeditor.com/docs/ckeditor4/latest/examples/assets/image/bilancino-logo.png" style="float:right;height:75px;width:75px;" /><span style="font-family:Georgia,serif">The Flavorful Tuscany Meetup</span></h1>
<h2 style="text-align:center"><span style="font-family:Georgia,serif"><span style="color:#2980b9">Welcome letter</span></span></h2>
<p>Dear Guest,</p>
<p>We are delighted to welcome you to the annual <em>Flavorful Tuscany Meetup</em> and hope you will enjoy the programme as well as your stay at the <a href="https://ckeditor.com">Bilancino Hotel</a>.</p>
<p>Please find attached the full schedule of the event.</p>
<blockquote>
<p>The annual Flavorful Tuscany meetups are always a culinary discovery. You get the best of Tuscan flavors during an intense one-day stay at one of the top hotels of the region. All the sessions are lead by top chefs passionate about their profession. I would certainly recommend to save the date in your calendar for this one!</p>
<p>Angelina Calvino, food journalist</p>
</blockquote>
<p>Please arrive at the <a href="https://ckeditor.com">Bilancino Hotel</a> reception desk at least <strong>half an hour earlier</strong> to make sure that the registration process goes as smoothly as possible.</p>
<p>We look forward to welcoming you to the event.</p>
<p><img alt="Victoria Valc signature" src="https://ckeditor.com/docs/ckeditor4/latest/examples/assets/image/signature.png" style="height:101px;width:180px" /></p>
<p><span style="font-size:16px"><strong>Victoria Valc</strong></span></p>
<p><strong>Event Manager<br />
Bilancino Hotel</strong></p>
<p>&nbsp;</p>
<div style="page-break-after: always"><span style="display:none">&nbsp;</span></div>
<p>&nbsp;</p>
<h2 style="text-align:center"><span style="font-family:Georgia,serif"><span style="color:#2980b9">The Flavorful Tuscany Meetup Schedule</span></span></h2>
<table border="1" cellspacing="0" style="border-collapse:collapse; width:597px">
<thead>
<tr>
<th colspan="2" style="background-color:#999999"><span style="color:#ffffff">Saturday, July 14</span></th>
</tr>
</thead>
<tbody>
<tr>
<td style="background-color:#e6e6e6; text-align:center">9:30 AM - 11:30 AM</td>
<td>
<p><strong>Americano vs. Brewed - &ldquo;know your coffee&rdquo;</strong> with:&nbsp;</p>
<ul>
<li>Giulia Bianchi</li>
<li>Stefano Garau</li>
<li>Giuseppe Russo</li>
</ul>
</td>
</tr>
<tr>
<td style="background-color:#e6e6e6; text-align:center">1:00 PM - 3:00 PM</td>
<td>
<p><strong>Pappardelle al pomodoro</strong> - live cooking&nbsp;<sup>1</sup></p>
<p>Incorporate the freshest ingredients&nbsp;<br />
with Rita Fresco</p>
</td>
</tr>
<tr>
<td style="background-color:#e6e6e6; text-align:center">5:00 PM - 8:00 PM</td>
<td>
<p><strong>Tuscan vineyards at a glance</strong> - wine-tasting&nbsp;<br />
with Frederico Riscoli</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><sup>1</sup>&nbsp;<em><span style="background-color:#98e64c">Registration for the live cooking session is required as seats are limited.</span></em></p>
<p>&nbsp;</p>
<hr>
<h2 style="text-align: center;"><span style="color:#2980b9"><span style="font-family:Georgia,serif">Driving directions from the airport</span></span></h2>
<ol>
<li>Head southeast on R138&nbsp;toward Nassau St.</li>
<li>Follow R138 and R148 to Bridgefoot St/R804.
<ol>
<li>Use the left 2 lanes to turn slightly left onto Lincoln Pl/R138.</li>
<li>Turn left onto Westland Row/R118/R138.</li>
<li>Use any lane to turn left onto Pearse St/R118/R138/R802.</li>
<li>Continue to follow R138/R802.</li>
</ol>
</li>
<li>Turn left onto Burgh Quay/George&#39;s Quay/R105/R138.</li>
<li>Continue onto Aston Quay/R148.
<ul>
<li>Continue to follow R148.</li>
</ul>
</li>
<li>Turn left onto Bridgefoot St/R804.
<ul>
<li>Continue to follow R804.</li>
</ul>
</li>
<li>After approximately 2 minutes, Bilancino Hotel will be on your left.</li>
</ol>
<p>&nbsp;</p>
</div>
<div id="preview">
<style>
#preview iframe {
width: 840px;
height: 500px;
}
</style>
<h2>Document preview (based on send HTML and CSS)</h2>
</div>
<script>
exportPdfUtils.initManualTest();
var editor = CKEDITOR.replace( 'editor', exportPdfUtils.getDefaultConfig( 'manual', {
width: 840,
height: 400
} ) );
editor.on( 'exportPdf', function( evt ) {
var oldIframe = document.querySelector( '#preview iframe' ),
html;
if ( oldIframe && oldIframe.parentNode ) {
oldIframe.parentNode.removeChild( oldIframe );
}
// Align iframe HTML with the one on the endpoint side by adding explicit encoding and DOCTYPE.
html = '<!DOCTYPE html><html><head><style>' + evt.data.css + '</style><meta charset="UTF-8"></head><body>' + evt.data.html + '</body></html>';
var iframe = document.createElement( 'iframe' );
document.querySelector( '#preview' ).appendChild( iframe );
iframe.contentWindow.document.open();
iframe.contentWindow.document.write( html );
iframe.contentWindow.document.close();
}, null, null, 16 );
</script>

View File

@ -0,0 +1,12 @@
@bender-tags: exportpdf, feature, 17
@bender-ui: collapsed
@bender-include: ../_helpers/tools.js
@bender-ckeditor-plugins: basicstyles, bidi, blockquote, clipboard, colorbutton, colordialog, dialogadvtab, elementspath, enterkey, font, format, horizontalrule, htmlwriter, image, indentlist, indentblock, justify, link, list, liststyle, magicline, pagebreak, pastefromgdocs, pastefromlibreoffice, pastefromword, pastetext, specialchar, stylescombo, table, tableselection, tabletools, toolbar, undo, wysiwygarea, sourcearea, resize
1. Click `Export to PDF` button (the one next to the `Source` button).
1. Wait for the PDF to download and examine it.
If you find any bugs, please report them <a href="https://github.com/cksource/ckeditor4-plugin-exportpdf/issues" target="_blank">here</a>. Just remember to check if it isn't <a href="https://github.com/cksource/ckeditor4-plugin-exportpdf/issues?q=is%3Aopen+is%3Aissue+label%3Atype%3Abug" target="_blank">already known</a>.
When comparing generated PDF to editor contents the best conversion results (close to 1:1 document formatting) can be observed in a Chrome browser.

View File

@ -0,0 +1,27 @@
<div id="editor">
<p>Foo bar</p>
</div>
<div id="tokenValue" style="word-break:break-all;border:1px solid red;"></div>
<script>
exportPdfUtils.initManualTest();
var editor = CKEDITOR.replace( 'editor', exportPdfUtils.getDefaultConfig( 'manual', {
extraPlugins: 'easyimage,exportpdf',
cloudServices_uploadUrl: 'https://33333.cke-cs.com/easyimage/upload/',
cloudServices_tokenUrl: 'https://33333.cke-cs.com/token/dev/ijrDsqFix838Gh3wGO3F77FSW94BwcLXprJ4APSp3XQ26xsUHTi0jcb1hoBt'
} ) );
editor.on( 'instanceReady', function() {
if ( !CKEDITOR.config.exportPdf_tokenUrl ) {
bender.ignore();
}
} );
editor.on( 'exportPdf', function( evt ) {
var value = CKEDITOR.document.findOne( '#tokenValue' );
value.setHtml( evt.data.token );
}, null, null, 17 );
</script>

View File

@ -0,0 +1,26 @@
@bender-tags: exportpdf, feature, 77
@bender-ui: collapsed
@bender-include: ../../_helpers/tools.js
@bender-ckeditor-plugins: wysiwygarea, toolbar, basicstyles, notification, format, easyimage
Note: You need the Internet connection to run this test.
1. Click `Export to PDF` toolbar button.
1. Examine the area in the red frame below.
**Expected:** There is a long token string in the frame.
**Unexpected:** Frame is empty or says 'undefined'.
1. Wait for the file to download and examine it.
**Expected:** No information about being created with CKEditor was added.
**Unexpected:** There is an additional note about CKEditor at the bottom of page.
1. Upload an image.
1. Examine browser console.
**Expected:** There are no errors or warnings.
**Unexpected:** Any error or warning concerning `Export to PDF` or `Easy Image` occurred.

View File

@ -0,0 +1,19 @@
<div id="editor1">
<p>Hello world!</p>
</div>
<div id="editor2">
<p>Hello world!</p>
</div>
<script>
exportPdfUtils.initManualTest();
CKEDITOR.replace( 'editor1', exportPdfUtils.getDefaultConfig( 'manual', {
extraPlugins: 'exportpdf'
} ) );
CKEDITOR.replace( 'editor2', exportPdfUtils.getDefaultConfig( 'manual', {
removePlugins: 'notification'
} ) );
</script>

View File

@ -0,0 +1,36 @@
@bender-tags: exportpdf, feature, 4
@bender-ui: collapsed
@bender-include: ../_helpers/tools.js
@bender-ckeditor-plugins: wysiwygarea, toolbar, notification
1. Read the expected results first as there will be a sequence of things happening quickly to examine.
1. Click `Export to PDF` button in the first editor.
**Expected:**
* Button is disabled after click.
* Nofitication bar of `info` type appeared.
* When download started, notification type changed to `success`.
* Once download finished, button is enabled again.
* After 3 seconds notification bar disappeared.
**Unexpected:**
* Button wasn't disabled.
* Button wasn't enabled after download started.
* Notifications were incorrect.
* Notification bar didn't disappear.
1. Click `Export to PDF` button in the second editor.
**Expected:**
* Neither notifications nor alerts appeared.
* File was downloaded.
* Button was disabled for the time between click and download.
**Unexpected:**
* Notification or browser alert appeared.
* File wasn't downloaded.
* Button wasn't disabled for the time between click and download.

View File

@ -0,0 +1,45 @@
<div id="editor1">
<p>Export to PDF test 1.</p>
</div>
<div id="editor2">
<p>Export to PDF test 2.</p>
</div>
<script>
exportPdfUtils.initManualTest();
var editor1 = CKEDITOR.replace( 'editor1', exportPdfUtils.getDefaultConfig( 'manual' ) );
editor1.on( 'exportPdf', function( evt ) {
if ( !evt.data.asyncDone ) {
setTimeout( function() {
evt.data.html = '<p>Content filtered!</p>';
evt.data.asyncDone = true;
editor1.fire( 'exportPdf', evt.data );
}, 2000 );
evt.cancel();
} else {
delete evt.data.asyncDone;
}
}, null, null, 1 );
var editor2 = CKEDITOR.replace( 'editor2', exportPdfUtils.getDefaultConfig( 'manual' ) );
editor2.on( 'exportPdf', function( evt ) {
if ( !evt.data.asyncDone ) {
setTimeout( function() {
evt.data.html = '<p>Content filtered!</p>';
evt.data.asyncDone = true;
editor2.fire( 'exportPdf', evt.data );
}, 2000 );
evt.cancel();
} else {
delete evt.data.asyncDone;
}
}, null, null, 17 );
</script>

View File

@ -0,0 +1,27 @@
@bender-tags: exportpdf, feature, 4
@bender-ui: collapsed
@bender-include: ../_helpers/tools.js
@bender-ckeditor-plugins: wysiwygarea, toolbar, basicstyles, notification
1. Click `Export to PDF` button (the one next to the `Source` button) in the first editor.
1. Watch appearing notifications.
**Expected:**
* Notification `Processing PDF document...` was visible for about 2 seconds.
* Progress steps were: `0`, `0.5`, `success`.
**Unexpected:**
Notification disappeared too fast to be noticable.
1. Do the same in the second editor.
**Expected:**
* Notification `Processing PDF document...` was visible for about 2 seconds.
* Progress steps were: `0.2`, `0.5`, `success`.
**Unexpected:**
Notification disappeared too fast to be noticable.

View File

@ -0,0 +1,29 @@
<div id="editor1">
<p>"Lorem ipsum dolor sit amet, consectetur adipiscing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
</p>
</div>
<div id="editor2">
<p>"Lorem ipsum dolor sit amet, consectetur adipiscing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
</p>
</div>
<script>
exportPdfUtils.initManualTest();
CKEDITOR.replace( 'editor1', exportPdfUtils.getDefaultConfig( 'manual' ) );
CKEDITOR.replace( 'editor2', exportPdfUtils.getDefaultConfig( 'manual', {
exportPdf_options: {
format: 'A6'
}
} ) );
</script>

View File

@ -0,0 +1,18 @@
@bender-tags: exportpdf, bug, 24
@bender-ui: collapsed
@bender-include: ../_helpers/tools.js
@bender-ckeditor-plugins: wysiwygarea, toolbar, basicstyles, notification
1. Click `Export to PDF` button (the one next to the `Source` button) in the first editor.
1. Wait for the file to download.
1. Do the same in the second editor.
1. Compare paper format in files.
**Expected:**
* First editor produced file in `A4` format (`8.27in x 11.7in`);
* Second editor produced file in `A6` format (`4.13in x 5.83in`).
**Unexpected:**
Any file is in different format than intended (e.g. `Letter` - `8.5in x 11in`).

View File

@ -0,0 +1,18 @@
<div id="editor">
<p>This editor is read-only.</p>
</div>
<button id="toggle">Toggle read-only mode</button>
<script>
exportPdfUtils.initManualTest();
var editor = CKEDITOR.replace( 'editor', exportPdfUtils.getDefaultConfig( 'manual', {
readOnly: true
} ) );
CKEDITOR.document.getById( 'toggle' ).on( 'click', function() {
editor.setReadOnly( !editor.readOnly );
} );
</script>

View File

@ -0,0 +1,28 @@
@bender-tags: exportpdf, feature, 1
@bender-ui: collapsed
@bender-include: ../_helpers/tools.js
@bender-ckeditor-plugins: wysiwygarea, toolbar, basicstyles, notification
1. Examine `Export to PDF` button (the one next to the `Source` button).
**Expected:**
Button is clickable.
**Unexpected:**
Button is inactive.
1. Click the button.
1. Wait for the file to download.
**Expected:**
File with correct content was downloaded.
**Unexpected:**
File was not downloaded or its content is incorrect.
1. Click `Toggle read-only mode` button.
1. Repeat steps 1-3.

View File

@ -0,0 +1,36 @@
<h2>Classic Editor</h2>
<textarea id="editor1">
<span class="badge badge-success">Classic Editor</span>
</textarea>
<h2>Divarea Editor</h2>
<div id="editor2">
<span class="badge badge-success">Divarea Editor</span>
</div>
<h2>Inline Editor</h2>
<div id="editor3" contenteditable="true">
<span class="badge badge-success">Inline Editor</span>
</div>
<script>
exportPdfUtils.initManualTest();
CKEDITOR.replace( 'editor1', exportPdfUtils.getDefaultConfig( 'manual', {
exportPdf_stylesheets: [ 'https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css' ],
extraPlugins: 'wysiwygarea,exportpdf',
allowedContent: true
} ) );
CKEDITOR.replace( 'editor2', exportPdfUtils.getDefaultConfig( 'manual', {
exportPdf_stylesheets: [ 'https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css' ],
extraPlugins: 'divarea,exportpdf',
allowedContent: true
} ) );
CKEDITOR.inline( 'editor3', exportPdfUtils.getDefaultConfig( 'manual', {
exportPdf_stylesheets: [ 'https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css' ],
extraPlugins: 'floatingspace,exportpdf',
allowedContent: true
} ) );
</script>

View File

@ -0,0 +1,19 @@
@bender-tags: exportpdf, feature, 31
@bender-ui: collapsed
@bender-include: ../_helpers/tools.js
@bender-ckeditor-plugins: toolbar, basicstyles, notification
**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.
1. Use `Export to PDF` button in the first editor.
1. Open generated file.
**Expected:**
Text from editor was converted to a green badge.
**Unexpected:**
Content is the same as in the editor.
1. Repeat the same steps for the second and third editor.

View File

@ -0,0 +1,23 @@
<div id="editor">
<p>Foo bar</p>
</div>
<div id="tokenValue" style="word-break:break-all;border:1px solid red;"></div>
<script>
exportPdfUtils.initManualTest();
var editor = CKEDITOR.replace( 'editor', exportPdfUtils.getDefaultConfig( 'manual' ) );
editor.on( 'instanceReady', function() {
if ( !CKEDITOR.config.exportPdf_tokenUrl ) {
bender.ignore();
}
} );
editor.on( 'exportPdf', function( evt ) {
var value = CKEDITOR.document.findOne( '#tokenValue' );
value.setHtml( evt.data.token );
}, null, null, 17 );
</script>

View File

@ -0,0 +1,19 @@
@bender-tags: exportpdf, feature, 77
@bender-ui: collapsed
@bender-include: ../_helpers/tools.js
@bender-ckeditor-plugins: wysiwygarea, toolbar, basicstyles, notification, format
Note: You need the Internet connection to run this test.
1. Click `Export to PDF` toolbar button.
1. Examine the area in the red frame below.
**Expected:** There is a long token string in the frame.
**Unexpected:** Frame is empty or says 'undefined'.
1. Wait for the file to download and open it.
**Expected:** No information about being created with CKEditor was added.
**Unexpected:** There is an additional note about CKEditor at the bottom of page.

View File

@ -0,0 +1,38 @@
<h3>Editor 1</h3>
<div id="editor1">
<p>Foo bar</p>
</div>
<div id="tokenValue1" style="word-break:break-all;border:1px solid red;"></div>
<h3>Editor 2</h3>
<div id="editor2">
<p>Foo bar</p>
</div>
<div id="tokenValue2" style="word-break:break-all;border:1px solid red;"></div>
<script>
exportPdfUtils.initManualTest();
var editor1 = CKEDITOR.replace( 'editor1', exportPdfUtils.getDefaultConfig( 'manual', { height: 100 } ) ),
editor2 = CKEDITOR.replace( 'editor2', exportPdfUtils.getDefaultConfig( 'manual', { height: 100 } ) );
editor1.on( 'instanceReady', function() {
if ( !CKEDITOR.config.exportPdf_tokenUrl ) {
bender.ignore();
}
} );
editor1.on( 'exportPdf', function( evt ) {
var value = CKEDITOR.document.findOne( '#tokenValue1' );
value.setHtml( evt.data.token );
evt.cancel();
}, null, null, 17 );
editor2.on( 'exportPdf', function( evt ) {
var value = CKEDITOR.document.findOne( '#tokenValue2' );
value.setHtml( evt.data.token );
evt.cancel();
}, null, null, 17 );
</script>

View File

@ -0,0 +1,14 @@
@bender-tags: exportpdf, feature, 77
@bender-ui: collapsed
@bender-include: ../_helpers/tools.js
@bender-ckeditor-plugins: wysiwygarea, toolbar, basicstyles, notification, format
Note: You need the Internet connection to run this test.
1. Click `Export to PDF` button in both editors.
1. Examine the area in the red frames below each editor.
**Expected:** Content of two boxes are two different long strings.
**Unexpected:** Values in both boxes are the same or one of them says `undefined`.

View File

@ -0,0 +1,38 @@
<h3>Editor 1</h3>
<div id="editor1">
<p>Foo bar</p>
</div>
<div id="tokenValue1" style="word-break:break-all;border:1px solid red;"></div>
<h3>Editor 2</h3>
<div id="editor2">
<p>Foo bar</p>
</div>
<div id="tokenValue2" style="word-break:break-all;border:1px solid red;"></div>
<script>
exportPdfUtils.initManualTest();
var editor1 = CKEDITOR.replace( 'editor1', exportPdfUtils.getDefaultConfig( 'manual', { height: 100 } ) ),
editor2 = CKEDITOR.replace( 'editor2', exportPdfUtils.getDefaultConfig( 'manual', { exportPdf_tokenUrl: '', height: 100 } ) );
editor1.on( 'instanceReady', function() {
if ( !CKEDITOR.config.exportPdf_tokenUrl ) {
bender.ignore();
}
} );
editor1.on( 'exportPdf', function( evt ) {
var value = CKEDITOR.document.findOne( '#tokenValue1' );
value.setHtml( evt.data.token );
evt.cancel();
}, null, null, 17 );
editor2.on( 'exportPdf', function( evt ) {
var value = CKEDITOR.document.findOne( '#tokenValue2' );
value.setHtml( evt.data.token );
evt.cancel();
}, null, null, 17 );
</script>

View File

@ -0,0 +1,14 @@
@bender-tags: exportpdf, feature, 77
@bender-ui: collapsed
@bender-include: ../_helpers/tools.js
@bender-ckeditor-plugins: wysiwygarea, toolbar, basicstyles, notification, format
Note: You need the Internet connection to run this test.
1. Click `Export to PDF` button in both editors.
1. Examine the area in the red frames below each editor.
**Expected:** First box contains token value and the second one `undefined`.
**Unexpected:** Values in both boxes are the same or none of them is `undefined`.

View File

@ -0,0 +1,19 @@
<div id="editor">
<p>Foo bar</p>
</div>
<div id="tokenValue" style="word-break:break-all;border:1px solid red;"></div>
<script>
exportPdfUtils.initManualTest();
var editor = CKEDITOR.replace( 'editor', exportPdfUtils.getDefaultConfig( 'manual', {
exportPdf_tokenUrl: ''
} ) );
editor.on( 'exportPdf', function( evt ) {
var value = CKEDITOR.document.findOne( '#tokenValue' );
value.setHtml( evt.data.token );
}, null, null, 17 );
</script>

View File

@ -0,0 +1,31 @@
@bender-tags: exportpdf, feature, 77
@bender-ui: collapsed
@bender-include: ../_helpers/tools.js
@bender-ckeditor-plugins: wysiwygarea, toolbar, basicstyles, notification, format
Note: You need the Internet connection to run this test.
1. Open and examine console.
**Expected:** `exportpdf-no-token-url` warning appeared.
**Unexpected:** No warning.
1. Click `Export to PDF` button in the editor.
1. Examine the area in the red frame below.
**Expected:** Frame has text `undefined`.
**Unexpected:** There is a long token string in the frame.
1. Examine console.
**Expected:** `exportpdf-no-token` warning appeared.
**Unexpected:** No warning.
1. Wait for the file to download and open it.
**Expected:** File contains info about being created with CKEditor.
**Unexpected:** No copyright info was added.

View File

@ -0,0 +1,21 @@
<div id="editor1">
<p>Hello world!</p>
</div>
<div id="editor2">
<p>Hello world!</p>
</div>
<script>
exportPdfUtils.initManualTest();
CKEDITOR.replace( 'editor1', exportPdfUtils.getDefaultConfig( 'manual', {
extraPlugins: 'exportpdf',
exportPdf_service: 'https://cksource.com'
} ) );
CKEDITOR.replace( 'editor2', exportPdfUtils.getDefaultConfig( 'manual', {
removePlugins: 'notification',
exportPdf_service: 'https://cksource.com'
} ) );
</script>

View File

@ -0,0 +1,34 @@
@bender-tags: exportpdf, feature, 4
@bender-ui: collapsed
@bender-include: ../_helpers/tools.js
@bender-ckeditor-plugins: wysiwygarea, toolbar, notification
**Note:** Errors in console during this test are allowed.
1. Click `Export to PDF` button in the first editor.
**Expected:**
* Warning notification with `Error occured.` message appeared.
* Button is clickable.
* File wasn't downloaded.
**Unexpected:**
* Notification didn't show up.
* Button wasn't reenabled.
* File was downloaded.
2. Click `Export to PDF` button in the second editor.
**Expected:**
* Alert appeared instead of notification.
* Button is clickable.
* File wasn't downloaded.
**Unexpected:**
* Notification didn't show up.
* Button wasn't reenabled.
* File was downloaded.

View File

@ -0,0 +1,4 @@
(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")}};
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",
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;
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." }')})}})})})();

View File

@ -0,0 +1,9 @@
(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)},
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',
'\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')},
'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',
'\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"'+
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+
"/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+
"/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/"})},
'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/"})}})})})();

View File

@ -0,0 +1,3 @@
(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=
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"],
"cke4-tests-unit","Custom stats header was not set properly.")})}})})})();

View File

@ -0,0 +1,18 @@
(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,
"Some CSS should be sent."):assert.isUndefined(b.data.css,"No CSS should be sent.");b=b.data.html.replace(/\?t=[a-z0-9]+/gi,"");assert.areEqual(a.expectedHtml,b,"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',
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",
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",
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',
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",
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",
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',
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',
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,
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',
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',
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",
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',
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",
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',
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",
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"]}})}})})})();

View File

@ -0,0 +1,8 @@
/*
Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
(function(){function g(b){return""===b?!1:b}function h(b){if(!/(o|u)l/i.test(b.parent.name))return b;d.elements.replaceWithChildren(b);return!1}function k(b){function d(a,f){var b,c;if(a&&"tr"===a.name){b=a.children;for(c=0;c<f.length&&b[c];c++)b[c].attributes.width=f[c];d(a.next,f)}}var c=b.parent;b=function(a){return CKEDITOR.tools.array.map(a,function(a){return Number(a.attributes.width)})}(b.children);var a=function(a){return CKEDITOR.tools.array.reduce(a,function(a,b){return a+b},0)}(b);c.attributes.width=
a;d(function(a){return(a=CKEDITOR.tools.array.find(a.children,function(a){return a.name&&("tr"===a.name||"tbody"===a.name)}))&&a.name&&"tbody"===a.name?a.children[0]:a}(c),b)}var e=CKEDITOR.plugins.pastetools,d=e.filters.common,c=d.styles;CKEDITOR.plugins.pastetools.filters.gdocs={rules:function(b,e,l){return{elementNames:[[/^meta/,""]],comment:function(){return!1},attributes:{id:function(a){return!/^docs\-internal\-guid\-/.test(a)},dir:function(a){return"ltr"===a?!1:a},style:function(a,b){return g(c.normalizedStyles(b,
e))},"class":function(a){return g(a.replace(/kix-line-break/ig,""))}},elements:{div:function(a){var b=1===a.children.length,c="table"===a.children[0].name;"div"===a.name&&b&&c&&delete a.attributes.align},colgroup:k,span:function(a){c.createStyleStack(a,l,e,/vertical-align|white-space|font-variant/);var b=/vertical-align:\s*sub/,d=a.attributes.style;/vertical-align:\s*super/.test(d)?a.name="sup":b.test(d)&&(a.name="sub");a.attributes.style=d.replace(/vertical-align\s*.+?;?/,"")},b:function(a){d.elements.replaceWithChildren(a);
return!1},p:function(a){if(a.parent&&"li"===a.parent.name)return d.elements.replaceWithChildren(a),!1},ul:function(a){c.pushStylesLower(a);return h(a)},ol:function(a){c.pushStylesLower(a);return h(a)},li:function(a){c.pushStylesLower(a);var b=a.children,e=/(o|u)l/i;1===b.length&&e.test(b[0].name)&&(d.elements.replaceWithChildren(a),a=!1);return a}}}}};CKEDITOR.pasteFilters.gdocs=e.createFilter({rules:[d.rules,CKEDITOR.plugins.pastetools.filters.gdocs.rules]})})();

View File

@ -0,0 +1,11 @@
/*
Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
(function(){function k(b,c){if(!(b.previous&&g(b.previous)&&b.getFirst().children.length&&1===b.children.length&&g(b.getFirst().getFirst())))return!1;for(var d=l(b.previous),a=0,f=d,r=q();f=f.getAscendant(r);)a++;return(a=m(b,a))?(d.add(a),a.filterChildren(c),!0):!1}function l(b){var c=b.children[b.children.length-1];return g(c)||"li"===c.name?l(c):b}function q(){var b=!1;return function(c){return b?!1:g(c)||"li"===c.name?g(c):(b=!0,!1)}}function m(b,c){return c?m(b.getFirst().getFirst(),--c):b}function g(b){return"ol"===
b.name||"ul"===b.name}function h(){return!1}var n=CKEDITOR.plugins.pastetools,p=n.filters.common,e=p.styles;CKEDITOR.plugins.pastetools.filters.libreoffice={rules:function(b,c,d){return{root:function(a){a.filterChildren(d)},comment:function(){return!1},elementNames:[[/^head$/i,""],[/^meta$/i,""],[/^strike$/i,"s"]],elements:{"!doctype":function(a){a.replaceWithChildren()},span:function(a){a.attributes.style&&(a.attributes.style=e.normalizedStyles(a,c),e.createStyleStack(a,d,c));CKEDITOR.tools.object.entries(a.attributes).length||
a.replaceWithChildren()},p:function(a){var f=CKEDITOR.tools.parseCssText(a.attributes.style);if(c.plugins.pagebreak&&("always"===f["page-break-before"]||"page"===f["break-before"])){var b=CKEDITOR.plugins.pagebreak.createElement(c),b=CKEDITOR.htmlParser.fragment.fromHtml(b.getOuterHtml()).children[0];b.insertBefore(a)}a.attributes.style=CKEDITOR.tools.writeCssText(f);a.filterChildren(d);e.createStyleStack(a,d,c)},div:function(a){e.createStyleStack(a,d,c)},a:function(a){if(a.attributes.style){var c=
a.attributes;a=CKEDITOR.tools.parseCssText(a.attributes.style);"#000080"===a.color&&delete a.color;"underline"===a["text-decoration"]&&delete a["text-decoration"];a=CKEDITOR.tools.writeCssText(a);c.style=a}},h1:function(a){e.createStyleStack(a,d,c)},h2:function(a){e.createStyleStack(a,d,c)},h3:function(a){e.createStyleStack(a,d,c)},h4:function(a){e.createStyleStack(a,d,c)},h5:function(a){e.createStyleStack(a,d,c)},h6:function(a){e.createStyleStack(a,d,c)},pre:function(a){e.createStyleStack(a,d,c)},
font:function(a){var c;c="a"===a.parent.name&&"#000080"===a.attributes.color?!0:1!==a.parent.children.length||"sup"!==a.parent.name&&"sub"!==a.parent.name||"2"!==a.attributes.size?!1:!0;c&&a.replaceWithChildren();c=CKEDITOR.tools.parseCssText(a.attributes.style);var b=a.getFirst();a.attributes.size&&b&&b.type===CKEDITOR.NODE_ELEMENT&&/font-size/.test(b.attributes.style)&&a.replaceWithChildren();c["font-size"]&&(delete a.attributes.size,a.name="span",b&&b.type===CKEDITOR.NODE_ELEMENT&&b.attributes.size&&
b.replaceWithChildren())},ul:function(a){if(k(a,d))return!1},ol:function(a){if(k(a,d))return!1},img:function(a){if(!a.attributes.src)return!1},table:function(a){var c=a.attributes;a=a.attributes.style;var b=CKEDITOR.tools.parseCssText(a);b["border-collapse"]||(b["border-collapse"]="collapse",a=CKEDITOR.tools.writeCssText(b));c.style=a}},attributes:{style:function(a,b){return e.normalizedStyles(b,c)||!1},align:function(a,b){if("img"!==b.name){var c=CKEDITOR.tools.parseCssText(b.attributes.style);c["text-align"]=
b.attributes.align;b.attributes.style=CKEDITOR.tools.writeCssText(c);return!1}},cellspacing:h,cellpadding:h,border:h}}}};CKEDITOR.pasteFilters.libreoffice=n.createFilter({rules:[p.rules,CKEDITOR.plugins.pastetools.filters.libreoffice.rules]})})();

View File

@ -0,0 +1,24 @@
/*
Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
(function(){function q(a,b,c){b+=c;for(var d=a[b],e=/[\s]/;d&&e.test(d);)b+=c,d=a[b];return d}function r(a){return/%$/.test(a)?a:a+"px"}function t(a){var b=a.margin?"margin":a.MARGIN?"MARGIN":!1,c,d;if(b){d=CKEDITOR.tools.style.parse.margin(a[b]);for(c in d)a["margin-"+c]=d[c];delete a[b]}}function u(a){var b="background-color:transparent;background:transparent;background-color:none;background:none;background-position:initial initial;background-repeat:initial initial;caret-color;font-family:-webkit-standard;font-variant-caps;letter-spacing:normal;orphans;widows;text-transform:none;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;text-indent:0px;margin-bottom:0in".split(";"),
c=CKEDITOR.tools.parseCssText(a.attributes.style),d,e;for(d in c)e=d+":"+c[d],CKEDITOR.tools.array.some(b,function(a){return e.substring(0,a.length).toLowerCase()===a})&&delete c[d];c=CKEDITOR.tools.writeCssText(c);""!==c?a.attributes.style=c:delete a.attributes.style}function v(a){a=a.config.font_names;var b=[];if(!a||!a.length)return!1;b=CKEDITOR.tools.array.map(a.split(";"),function(a){return-1===a.indexOf("/")?a:a.split("/")[1]});return b.length?b:!1}function w(a,b){var c=a.split(",");return CKEDITOR.tools.array.find(b,
function(a){for(var e=0;e<c.length;e++)if(-1===a.indexOf(CKEDITOR.tools.trim(c[e])))return!1;return!0})||a}var g,m=CKEDITOR.tools,p={};CKEDITOR.plugins.pastetools.filters.common=p;p.rules=function(a,b,c){var d=v(b);return{elements:{"^":function(a){u(a);if(a.attributes.bgcolor){var b=CKEDITOR.tools.parseCssText(a.attributes.style);b["background-color"]||(b["background-color"]=a.attributes.bgcolor,a.attributes.style=CKEDITOR.tools.writeCssText(b))}},span:function(a){if(a.hasClass("Apple-converted-space"))return new CKEDITOR.htmlParser.text(" ")},
table:function(a){a.filterChildren(c);var b=a.parent,f=b&&b.parent,d,h;if(b.name&&"div"===b.name&&b.attributes.align&&1===m.object.keys(b.attributes).length&&1===b.children.length){a.attributes.align=b.attributes.align;d=b.children.splice(0);a.remove();for(h=d.length-1;0<=h;h--)f.add(d[h],b.getIndex());b.remove()}g.convertStyleToPx(a)},tr:function(a){a.attributes={}},td:function(a){var d=a.getAscendant("table"),d=m.parseCssText(d.attributes.style,!0),f=d.background;f&&g.setStyle(a,"background",f,
!0);(d=d["background-color"])&&g.setStyle(a,"background-color",d,!0);var d=m.parseCssText(a.attributes.style,!0),f=d.border?CKEDITOR.tools.style.border.fromCssRule(d.border):{},f=m.style.border.splitCssValues(d,f),l=CKEDITOR.tools.clone(d),h;for(h in l)0==h.indexOf("border")&&delete l[h];a.attributes.style=CKEDITOR.tools.writeCssText(l);d.background&&(h=CKEDITOR.tools.style.parse.background(d.background),h.color&&(g.setStyle(a,"background-color",h.color,!0),g.setStyle(a,"background","")));for(var n in f)h=
d[n]?CKEDITOR.tools.style.border.fromCssRule(d[n]):f[n],"none"===h.style?g.setStyle(a,n,"none"):g.setStyle(a,n,h.toString());g.mapCommonStyles(a);g.convertStyleToPx(a);g.createStyleStack(a,c,b,/margin|text\-align|padding|list\-style\-type|width|height|border|white\-space|vertical\-align|background/i)},font:function(a){a.attributes.face&&d&&(a.attributes.face=w(a.attributes.face,d))}}}};p.styles={setStyle:function(a,b,c,d){var e=m.parseCssText(a.attributes.style);d&&e[b]||(""===c?delete e[b]:e[b]=
c,a.attributes.style=CKEDITOR.tools.writeCssText(e))},convertStyleToPx:function(a){var b=a.attributes.style;b&&(a.attributes.style=b.replace(/\d+(\.\d+)?pt/g,function(a){return CKEDITOR.tools.convertToPx(a)+"px"}))},mapStyles:function(a,b){for(var c in b)if(a.attributes[c]){if("function"===typeof b[c])b[c](a.attributes[c]);else g.setStyle(a,b[c],a.attributes[c]);delete a.attributes[c]}},mapCommonStyles:function(a){return g.mapStyles(a,{vAlign:function(b){g.setStyle(a,"vertical-align",b)},width:function(b){g.setStyle(a,
"width",r(b))},height:function(b){g.setStyle(a,"height",r(b))}})},normalizedStyles:function(a,b){var c="background-color:transparent border-image:none color:windowtext direction:ltr mso- visibility:visible div:border:none".split(" "),d="font-family font font-size color background-color line-height text-decoration".split(" "),e=function(){for(var a=[],b=0;b<arguments.length;b++)arguments[b]&&a.push(arguments[b]);return-1!==m.indexOf(c,a.join(":"))},k=!0===CKEDITOR.plugins.pastetools.getConfigValue(b,
"removeFontStyles"),f=m.parseCssText(a.attributes.style);"cke:li"==a.name&&(f["TEXT-INDENT"]&&f.MARGIN?(a.attributes["cke-indentation"]=p.lists.getElementIndentation(a),f.MARGIN=f.MARGIN.replace(/(([\w\.]+ ){3,3})[\d\.]+(\w+$)/,"$10$3")):delete f["TEXT-INDENT"],delete f["text-indent"]);for(var l=m.object.keys(f),h=0;h<l.length;h++){var n=l[h].toLowerCase(),g=f[l[h]],q=CKEDITOR.tools.indexOf;(k&&-1!==q(d,n.toLowerCase())||e(null,n,g)||e(null,n.replace(/\-.*$/,"-"))||e(null,n)||e(a.name,n,g)||e(a.name,
n.replace(/\-.*$/,"-"))||e(a.name,n)||e(g))&&delete f[l[h]]}var r=CKEDITOR.plugins.pastetools.getConfigValue(b,"keepZeroMargins");t(f);(function(){CKEDITOR.tools.array.forEach(["top","right","bottom","left"],function(a){a="margin-"+a;if(a in f){var b=CKEDITOR.tools.convertToPx(f[a]);b||r?f[a]=b?b+"px":0:delete f[a]}})})();return CKEDITOR.tools.writeCssText(f)},createStyleStack:function(a,b,c,d){var e=[];a.filterChildren(b);for(b=a.children.length-1;0<=b;b--)e.unshift(a.children[b]),a.children[b].remove();
g.sortStyles(a);b=m.parseCssText(g.normalizedStyles(a,c));c=a;var k="span"===a.name,f;for(f in b)if(!f.match(d||/margin((?!-)|-left|-top|-bottom|-right)|text-indent|text-align|width|border|padding/i))if(k)k=!1;else{var l=new CKEDITOR.htmlParser.element("span");l.attributes.style=f+":"+b[f];c.add(l);c=l;delete b[f]}CKEDITOR.tools.isEmpty(b)?delete a.attributes.style:a.attributes.style=CKEDITOR.tools.writeCssText(b);for(b=0;b<e.length;b++)c.add(e[b])},sortStyles:function(a){for(var b=["border","border-bottom",
"font-size","background"],c=m.parseCssText(a.attributes.style),d=m.object.keys(c),e=[],k=[],f=0;f<d.length;f++)-1!==m.indexOf(b,d[f].toLowerCase())?e.push(d[f]):k.push(d[f]);e.sort(function(a,c){var d=m.indexOf(b,a.toLowerCase()),e=m.indexOf(b,c.toLowerCase());return d-e});d=[].concat(e,k);e={};for(f=0;f<d.length;f++)e[d[f]]=c[d[f]];a.attributes.style=CKEDITOR.tools.writeCssText(e)},pushStylesLower:function(a,b,c){if(!a.attributes.style||0===a.children.length)return!1;b=b||{};var d={"list-style-type":!0,
width:!0,height:!0,border:!0,"border-":!0},e=m.parseCssText(a.attributes.style),k;for(k in e)if(!(k.toLowerCase()in d||d[k.toLowerCase().replace(/\-.*$/,"-")]||k.toLowerCase()in b)){for(var f=!1,l=0;l<a.children.length;l++){var h=a.children[l];if(h.type===CKEDITOR.NODE_TEXT&&c){var n=new CKEDITOR.htmlParser.element("span");n.setHtml(h.value);h.replaceWith(n);h=n}h.type===CKEDITOR.NODE_ELEMENT&&(f=!0,g.setStyle(h,k,e[k]))}f&&delete e[k]}a.attributes.style=CKEDITOR.tools.writeCssText(e);return!0},inliner:{filtered:"break-before break-after break-inside page-break page-break-before page-break-after page-break-inside".split(" "),
parse:function(a){function b(a){var b=new CKEDITOR.dom.element("style"),c=new CKEDITOR.dom.element("iframe");c.hide();CKEDITOR.document.getBody().append(c);c.$.contentDocument.documentElement.appendChild(b.$);b.$.textContent=a;c.remove();return b.$.sheet}function c(a){var b=a.indexOf("{"),c=a.indexOf("}");return d(a.substring(b+1,c),!0)}var d=CKEDITOR.tools.parseCssText,e=g.inliner.filter,k=a.is?a.$.sheet:b(a);a=[];var f;if(k)for(k=k.cssRules,f=0;f<k.length;f++)k[f].type===window.CSSRule.STYLE_RULE&&
a.push({selector:k[f].selectorText,styles:e(c(k[f].cssText))});return a},filter:function(a){var b=g.inliner.filtered,c=m.array.indexOf,d={},e;for(e in a)-1===c(b,e)&&(d[e]=a[e]);return d},sort:function(a){return a.sort(function(a){var c=CKEDITOR.tools.array.map(a,function(a){return a.selector});return function(a,b){var k=-1!==(""+a.selector).indexOf(".")?1:0,k=(-1!==(""+b.selector).indexOf(".")?1:0)-k;return 0!==k?k:c.indexOf(b.selector)-c.indexOf(a.selector)}}(a))},inline:function(a){var b=g.inliner.parse,
c=g.inliner.sort,d=function(a){a=(new DOMParser).parseFromString(a,"text/html");return new CKEDITOR.dom.document(a)}(a);a=d.find("style");c=c(function(a){var c=[],d;for(d=0;d<a.count();d++)c=c.concat(b(a.getItem(d)));return c}(a));CKEDITOR.tools.array.forEach(c,function(a){var b=a.styles;a=d.find(a.selector);var c,g,h;t(b);for(h=0;h<a.count();h++)c=a.getItem(h),g=CKEDITOR.tools.parseCssText(c.getAttribute("style")),t(g),g=CKEDITOR.tools.extend({},g,b),c.setAttribute("style",CKEDITOR.tools.writeCssText(g))});
return d}}};g=p.styles;p.lists={getElementIndentation:function(a){a=m.parseCssText(a.attributes.style);if(a.margin||a.MARGIN){a.margin=a.margin||a.MARGIN;var b={styles:{margin:a.margin}};CKEDITOR.filter.transformationsTools.splitMarginShorthand(b);a["margin-left"]=b.styles["margin-left"]}return parseInt(m.convertToPx(a["margin-left"]||"0px"),10)}};p.elements={replaceWithChildren:function(a){for(var b=a.children.length-1;0<=b;b--)a.children[b].insertAfter(a)}};p.createAttributeStack=function(a,b){var c,
d=[];a.filterChildren(b);for(c=a.children.length-1;0<=c;c--)d.unshift(a.children[c]),a.children[c].remove();c=a.attributes;var e=a,g=!0,f;for(f in c)if(g)g=!1;else{var l=new CKEDITOR.htmlParser.element(a.name);l.attributes[f]=c[f];e.add(l);e=l;delete c[f]}for(c=0;c<d.length;c++)e.add(d[c])};p.parseShorthandMargins=t;p.rtf={getGroups:function(a,b){for(var c=[],d,e=0;d=p.rtf.getGroup(a,b,{start:e});)e=d.end,c.push(d);return c},removeGroups:function(a,b){for(var c;c=p.rtf.getGroup(a,b);){var d=a.substring(0,
c.start);c=a.substring(c.end);a=d+c}return a},getGroup:function(a,b,c){var d=0;b=new RegExp("\\{\\\\"+b,"g");var e;c=CKEDITOR.tools.object.merge({start:0},c||{});b.lastIndex=c.start;c=b.exec(a);if(!c)return null;b=c.index;e=a[b];do{var g="{"===e&&"\\"!==q(a,b,-1)&&"\\"===q(a,b,1);e="}"===e&&"\\"!==q(a,b,-1)&&0<d;g?d++:e&&d--;e=a[++b]}while(e&&0<d);return{start:c.index,end:b,content:a.substring(c.index,b)}},extractGroupContent:function(a){var b;b=(b=a.match(/^\{\\(\w+)/))?b[1]:null;a=a.replace(/\}([^{\s]+)/g,
"} $1");a=p.rtf.removeGroups(a,"(?!"+b+")");a=CKEDITOR.tools.trim(a.replace(/^\{(\\[\w-]+\s*)+/g,""));return a.replace(/}$/,"")}}})();

View File

@ -0,0 +1,12 @@
/*
Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
(function(){function u(a,c,b){c=l(c);var e,d;if(0===c.length)return a;e=CKEDITOR.tools.array.map(c,function(a){return h(a)},this);if(b.length!==e.length)return CKEDITOR.error("pastetools-failed-image-extraction",{rtf:c.length,html:b.length}),a;for(d=0;d<b.length;d++)if(0===b[d].indexOf("file://"))if(e[d]){var k=b[d].replace(/\\/g,"\\\\");a=a.replace(new RegExp("(\x3cimg [^\x3e]*src\x3d[\"']?)"+k),"$1"+e[d])}else CKEDITOR.error("pastetools-unsupported-image",{type:c[d].type,index:d});return a}function v(a,
c,b){var e=CKEDITOR.tools.array.unique(CKEDITOR.tools.array.filter(b,function(a){return a.match(/^blob:/i)}));b=CKEDITOR.tools.array.map(e,m);CKEDITOR.tools.promise.all(b).then(function(b){CKEDITOR.tools.array.forEach(b,function(b,c){if(b){var d=e[c],d=a.editable().find('img[src\x3d"'+d+'"]').toArray();CKEDITOR.tools.array.forEach(d,function(a){a.setAttribute("src",b);a.setAttribute("data-cke-saved-src",b)},this)}else CKEDITOR.error("pastetools-unsupported-image",{type:"blob",index:c})})});return c}
function l(a){function c(a){return"string"!==typeof a?-1:CKEDITOR.tools.array.indexOf(d,function(b){return b.id===a})}function b(a){var b=a.match(/\\blipuid (\w+)\}/);a=a.match(/\\bliptag(-?\d+)/);return b?b[1]:a?a[1]:null}var e=CKEDITOR.plugins.pastetools.filters.common.rtf,d=[];a=e.removeGroups(a,"(?:(?:header|footer)[lrf]?|nonshppict|shprslt)");a=e.getGroups(a,"pict");if(!a)return d;for(var k=0;k<a.length;k++){var f=a[k].content,h=b(f),n=t(f),g=c(h),p=-1!==g&&d[g].hex,l=p&&d[g].type===n,p=p&&d[g].type!==
n&&g===d.length-1,m=-1!==f.indexOf("\\defshp"),q=-1!==CKEDITOR.tools.array.indexOf(CKEDITOR.pasteFilters.image.supportedImageTypes,n),r=-1!==CKEDITOR.tools.indexOf(f,"fHorizRule");l?d.push(d[g]):p||m||r||(f={id:h,hex:q?e.extractGroupContent(f).replace(/\s/g,""):null,type:n},-1!==g?d.splice(g,1,f):d.push(f))}return d}function q(a){for(var c=/<img[^>]+src="([^"]+)[^>]+/g,b=[],e;e=c.exec(a);)b.push(e[1]);return b}function t(a){var c=CKEDITOR.tools.array.find(CKEDITOR.pasteFilters.image.recognizableImageTypes,
function(b){return b.marker.test(a)});return c?c.type:"unknown"}function h(a){var c=-1!==CKEDITOR.tools.array.indexOf(CKEDITOR.pasteFilters.image.supportedImageTypes,a.type),b=a.hex;if(!c)return null;"string"===typeof b&&(b=CKEDITOR.tools.convertHexStringToBytes(a.hex));return a.type?"data:"+a.type+";base64,"+CKEDITOR.tools.convertBytesToBase64(b):null}function m(a){return new CKEDITOR.tools.promise(function(c){CKEDITOR.ajax.load(a,function(a){a=new Uint8Array(a);var e=r(a);a=h({type:e,hex:a});c(a)},
"arraybuffer")})}function r(a){a=a.subarray(0,4);var c=CKEDITOR.tools.array.map(a,function(a){return a.toString(16)}).join("");return(a=CKEDITOR.tools.array.find(CKEDITOR.pasteFilters.image.recognizableImageSignatures,function(a){return 0===c.indexOf(a.signature)}))?a.type:null}CKEDITOR.pasteFilters.image=function(a,c,b){var e;if(c.activeFilter&&!c.activeFilter.check("img[src]"))return a;e=q(a);return 0===e.length?a:b?u(a,b,e):v(c,a,e)};CKEDITOR.pasteFilters.image.extractFromRtf=l;CKEDITOR.pasteFilters.image.extractTagsFromHtml=
q;CKEDITOR.pasteFilters.image.getImageType=t;CKEDITOR.pasteFilters.image.createSrcWithBase64=h;CKEDITOR.pasteFilters.image.convertBlobUrlToBase64=m;CKEDITOR.pasteFilters.image.getImageTypeFromSignature=r;CKEDITOR.pasteFilters.image.supportedImageTypes=["image/png","image/jpeg","image/gif"];CKEDITOR.pasteFilters.image.recognizableImageTypes=[{marker:/\\pngblip/,type:"image/png"},{marker:/\\jpegblip/,type:"image/jpeg"},{marker:/\\emfblip/,type:"image/emf"},{marker:/\\wmetafile\d/,type:"image/wmf"}];
CKEDITOR.pasteFilters.image.recognizableImageSignatures=[{signature:"ffd8ff",type:"image/jpeg"},{signature:"47494638",type:"image/gif"},{signature:"89504e47",type:"image/png"}]})();

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 B

View File

@ -0,0 +1,10 @@
div[style*="page-break-after"] {
background:url( ../images/pagebreak.gif ) no-repeat center center;
clear:both;
width:100%;
border-top:#999 1px dotted;
border-bottom:#999 1px dotted;
padding:0;
height:7px;
cursor:default;
}

View File

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang("specialchar","sr-latn",{euro:"Znak eura",lsquo:"Levi simpli znak navoda",rsquo:"Desni simpli znak navoda",ldquo:"Levi dupli znak navoda",rdquo:"Desni dupli znak navoda",ndash:"Kratka crtica",mdash:"Dugačka crtica",iexcl:"Obrnuti uzvičnik",cent:"Znak za cent",pound:"Znak za funtе",curren:"Znak za valutu",yen:"Znak za jenа",brvbar:"Traka sa prekidom",sect:"Znak paragrafa",uml:"Umlaut",copy:"Znak za autorsko pravo",ordf:"Ženski redni indikator",laquo:"Dupla strelica levo",not:"Bez znaka",
reg:"Registrovani znak",macr:"Znak dužine",deg:"Znak za stepen",sup2:"Znak za kvadrat",sup3:"Znak za kub",acute:"Oštar akcenat",micro:"Znak mikro",para:"Znak pasusa",middot:"Srednja tačka",cedil:"Cedila",sup1:"Znak na prvom",ordm:"Muški redni indikator",raquo:"Dupla strelica desno",frac14:"Znak za četvrtinu",frac12:"Znak za polovinu",frac34:"Znak za trećinu",iquest:"Obrnuti upitnik",Agrave:"Veliko latinično slovo A sa obrnutom kukicom.",Aacute:"Veliko latinično slovo A sa kukicom.",Acirc:"Veliko latinično slovo A sa savijenom kukicom.",
Atilde:"Veliko latinično slovo A sa znakom talasa.",Auml:"Veliko latinično slovo A sa dvotačkom",Aring:"Veliko latinično slovo A sa prstenom iznad.",AElig:"Veliko latinično slovo Æ",Ccedil:"Veliko latinično slovo C sa cedilom",Egrave:"Veliko latinično slovo E sa obrnutom kukicom",Eacute:"Veliko latinično slovo E sa kukicom.",Ecirc:"Veliko latinično slovo E sa savijenom kukicom.",Euml:"Veliko latinično slovo E sa dvotačkom",Igrave:"Veliko latinično slovo I sa obrnutom kukicom",Iacute:"Veliko latinično slovo I sa kukicom.",
Icirc:"Veliko latinično slovo I sa savijenom kukicom.",Iuml:"Veliko latinično slovo I sa dvotačkom",ETH:"Veliko latinično slovo Eth",Ntilde:"Veliko latinično slovo N sa znakom talasa.",Ograve:"Veliko latinično slovo O sa obrnutom kukicom",Oacute:"Veliko latinično slovo O sa kukicom.",Ocirc:"Veliko latinično slovo O sa savijenom kukicom.",Otilde:"Veliko latinično slovo O sa znakom talasa.",Ouml:"Veliko latinično slovo O sa dvotačkom",times:"Znak množenja",Oslash:"Latinično slovo O precrtano",Ugrave:"Veliko latinično slovo U sa obrnutom kukicom",
Uacute:"Veliko latinično slovo U sa kukicom",Ucirc:"Veliko latinično slovo U sa savijenom kukicom.",Uuml:"Veliko latinično slovo U sa dvotačkom",Yacute:"Veliko latinično slovo Y sa kukicom",THORN:"Veliko latinično slovo Thotn",szlig:"Malo latinično slovo s",agrave:"Malo latinično slovo a sa obrnutom kukicom",aacute:"Malo latinično slovo a sa kukicom",acirc:"Malo latinično slovo a sa savijenom kukicom",atilde:"Malo latinično slovo a sa znakom talasa",auml:"Malo latinično slovo a sa dvotačkom",aring:"Malo latinično slovo a sa prstenom iznad",
aelig:"Malo latinično slovo æ",ccedil:"Malo latinično slovo c sa cedilom",egrave:"Malo latinično slovo e sa obrnutom kukicom",eacute:"Malo latinično slovo e sa kukicom",ecirc:"Malo latinično slovo e sa savijenom kukicom",euml:"Malo latinično slovo e sa dvotačkom",igrave:"Malo latinično slovo i sa obrnutom kukicom",iacute:"Malo latinično slovo i sa kukicom",icirc:"Malo latinično slovo i sa savijenom kukicom",iuml:"Malo latinično slovo i sa dvotačkom",eth:"Malo latinično slovo eth",ntilde:"Malo latinično slovo n sa znakom talasa",
ograve:"Malo latinično slovo o sa obrnutom kukicom",oacute:"Malo latinično slovo o sa kukicom",ocirc:"Malo latinično slovo o sa savijenom kukicom",otilde:"Malo latinično slovo o sa znakom talasa",ouml:"Malo latinično slovo o dvotačkom",divide:"Znak deljenja",oslash:"Malo latinično slovo o precrtano",ugrave:"Malo latinično slovo u sa obrnutom kukicom",uacute:"Malo latinično slovo u sa kukicom",ucirc:"Malo latinično slovo u sa savijenom kukicom",uuml:"Malo latinično slovo u sa dvotačkom",yacute:"Malo latinično slovo y sa kukicom",
thorn:"Malo latinično slovo thorn",yuml:"Malo latinično slovo y sa dvotačkom",OElig:"Veliki latinični znak OE",oelig:"Mali latinični znak OE",372:"Veliko latinično slovo W sa savijenom kukicom.",374:"Veliko latinično slovo Y sa savijenom kukicom.",373:"Malo latinično slovo w sa savijenom kukicom.",375:"Malo latinično slovo y sa savijenom kukicom.",sbquo:"Tipografski simpli navodnik za otvaranje",8219:"Tipografski simpli navodnik za zatvaranje",bdquo:"Tipografski dupli navodnik ",hellip:"Tri tačke",
trade:"Znak robne marke",9658:"Crni pokazivač desno",bull:"Tačka",rarr:"Strelica desno",rArr:"Dupla strelica desno",hArr:"Levo desno dupla strelica",diams:"Crni dijamant znak",asymp:"Znak skoro jednako"});

View File

@ -0,0 +1,13 @@
/*
Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang("specialchar","sr",{euro:"Знак еура",lsquo:"Леви симпли знак навода",rsquo:"Десни симпли знак навода",ldquo:"Леви дупли знак навода",rdquo:"Десни дупли знак навода",ndash:"Кратка цртица",mdash:"Дугачка цртица",iexcl:"Обрнути узвичник",cent:"Знак цент",pound:"Знак фунте",curren:"Знак валуте",yen:"Знак јена",brvbar:"Трака са прекидом",sect:"Знак параграфа",uml:"Умлаут",copy:"Знак ауторско право",ordf:"Женски редни индикатор",laquo:"Дупла стрелица лево",not:"Без знака",reg:"Регистровани знак",
macr:"Знак дужине",deg:"Знак за степен",sup2:"Знак на квадрату",sup3:"Знак на куб",acute:"Оштар акценат",micro:"Знак микро",para:"Знак пасуса",middot:"Средња тачка",cedil:"Цедиле",sup1:"Знак на првом",ordm:"Мушки редни индикатор",raquo:"Десна дупла стрелица",frac14:"Знак за четвртину",frac12:"Знак за половину",frac34:"Знак за трећину",iquest:"Обрнути упитник",Agrave:"Велико латинично слово А са обрнутом кукицом",Aacute:"Велико латинично слово А са кукицом",Acirc:"Велико латинично слово А са савијеном кукицом",
Atilde:"Велико латинично слово А са знаком таласа",Auml:"Велико латинично слово А са двотачком",Aring:"Велико латинично слово А прстеном изнад",AElig:"Велико латинично слово Æ",Ccedil:"Велико латинично слово Ц са цедилом",Egrave:"Велико латинично слово Е са обрнутом кукицом",Eacute:"Велико латинично слово Е са кукицом",Ecirc:"Велико латинично слово Е са савијеном кукицом",Euml:"Велико латинично слово Е са двотачком",Igrave:"Велико латинично слово И са обрнутом кукицом",Iacute:"Велико латинично слово И са кукицом",
Icirc:"Велико латинично слово И са савијеном кукицом",Iuml:"Велико латинично слово И са двотачком",ETH:"Велико латинично слово Eth",Ntilde:"Велико латинично слово Н са знаком таласа",Ograve:"Велико латинично слово О са обрнутом кукицом",Oacute:"Велико латинично слово О са кукицом",Ocirc:"Велико латинично слово О са савијеном кукицом",Otilde:"Велико латинично слово О са знаком таласа",Ouml:"Велико латинично слово О са двотачком",times:"Знак множења",Oslash:"Велико латинично слово О прецртано",Ugrave:"Велико латинично слово У са обрнутом кукицом",
Uacute:"Велико латинично слово У са кукицом",Ucirc:"Велико латинично слово У са савијеном кукицом",Uuml:"Велико латинично слово У са двотачком",Yacute:"Велико латинично слово ИПСИЛОН са кукицом",THORN:"Велико латинично словоThorn",szlig:"Мало латинично слово с",agrave:"Мало латинично слово с са обрнутом кукицом",aacute:"Мало латинично слово а са кукицом",acirc:"Мало латинично слово а са савијеном кукицом",atilde:"Мало латинично слово а са знаком таласа",auml:"Мало латинично слово а са двотачком",
aring:"Мало латинично слово а са прстеном изнад",aelig:"Мало латинично слово æ",ccedil:"Мало латинично слово ц са цедилом",egrave:"Мало латинично слово е са обрнутом кукицом",eacute:"Мало латинично слово е са кукицом",ecirc:"Мало латинично слово е са савијеном кукицом",euml:"Мало латинично слово е са двотачком",igrave:"Мало латинично слово и са обрнутом кукицом",iacute:"Мало латинично слово и са кукицом",icirc:"Мало латинично слово и са савијеном кукицом",iuml:"Мало латинично слово и са двотачком",
eth:"Мало латинично слово eth",ntilde:" Мало латинично слово н са знаком таласа",ograve:"Мало латинично слово о са обрнутом кукицом",oacute:"Мало латинично слово о са кукицом",ocirc:"Мало латинично слово о са савијеном кукицом",otilde:"Мало латинично слово о са знаком таласа",ouml:"Мало латинично слово о са двотачком",divide:"Знак дељења",oslash:"Мало латинично слово о прецртано",ugrave:"Мало латинично слово у са обрнутом кукицом",uacute:"Мало латинично слово у са кукицом",ucirc:"Мало латинично слово у са савијеном кукицом",
uuml:"Мало латинично слово у са двотачком",yacute:"Мало латинично слово ипсилон са кукицом",thorn:"Мало латинично слово thorn",yuml:"Мало латинично слово ипсилон са двотачком",OElig:"Белико латинично слово ОЕ",oelig:"Мало латинично слово ОЕ",372:"Белико латинично слово W са савијеном кукицом",374:"Велико латинично слово ипсилон са савијеном кукицом",373:"Мало латинично слово w са савијеном кукицом",375:"Мало латинично слово ипсилон са савијеном кукицом",sbquo:"Типографски симпли наводник за отварање",
8219:"Типографски симпли наводник за затварање",bdquo:"Типографски дупли наводник ",hellip:"Три тачке",trade:"Знак робне марке",9658:"Црни показивач десно",bull:"Тачка",rarr:"Стрелица десно",rArr:"Дупла стрелица десно",hArr:"Дупла стрелица лево десно",diams:"Црни дијамант знак",asymp:"Знак скоро једнако"});

View File

@ -0,0 +1,4 @@
/*
Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 836 B

View File

@ -0,0 +1,2 @@
CKEDITOR.plugins.setLang("wsc","af",{btnIgnore:"Ignoreer",btnIgnoreAll:"Ignoreer alles",btnReplace:"Vervang",btnReplaceAll:"vervang alles",btnUndo:"Ontdoen",changeTo:"Verander na",errorLoading:"Fout by inlaai van diens: %s.",ieSpellDownload:"Speltoetser is nie geïnstalleer nie. Wil u dit nou aflaai?",manyChanges:"Klaar met speltoets: %1 woorde verander",noChanges:"Klaar met speltoets: Geen woorde verander nie",noMispell:"Klaar met speltoets: Geen foute nie",noSuggestions:"- Geen voorstel -",notAvailable:"Jammer, hierdie diens is nie nou beskikbaar nie.",
notInDic:"Nie in woordeboek nie",oneChange:"Klaar met speltoets: Een woord verander",progress:"Spelling word getoets...",title:"Speltoetser",toolbar:"Speltoets"});

View File

@ -0,0 +1,2 @@
CKEDITOR.plugins.setLang("wsc","ar",{btnIgnore:"تجاهل",btnIgnoreAll:"تجاهل الكل",btnReplace:"تغيير",btnReplaceAll:"تغيير الكل",btnUndo:"تراجع",changeTo:"التغيير إلى",errorLoading:"خطأ في تحميل تطبيق خدمة الاستضافة: %s.",ieSpellDownload:"المدقق الإملائي (الإنجليزي) غير مثبّت. هل تود تحميله الآن؟",manyChanges:"تم إكمال التدقيق الإملائي: تم تغيير %1 من كلمات",noChanges:"تم التدقيق الإملائي: لم يتم تغيير أي كلمة",noMispell:"تم التدقيق الإملائي: لم يتم العثور على أي أخطاء إملائية",noSuggestions:"- لا توجد إقتراحات -",
notAvailable:"عفواً، ولكن هذه الخدمة غير متاحة الان",notInDic:"ليست في القاموس",oneChange:"تم التدقيق الإملائي: تم تغيير كلمة واحدة فقط",progress:"جاري التدقيق الاملائى",title:"التدقيق الإملائي",toolbar:"تدقيق إملائي"});

View File

@ -0,0 +1,2 @@
CKEDITOR.plugins.setLang("wsc","bg",{btnIgnore:"Игнорирай",btnIgnoreAll:"Игнорирай всичко",btnReplace:"Препокриване",btnReplaceAll:"Препокрий всичко",btnUndo:"Възтанови",changeTo:"Промени на",errorLoading:"Error loading application service host: %s.",ieSpellDownload:"Spell checker not installed. Do you want to download it now?",manyChanges:"Spell check complete: %1 words changed",noChanges:"Spell check complete: No words changed",noMispell:"Spell check complete: No misspellings found",noSuggestions:"- Няма препоръчани -",
notAvailable:"Съжаляваме, но услугата не е достъпна за момента",notInDic:"Не е в речника",oneChange:"Spell check complete: One word changed",progress:"Проверява се правописа...",title:"Проверка на правопис",toolbar:"Проверка на правопис"});

View File

@ -0,0 +1,2 @@
CKEDITOR.plugins.setLang("wsc","bn",{btnIgnore:"ইগনোর কর",btnIgnoreAll:"সব ইগনোর কর",btnReplace:"বদলে দাও",btnReplaceAll:"সব বদলে দাও",btnUndo:"আন্ডু",changeTo:"এতে বদলাও",errorLoading:"Error loading application service host: %s.",ieSpellDownload:"বানান পরীক্ষক ইনস্টল করা নেই। আপনি কি এখনই এটা ডাউনলোড করতে চান?",manyChanges:"বানান পরীক্ষা শেষ: %1 গুলো শব্দ বদলে গ্যাছে",noChanges:"বানান পরীক্ষা শেষ: কোন শব্দ পরিবর্তন করা হয়নি",noMispell:"বানান পরীক্ষা শেষ: কোন ভুল বানান পাওয়া যায়নি",noSuggestions:"- কোন সাজেশন নেই -",
notAvailable:"Sorry, but service is unavailable now.",notInDic:"শব্দকোষে নেই",oneChange:"বানান পরীক্ষা শেষ: একটি মাত্র শব্দ পরিবর্তন করা হয়েছে",progress:"বানান পরীক্ষা চলছে...",title:"Spell Checker",toolbar:"বানান চেক"});

View File

@ -0,0 +1,2 @@
CKEDITOR.plugins.setLang("wsc","bs",{btnIgnore:"Ignore",btnIgnoreAll:"Ignore All",btnReplace:"Replace",btnReplaceAll:"Replace All",btnUndo:"Undo",changeTo:"Change to",errorLoading:"Error loading application service host: %s.",ieSpellDownload:"Spell checker not installed. Do you want to download it now?",manyChanges:"Spell check complete: %1 words changed",noChanges:"Spell check complete: No words changed",noMispell:"Spell check complete: No misspellings found",noSuggestions:"- No suggestions -",notAvailable:"Sorry, but service is unavailable now.",
notInDic:"Not in dictionary",oneChange:"Spell check complete: One word changed",progress:"Spell check in progress...",title:"Spell Checker",toolbar:"Check Spelling"});

View File

@ -0,0 +1,2 @@
CKEDITOR.plugins.setLang("wsc","ca",{btnIgnore:"Ignora",btnIgnoreAll:"Ignora-les totes",btnReplace:"Canvia",btnReplaceAll:"Canvia-les totes",btnUndo:"Desfés",changeTo:"Reemplaça amb",errorLoading:"Error carregant el servidor: %s.",ieSpellDownload:"Verificació ortogràfica no instal·lada. Voleu descarregar-ho ara?",manyChanges:"Verificació ortogràfica: s'han canviat %1 paraules",noChanges:"Verificació ortogràfica: no s'ha canviat cap paraula",noMispell:"Verificació ortogràfica acabada: no hi ha cap paraula mal escrita",
noSuggestions:"Cap suggeriment",notAvailable:"El servei no es troba disponible ara.",notInDic:"No és al diccionari",oneChange:"Verificació ortogràfica: s'ha canviat una paraula",progress:"Verificació ortogràfica en curs...",title:"Comprova l'ortografia",toolbar:"Revisa l'ortografia"});

View File

@ -0,0 +1,2 @@
CKEDITOR.plugins.setLang("wsc","cs",{btnIgnore:"Přeskočit",btnIgnoreAll:"Přeskakovat vše",btnReplace:"Zaměnit",btnReplaceAll:"Zaměňovat vše",btnUndo:"Zpět",changeTo:"Změnit na",errorLoading:"Chyba nahrávání služby aplikace z: %s.",ieSpellDownload:"Kontrola pravopisu není nainstalována. Chcete ji nyní stáhnout?",manyChanges:"Kontrola pravopisu dokončena: %1 slov změněno",noChanges:"Kontrola pravopisu dokončena: Beze změn",noMispell:"Kontrola pravopisu dokončena: Žádné pravopisné chyby nenalezeny",
noSuggestions:"- žádné návrhy -",notAvailable:"Omlouváme se, ale služba nyní není dostupná.",notInDic:"Není ve slovníku",oneChange:"Kontrola pravopisu dokončena: Jedno slovo změněno",progress:"Probíhá kontrola pravopisu...",title:"Kontrola pravopisu",toolbar:"Zkontrolovat pravopis"});

View File

@ -0,0 +1,2 @@
CKEDITOR.plugins.setLang("wsc","cy",{btnIgnore:"Anwybyddu Un",btnIgnoreAll:"Anwybyddu Pob",btnReplace:"Amnewid Un",btnReplaceAll:"Amnewid Pob",btnUndo:"Dadwneud",changeTo:"Newid i",errorLoading:"Error loading application service host: %s.",ieSpellDownload:"Gwirydd sillafu heb ei arsefydlu. A ydych am ei lawrlwytho nawr?",manyChanges:"Gwirio sillafu wedi gorffen: Newidiwyd %1 gair",noChanges:"Gwirio sillafu wedi gorffen: Dim newidiadau",noMispell:"Gwirio sillafu wedi gorffen: Dim camsillaf.",noSuggestions:"- Dim awgrymiadau -",
notAvailable:"Nid yw'r gwasanaeth hwn ar gael yn bresennol.",notInDic:"Nid i'w gael yn y geiriadur",oneChange:"Gwirio sillafu wedi gorffen: Newidiwyd 1 gair",progress:"Gwirio sillafu yn ar y gweill...",title:"Gwirio Sillafu",toolbar:"Gwirio Sillafu"});

View File

@ -0,0 +1,2 @@
CKEDITOR.plugins.setLang("wsc","da",{btnIgnore:"Ignorér",btnIgnoreAll:"Ignorér alle",btnReplace:"Erstat",btnReplaceAll:"Erstat alle",btnUndo:"Tilbage",changeTo:"Forslag",errorLoading:"Fejl ved indlæsning af host: %s.",ieSpellDownload:"Stavekontrol ikke installeret. Vil du installere den nu?",manyChanges:"Stavekontrol færdig: %1 ord ændret",noChanges:"Stavekontrol færdig: Ingen ord ændret",noMispell:"Stavekontrol færdig: Ingen fejl fundet",noSuggestions:"(ingen forslag)",notAvailable:"Stavekontrol er desværre ikke tilgængelig.",
notInDic:"Ikke i ordbogen",oneChange:"Stavekontrol færdig: Et ord ændret",progress:"Stavekontrollen arbejder...",title:"Stavekontrol",toolbar:"Stavekontrol"});

View File

@ -0,0 +1,2 @@
CKEDITOR.plugins.setLang("wsc","de",{btnIgnore:"Ignorieren",btnIgnoreAll:"Alle Ignorieren",btnReplace:"Ersetzen",btnReplaceAll:"Alle Ersetzen",btnUndo:"Rückgängig",changeTo:"Ändern in",errorLoading:"Fehler beim laden des Dienstanbieters: %s.",ieSpellDownload:"Rechtschreibprüfung nicht installiert. Möchten Sie sie jetzt herunterladen?",manyChanges:"Rechtschreibprüfung abgeschlossen - %1 Wörter geändert",noChanges:"Rechtschreibprüfung abgeschlossen - keine Worte geändert",noMispell:"Rechtschreibprüfung abgeschlossen - keine Fehler gefunden",
noSuggestions:" - keine Vorschläge - ",notAvailable:"Entschuldigung, aber dieser Dienst steht im Moment nicht zur Verfügung.",notInDic:"Nicht im Wörterbuch",oneChange:"Rechtschreibprüfung abgeschlossen - ein Wort geändert",progress:"Rechtschreibprüfung läuft...",title:"Rechtschreibprüfung",toolbar:"Rechtschreibprüfung"});

View File

@ -0,0 +1,2 @@
CKEDITOR.plugins.setLang("wsc","el",{btnIgnore:"Αγνόηση",btnIgnoreAll:"Αγνόηση όλων",btnReplace:"Αντικατάσταση",btnReplaceAll:"Αντικατάσταση όλων",btnUndo:"Αναίρεση",changeTo:"Αλλαγή σε",errorLoading:"Error loading application service host: %s.",ieSpellDownload:"Δεν υπάρχει εγκατεστημένος ορθογράφος. Θέλετε να τον κατεβάσετε τώρα;",manyChanges:"Ο ορθογραφικός έλεγχος ολοκληρώθηκε: Άλλαξαν %1 λέξεις",noChanges:"Ο ορθογραφικός έλεγχος ολοκληρώθηκε: Δεν άλλαξαν λέξεις",noMispell:"Ο ορθογραφικός έλεγχος ολοκληρώθηκε: Δεν βρέθηκαν λάθη",
noSuggestions:"- Δεν υπάρχουν προτάσεις -",notAvailable:"Η υπηρεσία δεν είναι διαθέσιμη αυτήν την στιγμή.",notInDic:"Δεν υπάρχει στο λεξικό",oneChange:"Ο ορθογραφικός έλεγχος ολοκληρώθηκε: Άλλαξε μια λέξη",progress:"Γίνεται ορθογραφικός έλεγχος...",title:"Ορθογραφικός Έλεγχος",toolbar:"Ορθογραφικός Έλεγχος"});

View File

@ -0,0 +1,2 @@
CKEDITOR.plugins.setLang("wsc","en-au",{btnIgnore:"Ignore",btnIgnoreAll:"Ignore All",btnReplace:"Replace",btnReplaceAll:"Replace All",btnUndo:"Undo",changeTo:"Change to",errorLoading:"Error loading application service host: %s.",ieSpellDownload:"Spell checker not installed. Do you want to download it now?",manyChanges:"Spell check complete: %1 words changed",noChanges:"Spell check complete: No words changed",noMispell:"Spell check complete: No misspellings found",noSuggestions:"- No suggestions -",
notAvailable:"Sorry, but service is unavailable now.",notInDic:"Not in dictionary",oneChange:"Spell check complete: One word changed",progress:"Spell check in progress...",title:"Spell Checker",toolbar:"Check Spelling"});

View File

@ -0,0 +1,2 @@
CKEDITOR.plugins.setLang("wsc","en-ca",{btnIgnore:"Ignore",btnIgnoreAll:"Ignore All",btnReplace:"Replace",btnReplaceAll:"Replace All",btnUndo:"Undo",changeTo:"Change to",errorLoading:"Error loading application service host: %s.",ieSpellDownload:"Spell checker not installed. Do you want to download it now?",manyChanges:"Spell check complete: %1 words changed",noChanges:"Spell check complete: No words changed",noMispell:"Spell check complete: No misspellings found",noSuggestions:"- No suggestions -",
notAvailable:"Sorry, but service is unavailable now.",notInDic:"Not in dictionary",oneChange:"Spell check complete: One word changed",progress:"Spell check in progress...",title:"Spell Checker",toolbar:"Check Spelling"});

View File

@ -0,0 +1,2 @@
CKEDITOR.plugins.setLang("wsc","en-gb",{btnIgnore:"Ignore",btnIgnoreAll:"Ignore All",btnReplace:"Replace",btnReplaceAll:"Replace All",btnUndo:"Undo",changeTo:"Change to",errorLoading:"Error loading application service host: %s.",ieSpellDownload:"Spell checker not installed. Do you want to download it now?",manyChanges:"Spell check complete: %1 words changed",noChanges:"Spell check complete: No words changed",noMispell:"Spell check complete: No misspellings found",noSuggestions:"- No suggestions -",
notAvailable:"Sorry, but service is unavailable now.",notInDic:"Not in dictionary",oneChange:"Spell check complete: One word changed",progress:"Spell check in progress...",title:"Spell Checker",toolbar:"Check Spelling"});

View File

@ -0,0 +1,2 @@
CKEDITOR.plugins.setLang("wsc","en",{btnIgnore:"Ignore",btnIgnoreAll:"Ignore All",btnReplace:"Replace",btnReplaceAll:"Replace All",btnUndo:"Undo",changeTo:"Change to",errorLoading:"Error loading application service host: %s.",ieSpellDownload:"Spell checker not installed. Do you want to download it now?",manyChanges:"Spell check complete: %1 words changed",noChanges:"Spell check complete: No words changed",noMispell:"Spell check complete: No misspellings found",noSuggestions:"- No suggestions -",notAvailable:"Sorry, but service is unavailable now.",
notInDic:"Not in dictionary",oneChange:"Spell check complete: One word changed",progress:"Spell check in progress...",title:"Spell Checker",toolbar:"Check Spelling"});

View File

@ -0,0 +1,2 @@
CKEDITOR.plugins.setLang("wsc","eo",{btnIgnore:"Ignori",btnIgnoreAll:"Ignori Ĉion",btnReplace:"Anstataŭigi",btnReplaceAll:"Anstataŭigi Ĉion",btnUndo:"Malfari",changeTo:"Ŝanĝi al",errorLoading:"Eraro en la servoelŝuto el la gastiga komputiko: %s.",ieSpellDownload:"Ortografikontrolilo ne instalita. Ĉu vi volas elŝuti ĝin nun?",manyChanges:"Ortografikontrolado finita: %1 vortoj korektitaj",noChanges:"Ortografikontrolado finita: neniu vorto korektita",noMispell:"Ortografikontrolado finita: neniu eraro trovita",
noSuggestions:"- Neniu propono -",notAvailable:"Bedaŭrinde la servo ne funkcias nuntempe.",notInDic:"Ne trovita en la vortaro",oneChange:"Ortografikontrolado finita: unu vorto korektita",progress:"La ortografio estas kontrolata...",title:"Kontroli la ortografion",toolbar:"Kontroli la ortografion"});

View File

@ -0,0 +1,2 @@
CKEDITOR.plugins.setLang("wsc","es",{btnIgnore:"Ignorar",btnIgnoreAll:"Ignorar Todo",btnReplace:"Reemplazar",btnReplaceAll:"Reemplazar Todo",btnUndo:"Deshacer",changeTo:"Cambiar a",errorLoading:"Error cargando la aplicación del servidor: %s.",ieSpellDownload:"Módulo de Control de Ortografía no instalado.\r\n¿Desea descargarlo ahora?",manyChanges:"Control finalizado: se ha cambiado %1 palabras",noChanges:"Control finalizado: no se ha cambiado ninguna palabra",noMispell:"Control finalizado: no se encontraron errores",
noSuggestions:"- No hay sugerencias -",notAvailable:"Lo sentimos pero el servicio no está disponible.",notInDic:"No se encuentra en el Diccionario",oneChange:"Control finalizado: se ha cambiado una palabra",progress:"Control de Ortografía en progreso...",title:"Comprobar ortografía",toolbar:"Ortografía"});

View File

@ -0,0 +1,2 @@
CKEDITOR.plugins.setLang("wsc","et",{btnIgnore:"Ignoreeri",btnIgnoreAll:"Ignoreeri kõiki",btnReplace:"Asenda",btnReplaceAll:"Asenda kõik",btnUndo:"Võta tagasi",changeTo:"Muuda",errorLoading:"Viga rakenduse teenushosti laadimisel: %s.",ieSpellDownload:"Õigekirja kontrollija ei ole paigaldatud. Soovid sa selle alla laadida?",manyChanges:"Õigekirja kontroll sooritatud: %1 sõna muudetud",noChanges:"Õigekirja kontroll sooritatud: ühtegi sõna ei muudetud",noMispell:"Õigekirja kontroll sooritatud: õigekirjuvigu ei leitud",
noSuggestions:"- Soovitused puuduvad -",notAvailable:"Kahjuks ei ole teenus praegu saadaval.",notInDic:"Puudub sõnastikust",oneChange:"Õigekirja kontroll sooritatud: üks sõna muudeti",progress:"Toimub õigekirja kontroll...",title:"Õigekirjakontroll",toolbar:"Õigekirjakontroll"});

View File

@ -0,0 +1,2 @@
CKEDITOR.plugins.setLang("wsc","eu",{btnIgnore:"Ezikusi",btnIgnoreAll:"Denak Ezikusi",btnReplace:"Ordezkatu",btnReplaceAll:"Denak Ordezkatu",btnUndo:"Desegin",changeTo:"Honekin ordezkatu",errorLoading:"Errorea gertatu da aplikazioa zerbitzaritik kargatzean: %s.",ieSpellDownload:"Zuzentzaile ortografikoa ez dago instalatuta. Deskargatu nahi duzu?",manyChanges:"Zuzenketa ortografikoa bukatuta: %1 hitz aldatu dira",noChanges:"Zuzenketa ortografikoa bukatuta: Ez da ezer aldatu",noMispell:"Zuzenketa ortografikoa bukatuta: Akatsik ez",
noSuggestions:"- Iradokizunik ez -",notAvailable:"Barkatu baina momentu honetan zerbitzua ez dago erabilgarri.",notInDic:"Ez dago hiztegian",oneChange:"Zuzenketa ortografikoa bukatuta: Hitz bat aldatu da",progress:"Zuzenketa ortografikoa martxan...",title:"Ortografia zuzenketa",toolbar:"Ortografia"});

View File

@ -0,0 +1,2 @@
CKEDITOR.plugins.setLang("wsc","fa",{btnIgnore:"چشمپوشی",btnIgnoreAll:"چشمپوشی همه",btnReplace:"جایگزینی",btnReplaceAll:"جایگزینی همه",btnUndo:"واچینش",changeTo:"تغییر به",errorLoading:"خطا در بارگیری برنامه خدمات میزبان: %s.",ieSpellDownload:"بررسی کنندهٴ املا نصب نشده است. آیا میخواهید آن را هماکنون دریافت کنید؟",manyChanges:"بررسی املا انجام شد. %1 واژه تغییر یافت",noChanges:"بررسی املا انجام شد. هیچ واژهای تغییر نیافت",noMispell:"بررسی املا انجام شد. هیچ غلط املائی یافت نشد",noSuggestions:"- پیشنهادی نیست -",
notAvailable:"با عرض پوزش خدمات الان در دسترس نیستند.",notInDic:"در واژه~نامه یافت نشد",oneChange:"بررسی املا انجام شد. یک واژه تغییر یافت",progress:"بررسی املا در حال انجام...",title:"بررسی املا",toolbar:"بررسی املا"});

View File

@ -0,0 +1,2 @@
CKEDITOR.plugins.setLang("wsc","fi",{btnIgnore:"Jätä huomioimatta",btnIgnoreAll:"Jätä kaikki huomioimatta",btnReplace:"Korvaa",btnReplaceAll:"Korvaa kaikki",btnUndo:"Kumoa",changeTo:"Vaihda",errorLoading:"Virhe ladattaessa oikolukupalvelua isännältä: %s.",ieSpellDownload:"Oikeinkirjoituksen tarkistusta ei ole asennettu. Haluatko ladata sen nyt?",manyChanges:"Tarkistus valmis: %1 sanaa muutettiin",noChanges:"Tarkistus valmis: Yhtään sanaa ei muutettu",noMispell:"Tarkistus valmis: Ei virheitä",noSuggestions:"Ei ehdotuksia",
notAvailable:"Valitettavasti oikoluku ei ole käytössä tällä hetkellä.",notInDic:"Ei sanakirjassa",oneChange:"Tarkistus valmis: Yksi sana muutettiin",progress:"Tarkistus käynnissä...",title:"Oikoluku",toolbar:"Tarkista oikeinkirjoitus"});

View File

@ -0,0 +1,2 @@
CKEDITOR.plugins.setLang("wsc","fo",{btnIgnore:"Forfjóna",btnIgnoreAll:"Forfjóna alt",btnReplace:"Yvirskriva",btnReplaceAll:"Yvirskriva alt",btnUndo:"Angra",changeTo:"Broyt til",errorLoading:"Feilur við innlesing av application service host: %s.",ieSpellDownload:"Rættstavarin er ikki tøkur í tekstviðgeranum. Vilt tú heinta hann nú?",manyChanges:"Rættstavarin liðugur: %1 orð broytt",noChanges:"Rættstavarin liðugur: Einki orð varð broytt",noMispell:"Rættstavarin liðugur: Eingin feilur funnin",noSuggestions:"- Einki uppskot -",
notAvailable:"Tíverri, ikki tøkt í løtuni.",notInDic:"Finst ikki í orðabókini",oneChange:"Rættstavarin liðugur: Eitt orð er broytt",progress:"Rættstavarin arbeiðir...",title:"Kanna stavseting",toolbar:"Kanna stavseting"});

View File

@ -0,0 +1,2 @@
CKEDITOR.plugins.setLang("wsc","fr-ca",{btnIgnore:"Ignorer",btnIgnoreAll:"Ignorer tout",btnReplace:"Remplacer",btnReplaceAll:"Remplacer tout",btnUndo:"Annuler",changeTo:"Changer en",errorLoading:"Error loading application service host: %s.",ieSpellDownload:"Le Correcteur d'orthographe n'est pas installé. Souhaitez-vous le télécharger maintenant?",manyChanges:"Vérification d'orthographe terminée: %1 mots modifiés",noChanges:"Vérification d'orthographe terminée: Pas de modifications",noMispell:"Vérification d'orthographe terminée: pas d'erreur trouvée",
noSuggestions:"- Pas de suggestion -",notAvailable:"Sorry, but service is unavailable now.",notInDic:"Pas dans le dictionnaire",oneChange:"Vérification d'orthographe terminée: Un mot modifié",progress:"Vérification d'orthographe en cours...",title:"Spell Checker",toolbar:"Orthographe"});

View File

@ -0,0 +1,2 @@
CKEDITOR.plugins.setLang("wsc","fr",{btnIgnore:"Ignorer",btnIgnoreAll:"Ignorer tout",btnReplace:"Remplacer",btnReplaceAll:"Remplacer tout",btnUndo:"Annuler",changeTo:"Modifier pour",errorLoading:"Erreur du chargement du service depuis l'hôte : %s.",ieSpellDownload:"La vérification d'orthographe n'est pas installée. Voulez-vous la télécharger maintenant?",manyChanges:"Vérification de l'orthographe terminée : %1 mots corrigés.",noChanges:"Vérification de l'orthographe terminée : Aucun mot corrigé.",
noMispell:"Vérification de l'orthographe terminée : aucune erreur trouvée.",noSuggestions:"- Aucune suggestion -",notAvailable:"Désolé, le service est indisponible actuellement.",notInDic:"N'existe pas dans le dictionnaire.",oneChange:"Vérification de l'orthographe terminée : Un seul mot corrigé.",progress:"Vérification de l'orthographe en cours...",title:"Vérifier l'orthographe",toolbar:"Vérifier l'orthographe"});

Some files were not shown because too many files have changed in this diff Show More