force allow cors

This commit is contained in:
Hesabix 2023-12-30 06:45:30 +00:00
parent 82055b5b60
commit 9daa4bdad0
69 changed files with 5881 additions and 5791 deletions

View file

@ -22,3 +22,7 @@ MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
###> symfony/mailer ### ###> symfony/mailer ###
MAILER_DSN=null://null MAILER_DSN=null://null
###< symfony/mailer ### ###< symfony/mailer ###
###> nelmio/cors-bundle ###
CORS_ALLOW_ORIGIN='*'
###< nelmio/cors-bundle ###

View file

@ -18,6 +18,7 @@
"gregwar/captcha-bundle": "^2.2", "gregwar/captcha-bundle": "^2.2",
"melipayamak/php": "1.0.0", "melipayamak/php": "1.0.0",
"mpdf/mpdf": "^8.2", "mpdf/mpdf": "^8.2",
"nelmio/cors-bundle": "^2.4",
"phpdocumentor/reflection-docblock": "^5.3", "phpdocumentor/reflection-docblock": "^5.3",
"phpoffice/phpspreadsheet": "^1.29", "phpoffice/phpspreadsheet": "^1.29",
"phpstan/phpdoc-parser": "^1.16", "phpstan/phpdoc-parser": "^1.16",

View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "d64efcccc20c485b523c63e628808194", "content-hash": "bf4224d6036db7f5892091d37f3160dc",
"packages": [ "packages": [
{ {
"name": "doctrine/annotations", "name": "doctrine/annotations",
@ -2441,6 +2441,68 @@
], ],
"time": "2023-03-08T13:26:56+00:00" "time": "2023-03-08T13:26:56+00:00"
}, },
{
"name": "nelmio/cors-bundle",
"version": "2.4.0",
"source": {
"type": "git",
"url": "https://github.com/nelmio/NelmioCorsBundle.git",
"reference": "78fcdb91f76b080a1008133def9c7f613833933d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nelmio/NelmioCorsBundle/zipball/78fcdb91f76b080a1008133def9c7f613833933d",
"reference": "78fcdb91f76b080a1008133def9c7f613833933d",
"shasum": ""
},
"require": {
"psr/log": "^1.0 || ^2.0 || ^3.0",
"symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0"
},
"require-dev": {
"mockery/mockery": "^1.3.6",
"symfony/phpunit-bridge": "^5.4 || ^6.0 || ^7.0"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "2.x-dev"
}
},
"autoload": {
"psr-4": {
"Nelmio\\CorsBundle\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nelmio",
"homepage": "http://nelm.io"
},
{
"name": "Symfony Community",
"homepage": "https://github.com/nelmio/NelmioCorsBundle/contributors"
}
],
"description": "Adds CORS (Cross-Origin Resource Sharing) headers support in your Symfony application",
"keywords": [
"api",
"cors",
"crossdomain"
],
"support": {
"issues": "https://github.com/nelmio/NelmioCorsBundle/issues",
"source": "https://github.com/nelmio/NelmioCorsBundle/tree/2.4.0"
},
"time": "2023-11-30T16:41:19+00:00"
},
{ {
"name": "paragonie/random_compat", "name": "paragonie/random_compat",
"version": "v9.99.100", "version": "v9.99.100",
@ -10864,5 +10926,5 @@
"ext-iconv": "*" "ext-iconv": "*"
}, },
"platform-dev": [], "platform-dev": [],
"plugin-api-version": "2.6.0" "plugin-api-version": "2.2.0"
} }

View file

@ -14,4 +14,5 @@ return [
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Gregwar\CaptchaBundle\GregwarCaptchaBundle::class => ['all' => true], Gregwar\CaptchaBundle\GregwarCaptchaBundle::class => ['all' => true],
FOS\CKEditorBundle\FOSCKEditorBundle::class => ['all' => true], FOS\CKEditorBundle\FOSCKEditorBundle::class => ['all' => true],
Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true],
]; ];

View file

@ -0,0 +1,10 @@
nelmio_cors:
defaults:
origin_regex: false
allow_origin: ['%env(CORS_ALLOW_ORIGIN)%']
allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE']
allow_headers: ['*']
expose_headers: ['Link']
max_age: 3600
paths:
'^/': null

View file

@ -41,11 +41,10 @@ class ApiKeyAuthenticator extends AbstractAuthenticator
public function authenticate(Request $request): Passport public function authenticate(Request $request): Passport
{ {
$apiToken = $request->headers->get('X-AUTH-TOKEN'); $apiToken = $request->headers->get('X-AUTH-TOKEN');
if (null == $apiToken) { if (null == $apiToken) {
// The token header was empty, authentication fails with HTTP Status // The token header was empty, authentication fails with HTTP Status
// Code 401 "Unauthorized" // Code 401 "Unauthorized"
//throw new CustomUserMessageAuthenticationException('No API token provided'); throw new CustomUserMessageAuthenticationException('No API token provided');
} }
@ -68,6 +67,8 @@ class ApiKeyAuthenticator extends AbstractAuthenticator
public function onAuthenticationFailure(Request $request, AuthenticationException $exception): ?Response public function onAuthenticationFailure(Request $request, AuthenticationException $exception): ?Response
{ {
echo 55;
die();
$data = [ $data = [
// you may want to customize or obfuscate the message first // you may want to customize or obfuscate the message first
'message' => strtr($exception->getMessageKey(), $exception->getMessageData()) 'message' => strtr($exception->getMessageKey(), $exception->getMessageData())

View file

@ -50,6 +50,18 @@
"gregwar/captcha-bundle": { "gregwar/captcha-bundle": {
"version": "v2.2.0" "version": "v2.2.0"
}, },
"nelmio/cors-bundle": {
"version": "2.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "1.5",
"ref": "6bea22e6c564fba3a1391615cada1437d0bde39c"
},
"files": [
"config/packages/nelmio_cors.yaml"
]
},
"phpunit/phpunit": { "phpunit/phpunit": {
"version": "9.6", "version": "9.6",
"recipe": { "recipe": {

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,10 +1,10 @@
# Reporting a security issues # Reporting a security issues
If you believe you have found a security issue in the CKEditor 4 software, please contact us immediately. 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: When reporting a potential security problem, please bear this in mind:
* Make sure to provide as many details as possible about the vulnerability. * 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. * 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. 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

@ -1,208 +1,208 @@
/* /*
Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model. CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/ */
body body
{ {
/* Font */ /* Font */
/* Emoji fonts are added to visualise them nicely in Internet Explorer. */ /* Emoji fonts are added to visualise them nicely in Internet Explorer. */
font-family: sans-serif, Arial, Verdana, "Trebuchet MS", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-family: sans-serif, Arial, Verdana, "Trebuchet MS", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-size: 12px; font-size: 12px;
/* Text color */ /* Text color */
color: #333; color: #333;
/* Remove the background color to make it transparent. */ /* Remove the background color to make it transparent. */
background-color: #fff; background-color: #fff;
margin: 20px; margin: 20px;
} }
.cke_editable .cke_editable
{ {
font-size: 13px; font-size: 13px;
line-height: 1.6; line-height: 1.6;
/* Fix for missing scrollbars with RTL texts. (#10488) */ /* Fix for missing scrollbars with RTL texts. (#10488) */
word-wrap: break-word; word-wrap: break-word;
} }
blockquote blockquote
{ {
font-style: italic; font-style: italic;
font-family: Georgia, Times, "Times New Roman", serif; font-family: Georgia, Times, "Times New Roman", serif;
padding: 2px 0; padding: 2px 0;
border-style: solid; border-style: solid;
border-color: #ccc; border-color: #ccc;
border-width: 0; border-width: 0;
} }
.cke_contents_ltr blockquote .cke_contents_ltr blockquote
{ {
padding-left: 20px; padding-left: 20px;
padding-right: 8px; padding-right: 8px;
border-left-width: 5px; border-left-width: 5px;
} }
.cke_contents_rtl blockquote .cke_contents_rtl blockquote
{ {
padding-left: 8px; padding-left: 8px;
padding-right: 20px; padding-right: 20px;
border-right-width: 5px; border-right-width: 5px;
} }
a a
{ {
color: #0782C1; color: #0782C1;
} }
ol,ul,dl ol,ul,dl
{ {
/* IE7: reset rtl list margin. (#7334) */ /* IE7: reset rtl list margin. (#7334) */
*margin-right: 0px; *margin-right: 0px;
/* Preserved spaces for list items with text direction different than the list. (#6249,#8049)*/ /* Preserved spaces for list items with text direction different than the list. (#6249,#8049)*/
padding: 0 40px; padding: 0 40px;
} }
h1,h2,h3,h4,h5,h6 h1,h2,h3,h4,h5,h6
{ {
font-weight: normal; font-weight: normal;
line-height: 1.2; line-height: 1.2;
} }
hr hr
{ {
border: 0px; border: 0px;
border-top: 1px solid #ccc; border-top: 1px solid #ccc;
} }
img.right img.right
{ {
border: 1px solid #ccc; border: 1px solid #ccc;
float: right; float: right;
margin-left: 15px; margin-left: 15px;
padding: 5px; padding: 5px;
} }
img.left img.left
{ {
border: 1px solid #ccc; border: 1px solid #ccc;
float: left; float: left;
margin-right: 15px; margin-right: 15px;
padding: 5px; padding: 5px;
} }
pre pre
{ {
white-space: pre-wrap; /* CSS 2.1 */ white-space: pre-wrap; /* CSS 2.1 */
word-wrap: break-word; /* IE7 */ word-wrap: break-word; /* IE7 */
-moz-tab-size: 4; -moz-tab-size: 4;
tab-size: 4; tab-size: 4;
} }
.marker .marker
{ {
background-color: Yellow; background-color: Yellow;
} }
span[lang] span[lang]
{ {
font-style: italic; font-style: italic;
} }
figure figure
{ {
text-align: center; text-align: center;
outline: solid 1px #ccc; outline: solid 1px #ccc;
background: rgba(0,0,0,0.05); background: rgba(0,0,0,0.05);
padding: 10px; padding: 10px;
margin: 10px 20px; margin: 10px 20px;
display: inline-block; display: inline-block;
} }
figure > figcaption figure > figcaption
{ {
text-align: center; text-align: center;
display: block; /* For IE8 */ display: block; /* For IE8 */
} }
a > img { a > img {
padding: 1px; padding: 1px;
margin: 1px; margin: 1px;
border: none; border: none;
outline: 1px solid #0782C1; outline: 1px solid #0782C1;
} }
/* Widget Styles */ /* Widget Styles */
.code-featured .code-featured
{ {
border: 5px solid red; border: 5px solid red;
} }
.math-featured .math-featured
{ {
padding: 20px; padding: 20px;
box-shadow: 0 0 2px rgba(200, 0, 0, 1); box-shadow: 0 0 2px rgba(200, 0, 0, 1);
background-color: rgba(255, 0, 0, 0.05); background-color: rgba(255, 0, 0, 0.05);
margin: 10px; margin: 10px;
} }
.image-clean .image-clean
{ {
border: 0; border: 0;
background: none; background: none;
padding: 0; padding: 0;
} }
.image-clean > figcaption .image-clean > figcaption
{ {
font-size: .9em; font-size: .9em;
text-align: right; text-align: right;
} }
.image-grayscale .image-grayscale
{ {
background-color: white; background-color: white;
color: #666; color: #666;
} }
.image-grayscale img, img.image-grayscale .image-grayscale img, img.image-grayscale
{ {
filter: grayscale(100%); filter: grayscale(100%);
} }
.embed-240p .embed-240p
{ {
max-width: 426px; max-width: 426px;
max-height: 240px; max-height: 240px;
margin:0 auto; margin:0 auto;
} }
.embed-360p .embed-360p
{ {
max-width: 640px; max-width: 640px;
max-height: 360px; max-height: 360px;
margin:0 auto; margin:0 auto;
} }
.embed-480p .embed-480p
{ {
max-width: 854px; max-width: 854px;
max-height: 480px; max-height: 480px;
margin:0 auto; margin:0 auto;
} }
.embed-720p .embed-720p
{ {
max-width: 1280px; max-width: 1280px;
max-height: 720px; max-height: 720px;
margin:0 auto; margin:0 auto;
} }
.embed-1080p .embed-1080p
{ {
max-width: 1920px; max-width: 1920px;
max-height: 1080px; max-height: 1080px;
margin:0 auto; margin:0 auto;
} }

View file

@ -1,25 +1,25 @@
Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model. CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
cs.js Found: 30 Missing: 0 cs.js Found: 30 Missing: 0
cy.js Found: 30 Missing: 0 cy.js Found: 30 Missing: 0
da.js Found: 12 Missing: 18 da.js Found: 12 Missing: 18
de.js Found: 30 Missing: 0 de.js Found: 30 Missing: 0
el.js Found: 25 Missing: 5 el.js Found: 25 Missing: 5
eo.js Found: 30 Missing: 0 eo.js Found: 30 Missing: 0
fa.js Found: 30 Missing: 0 fa.js Found: 30 Missing: 0
fi.js Found: 30 Missing: 0 fi.js Found: 30 Missing: 0
fr.js Found: 30 Missing: 0 fr.js Found: 30 Missing: 0
gu.js Found: 12 Missing: 18 gu.js Found: 12 Missing: 18
he.js Found: 30 Missing: 0 he.js Found: 30 Missing: 0
it.js Found: 30 Missing: 0 it.js Found: 30 Missing: 0
mk.js Found: 5 Missing: 25 mk.js Found: 5 Missing: 25
nb.js Found: 30 Missing: 0 nb.js Found: 30 Missing: 0
nl.js Found: 30 Missing: 0 nl.js Found: 30 Missing: 0
no.js Found: 30 Missing: 0 no.js Found: 30 Missing: 0
pt-br.js Found: 30 Missing: 0 pt-br.js Found: 30 Missing: 0
ro.js Found: 6 Missing: 24 ro.js Found: 6 Missing: 24
tr.js Found: 30 Missing: 0 tr.js Found: 30 Missing: 0
ug.js Found: 27 Missing: 3 ug.js Found: 27 Missing: 3
vi.js Found: 6 Missing: 24 vi.js Found: 6 Missing: 24
zh-cn.js Found: 30 Missing: 0 zh-cn.js Found: 30 Missing: 0

View file

@ -1,20 +1,20 @@
/** /**
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
* CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model. * CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/ */
.cke_colordialog_colorcell { .cke_colordialog_colorcell {
width: 12px; /* All cells have equal width which depends on parent width (in this case table parent). Width works more like max-width. */ width: 12px; /* All cells have equal width which depends on parent width (in this case table parent). Width works more like max-width. */
height: 14px; height: 14px;
padding: 1px; /* Padding is replaced by border for focused cells. Prevents 'jumping' when adding borders. */ padding: 1px; /* Padding is replaced by border for focused cells. Prevents 'jumping' when adding borders. */
} }
.cke_colordialog_colorcell.cke_colordialog_focused_light, .cke_colordialog_colorcell.cke_colordialog_focused_light,
.cke_colordialog_colorcell.cke_colordialog_focused_dark { .cke_colordialog_colorcell.cke_colordialog_focused_dark {
padding: 0; /* Shrink cell to allow 1px border indicating focus. */ padding: 0; /* Shrink cell to allow 1px border indicating focus. */
border: 1px dotted #000; border: 1px dotted #000;
} }
.cke_colordialog_colorcell.cke_colordialog_focused_dark { .cke_colordialog_colorcell.cke_colordialog_focused_dark {
border-color: #FFF; border-color: #FFF;
} }

View file

@ -1,45 +1,45 @@
/* /*
Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model. CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/ */
html.cke_copyformatting_active { html.cke_copyformatting_active {
min-height: 100%; min-height: 100%;
} }
/* There is no cursor in CUR format for IE/Edge as that browser /* There is no cursor in CUR format for IE/Edge as that browser
does not support custom cursor in [contenteditable] area. does not support custom cursor in [contenteditable] area.
Ticket for this issue: Ticket for this issue:
https://connect.microsoft.com/IE/feedback/details/1070215/cant-change-cursor-in-contenteditable-using-css */ https://connect.microsoft.com/IE/feedback/details/1070215/cant-change-cursor-in-contenteditable-using-css */
.cke_copyformatting_disabled, .cke_copyformatting_disabled,
.cke_copyformatting_disabled a, .cke_copyformatting_disabled a,
.cke_copyformatting_disabled .cke_editable { .cke_copyformatting_disabled .cke_editable {
cursor: url(../cursors/cursor-disabled.svg) 12 1, auto; cursor: url(../cursors/cursor-disabled.svg) 12 1, auto;
} }
.cke_copyformatting_disabled .cke_top a, .cke_copyformatting_disabled .cke_top a,
.cke_copyformatting_disabled .cke_bottom a { .cke_copyformatting_disabled .cke_bottom a {
cursor: default; cursor: default;
} }
/* Added `!important` rule as a fix for overriding the cursor by the Table Resize plugin. /* Added `!important` rule as a fix for overriding the cursor by the Table Resize plugin.
The `!important` rule is used because the Table Resize plugin creates a `<div>` which changes the cursor using inlined styles. */ The `!important` rule is used because the Table Resize plugin creates a `<div>` which changes the cursor using inlined styles. */
.cke_copyformatting_active, .cke_copyformatting_active,
.cke_copyformatting_active.cke_editable, .cke_copyformatting_active.cke_editable,
.cke_copyformatting_active .cke_editable, .cke_copyformatting_active .cke_editable,
.cke_copyformatting_active a, .cke_copyformatting_active a,
.cke_copyformatting_active table, .cke_copyformatting_active table,
.cke_copyformatting_active div[data-cke-temp], .cke_copyformatting_active div[data-cke-temp],
.cke_copyformatting_tableresize_cursor div[data-cke-temp] { .cke_copyformatting_tableresize_cursor div[data-cke-temp] {
cursor: url(../cursors/cursor.svg) 12 1, auto !important; cursor: url(../cursors/cursor.svg) 12 1, auto !important;
} }
.cke_screen_reader_only { .cke_screen_reader_only {
position: absolute; position: absolute;
clip: rect(1px, 1px, 1px, 1px); clip: rect(1px, 1px, 1px, 1px);
padding: 0; padding: 0;
border: 0; border: 0;
height: 1px; height: 1px;
width: 1px; width: 1px;
overflow: hidden; overflow: hidden;
} }

View file

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

View file

@ -1,72 +1,72 @@
# CKEditor 4 Export to PDF Plugin Changelog # CKEditor 4 Export to PDF Plugin Changelog
## ckeditor4-plugin-exportpdf 1.0.6 ## ckeditor4-plugin-exportpdf 1.0.6
Other Changes: Other Changes:
* Updated changelog. * Updated changelog.
## ckeditor4-plugin-exportpdf 1.0.5 ## ckeditor4-plugin-exportpdf 1.0.5
Other Changes: Other Changes:
* Updated year and company name in license headers. * Updated year and company name in license headers.
## ckeditor4-plugin-exportpdf 1.0.4 ## ckeditor4-plugin-exportpdf 1.0.4
Other Changes: Other Changes:
* Updated test files. * Updated test files.
## ckeditor4-plugin-exportpdf 1.0.3 ## ckeditor4-plugin-exportpdf 1.0.3
Other Changes: Other Changes:
* Updated test files. * Updated test files.
## ckeditor4-plugin-exportpdf 1.0.2 ## ckeditor4-plugin-exportpdf 1.0.2
Other Changes: Other Changes:
* Updated year in license headers. * Updated year in license headers.
## ckeditor4-plugin-exportpdf 1.0.1 ## ckeditor4-plugin-exportpdf 1.0.1
Other Changes: 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). * 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 ## 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! 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: 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. * 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 ## ckeditor4-plugin-exportpdf 0.1.2
Other Changes: Other Changes:
* Improved [plugin API documentation](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-exportPdf_fileName). * 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). * 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 ## ckeditor4-plugin-exportpdf 0.1.1
Other Changes: 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. * 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 ## ckeditor4-plugin-exportpdf 0.1.0
The first beta release of the CKEditor 4 Export to PDF plugin. 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. 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: Available features:
* Exporting HTML content from CKEditor 4 WYSIWYG editor to PDF with a single click. * Exporting HTML content from CKEditor 4 WYSIWYG editor to PDF with a single click.
* Setting a custom name for the generated PDF file. * Setting a custom name for the generated PDF file.
* Handling relative image paths. * Handling relative image paths.
* Changing the appearance of the PDF document (like margins, text styling, custom headers and footers etc.) with custom CSS styles. * 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. * Pre-processing HTML content via synchronous and asynchronous code before the generation of the PDF file.

View file

@ -1,18 +1,18 @@
Software License Agreement Software License Agreement
========================== ==========================
**CKEditor 4 Export to PDF plugin** (https://ckeditor.com/ckeditor-4/)<br> **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. 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. 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. 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 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. 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 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. **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

@ -1,102 +1,102 @@
# CKEditor 4 Export to PDF Plugin # 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. 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. 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. 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). 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. 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) ![](https://c.cksource.com/a/1/img/npm/ckeditor4-pdf-export.gif)
## Getting Started ## Getting Started
### Using with official CKEditor 4 presets ### 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: 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 ```js
CKEDITOR.replace( 'editor', { CKEDITOR.replace( 'editor', {
extraPlugins: 'exportpdf' extraPlugins: 'exportpdf'
} ); } );
``` ```
### Installation from npm ### Installation from npm
To instal the plugin via npm, simply run: To instal the plugin via npm, simply run:
```bash ```bash
npm i ckeditor4-plugin-exportpdf 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): 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 ```js
CKEDITOR.plugins.addExternal( 'exportpdf', './node_modules/ckeditor4-plugin-exportpdf/' ); 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: 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 ```js
CKEDITOR.replace( 'editor', { CKEDITOR.replace( 'editor', {
extraPlugins: 'exportpdf' extraPlugins: 'exportpdf'
} ); } );
``` ```
### Other Installation Methods ### 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: 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) * [Custom build with online builder](https://ckeditor.com/cke4/builder)
* [Manual download](https://ckeditor.com/cke4/addon/exportpdf) * [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/). 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 ### 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: 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 ```js
CKEDITOR.replace( 'editor', { CKEDITOR.replace( 'editor', {
exportPdf_tokenUrl: 'https://example.com/cs-token-endpoint' 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 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/). This is all. If you are having trouble in setting up Export to PDF plugin, please [contact us](https://ckeditor.com/contact/).
## Features ## 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 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: The most important features are:
* Exporting HTML content from CKEditor 4 WYSIWYG editor to PDF with a single click. * 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. * [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). * [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. * [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. * [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 ## 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`. 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 ## 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. 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 ## License
**CKEditor 4 Export to PDF plugin** (https://ckeditor.com/ckeditor-4/)<br> **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. 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. 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. For more details about available licensing options please contact us at sales@cksource.com.
### Trademarks ### 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. **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

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

View file

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

View file

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

View file

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

View file

@ -1,148 +1,148 @@
<div id="editor"> <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> <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> <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>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>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> <p>Please find attached the full schedule of the event.</p>
<blockquote> <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>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> <p>Angelina Calvino, food journalist</p>
</blockquote> </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>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>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><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><span style="font-size:16px"><strong>Victoria Valc</strong></span></p>
<p><strong>Event Manager<br /> <p><strong>Event Manager<br />
Bilancino Hotel</strong></p> Bilancino Hotel</strong></p>
<p>&nbsp;</p> <p>&nbsp;</p>
<div style="page-break-after: always"><span style="display:none">&nbsp;</span></div> <div style="page-break-after: always"><span style="display:none">&nbsp;</span></div>
<p>&nbsp;</p> <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> <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"> <table border="1" cellspacing="0" style="border-collapse:collapse; width:597px">
<thead> <thead>
<tr> <tr>
<th colspan="2" style="background-color:#999999"><span style="color:#ffffff">Saturday, July 14</span></th> <th colspan="2" style="background-color:#999999"><span style="color:#ffffff">Saturday, July 14</span></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td style="background-color:#e6e6e6; text-align:center">9:30 AM - 11:30 AM</td> <td style="background-color:#e6e6e6; text-align:center">9:30 AM - 11:30 AM</td>
<td> <td>
<p><strong>Americano vs. Brewed - &ldquo;know your coffee&rdquo;</strong> with:&nbsp;</p> <p><strong>Americano vs. Brewed - &ldquo;know your coffee&rdquo;</strong> with:&nbsp;</p>
<ul> <ul>
<li>Giulia Bianchi</li> <li>Giulia Bianchi</li>
<li>Stefano Garau</li> <li>Stefano Garau</li>
<li>Giuseppe Russo</li> <li>Giuseppe Russo</li>
</ul> </ul>
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="background-color:#e6e6e6; text-align:center">1:00 PM - 3:00 PM</td> <td style="background-color:#e6e6e6; text-align:center">1:00 PM - 3:00 PM</td>
<td> <td>
<p><strong>Pappardelle al pomodoro</strong> - live cooking&nbsp;<sup>1</sup></p> <p><strong>Pappardelle al pomodoro</strong> - live cooking&nbsp;<sup>1</sup></p>
<p>Incorporate the freshest ingredients&nbsp;<br /> <p>Incorporate the freshest ingredients&nbsp;<br />
with Rita Fresco</p> with Rita Fresco</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="background-color:#e6e6e6; text-align:center">5:00 PM - 8:00 PM</td> <td style="background-color:#e6e6e6; text-align:center">5:00 PM - 8:00 PM</td>
<td> <td>
<p><strong>Tuscan vineyards at a glance</strong> - wine-tasting&nbsp;<br /> <p><strong>Tuscan vineyards at a glance</strong> - wine-tasting&nbsp;<br />
with Frederico Riscoli</p> with Frederico Riscoli</p>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<p>&nbsp;</p> <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><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> <p>&nbsp;</p>
<hr> <hr>
<h2 style="text-align: center;"><span style="color:#2980b9"><span style="font-family:Georgia,serif">Driving directions from the airport</span></span></h2> <h2 style="text-align: center;"><span style="color:#2980b9"><span style="font-family:Georgia,serif">Driving directions from the airport</span></span></h2>
<ol> <ol>
<li>Head southeast on R138&nbsp;toward Nassau St.</li> <li>Head southeast on R138&nbsp;toward Nassau St.</li>
<li>Follow R138 and R148 to Bridgefoot St/R804. <li>Follow R138 and R148 to Bridgefoot St/R804.
<ol> <ol>
<li>Use the left 2 lanes to turn slightly left onto Lincoln Pl/R138.</li> <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>Turn left onto Westland Row/R118/R138.</li>
<li>Use any lane to turn left onto Pearse St/R118/R138/R802.</li> <li>Use any lane to turn left onto Pearse St/R118/R138/R802.</li>
<li>Continue to follow R138/R802.</li> <li>Continue to follow R138/R802.</li>
</ol> </ol>
</li> </li>
<li>Turn left onto Burgh Quay/George&#39;s Quay/R105/R138.</li> <li>Turn left onto Burgh Quay/George&#39;s Quay/R105/R138.</li>
<li>Continue onto Aston Quay/R148. <li>Continue onto Aston Quay/R148.
<ul> <ul>
<li>Continue to follow R148.</li> <li>Continue to follow R148.</li>
</ul> </ul>
</li> </li>
<li>Turn left onto Bridgefoot St/R804. <li>Turn left onto Bridgefoot St/R804.
<ul> <ul>
<li>Continue to follow R804.</li> <li>Continue to follow R804.</li>
</ul> </ul>
</li> </li>
<li>After approximately 2 minutes, Bilancino Hotel will be on your left.</li> <li>After approximately 2 minutes, Bilancino Hotel will be on your left.</li>
</ol> </ol>
<p>&nbsp;</p> <p>&nbsp;</p>
</div> </div>
<div id="preview"> <div id="preview">
<style> <style>
#preview iframe { #preview iframe {
width: 840px; width: 840px;
height: 500px; height: 500px;
} }
</style> </style>
<h2>Document preview (based on send HTML and CSS)</h2> <h2>Document preview (based on send HTML and CSS)</h2>
</div> </div>
<script> <script>
exportPdfUtils.initManualTest(); exportPdfUtils.initManualTest();
var editor = CKEDITOR.replace( 'editor', exportPdfUtils.getDefaultConfig( 'manual', { var editor = CKEDITOR.replace( 'editor', exportPdfUtils.getDefaultConfig( 'manual', {
width: 840, width: 840,
height: 400 height: 400
} ) ); } ) );
editor.on( 'exportPdf', function( evt ) { editor.on( 'exportPdf', function( evt ) {
var oldIframe = document.querySelector( '#preview iframe' ), var oldIframe = document.querySelector( '#preview iframe' ),
html; html;
if ( oldIframe && oldIframe.parentNode ) { if ( oldIframe && oldIframe.parentNode ) {
oldIframe.parentNode.removeChild( oldIframe ); oldIframe.parentNode.removeChild( oldIframe );
} }
// Align iframe HTML with the one on the endpoint side by adding explicit encoding and DOCTYPE. // 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>'; 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' ); var iframe = document.createElement( 'iframe' );
document.querySelector( '#preview' ).appendChild( iframe ); document.querySelector( '#preview' ).appendChild( iframe );
iframe.contentWindow.document.open(); iframe.contentWindow.document.open();
iframe.contentWindow.document.write( html ); iframe.contentWindow.document.write( html );
iframe.contentWindow.document.close(); iframe.contentWindow.document.close();
}, null, null, 16 ); }, null, null, 16 );
</script> </script>

View file

@ -1,12 +1,12 @@
@bender-tags: exportpdf, feature, 17 @bender-tags: exportpdf, feature, 17
@bender-ui: collapsed @bender-ui: collapsed
@bender-include: ../_helpers/tools.js @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 @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. Click `Export to PDF` button (the one next to the `Source` button).
1. Wait for the PDF to download and examine it. 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>. 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. 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

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,29 +1,29 @@
<div id="editor1"> <div id="editor1">
<p>"Lorem ipsum dolor sit amet, consectetur adipiscing elit, <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, 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 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. 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." Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
</p> </p>
</div> </div>
<div id="editor2"> <div id="editor2">
<p>"Lorem ipsum dolor sit amet, consectetur adipiscing elit, <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, 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 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. 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." Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
</p> </p>
</div> </div>
<script> <script>
exportPdfUtils.initManualTest(); exportPdfUtils.initManualTest();
CKEDITOR.replace( 'editor1', exportPdfUtils.getDefaultConfig( 'manual' ) ); CKEDITOR.replace( 'editor1', exportPdfUtils.getDefaultConfig( 'manual' ) );
CKEDITOR.replace( 'editor2', exportPdfUtils.getDefaultConfig( 'manual', { CKEDITOR.replace( 'editor2', exportPdfUtils.getDefaultConfig( 'manual', {
exportPdf_options: { exportPdf_options: {
format: 'A6' format: 'A6'
} }
} ) ); } ) );
</script> </script>

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,13 +1,13 @@
<script> <script>
// Prevent from DOM clobbering. // Prevent from DOM clobbering.
if ( typeof window.opener._cke_htmlToLoad == 'string' ) { if ( typeof window.opener._cke_htmlToLoad == 'string' ) {
var doc = document; var doc = document;
doc.open(); doc.open();
doc.write( window.opener._cke_htmlToLoad ); doc.write( window.opener._cke_htmlToLoad );
doc.close(); doc.close();
delete window.opener._cke_htmlToLoad; delete window.opener._cke_htmlToLoad;
} }
</script> </script>

View file

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

View file

@ -1,4 +1,4 @@
SCAYT plugin for CKEditor 4 Changelog SCAYT plugin for CKEditor 4 Changelog
==================== ====================
The full changelog of the SCAYT plugin for CKEditor 4 can be found on our website under the [release notes](https://webspellchecker.com/release-notes/) section. The full changelog of the SCAYT plugin for CKEditor 4 can be found on our website under the [release notes](https://webspellchecker.com/release-notes/) section.

View file

@ -1,28 +1,28 @@
Software License Agreement Software License Agreement
========================== ==========================
**CKEditor SCAYT Plugin** **CKEditor SCAYT Plugin**
Copyright &copy; 2012, [CKSource](http://cksource.com) - Frederico Knabben. All rights reserved. Copyright &copy; 2012, [CKSource](http://cksource.com) - Frederico Knabben. All rights reserved.
Licensed under the terms of any of the following licenses at your choice: Licensed under the terms of any of the following licenses at your choice:
* GNU General Public License Version 2 or later (the "GPL"): * GNU General Public License Version 2 or later (the "GPL"):
http://www.gnu.org/licenses/gpl.html http://www.gnu.org/licenses/gpl.html
* GNU Lesser General Public License Version 2.1 or later (the "LGPL"): * GNU Lesser General Public License Version 2.1 or later (the "LGPL"):
http://www.gnu.org/licenses/lgpl.html http://www.gnu.org/licenses/lgpl.html
* Mozilla Public License Version 1.1 or later (the "MPL"): * Mozilla Public License Version 1.1 or later (the "MPL"):
http://www.mozilla.org/MPL/MPL-1.1.html http://www.mozilla.org/MPL/MPL-1.1.html
You are not required to, but if you want to explicitly declare the license you have chosen to be bound to when using, reproducing, modifying and distributing this software, just include a text file titled "legal.txt" in your version of this software, indicating your license choice. You are not required to, but if you want to explicitly declare the license you have chosen to be bound to when using, reproducing, modifying and distributing this software, just include a text file titled "legal.txt" in your version of this software, indicating your license choice.
Sources of Intellectual Property Included in this plugin Sources of Intellectual Property Included in this plugin
-------------------------------------------------------- --------------------------------------------------------
Where not otherwise indicated, all plugin content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, the plugin will incorporate work done by developers outside of CKSource with their express permission. Where not otherwise indicated, all plugin content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, the plugin will incorporate work done by developers outside of CKSource with their express permission.
Trademarks Trademarks
---------- ----------
CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders. CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.

View file

@ -1,81 +1,81 @@
SCAYT plugin for CKEditor 4 SCAYT plugin for CKEditor 4
===================== =====================
SpellCheckAsYouType (SCAYT) instantly underlines spelling and grammar errors while users type. To correct spelling or grammar error, a user simply needs to right-click the marked word to select from suggested corrections. SpellCheckAsYouType (SCAYT) instantly underlines spelling and grammar errors while users type. To correct spelling or grammar error, a user simply needs to right-click the marked word to select from suggested corrections.
![SCAYT Plugin for CKEditor 4 View](https://webspellchecker.com/app/images/scayt_plugin_for_ckeditor4.png) ![SCAYT Plugin for CKEditor 4 View](https://webspellchecker.com/app/images/scayt_plugin_for_ckeditor4.png)
This plugin brings the multi-language SCAYT functionality into CKEditor 4. It is integrated by default starting with [Standard Package of CKEditor 4](https://ckeditor.com/ckeditor-4/download/). You can find it on the CKEditor 4 toolbar panel under the ABC button (Enable SCAYT). This plugin brings the multi-language SCAYT functionality into CKEditor 4. It is integrated by default starting with [Standard Package of CKEditor 4](https://ckeditor.com/ckeditor-4/download/). You can find it on the CKEditor 4 toolbar panel under the ABC button (Enable SCAYT).
If your version of CKEditor doesnt have SCAYT built-in, you can easily add it by following the steps outlined in the Get Started section. If your version of CKEditor doesnt have SCAYT built-in, you can easily add it by following the steps outlined in the Get Started section.
The default version of SCAYT plugin for CKEditor 4 is using the free services of WebSpellChecker. It is provided with a banner ad and has some [limitations](https://docs.webspellchecker.net/display/WebSpellCheckerCloud/Free+and+Paid+WebSpellChecker+Cloud+Services+Comparison+for+CKEditor). The default version of SCAYT plugin for CKEditor 4 is using the free services of WebSpellChecker. It is provided with a banner ad and has some [limitations](https://docs.webspellchecker.net/display/WebSpellCheckerCloud/Free+and+Paid+WebSpellChecker+Cloud+Services+Comparison+for+CKEditor).
To lift the limitations and get rid of the banner, [obtain a license](https://webspellchecker.com/wsc-scayt-ckeditor4/#pricing). Depending on your needs, you can choose a Cloud-based or Server (self-hosted) solution. To lift the limitations and get rid of the banner, [obtain a license](https://webspellchecker.com/wsc-scayt-ckeditor4/#pricing). Depending on your needs, you can choose a Cloud-based or Server (self-hosted) solution.
Demo Demo
------------ ------------
SCAYT plugin for CKEditor 4: https://webspellchecker.com/wsc-scayt-ckeditor4/ SCAYT plugin for CKEditor 4: https://webspellchecker.com/wsc-scayt-ckeditor4/
Supported languages Supported languages
------------ ------------
The SCAYT plugin for CKEditor as a part of the free services supports the next languages for check spelling: American English, British English, Canadian English, Canadian French, Danish, Dutch, Finnish, French, German, Greek, Italian, Norwegian Bokmal, Spanish, Swedish. The SCAYT plugin for CKEditor as a part of the free services supports the next languages for check spelling: American English, British English, Canadian English, Canadian French, Danish, Dutch, Finnish, French, German, Greek, Italian, Norwegian Bokmal, Spanish, Swedish.
There are also additional languages and specialized dictionaries available for a commercial license, you can check the full list [here](https://webspellchecker.com/additional-dictionaries/). There are also additional languages and specialized dictionaries available for a commercial license, you can check the full list [here](https://webspellchecker.com/additional-dictionaries/).
Get started Get started
------------ ------------
1. Clone/copy this repository contents in a new "plugins/scayt" folder in your CKEditor installation. 1. Clone/copy this repository contents in a new "plugins/scayt" folder in your CKEditor installation.
2. Enable the "scayt" plugin in the CKEditor configuration file (config.js): 2. Enable the "scayt" plugin in the CKEditor configuration file (config.js):
config.extraPlugins = 'scayt'; config.extraPlugins = 'scayt';
That's all. SCAYT will appear on the editor toolbar under the ABC button and will be ready to use. That's all. SCAYT will appear on the editor toolbar under the ABC button and will be ready to use.
Supported browsers Supported browsers
------- -------
This is the list of officially supported browsers for the SCAYT plugin for CKEditor 4. SCAYT may also work in other browsers and environments but we unable to check all of them and guarantee proper work. This is the list of officially supported browsers for the SCAYT plugin for CKEditor 4. SCAYT may also work in other browsers and environments but we unable to check all of them and guarantee proper work.
* Chrome (the latest) * Chrome (the latest)
* Firefox (the latest) * Firefox (the latest)
* Safari (the latest) * Safari (the latest)
* MS Edge (the latest) * MS Edge (the latest)
* Internet Explorer 8.0 (limited support) * Internet Explorer 8.0 (limited support)
* Internet Explorer 9.0+ (close to full support) * Internet Explorer 9.0+ (close to full support)
Note: All browsers are to be supported for web pages that work in Standards Mode. Note: All browsers are to be supported for web pages that work in Standards Mode.
Resources Resources
------- -------
* Demo: https://webspellchecker.com/wsc-scayt-ckeditor4/ * Demo: https://webspellchecker.com/wsc-scayt-ckeditor4/
* Documentation: https://docs.webspellchecker.net/ * Documentation: https://docs.webspellchecker.net/
* YouTube video “How to Configure CKEditor 4 and SpellCheckAsYouType Plugin”: https://youtu.be/D0ahmVjYBq8 * YouTube video “How to Configure CKEditor 4 and SpellCheckAsYouType Plugin”: https://youtu.be/D0ahmVjYBq8
* Term of Service: https://webspellchecker.com/terms-of-service/ * Term of Service: https://webspellchecker.com/terms-of-service/
* CKEditors How-Tos for SCAYT: https://ckeditor.com/docs/ckeditor4/latest/guide/dev_howtos_scayt.html * CKEditors How-Tos for SCAYT: https://ckeditor.com/docs/ckeditor4/latest/guide/dev_howtos_scayt.html
* CKEditors example of SCAYT: https://ckeditor.com/docs/ckeditor4/latest/examples/spellchecker.html * CKEditors example of SCAYT: https://ckeditor.com/docs/ckeditor4/latest/examples/spellchecker.html
Technical support or questions Technical support or questions
------- -------
In cooperation with the CKEditor team, during the past 10 years we have simplified the installation and built the extensive amount of documentation devoted to SCAYT plugin for CKEditor 4 and less. In cooperation with the CKEditor team, during the past 10 years we have simplified the installation and built the extensive amount of documentation devoted to SCAYT plugin for CKEditor 4 and less.
If you are experiencing any difficulties with the setup of the plugin, please check the links provided in the Resources section. If you are experiencing any difficulties with the setup of the plugin, please check the links provided in the Resources section.
Holders of an active subscription to the services or a commercial license have access to professional technical assistance directly from the WebSpellChecker team. [Contact us here](https://webspellchecker.com/contact-us/)! Holders of an active subscription to the services or a commercial license have access to professional technical assistance directly from the WebSpellChecker team. [Contact us here](https://webspellchecker.com/contact-us/)!
Reporting issues Reporting issues
------- -------
Please use the [SCAYT plugin for CKEditor 4 GitHub issue page](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues) to report bugs and feature requests. We will do our best to reply at our earliest convenience. Please use the [SCAYT plugin for CKEditor 4 GitHub issue page](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues) to report bugs and feature requests. We will do our best to reply at our earliest convenience.
License License
------- -------
This plugin is licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html). This plugin is licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html).
See LICENSE.md for more information. See LICENSE.md for more information.
Developed by [WebSpellChecker](https://webspellchecker.com/) in cooperation with CKSource. Developed by [WebSpellChecker](https://webspellchecker.com/) in cooperation with CKSource.

View file

@ -1,23 +1,23 @@
div.cke_dialog_ui_scaytItemList { div.cke_dialog_ui_scaytItemList {
border: 1px solid #c9cccf; border: 1px solid #c9cccf;
} }
.cke_scaytItemList-child { .cke_scaytItemList-child {
position: relative; position: relative;
padding: 6px 30px 6px 5px; padding: 6px 30px 6px 5px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.cke_scaytItemList-child:hover { .cke_scaytItemList-child:hover {
background: #ebebeb; background: #ebebeb;
} }
.cke_scaytItemList-child .cke_scaytItemList_remove { .cke_scaytItemList-child .cke_scaytItemList_remove {
position: absolute; position: absolute;
top: 0; top: 0;
right: 5px; right: 5px;
width: 26px; width: 26px;
height: 26px; height: 26px;
} }

View file

@ -1,71 +1,71 @@
a a
{ {
text-decoration:none; text-decoration:none;
padding: 2px 4px 4px 6px; padding: 2px 4px 4px 6px;
display : block; display : block;
border-width: 1px; border-width: 1px;
border-style: solid; border-style: solid;
margin : 0px; margin : 0px;
} }
a.cke_scayt_toogle:hover, a.cke_scayt_toogle:hover,
a.cke_scayt_toogle:focus, a.cke_scayt_toogle:focus,
a.cke_scayt_toogle:active a.cke_scayt_toogle:active
{ {
border-color: #316ac5; border-color: #316ac5;
background-color: #dff1ff; background-color: #dff1ff;
color : #000; color : #000;
cursor: pointer; cursor: pointer;
margin : 0px; margin : 0px;
} }
a.cke_scayt_toogle { a.cke_scayt_toogle {
color : #316ac5; color : #316ac5;
border-color: #fff; border-color: #fff;
} }
.scayt_enabled a.cke_scayt_item { .scayt_enabled a.cke_scayt_item {
color : #316ac5; color : #316ac5;
border-color: #fff; border-color: #fff;
margin : 0px; margin : 0px;
} }
.scayt_disabled a.cke_scayt_item { .scayt_disabled a.cke_scayt_item {
color : gray; color : gray;
border-color : #fff; border-color : #fff;
} }
.scayt_enabled a.cke_scayt_item:hover, .scayt_enabled a.cke_scayt_item:hover,
.scayt_enabled a.cke_scayt_item:focus, .scayt_enabled a.cke_scayt_item:focus,
.scayt_enabled a.cke_scayt_item:active .scayt_enabled a.cke_scayt_item:active
{ {
border-color: #316ac5; border-color: #316ac5;
background-color: #dff1ff; background-color: #dff1ff;
color : #000; color : #000;
cursor: pointer; cursor: pointer;
} }
.scayt_disabled a.cke_scayt_item:hover, .scayt_disabled a.cke_scayt_item:hover,
.scayt_disabled a.cke_scayt_item:focus, .scayt_disabled a.cke_scayt_item:focus,
.scayt_disabled a.cke_scayt_item:active .scayt_disabled a.cke_scayt_item:active
{ {
border-color: gray; border-color: gray;
background-color: #dff1ff; background-color: #dff1ff;
color : gray; color : gray;
cursor: no-drop; cursor: no-drop;
} }
.cke_scayt_set_on, .cke_scayt_set_off .cke_scayt_set_on, .cke_scayt_set_off
{ {
display: none; display: none;
} }
.scayt_enabled .cke_scayt_set_on .scayt_enabled .cke_scayt_set_on
{ {
display: none; display: none;
} }
.scayt_disabled .cke_scayt_set_on .scayt_disabled .cke_scayt_set_on
{ {
display: inline; display: inline;
} }
.scayt_disabled .cke_scayt_set_off .scayt_disabled .cke_scayt_set_off
{ {
display: none; display: none;
} }
.scayt_enabled .cke_scayt_set_off .scayt_enabled .cke_scayt_set_off
{ {
display: inline; display: inline;
} }

View file

@ -1,25 +1,25 @@
.scayt-lang-list > div .scayt-lang-list > div
{ {
padding-bottom: 6px !important; padding-bottom: 6px !important;
} }
.scayt-lang-list > div input .scayt-lang-list > div input
{ {
margin-right: 4px; margin-right: 4px;
} }
#scayt_about_ #scayt_about_
{ {
margin: 30px auto 0 auto; margin: 30px auto 0 auto;
} }
#scayt_about_ p #scayt_about_ p
{ {
text-align: center; text-align: center;
margin-bottom: 10px; margin-bottom: 10px;
} }
.cke_dialog_contents_body div[name=dictionaries] .cke_dialog_ui_hbox_last > a.cke_dialog_ui_button .cke_dialog_contents_body div[name=dictionaries] .cke_dialog_ui_hbox_last > a.cke_dialog_ui_button
{ {
margin-top: 0; margin-top: 0;
} }

View file

@ -1,20 +1,20 @@
Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model. CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
cs.js Found: 118 Missing: 0 cs.js Found: 118 Missing: 0
cy.js Found: 118 Missing: 0 cy.js Found: 118 Missing: 0
de.js Found: 118 Missing: 0 de.js Found: 118 Missing: 0
el.js Found: 16 Missing: 102 el.js Found: 16 Missing: 102
eo.js Found: 118 Missing: 0 eo.js Found: 118 Missing: 0
et.js Found: 31 Missing: 87 et.js Found: 31 Missing: 87
fa.js Found: 24 Missing: 94 fa.js Found: 24 Missing: 94
fi.js Found: 23 Missing: 95 fi.js Found: 23 Missing: 95
fr.js Found: 118 Missing: 0 fr.js Found: 118 Missing: 0
hr.js Found: 23 Missing: 95 hr.js Found: 23 Missing: 95
it.js Found: 118 Missing: 0 it.js Found: 118 Missing: 0
nb.js Found: 118 Missing: 0 nb.js Found: 118 Missing: 0
nl.js Found: 118 Missing: 0 nl.js Found: 118 Missing: 0
no.js Found: 118 Missing: 0 no.js Found: 118 Missing: 0
tr.js Found: 118 Missing: 0 tr.js Found: 118 Missing: 0
ug.js Found: 39 Missing: 79 ug.js Found: 39 Missing: 79
zh-cn.js Found: 118 Missing: 0 zh-cn.js Found: 118 Missing: 0

View file

@ -1,36 +1,36 @@
.cke_table-faked-selection-editor *::selection, table[data-cke-table-faked-selection-table] *::selection { .cke_table-faked-selection-editor *::selection, table[data-cke-table-faked-selection-table] *::selection {
background: transparent; background: transparent;
} }
.cke_table-faked-selection { .cke_table-faked-selection {
background: darkgray !important; background: darkgray !important;
color: black; color: black;
} }
.cke_table-faked-selection a { .cke_table-faked-selection a {
color: black; color: black;
} }
.cke_editable:focus .cke_table-faked-selection { .cke_editable:focus .cke_table-faked-selection {
/* We have to use !important here, as td might specify it's own background, thus table selection /* We have to use !important here, as td might specify it's own background, thus table selection
would not be visible. */ would not be visible. */
background: #0076cb !important; background: #0076cb !important;
color: white; color: white;
} }
.cke_editable:focus .cke_table-faked-selection a { .cke_editable:focus .cke_table-faked-selection a {
color: white; color: white;
} }
.cke_table-faked-selection::-moz-selection, .cke_table-faked-selection ::-moz-selection { .cke_table-faked-selection::-moz-selection, .cke_table-faked-selection ::-moz-selection {
background: transparent; background: transparent;
} }
.cke_table-faked-selection::selection, .cke_table-faked-selection ::selection { .cke_table-faked-selection::selection, .cke_table-faked-selection ::selection {
background: transparent; background: transparent;
} }
/* Change the cursor when selecting cells (#706). /* Change the cursor when selecting cells (#706).
* *
* This solution does not work in IE, Edge and Safari due to upstream isues: * This solution does not work in IE, Edge and Safari due to upstream isues:
* https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/3419602/ * https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/3419602/
* https://bugs.webkit.org/show_bug.cgi?id=53341 * https://bugs.webkit.org/show_bug.cgi?id=53341
*/ */
table[data-cke-table-faked-selection-table] { table[data-cke-table-faked-selection-table] {
cursor: cell; cursor: cell;
} }

View file

@ -1,84 +1,84 @@
/* /*
Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model. CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/ */
.cke_tpl_list .cke_tpl_list
{ {
border: #dcdcdc 2px solid; border: #dcdcdc 2px solid;
background-color: #ffffff; background-color: #ffffff;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
width: 100%; width: 100%;
height: 220px; height: 220px;
} }
.cke_tpl_item .cke_tpl_item
{ {
margin: 5px; margin: 5px;
padding: 7px; padding: 7px;
border: #eeeeee 1px solid; border: #eeeeee 1px solid;
*width: 88%; *width: 88%;
} }
.cke_tpl_preview .cke_tpl_preview
{ {
border-collapse: separate; border-collapse: separate;
text-indent:0; text-indent:0;
width: 100%; width: 100%;
} }
.cke_tpl_preview td .cke_tpl_preview td
{ {
padding: 2px; padding: 2px;
vertical-align: middle; vertical-align: middle;
} }
.cke_tpl_preview .cke_tpl_preview_img .cke_tpl_preview .cke_tpl_preview_img
{ {
width: 100px; width: 100px;
} }
.cke_tpl_preview span .cke_tpl_preview span
{ {
white-space: normal; white-space: normal;
} }
.cke_tpl_title .cke_tpl_title
{ {
font-weight: bold; font-weight: bold;
} }
.cke_tpl_list a:hover .cke_tpl_item, .cke_tpl_list a:hover .cke_tpl_item,
.cke_tpl_list a:focus .cke_tpl_item, .cke_tpl_list a:focus .cke_tpl_item,
.cke_tpl_list a:active .cke_tpl_item .cke_tpl_list a:active .cke_tpl_item
{ {
border: #ff9933 1px solid; border: #ff9933 1px solid;
background-color: #fffacd; background-color: #fffacd;
} }
.cke_tpl_list a:hover *, .cke_tpl_list a:hover *,
.cke_tpl_list a:focus *, .cke_tpl_list a:focus *,
.cke_tpl_list a:active * .cke_tpl_list a:active *
{ {
cursor: pointer; cursor: pointer;
} }
/* IE Quirks contextual selectors children will not get :hover transition until /* IE Quirks contextual selectors children will not get :hover transition until
the hover style of the link itself contains certain CSS declarations. */ the hover style of the link itself contains certain CSS declarations. */
.cke_browser_quirks .cke_tpl_list a:active, .cke_browser_quirks .cke_tpl_list a:active,
.cke_browser_quirks .cke_tpl_list a:hover, .cke_browser_quirks .cke_tpl_list a:hover,
.cke_browser_quirks .cke_tpl_list a:focus .cke_browser_quirks .cke_tpl_list a:focus
{ {
background-position: 0 0; background-position: 0 0;
} }
.cke_hc .cke_tpl_list a:hover .cke_tpl_item, .cke_hc .cke_tpl_list a:hover .cke_tpl_item,
.cke_hc .cke_tpl_list a:focus .cke_tpl_item, .cke_hc .cke_tpl_list a:focus .cke_tpl_item,
.cke_hc .cke_tpl_list a:active .cke_tpl_item .cke_hc .cke_tpl_list a:active .cke_tpl_item
{ {
border-width: 3px; border-width: 3px;
} }
.cke_tpl_empty, .cke_tpl_loading .cke_tpl_empty, .cke_tpl_loading
{ {
text-align: center; text-align: center;
padding: 5px; padding: 5px;
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,46 +1,46 @@
"Moono-lisa" Skin "Moono-lisa" Skin
================= =================
This skin has been made a **default skin** starting from CKEditor 4.6.0 and is maintained by the core developers. This skin has been made a **default skin** starting from CKEditor 4.6.0 and is maintained by the core developers.
For more information about skins, please check the [CKEditor Skin SDK](https://ckeditor.com/docs/ckeditor4/latest/guide/skin_sdk_intro.html) For more information about skins, please check the [CKEditor Skin SDK](https://ckeditor.com/docs/ckeditor4/latest/guide/skin_sdk_intro.html)
documentation. documentation.
Features Features
------------------- -------------------
"Moono-lisa" is a monochromatic skin, which offers a modern, flat and minimalistic look which blends very well in modern design. "Moono-lisa" is a monochromatic skin, which offers a modern, flat and minimalistic look which blends very well in modern design.
It comes with the following features: It comes with the following features:
- Chameleon feature with brightness. - Chameleon feature with brightness.
- High-contrast compatibility. - High-contrast compatibility.
- Graphics source provided in SVG. - Graphics source provided in SVG.
Directory Structure Directory Structure
------------------- -------------------
CSS parts: CSS parts:
- **editor.css**: the main CSS file. It's simply loading several other files, for easier maintenance, - **editor.css**: the main CSS file. It's simply loading several other files, for easier maintenance,
- **mainui.css**: the file contains styles of entire editor outline structures, - **mainui.css**: the file contains styles of entire editor outline structures,
- **toolbar.css**: the file contains styles of the editor toolbar space (top), - **toolbar.css**: the file contains styles of the editor toolbar space (top),
- **richcombo.css**: the file contains styles of the rich combo ui elements on toolbar, - **richcombo.css**: the file contains styles of the rich combo ui elements on toolbar,
- **panel.css**: the file contains styles of the rich combo drop-down, it's not loaded - **panel.css**: the file contains styles of the rich combo drop-down, it's not loaded
until the first panel open up, until the first panel open up,
- **elementspath.css**: the file contains styles of the editor elements path bar (bottom), - **elementspath.css**: the file contains styles of the editor elements path bar (bottom),
- **menu.css**: the file contains styles of all editor menus including context menu and button drop-down, - **menu.css**: the file contains styles of all editor menus including context menu and button drop-down,
it's not loaded until the first menu open up, it's not loaded until the first menu open up,
- **dialog.css**: the CSS files for the dialog UI, it's not loaded until the first dialog open, - **dialog.css**: the CSS files for the dialog UI, it's not loaded until the first dialog open,
- **reset.css**: the file defines the basis of style resets among all editor UI spaces, - **reset.css**: the file defines the basis of style resets among all editor UI spaces,
- **preset.css**: the file defines the default styles of some UI elements reflecting the skin preference, - **preset.css**: the file defines the default styles of some UI elements reflecting the skin preference,
- **editor_XYZ.css** and **dialog_XYZ.css**: browser specific CSS hacks. - **editor_XYZ.css** and **dialog_XYZ.css**: browser specific CSS hacks.
Other parts: Other parts:
- **skin.js**: the only JavaScript part of the skin that registers the skin, its browser specific files and its icons and defines the Chameleon feature, - **skin.js**: the only JavaScript part of the skin that registers the skin, its browser specific files and its icons and defines the Chameleon feature,
- **images/**: contains a fill general used images, - **images/**: contains a fill general used images,
- **dev/**: contains SVG and PNG source of the skin icons. - **dev/**: contains SVG and PNG source of the skin icons.
License License
------- -------
Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model. CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.

View file

@ -1,137 +1,137 @@
/** /**
* Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
* CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model. * CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/ */
// This file contains style definitions that can be used by CKEditor plugins. // This file contains style definitions that can be used by CKEditor plugins.
// //
// The most common use for it is the "stylescombo" plugin which shows the Styles drop-down // The most common use for it is the "stylescombo" plugin which shows the Styles drop-down
// list containing all styles in the editor toolbar. Other plugins, like // list containing all styles in the editor toolbar. Other plugins, like
// the "div" plugin, use a subset of the styles for their features. // the "div" plugin, use a subset of the styles for their features.
// //
// If you do not have plugins that depend on this file in your editor build, you can simply // If you do not have plugins that depend on this file in your editor build, you can simply
// ignore it. Otherwise it is strongly recommended to customize this file to match your // ignore it. Otherwise it is strongly recommended to customize this file to match your
// website requirements and design properly. // website requirements and design properly.
// //
// For more information refer to: https://ckeditor.com/docs/ckeditor4/latest/guide/dev_styles.html#style-rules // For more information refer to: https://ckeditor.com/docs/ckeditor4/latest/guide/dev_styles.html#style-rules
CKEDITOR.stylesSet.add( 'default', [ CKEDITOR.stylesSet.add( 'default', [
/* Block styles */ /* Block styles */
// These styles are already available in the "Format" drop-down list ("format" plugin), // These styles are already available in the "Format" drop-down list ("format" plugin),
// so they are not needed here by default. You may enable them to avoid // so they are not needed here by default. You may enable them to avoid
// placing the "Format" combo in the toolbar, maintaining the same features. // placing the "Format" combo in the toolbar, maintaining the same features.
/* /*
{ name: 'Paragraph', element: 'p' }, { name: 'Paragraph', element: 'p' },
{ name: 'Heading 1', element: 'h1' }, { name: 'Heading 1', element: 'h1' },
{ name: 'Heading 2', element: 'h2' }, { name: 'Heading 2', element: 'h2' },
{ name: 'Heading 3', element: 'h3' }, { name: 'Heading 3', element: 'h3' },
{ name: 'Heading 4', element: 'h4' }, { name: 'Heading 4', element: 'h4' },
{ name: 'Heading 5', element: 'h5' }, { name: 'Heading 5', element: 'h5' },
{ name: 'Heading 6', element: 'h6' }, { name: 'Heading 6', element: 'h6' },
{ name: 'Preformatted Text',element: 'pre' }, { name: 'Preformatted Text',element: 'pre' },
{ name: 'Address', element: 'address' }, { name: 'Address', element: 'address' },
*/ */
{ name: 'Italic Title', element: 'h2', styles: { 'font-style': 'italic' } }, { name: 'Italic Title', element: 'h2', styles: { 'font-style': 'italic' } },
{ name: 'Subtitle', element: 'h3', styles: { 'color': '#aaa', 'font-style': 'italic' } }, { name: 'Subtitle', element: 'h3', styles: { 'color': '#aaa', 'font-style': 'italic' } },
{ {
name: 'Special Container', name: 'Special Container',
element: 'div', element: 'div',
styles: { styles: {
padding: '5px 10px', padding: '5px 10px',
background: '#eee', background: '#eee',
border: '1px solid #ccc' border: '1px solid #ccc'
} }
}, },
/* Inline styles */ /* Inline styles */
// These are core styles available as toolbar buttons. You may opt enabling // These are core styles available as toolbar buttons. You may opt enabling
// some of them in the Styles drop-down list, removing them from the toolbar. // some of them in the Styles drop-down list, removing them from the toolbar.
// (This requires the "stylescombo" plugin.) // (This requires the "stylescombo" plugin.)
/* /*
{ name: 'Strong', element: 'strong', overrides: 'b' }, { name: 'Strong', element: 'strong', overrides: 'b' },
{ name: 'Emphasis', element: 'em' , overrides: 'i' }, { name: 'Emphasis', element: 'em' , overrides: 'i' },
{ name: 'Underline', element: 'u' }, { name: 'Underline', element: 'u' },
{ name: 'Strikethrough', element: 'strike' }, { name: 'Strikethrough', element: 'strike' },
{ name: 'Subscript', element: 'sub' }, { name: 'Subscript', element: 'sub' },
{ name: 'Superscript', element: 'sup' }, { name: 'Superscript', element: 'sup' },
*/ */
{ name: 'Marker', element: 'span', attributes: { 'class': 'marker' } }, { name: 'Marker', element: 'span', attributes: { 'class': 'marker' } },
{ name: 'Big', element: 'big' }, { name: 'Big', element: 'big' },
{ name: 'Small', element: 'small' }, { name: 'Small', element: 'small' },
{ name: 'Typewriter', element: 'tt' }, { name: 'Typewriter', element: 'tt' },
{ name: 'Computer Code', element: 'code' }, { name: 'Computer Code', element: 'code' },
{ name: 'Keyboard Phrase', element: 'kbd' }, { name: 'Keyboard Phrase', element: 'kbd' },
{ name: 'Sample Text', element: 'samp' }, { name: 'Sample Text', element: 'samp' },
{ name: 'Variable', element: 'var' }, { name: 'Variable', element: 'var' },
{ name: 'Deleted Text', element: 'del' }, { name: 'Deleted Text', element: 'del' },
{ name: 'Inserted Text', element: 'ins' }, { name: 'Inserted Text', element: 'ins' },
{ name: 'Cited Work', element: 'cite' }, { name: 'Cited Work', element: 'cite' },
{ name: 'Inline Quotation', element: 'q' }, { name: 'Inline Quotation', element: 'q' },
{ name: 'Language: RTL', element: 'span', attributes: { 'dir': 'rtl' } }, { name: 'Language: RTL', element: 'span', attributes: { 'dir': 'rtl' } },
{ name: 'Language: LTR', element: 'span', attributes: { 'dir': 'ltr' } }, { name: 'Language: LTR', element: 'span', attributes: { 'dir': 'ltr' } },
/* Object styles */ /* Object styles */
{ {
name: 'Styled Image (left)', name: 'Styled Image (left)',
element: 'img', element: 'img',
attributes: { 'class': 'left' } attributes: { 'class': 'left' }
}, },
{ {
name: 'Styled Image (right)', name: 'Styled Image (right)',
element: 'img', element: 'img',
attributes: { 'class': 'right' } attributes: { 'class': 'right' }
}, },
{ {
name: 'Compact Table', name: 'Compact Table',
element: 'table', element: 'table',
attributes: { attributes: {
cellpadding: '5', cellpadding: '5',
cellspacing: '0', cellspacing: '0',
border: '1', border: '1',
bordercolor: '#ccc' bordercolor: '#ccc'
}, },
styles: { styles: {
'border-collapse': 'collapse' 'border-collapse': 'collapse'
} }
}, },
{ name: 'Borderless Table', element: 'table', styles: { 'border-style': 'hidden', 'background-color': '#E6E6FA' } }, { name: 'Borderless Table', element: 'table', styles: { 'border-style': 'hidden', 'background-color': '#E6E6FA' } },
{ name: 'Square Bulleted List', element: 'ul', styles: { 'list-style-type': 'square' } }, { name: 'Square Bulleted List', element: 'ul', styles: { 'list-style-type': 'square' } },
/* Widget styles */ /* Widget styles */
{ name: 'Clean Image', type: 'widget', widget: 'image', attributes: { 'class': 'image-clean' } }, { name: 'Clean Image', type: 'widget', widget: 'image', attributes: { 'class': 'image-clean' } },
{ name: 'Grayscale Image', type: 'widget', widget: 'image', attributes: { 'class': 'image-grayscale' } }, { name: 'Grayscale Image', type: 'widget', widget: 'image', attributes: { 'class': 'image-grayscale' } },
{ name: 'Featured Snippet', type: 'widget', widget: 'codeSnippet', attributes: { 'class': 'code-featured' } }, { name: 'Featured Snippet', type: 'widget', widget: 'codeSnippet', attributes: { 'class': 'code-featured' } },
{ name: 'Featured Formula', type: 'widget', widget: 'mathjax', attributes: { 'class': 'math-featured' } }, { name: 'Featured Formula', type: 'widget', widget: 'mathjax', attributes: { 'class': 'math-featured' } },
{ name: '240p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-240p' }, group: 'size' }, { name: '240p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-240p' }, group: 'size' },
{ name: '360p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-360p' }, group: 'size' }, { name: '360p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-360p' }, group: 'size' },
{ name: '480p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-480p' }, group: 'size' }, { name: '480p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-480p' }, group: 'size' },
{ name: '720p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-720p' }, group: 'size' }, { name: '720p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-720p' }, group: 'size' },
{ name: '1080p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-1080p' }, group: 'size' }, { name: '1080p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-1080p' }, group: 'size' },
// Adding space after the style name is an intended workaround. For now, there // Adding space after the style name is an intended workaround. For now, there
// is no option to create two styles with the same name for different widget types. See https://dev.ckeditor.com/ticket/16664. // is no option to create two styles with the same name for different widget types. See https://dev.ckeditor.com/ticket/16664.
{ name: '240p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-240p' }, group: 'size' }, { name: '240p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-240p' }, group: 'size' },
{ name: '360p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-360p' }, group: 'size' }, { name: '360p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-360p' }, group: 'size' },
{ name: '480p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-480p' }, group: 'size' }, { name: '480p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-480p' }, group: 'size' },
{ name: '720p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-720p' }, group: 'size' }, { name: '720p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-720p' }, group: 'size' },
{ name: '1080p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-1080p' }, group: 'size' } { name: '1080p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-1080p' }, group: 'size' }
] ); ] );

View file

@ -1,8 +1,7 @@
<?php <?php
use App\Kernel; use App\Kernel;
require_once dirname(__DIR__).'/hesabixCore/vendor/autoload_runtime.php'; require_once dirname(__DIR__).'/hesabixCore/vendor/autoload_runtime.php';
header("Access-Control-Allow-Origin: *"); header("Access-Control-Allow-Credentials: true");
return function (array $context) { return function (array $context) {
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']); return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
}; };