Removed depracated modules and doc html filesof external libs.

This commit is contained in:
Laurent Destailleur 2024-10-30 18:39:18 +01:00
parent c34ea09c2c
commit 50d50825cf
50 changed files with 0 additions and 2394 deletions

View File

@ -1,39 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Editor</title>
<style type="text/css" media="screen">
body {
overflow: hidden;
}
#editor {
margin: 0;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
</style>
</head>
<body>
<pre id="editor">function foo(items) {
var i;
for (i = 0; i &lt; items.length; i++) {
alert("Ace Rocks " + items[i]);
}
}</pre>
<script src="src-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
<script>
var editor = ace.edit("editor");
editor.setTheme("ace/theme/twilight");
editor.session.setMode("ace/mode/javascript");
</script>
</body>
</html>

View File

@ -1,56 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,height=device-height" />
<title>Ace Kitchen Sink</title>
<meta name="author" content="Fabian Jakobs">
<!--
Ace
version 1.4.14
commit
-->
<link rel="stylesheet" href="demo/kitchen-sink/styles.css" type="text/css" media="screen" charset="utf-8">
<script async="true" src="https://use.edgefonts.net/source-code-pro.js"></script>
<link href="./doc/site/images/favicon.ico" rel="icon" type="image/x-icon">
</head>
<body>
<div id="sidePanel" style="position:absolute;height:100%;">
<div class="toggleButton" id="optionToggle" role="button" aria-label="Hide Options" tabindex="0">
<div></div><div></div><div></div>
</div>
<a href="https://c9.io">
<img id="c9-logo" alt="Cloud9 IDE | Your code anywhere, anytime" src="demo/kitchen-sink/logo.png" style="width: 172px;margin: -9px 30px -12px 51px;">
</a>
<div style="position: absolute; overflow: hidden; top:100px; bottom:0">
<div id="optionsPanel" style="width: 120%; height:100%; overflow-y: scroll">
<a href="https://ace.c9.io">
<img id="ace-logo" alt="Ace Website" src="demo/kitchen-sink/ace-logo.png" style="width: 134px;margin: 46px 0px 4px 66px;">
</a>
</div>
</div>
</div>
<div id="editor-container"></div>
<script src="src/ace.js" data-ace-base="src" type="text/javascript" charset="utf-8"></script>
<script src="src/keybinding-vim.js"></script>
<script src="src/keybinding-emacs.js"></script>
<script src="demo/kitchen-sink/demo.js"></script>
<script type="text/javascript" charset="utf-8">
require("kitchen-sink/demo");
</script>
</body>
</html>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,19 +0,0 @@
@bender-tags: exportpdf, feature, 31
@bender-ui: collapsed
@bender-include: ../_helpers/tools.js
@bender-ckeditor-plugins: toolbar, basicstyles, notification
**Note:** This test uses <a href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" target="_blank">Bootstrap CDN</a>. If something goes wrong, check if the link works correctly first.
1. Use `Export to PDF` button in the first editor.
1. Open generated file.
**Expected:**
Text from editor was converted to a green badge.
**Unexpected:**
Content is the same as in the editor.
1. Repeat the same steps for the second and third editor.

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +0,0 @@
(function(){bender.loadExternalPlugin("exportpdf","/apps/plugin/");CKEDITOR.plugins.load("exportpdf",function(){function c(a,b){var c=a._.notificationArea.notifications[0];assert.areSame(b.message,c.message,"Message should be the same.");assert.areSame(b.type,c.type,"Type should be the same.");assert.areSame(b.progress,c.progress,"Progress should be the same.")}bender.editors={successEditor:{config:exportPdfUtils.getDefaultConfig("unit")},errorEditor:{config:exportPdfUtils.getDefaultConfig("unit")}};
bender.test({setUp:function(){bender.tools.ignoreUnsupportedEnvironment("exportpdf");sinon.stub(CKEDITOR.plugins.exportpdf,"downloadFile")},tearDown:function(){CKEDITOR.plugins.exportpdf.downloadFile.restore()},"test notifications and progress steps are correct in happy path":function(){var a=this.editors.successEditor;this.editorBots.successEditor.setHtmlWithSelection('\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e^');a.once("exportPdf",function(){c(a,{message:"Processing PDF document...",type:"progress",
progress:0})});a.once("exportPdf",function(){c(a,{message:"Processing PDF document...",type:"progress",progress:.2})},null,null,16);exportPdfUtils.useXHR(a,function(b){b.addEventListener("progress",function(){c(a,{message:"Processing PDF document...",type:"progress",progress:.8})});b.addEventListener("loadend",function(){c(a,{message:"Document is ready!",type:"success",progress:1})});b.respond(200,{},"")})},"test notifications and progress steps are correct in sad path":function(){var a=this.editors.errorEditor;
this.editorBots.errorEditor.setHtmlWithSelection('\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e^');exportPdfUtils.useXHR(a,function(b){var d=sinon.stub(console,"error",function(a){assert.areSame("Validation failed.",a.message,"Message from endpoint is incorrect.");d.restore()});b.addEventListener("loadend",function(){c(a,{message:"Error occurred.",type:"warning"})});b.respond(400,{},'{ "message": "Validation failed." }')})}})})})();

View File

@ -1,9 +0,0 @@
(function(){bender.loadExternalPlugin("exportpdf","/apps/plugin/");CKEDITOR.plugins.load("exportpdf",function(){function a(a,d,b){b=exportPdfUtils.getDefaultConfig("unit",b||{});bender.editorBot.create({name:"editor"+Date.now(),config:b},function(b){var c=b.editor;b.setHtmlWithSelection(a);c.once("exportPdf",function(b){assert.areEqual(a,b.data.html)},null,null,10);c.once("exportPdf",function(a){a.cancel();assert.areEqual('\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e'+d+"\x3c/div\x3e",a.data.html)},
null,null,16);c.execCommand("exportPdf")})}function b(a,b){a=a.replace(/\/$/g,"");b&&0<b&&(a=a.split("/").slice(0,-b).join("/"));return a}bender.test({setUp:function(){bender.tools.ignoreUnsupportedEnvironment("exportpdf");this.paths={relative0:b(bender.testDir),relative1:b(bender.testDir,1),relative3:b(bender.testDir,3)}},"test absolute image urls are not changed":function(){a('\x3cp\x3eFoo \x3cimg src\x3d"https://ckeditor.com/img/image1.jpg" /\x3e\x3cimg src\x3d"https://ckeditor.com/img/image2.png" /\x3e\x3c/p\x3e',
'\x3cp\x3eFoo \x3cimg src\x3d"https://ckeditor.com/img/image1.jpg" /\x3e\x3cimg src\x3d"https://ckeditor.com/img/image2.png" /\x3e\x3c/p\x3e')},"test relative (to root) image urls are changed to absolute":function(){a('\x3cp\x3e\x3cimg src\x3d"/img/image1.jpg" /\x3e Bar \x3cimg src\x3d"/img/big/image2.png" /\x3e\x3c/p\x3e','\x3cp\x3e\x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl("/img/image1.jpg")+'" /\x3e Bar \x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl("/img/big/image2.png")+'" /\x3e\x3c/p\x3e')},
'test relative (to root) image urls with ".." are changed to absolute':function(){a('\x3cp\x3e\x3cimg src\x3d"/../img/image1.jpg" /\x3e Bar \x3cimg src\x3d"/../../img/big/image2.png" /\x3e\x3c/p\x3e','\x3cp\x3e\x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl("/img/image1.jpg")+'" /\x3e Bar \x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl("/img/big/image2.png")+'" /\x3e\x3c/p\x3e')},"test relative (to root) image urls with custom baseHref are changed to absolute":function(){a('\x3cp\x3e\x3cimg src\x3d"/img/image1.jpg" /\x3e Bar \x3cimg src\x3d"/img/big/image2.png" /\x3e\x3c/p\x3e',
'\x3cp\x3e\x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl("/img/image1.jpg","http://ckeditor.com")+'" /\x3e Bar \x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl("/img/big/image2.png","http://ckeditor.com")+'" /\x3e\x3c/p\x3e',{baseHref:"http://ckeditor.com/ckeditor4/"})},'test relative (to root) image urls with custom baseHref and ".." are changed to absolute':function(){a('\x3cp\x3e\x3cimg src\x3d"/../img/image1.jpg" /\x3e Bar \x3cimg src\x3d"/../../img/big/image2.png" /\x3e\x3c/p\x3e','\x3cp\x3e\x3cimg src\x3d"'+
exportPdfUtils.toAbsoluteUrl("/img/image1.jpg","http://ckeditor.com")+'" /\x3e Bar \x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl("/img/big/image2.png","http://ckeditor.com")+'" /\x3e\x3c/p\x3e',{baseHref:"http://ckeditor.com/ckeditor4/"})},"test relative (to current url) image urls are changed to absolute":function(){a('\x3cp\x3e\x3cimg src\x3d"img/image1.jpg" /\x3e Bar \x3cimg src\x3d"img/big/image2.png" /\x3e\x3c/p\x3e','\x3cp\x3e\x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl(this.paths.relative0+
"/img/image1.jpg")+'" /\x3e Bar \x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl(this.paths.relative0+"/img/big/image2.png")+'" /\x3e\x3c/p\x3e')},'test relative (to current url) image urls with ".." are changed to absolute':function(){a('\x3cp\x3e\x3cimg src\x3d"../img/image1.jpg" /\x3e Bar \x3cimg src\x3d"../../../img/big/image2.png" /\x3e\x3c/p\x3e','\x3cp\x3e\x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl(this.paths.relative1+"/img/image1.jpg")+'" /\x3e Bar \x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl(this.paths.relative3+
"/img/big/image2.png")+'" /\x3e\x3c/p\x3e')},"test relative (to current url) image urls with custom baseHref are changed to absolute":function(){a('\x3cp\x3e\x3cimg src\x3d"img/image1.jpg" /\x3e Bar \x3cimg src\x3d"img/big/image2.png" /\x3e\x3c/p\x3e','\x3cp\x3e\x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl("img/image1.jpg","http://ckeditor.com/ckeditor4/")+'" /\x3e Bar \x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl("img/big/image2.png","http://ckeditor.com/ckeditor4/")+'" /\x3e\x3c/p\x3e',{baseHref:"http://ckeditor.com/ckeditor4/"})},
'test relative (to current url) image urls with custom baseHref and ".." are changed to absolute':function(){a('\x3cp\x3e\x3cimg src\x3d"../img/image1.jpg" /\x3e Bar \x3cimg src\x3d"../../img/big/image2.png" /\x3e\x3c/p\x3e','\x3cp\x3e\x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl("img/image1.jpg","https://ckeditor.com/ckeditor4/")+'" /\x3e Bar \x3cimg src\x3d"'+exportPdfUtils.toAbsoluteUrl("img/big/image2.png","https://ckeditor.com/")+'" /\x3e\x3c/p\x3e',{baseHref:"https://ckeditor.com/ckeditor4/demo/"})}})})})();

View File

@ -1,3 +0,0 @@
(function(){bender.loadExternalPlugin("exportpdf","/apps/plugin/");CKEDITOR.plugins.load("exportpdf",function(){bender.editors={defaultHeader:{config:{extraPlugins:"exportpdf"}},customHeader:{config:exportPdfUtils.getDefaultConfig("unit")}};bender.test({setUp:function(){bender.tools.ignoreUnsupportedEnvironment("exportpdf");sinon.stub(CKEDITOR.plugins.exportpdf,"downloadFile")},tearDown:function(){CKEDITOR.plugins.exportpdf.downloadFile.restore()},"test default statistics header":function(){var a=
this.editors.defaultHeader;this.editorBots.defaultHeader.setHtmlWithSelection('\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e^');exportPdfUtils.useXHR(a,function(a){assert.areEqual(a.requestHeaders["x-cs-app-id"],"cke4","Default stats header is wrong.")})},"test custom statistics header":function(){var a=this.editors.customHeader;this.editorBots.customHeader.setHtmlWithSelection('\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e^');exportPdfUtils.useXHR(a,function(a){assert.areEqual(a.requestHeaders["x-cs-app-id"],
"cke4-tests-unit","Custom stats header was not set properly.")})}})})})();

View File

@ -1,18 +0,0 @@
(function(){bender.loadExternalPlugin("exportpdf","/apps/plugin/");CKEDITOR.plugins.load("exportpdf",function(){function a(a){var e=exportPdfUtils.getDefaultConfig("unit",a.extraConfig||{});bender.editorBot.create({name:"editor"+Date.now(),config:e,creator:a.creator},function(d){var c=d.editor;d.setHtmlWithSelection(a.initialHtml);c.once("exportPdf",function(b){assert.areEqual(a.initialHtml,b.data.html)},null,null,10);c.once("exportPdf",function(b){b.cancel();a.expectCss?assert.isNotUndefined(b.data.css,
"Some CSS should be sent."):assert.isUndefined(b.data.css,"No CSS should be sent.");b=b.data.html.replace(/\?t=[a-z0-9]+/gi,"");assert.areEqual(a.expectedHtml,b,"HTML is incorrect.")},null,null,16);c.execCommand("exportPdf")})}bender.test({setUp:function(){bender.tools.ignoreUnsupportedEnvironment("exportpdf")},"test no custom stylesheets attached to divarea editor":function(){a({creator:"replace",initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',
expectCss:!1})},"test one absolute path custom stylesheet attached to divarea editor":function(){a({creator:"replace",initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"https://ckeditor.com/"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!1,extraConfig:{exportPdf_stylesheets:["https://ckeditor.com"]}})},"test two absolute path custom stylesheets attached to divarea editor":function(){a({creator:"replace",
initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"https://ckeditor.css/"\x3e\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"https://cksource.css/"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!1,extraConfig:{exportPdf_stylesheets:["https://ckeditor.css","https://cksource.css"]}})},"test one relative path custom stylesheet attached to divarea editor":function(){a({creator:"replace",
initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+exportPdfUtils.toAbsoluteUrl("/css/ckeditor.css")+'"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!1,extraConfig:{exportPdf_stylesheets:["/css/ckeditor.css"]}})},"test two relative path custom stylesheets attached to divarea editor":function(){a({creator:"replace",initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',
expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+exportPdfUtils.toAbsoluteUrl("/css/ckeditor.css")+'"\x3e\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+exportPdfUtils.toAbsoluteUrl("/css/cksource.css")+'"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!1,extraConfig:{exportPdf_stylesheets:["/css/ckeditor.css","/css/cksource.css"]}})},"test one relative and one absolute path custom stylesheets attached to divarea editor":function(){a({creator:"replace",
initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+exportPdfUtils.toAbsoluteUrl("/css/ckeditor.css")+'"\x3e\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"https://ckeditor.com/"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!1,extraConfig:{exportPdf_stylesheets:["/css/ckeditor.css","https://ckeditor.com"]}})},"test no custom stylesheets attached to inline editor":function(){a({creator:"inline",
initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!1})},"test one absolute path custom stylesheet attached to inline editor":function(){a({creator:"inline",initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"https://ckeditor.com/"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',
expectCss:!1,extraConfig:{exportPdf_stylesheets:["https://ckeditor.com"]}})},"test two absolute path custom stylesheets attached to inline editor":function(){a({creator:"inline",initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"https://ckeditor.css/"\x3e\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"https://cksource.css/"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',
expectCss:!1,extraConfig:{exportPdf_stylesheets:["https://ckeditor.css","https://cksource.css"]}})},"test one relative path custom stylesheet attached to inline editor":function(){a({creator:"inline",initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+exportPdfUtils.toAbsoluteUrl("/css/ckeditor.css")+'"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!1,
extraConfig:{exportPdf_stylesheets:["/css/ckeditor.css"]}})},"test two relative path custom stylesheets attached to inline editor":function(){a({creator:"inline",initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+exportPdfUtils.toAbsoluteUrl("/css/ckeditor.css")+'"\x3e\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+exportPdfUtils.toAbsoluteUrl("/css/cksource.css")+'"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',
expectCss:!1,extraConfig:{exportPdf_stylesheets:["/css/ckeditor.css","/css/cksource.css"]}})},"test one relative and one absolute path custom stylesheets attached to inline editor":function(){a({creator:"inline",initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+exportPdfUtils.toAbsoluteUrl("/css/ckeditor.css")+'"\x3e\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"https://ckeditor.com/"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',
expectCss:!1,extraConfig:{exportPdf_stylesheets:["/css/ckeditor.css","https://ckeditor.com"]}})},"test no custom stylesheets attached to classic editor":function(){a({creator:"replace",initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!0,extraConfig:{removePlugins:"divarea"}})},"test one absolute path custom stylesheet attached to classic editor":function(){a({creator:"replace",
initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"https://ckeditor.com/"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!1,extraConfig:{removePlugins:"divarea",exportPdf_stylesheets:["https://ckeditor.com"]}})},"test two absolute path custom stylesheets attached to classic editor":function(){a({creator:"replace",initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',
expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"https://ckeditor.css/"\x3e\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"https://cksource.css/"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!1,extraConfig:{removePlugins:"divarea",exportPdf_stylesheets:["https://ckeditor.css","https://cksource.css"]}})},"test one relative path custom stylesheet attached to classic editor":function(){a({creator:"replace",
initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+exportPdfUtils.toAbsoluteUrl("/css/ckeditor.css")+'"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!1,extraConfig:{removePlugins:"divarea",exportPdf_stylesheets:["/css/ckeditor.css"]}})},"test two relative path custom stylesheets attached to classic editor":function(){a({creator:"replace",initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',
expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+exportPdfUtils.toAbsoluteUrl("/css/ckeditor.css")+'"\x3e\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+exportPdfUtils.toAbsoluteUrl("/css/cksource.css")+'"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!1,extraConfig:{removePlugins:"divarea",exportPdf_stylesheets:["/css/ckeditor.css","/css/cksource.css"]}})},"test one relative and one absolute path custom stylesheets attached to classic editor":function(){a({creator:"replace",
initialHtml:'\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e',expectedHtml:'\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+exportPdfUtils.toAbsoluteUrl("/css/ckeditor.css")+'"\x3e\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"https://ckeditor.com/"\x3e\x3cdiv class\x3d"cke_editable cke_contents_ltr"\x3e\x3cp id\x3d"test"\x3eHello, World!\x3c/p\x3e\x3c/div\x3e',expectCss:!1,extraConfig:{removePlugins:"divarea",exportPdf_stylesheets:["/css/ckeditor.css","https://ckeditor.com"]}})}})})})();

View File

@ -1,28 +0,0 @@
Software License Agreement
==========================
**CKEditor WSC Plugin**
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:
* GNU General Public License Version 2 or later (the "GPL"):
https://www.gnu.org/licenses/gpl.html
* GNU Lesser General Public License Version 2.1 or later (the "LGPL"):
https://www.gnu.org/licenses/lgpl.html
* Mozilla Public License Version 1.1 or later (the "MPL"):
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.
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.
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.

View File

@ -1,80 +0,0 @@
WebSpellChecker Dialog Plugin for CKEditor 4
===============================
WebSpellChecker Dialog (WSC Dialog) provides distraction-free proofreading, checking the whole texts spelling and grammar on-click in a separate pop-up window.
![WSC Dialog Plugin for CKEditor 4 View](https://webspellchecker.com/app/images/wsc_dialog_plugin_for_ckeditor4.png)
This plugin brings the multi-language WSC Dialog 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 (Check Spelling).
If your version of CKEditor doesnt have WSC Dialog built-in, you can easily add it by following the steps outlined in the Get Started section.
The default version of WSC Dialog 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-dialog-ckeditor4/#pricing). Depending on your needs, you can choose a Cloud-based or Server (self-hosted) solution.
Demo
------------
WSC Dialog plugin for CKEditor 4: https://webspellchecker.com/wsc-dialog-ckeditor4/
Supported Languages
------------
The WSC Dialog 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/).
Get Started
------------
1. Clone/copy this repository contents in a new "plugins/wsc" folder in your CKEditor installation.
2. Enable the "wsc" plugin in the CKEditor configuration file (config.js):
config.extraPlugins = 'wsc';
That's all. WSC Dialog will appear on the editor toolbar under the ABC button and will be ready to use.
Supported Browsers
-------
This is the list of officially supported browsers for the WSC Dialog plugin for CKEditor 4. WSC Dialog may also work in other browsers and environments but we unable to check all of them and guarantee proper work.
* Chrome (the latest)
* Firefox (the latest)
* Safari (the latest)
* MS Edge (the latest)
* Internet Explorer 8.0 (limited support)
* Internet Explorer 9.0+ (close to full support)
Note: All browsers are to be supported for web pages that work in Standards Mode.
Resources
-------
* Demo: https://webspellchecker.com/wsc-dialog-ckeditor4/
* Documentation: https://docs.webspellchecker.net/
* YouTube video: https://youtu.be/bkVPZ-5T22Q
* Term of Service: https://webspellchecker.com/terms-of-service/
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 WSC Dialog 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.
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
-------
Please use the [WSC Dialog plugin for CKEditor 4 GitHub issue page](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues) to report bugs and feature requests. We will do our best to reply at our earliest convenience.
License
-------
This plugin is licensed under the terms of any of the following licenses at your choice: [GPL](https://www.gnu.org/licenses/gpl.html), [LGPL](https://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html).
See LICENSE.md for more information.
Developed by [WebSpellChecker](https://webspellchecker.com/) in cooperation with CKSource.

View File

@ -1,66 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!--
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
-->
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
function gup( name )
{
name = name.replace( /[\[]/, '\\\[' ).replace( /[\]]/, '\\\]' ) ;
var regexS = '[\\?&]' + name + '=([^&#]*)' ;
var regex = new RegExp( regexS ) ;
var results = regex.exec( window.location.href ) ;
if ( results )
return results[ 1 ] ;
else
return '' ;
}
var interval;
function sendData2Master()
{
var destination = window.parent.parent ;
try
{
if ( destination.XDTMaster )
{
var t = destination.XDTMaster.read( [ gup( 'cmd' ), gup( 'data' ) ] ) ;
window.clearInterval( interval ) ;
}
}
catch (e) {}
}
function OnMessage (event) {
var message = event.data;
var destination = window.parent.parent;
destination.XDTMaster.read( [ 'end', message, 'fpm' ] ) ;
}
function listenPostMessage() {
if (window.addEventListener) { // all browsers except IE before version 9
window.addEventListener ("message", OnMessage, false);
}else {
if (window.attachEvent) { // IE before version 9
window.attachEvent("onmessage", OnMessage);
}
}
}
function onLoad()
{
interval = window.setInterval( sendData2Master, 100 );
listenPostMessage();
}
</script>
</head>
<body onload="onLoad()"><p></p></body>
</html>

View File

@ -1,52 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<!--
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
-->
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
function doLoadScript( url )
{
if ( !url )
return false ;
var s = document.createElement( "script" ) ;
s.type = "text/javascript" ;
s.src = url ;
document.getElementsByTagName( "head" )[ 0 ].appendChild( s ) ;
return true ;
}
var opener;
function tryLoad()
{
opener = window.parent;
// get access to global parameters
var oParams = window.opener.oldFramesetPageParams;
// make frameset rows string prepare
var sFramesetRows = ( parseInt( oParams.firstframeh, 10 ) || '30') + ",*," + ( parseInt( oParams.thirdframeh, 10 ) || '150' ) + ',0' ;
document.getElementById( 'itFrameset' ).rows = sFramesetRows ;
// dynamic including init frames and crossdomain transport code
// from config sproxy_js_frameset url
var addScriptUrl = oParams.sproxy_js_frameset ;
doLoadScript( addScriptUrl ) ;
}
</script>
</head>
<frameset id="itFrameset" onload="tryLoad();" border="0" rows="30,*,*,0">
<frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="0" marginwidth="2" src="" name="navbar"></frame>
<frame scrolling="auto" framespacing="0" frameborder="0" noresize="noresize" marginheight="0" marginwidth="0" src="" name="mid"></frame>
<frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="1" marginwidth="1" src="" name="bot"></frame>
<frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="1" marginwidth="1" src="" name="spellsuggestall"></frame>
</frameset>
</html>

View File

@ -1,82 +0,0 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
html, body
{
background-color: transparent;
margin: 0px;
padding: 0px;
}
body
{
padding: 10px;
}
body, td, input, select, textarea
{
font-size: 11px;
font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana;
}
.midtext
{
padding:0px;
margin:10px;
}
.midtext p
{
padding:0px;
margin:10px;
}
.Button
{
border: #737357 1px solid;
color: #3b3b1f;
background-color: #c7c78f;
}
.PopupTabArea
{
color: #737357;
background-color: #e3e3c7;
}
.PopupTitleBorder
{
border-bottom: #d5d59d 1px solid;
}
.PopupTabEmptyArea
{
padding-left: 10px;
border-bottom: #d5d59d 1px solid;
}
.PopupTab, .PopupTabSelected
{
border-right: #d5d59d 1px solid;
border-top: #d5d59d 1px solid;
border-left: #d5d59d 1px solid;
padding: 3px 5px 3px 5px;
color: #737357;
}
.PopupTab
{
margin-top: 1px;
border-bottom: #d5d59d 1px solid;
cursor: pointer;
}
.PopupTabSelected
{
font-weight: bold;
cursor: default;
padding-top: 4px;
border-bottom: #f1f1e3 1px solid;
background-color: #f1f1e3;
}

View File

@ -1,91 +0,0 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
(function(){function A(a){return a&&a.domId&&a.getInputElement().$?a.getInputElement():a&&a.$?a:!1}function J(a){if(!a)throw"Languages-by-groups list are required for construct selectbox";var d=[],c="",e;for(e in a)for(var f in a[e]){var h=a[e][f];"en_US"==h?c=h:d.push(h)}d.sort();c&&d.unshift(c);return{getCurrentLangGroup:function(d){a:{for(var c in a)for(var e in a[c])if(e.toUpperCase()===d.toUpperCase()){d=c;break a}d=""}return d},setLangList:function(){var d={},c;for(c in a)for(var e in a[c])d[a[c][e]]=
e;return d}()}}var g=function(){var a=function(a,b,e){e=e||{};var f=e.expires;if("number"==typeof f&&f){var h=new Date;h.setTime(h.getTime()+1E3*f);f=e.expires=h}f&&f.toUTCString&&(e.expires=f.toUTCString());b=encodeURIComponent(b);a=a+"\x3d"+b;for(var k in e)b=e[k],a+="; "+k,!0!==b&&(a+="\x3d"+b);document.cookie=a};return{postMessage:{init:function(a){window.addEventListener?window.addEventListener("message",a,!1):window.attachEvent("onmessage",a)},send:function(a){var b=Object.prototype.toString,
e=a.fn||null,f=a.id||"",h=a.target||window,k=a.message||{id:f};a.message&&"[object Object]"==b.call(a.message)&&(a.message.id?a.message.id:a.message.id=f,k=a.message);a=window.JSON.stringify(k,e);h.postMessage(a,"*")},unbindHandler:function(a){window.removeEventListener?window.removeEventListener("message",a,!1):window.detachEvent("onmessage",a)}},hash:{create:function(){},parse:function(){}},cookie:{set:a,get:function(a){return(a=document.cookie.match(new RegExp("(?:^|; )"+a.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,
"\\$1")+"\x3d([^;]*)")))?decodeURIComponent(a[1]):void 0},remove:function(d){a(d,"",{expires:-1})}},misc:{findFocusable:function(a){var b=null;a&&(b=a.find("a[href], area[href], input, select, textarea, button, *[tabindex], *[contenteditable]"));return b},isVisible:function(a){var b;(b=0===a.offsetWidth||0==a.offsetHeight)||(b="none"===(document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null).display:a.currentStyle?a.currentStyle.display:a.style.display));
return!b},hasClass:function(a,b){return!(!a.className||!a.className.match(new RegExp("(\\s|^)"+b+"(\\s|$)")))}}}}(),a=a||{};a.TextAreaNumber=null;a.load=!0;a.cmd={SpellTab:"spell",Thesaurus:"thes",GrammTab:"grammar"};a.dialog=null;a.optionNode=null;a.selectNode=null;a.grammerSuggest=null;a.textNode={};a.iframeMain=null;a.dataTemp="";a.div_overlay=null;a.textNodeInfo={};a.selectNode={};a.selectNodeResponce={};a.langList=null;a.langSelectbox=null;a.banner="";a.show_grammar=null;a.div_overlay_no_check=
null;a.targetFromFrame={};a.onLoadOverlay=null;a.LocalizationComing={};a.OverlayPlace=null;a.sessionid="";a.LocalizationButton={ChangeTo_button:{instance:null,text:"Change to",localizationID:"ChangeTo"},ChangeAll:{instance:null,text:"Change All"},IgnoreWord:{instance:null,text:"Ignore word"},IgnoreAllWords:{instance:null,text:"Ignore all words"},Options:{instance:null,text:"Options",optionsDialog:{instance:null}},AddWord:{instance:null,text:"Add word"},FinishChecking_button:{instance:null,text:"Finish Checking",
localizationID:"FinishChecking"},Option_button:{instance:null,text:"Options",localizationID:"Options"},FinishChecking_button_block:{instance:null,text:"Finish Checking",localizationID:"FinishChecking"}};a.LocalizationLabel={ChangeTo_label:{instance:null,text:"Change to",localizationID:"ChangeTo"},Suggestions:{instance:null,text:"Suggestions"},Categories:{instance:null,text:"Categories"},Synonyms:{instance:null,text:"Synonyms"}};var K=function(b){var d,c,e;for(e in b){if(d=a.dialog.getContentElement(a.dialog._.currentTabId,
e))d=d.getElement();else if(b[e].instance)d=b[e].instance.getElement().getFirst()||b[e].instance.getElement();else continue;c=b[e].localizationID||e;d.setText(a.LocalizationComing[c])}},L=function(b){var d,c,e;for(e in b)d=a.dialog.getContentElement(a.dialog._.currentTabId,e),d||(d=b[e].instance),d.setLabel&&(c=b[e].localizationID||e,d.setLabel(a.LocalizationComing[c]+":"))},t,B;a.framesetHtml=function(b){return"\x3ciframe id\x3d"+a.iframeNumber+"_"+b+' frameborder\x3d"0" allowtransparency\x3d"1" style\x3d"width:100%;border: 1px solid #AEB3B9;overflow: auto;background:#fff; border-radius: 3px;"\x3e\x3c/iframe\x3e'};
a.setIframe=function(b,d){var c;c=a.framesetHtml(d);var e=a.iframeNumber+"_"+d;b.getElement().setHtml(c);c=document.getElementById(e);c=c.contentWindow?c.contentWindow:c.contentDocument.document?c.contentDocument.document:c.contentDocument;c.document.open();c.document.write('\x3c!DOCTYPE html\x3e\x3chtml\x3e\x3chead\x3e\x3cmeta charset\x3d"UTF-8"\x3e\x3ctitle\x3eiframe\x3c/title\x3e\x3cstyle\x3ehtml,body{margin: 0;height: 100%;font: 13px/1.555 "Trebuchet MS", sans-serif;}a{color: #888;font-weight: bold;text-decoration: none;border-bottom: 1px solid #888;}.main-box {color:#252525;padding: 3px 5px;text-align: justify;}.main-box p{margin: 0 0 14px;}.main-box .cerr{color: #f00000;border-bottom-color: #f00000;}\x3c/style\x3e\x3c/head\x3e\x3cbody\x3e\x3cdiv id\x3d"content" class\x3d"main-box"\x3e\x3c/div\x3e\x3ciframe src\x3d"" frameborder\x3d"0" id\x3d"spelltext" name\x3d"spelltext" style\x3d"display:none; width: 100%" \x3e\x3c/iframe\x3e\x3ciframe src\x3d"" frameborder\x3d"0" id\x3d"loadsuggestfirst" name\x3d"loadsuggestfirst" style\x3d"display:none; width: 100%" \x3e\x3c/iframe\x3e\x3ciframe src\x3d"" frameborder\x3d"0" id\x3d"loadspellsuggestall" name\x3d"loadspellsuggestall" style\x3d"display:none; width: 100%" \x3e\x3c/iframe\x3e\x3ciframe src\x3d"" frameborder\x3d"0" id\x3d"loadOptionsForm" name\x3d"loadOptionsForm" style\x3d"display:none; width: 100%" \x3e\x3c/iframe\x3e\x3cscript\x3e(function(window) {var ManagerPostMessage \x3d function() {var _init \x3d function(handler) {if (document.addEventListener) {window.addEventListener("message", handler, false);} else {window.attachEvent("onmessage", handler);};};var _sendCmd \x3d function(o) {var str,type \x3d Object.prototype.toString,fn \x3d o.fn || null,id \x3d o.id || "",target \x3d o.target || window,message \x3d o.message || { "id": id };if (o.message \x26\x26 type.call(o.message) \x3d\x3d "[object Object]") {(o.message["id"]) ? o.message["id"] : o.message["id"] \x3d id;message \x3d o.message;};str \x3d JSON.stringify(message, fn);target.postMessage(str, "*");};return {init: _init,send: _sendCmd};};var manageMessageTmp \x3d new ManagerPostMessage;var appString \x3d (function(){var spell \x3d parent.CKEDITOR.config.wsc.DefaultParams.scriptPath;var serverUrl \x3d parent.CKEDITOR.config.wsc.DefaultParams.serviceHost;return serverUrl + spell;})();function loadScript(src, callback) {var scriptTag \x3d document.createElement("script");scriptTag.type \x3d "text/javascript";callback ? callback : callback \x3d function() {};if(scriptTag.readyState) {scriptTag.onreadystatechange \x3d function() {if (scriptTag.readyState \x3d\x3d "loaded" ||scriptTag.readyState \x3d\x3d "complete") {scriptTag.onreadystatechange \x3d null;setTimeout(function(){scriptTag.parentNode.removeChild(scriptTag)},1);callback();}};}else{scriptTag.onload \x3d function() {setTimeout(function(){scriptTag.parentNode.removeChild(scriptTag)},1);callback();};};scriptTag.src \x3d src;document.getElementsByTagName("head")[0].appendChild(scriptTag);};window.onload \x3d function(){loadScript(appString, function(){manageMessageTmp.send({"id": "iframeOnload","target": window.parent});});}})(this);\x3c/script\x3e\x3c/body\x3e\x3c/html\x3e');
c.document.close();a.div_overlay.setEnable()};a.setCurrentIframe=function(b){a.setIframe(a.dialog._.contents[b].Content,b)};a.setHeightBannerFrame=function(){var b=a.dialog.getContentElement("SpellTab","banner").getElement(),d=a.dialog.getContentElement("GrammTab","banner").getElement(),c=a.dialog.getContentElement("Thesaurus","banner").getElement();b.setStyle("height","90px");d.setStyle("height","90px");c.setStyle("height","90px")};a.setHeightFrame=function(){document.getElementById(a.iframeNumber+
"_"+a.dialog._.currentTabId).style.height="240px"};a.sendData=function(b){var d=b._.currentTabId,c=b._.contents[d].Content,e,f;a.previousTab=d;a.setIframe(c,d);var h=function(h){d=b._.currentTabId;h=h||window.event;h.data.getTarget().is("a")&&d!==a.previousTab&&(a.previousTab=d,c=b._.contents[d].Content,e=a.iframeNumber+"_"+d,a.div_overlay.setEnable(),c.getElement().getChildCount()?F(a.targetFromFrame[e],a.cmd[d]):(a.setIframe(c,d),f=document.getElementById(e),a.targetFromFrame[e]=f.contentWindow))};
b.parts.tabs.removeListener("click",h);b.parts.tabs.on("click",h)};a.buildSelectLang=function(a){var d=new CKEDITOR.dom.element("div"),c=new CKEDITOR.dom.element("select");a="wscLang"+a;d.addClass("cke_dialog_ui_input_select");d.setAttribute("role","presentation");d.setStyles({height:"auto",position:"absolute",right:"0",top:"-1px",width:"160px","white-space":"normal"});c.setAttribute("id",a);c.addClass("cke_dialog_ui_input_select");c.setStyles({width:"160px"});d.append(c);return d};a.buildOptionLang=
function(b,d){var c=document.getElementById("wscLang"+d),e=document.createDocumentFragment(),f,h,k=[];if(0===c.options.length){for(f in b)k.push([f,b[f]]);k.sort();for(var l=0;l<k.length;l++)f=document.createElement("option"),f.setAttribute("value",k[l][1]),h=document.createTextNode(k[l][0]),f.appendChild(h),e.appendChild(f);c.appendChild(e)}for(e=0;e<c.options.length;e++)c.options[e].value==a.selectingLang&&(c.options[e].selected="selected")};a.buildOptionSynonyms=function(b){b=a.selectNodeResponce[b];
var d=A(a.selectNode.Synonyms);a.selectNode.Synonyms.clear();for(var c=0;c<b.length;c++){var e=document.createElement("option");e.text=b[c];e.value=b[c];d.$.add(e,c)}a.selectNode.Synonyms.getInputElement().$.firstChild.selected=!0;a.textNode.Thesaurus.setValue(a.selectNode.Synonyms.getInputElement().getValue())};var C=function(a){var d=document,c=a.target||d.body,e=a.id||"overlayBlock",f=a.opacity||"0.9";a=a.background||"#f1f1f1";var h=d.getElementById(e),k=h||d.createElement("div");k.style.cssText=
"position: absolute;top:30px;bottom:41px;left:1px;right:1px;z-index: 10020;padding:0;margin:0;background:"+a+";opacity: "+f+";filter: alpha(opacity\x3d"+100*f+");display: none;";k.id=e;h||c.appendChild(k);return{setDisable:function(){k.style.display="none"},setEnable:function(){k.style.display="block"}}},M=function(b,d,c){var e=new CKEDITOR.dom.element("div"),f=new CKEDITOR.dom.element("input"),h=new CKEDITOR.dom.element("label"),k="wscGrammerSuggest"+b+"_"+d;e.addClass("cke_dialog_ui_input_radio");
e.setAttribute("role","presentation");e.setStyles({width:"97%",padding:"5px","white-space":"normal"});f.setAttributes({type:"radio",value:d,name:"wscGrammerSuggest",id:k});f.setStyles({"float":"left"});f.on("click",function(b){a.textNode.GrammTab.setValue(b.sender.getValue())});c?f.setAttribute("checked",!0):!1;f.addClass("cke_dialog_ui_radio_input");h.appendText(b);h.setAttribute("for",k);h.setStyles({display:"block","line-height":"16px","margin-left":"18px","white-space":"normal"});e.append(f);
e.append(h);return e},G=function(a){a=a||"true";null!==a&&"false"==a&&u()},w=function(b){var d=new J(b);b="wscLang"+a.dialog.getParentEditor().name;b=document.getElementById(b);var c,e=a.iframeNumber+"_"+a.dialog._.currentTabId;a.buildOptionLang(d.setLangList,a.dialog.getParentEditor().name);if(c=d.getCurrentLangGroup(a.selectingLang))v[c].onShow();G(a.show_grammar);b.onchange=function(b){b=d.getCurrentLangGroup(this.value);var c=a.dialog._.currentTabId;v[b].onShow();G(a.show_grammar);a.div_overlay.setEnable();
a.selectingLang=this.value;c=a.cmd[c];b&&v[b]&&v[b].allowedTabCommands[c]||(c=v[b].defaultTabCommand);for(var k in a.cmd)if(a.cmd[k]==c){a.previousTab=k;break}g.postMessage.send({message:{changeLang:a.selectingLang,interfaceLang:a.interfaceLang,text:a.dataTemp,cmd:c},target:a.targetFromFrame[e],id:"selectionLang_outer__page"})}},N=function(b){var d,c=function(b){b=a.dialog.getContentElement(a.dialog._.currentTabId,b)||a.LocalizationButton[b].instance;b.getElement().hasClass("cke_disabled")?b.getElement().setStyle("color",
"#a0a0a0"):b.disable()};d=function(b){b=a.dialog.getContentElement(a.dialog._.currentTabId,b)||a.LocalizationButton[b].instance;b.enable();b.getElement().setStyle("color","#333")};"no_any_suggestions"==b?(b="No suggestions",d=a.dialog.getContentElement(a.dialog._.currentTabId,"ChangeTo_button")||a.LocalizationButton.ChangeTo_button.instance,d.disable(),d=a.dialog.getContentElement(a.dialog._.currentTabId,"ChangeAll")||a.LocalizationButton.ChangeAll.instance,d.disable(),c("ChangeTo_button"),c("ChangeAll")):
(d("ChangeTo_button"),d("ChangeAll"));return b},P={iframeOnload:function(b){b=a.dialog._.currentTabId;F(a.targetFromFrame[a.iframeNumber+"_"+b],a.cmd[b])},suggestlist:function(b){delete b.id;a.div_overlay_no_check.setDisable();D();w(a.langList);var d=N(b.word),c="";d instanceof Array&&(d=b.word[0]);c=d=d.split(",");a.textNode.SpellTab.setValue(c[0]);b=A(B);B.clear();for(d=0;d<c.length;d++){var e=document.createElement("option");e.text=c[d];e.value=c[d];b.$.add(e,d)}p();a.div_overlay.setDisable()},
grammerSuggest:function(b){delete b.id;delete b.mocklangs;D();w(a.langList);var d=b.grammSuggest[0];a.grammerSuggest.getElement().setHtml("");a.textNode.GrammTab.reset();a.textNode.GrammTab.setValue(d);a.textNodeInfo.GrammTab.getElement().setHtml("");a.textNodeInfo.GrammTab.getElement().setText(b.info);b=b.grammSuggest;for(var d=b.length,c=!0,e=0;e<d;e++)a.grammerSuggest.getElement().append(M(b[e],b[e],c)),c=!1;p();a.div_overlay.setDisable()},thesaurusSuggest:function(b){delete b.id;delete b.mocklangs;
D();w(a.langList);a.selectNodeResponce=b;a.textNode.Thesaurus.reset();var d=A(a.selectNode.Categories),c=0;a.selectNode.Categories.clear();for(var e in b)b=document.createElement("option"),b.text=e,b.value=e,d.$.add(b,c),c++;d=a.selectNode.Categories.getInputElement().getChildren().$[0].value;a.selectNode.Categories.getInputElement().getChildren().$[0].selected=!0;a.buildOptionSynonyms(d);p();a.div_overlay.setDisable()},finish:function(b){delete b.id;O();b=a.dialog.getContentElement(a.dialog._.currentTabId,
"BlockFinishChecking").getElement();b.removeStyle("display");b.removeStyle("position");b.removeStyle("left");b.show();a.div_overlay.setDisable()},settext:function(b){function d(){try{c.focus()}catch(d){}c.setData(b.text,function(){a.dataTemp="";c.unlockSelection();c.fire("saveSnapshot");a.dialog.hide()})}delete b.id;a.dialog.getParentEditor().getCommand("checkspell");var c=a.dialog.getParentEditor(),e=CKEDITOR.plugins.scayt,f=c.scayt;if(e&&c.wsc){var h=c.wsc.udn,k=c.wsc.ud,l,g;if(f){var x=function(){if(k)for(l=
k.split(","),g=0;g<l.length;g+=1)f.addWordToUserDictionary(l[g]);else c.wsc.DataStorage.setData("scayt_user_dictionary",[]);d()};e.state.scayt[c.name]&&f.setMarkupPaused(!1);h?(c.wsc.DataStorage.setData("scayt_user_dictionary_name",h),f.restoreUserDictionary(h,x,x)):(c.wsc.DataStorage.setData("scayt_user_dictionary_name",""),f.removeUserDictionary(void 0,x,x))}else h?c.wsc.DataStorage.setData("scayt_user_dictionary_name",h):c.wsc.DataStorage.setData("scayt_user_dictionary_name",""),k&&(l=k.split(","),
c.wsc.DataStorage.setData("scayt_user_dictionary",l)),d()}else d()},ReplaceText:function(b){delete b.id;a.div_overlay.setEnable();a.dataTemp=b.text;a.selectingLang=b.currentLang;(b.cmd="0"!==b.len&&b.len)?a.div_overlay.setDisable():window.setTimeout(function(){try{a.div_overlay.setDisable()}catch(b){}},500);K(a.LocalizationButton);L(a.LocalizationLabel)},options_checkbox_send:function(b){delete b.id;b={osp:g.cookie.get("osp"),udn:g.cookie.get("udn"),cust_dic_ids:a.cust_dic_ids};g.postMessage.send({message:b,
target:a.targetFromFrame[a.iframeNumber+"_"+a.dialog._.currentTabId],id:"options_outer__page"})},getOptions:function(b){var d=b.DefOptions.udn;a.LocalizationComing=b.DefOptions.localizationButtonsAndText;a.show_grammar=b.show_grammar;a.langList=b.lang;a.bnr=b.bannerId;a.sessionid=b.sessionid;if(b.bannerId){a.setHeightBannerFrame();var c=b.banner;a.dialog.getContentElement(a.dialog._.currentTabId,"banner").getElement().setHtml(c)}else a.setHeightFrame();"undefined"==d&&(a.userDictionaryName?(d=a.userDictionaryName,
c={osp:g.cookie.get("osp"),udn:a.userDictionaryName,cust_dic_ids:a.cust_dic_ids,id:"options_dic_send",udnCmd:"create"},g.postMessage.send({message:c,target:a.targetFromFrame[void 0]})):d="");g.cookie.set("osp",b.DefOptions.osp);g.cookie.set("udn",d);g.cookie.set("cust_dic_ids",b.DefOptions.cust_dic_ids);g.postMessage.send({id:"giveOptions"})},options_dic_send:function(b){b={osp:g.cookie.get("osp"),udn:g.cookie.get("udn"),cust_dic_ids:a.cust_dic_ids,id:"options_dic_send",udnCmd:g.cookie.get("udnCmd")};
g.postMessage.send({message:b,target:a.targetFromFrame[a.iframeNumber+"_"+a.dialog._.currentTabId]})},data:function(a){delete a.id},giveOptions:function(){},setOptionsConfirmF:function(){},setOptionsConfirmT:function(){t.setValue("")},clickBusy:function(){a.div_overlay.setEnable()},suggestAllCame:function(){a.div_overlay.setDisable();a.div_overlay_no_check.setDisable()},TextCorrect:function(){w(a.langList)}},H=function(a){a=a||window.event;var d;try{d=window.JSON.parse(a.data)}catch(c){}if(d&&d.id)P[d.id](d)},
F=function(b,d,c,e){d=d||CKEDITOR.config.wsc_cmd;c=c||a.dataTemp;g.postMessage.send({message:{customerId:a.wsc_customerId,text:c,txt_ctrl:a.TextAreaNumber,cmd:d,cust_dic_ids:a.cust_dic_ids,udn:a.userDictionaryName,slang:a.selectingLang,interfaceLang:a.interfaceLang,reset_suggest:e||!1,sessionid:a.sessionid},target:b,id:"data_outer__page"});a.div_overlay.setEnable()},v={superset:{onShow:function(){a.dialog.showPage("Thesaurus");a.dialog.showPage("GrammTab");q()},allowedTabCommands:{spell:!0,grammar:!0,
thes:!0},defaultTabCommand:"spell"},usual:{onShow:function(){y();u();q()},allowedTabCommands:{spell:!0},defaultTabCommand:"spell"},rtl:{onShow:function(){y();u();q()},allowedTabCommands:{spell:!0},defaultTabCommand:"spell"},spellgrammar:{onShow:function(){y();a.dialog.showPage("GrammTab");q()},allowedTabCommands:{spell:!0,grammar:!0},defaultTabCommand:"spell"},spellthes:{onShow:function(){a.dialog.showPage("Thesaurus");u();q()},allowedTabCommands:{spell:!0,thes:!0},defaultTabCommand:"spell"}},I=function(b){var d=
(new function(a){var b={};return{getCmdByTab:function(d){for(var h in a)b[a[h]]=h;return b[d]}}}(a.cmd)).getCmdByTab(CKEDITOR.config.wsc_cmd);p();b.selectPage(d);a.sendData(b)},y=function(){a.dialog.hidePage("Thesaurus")},u=function(){a.dialog.hidePage("GrammTab")},q=function(){a.dialog.showPage("SpellTab")},p=function(){var b=a.dialog.getContentElement(a.dialog._.currentTabId,"bottomGroup").getElement();b.removeStyle("display");b.removeStyle("position");b.removeStyle("left");b.show()},O=function(){var b=
a.dialog.getContentElement(a.dialog._.currentTabId,"bottomGroup").getElement(),d=document.activeElement,c;b.setStyles({display:"block",position:"absolute",left:"-9999px"});setTimeout(function(){b.removeStyle("display");b.removeStyle("position");b.removeStyle("left");b.hide();a.dialog._.editor.focusManager.currentActive.focusNext();c=g.misc.findFocusable(a.dialog.parts.contents);if(g.misc.hasClass(d,"cke_dialog_tab")||g.misc.hasClass(d,"cke_dialog_contents_body")||!g.misc.isVisible(d))for(var e=0,
f;e<c.count();e++){if(f=c.getItem(e),g.misc.isVisible(f.$)){try{f.$.focus()}catch(h){}break}}else try{d.focus()}catch(k){}},0)},D=function(){var b=a.dialog.getContentElement(a.dialog._.currentTabId,"BlockFinishChecking").getElement(),d=document.activeElement,c;b.setStyles({display:"block",position:"absolute",left:"-9999px"});setTimeout(function(){b.removeStyle("display");b.removeStyle("position");b.removeStyle("left");b.hide();a.dialog._.editor.focusManager.currentActive.focusNext();c=g.misc.findFocusable(a.dialog.parts.contents);
if(g.misc.hasClass(d,"cke_dialog_tab")||g.misc.hasClass(d,"cke_dialog_contents_body")||!g.misc.isVisible(d))for(var e=0,f;e<c.count();e++){if(f=c.getItem(e),g.misc.isVisible(f.$)){try{f.$.focus()}catch(h){}break}}else try{d.focus()}catch(k){}},0)};CKEDITOR.dialog.add("checkspell",function(b){function d(a){var c=parseInt(b.config.wsc_left,10),d=parseInt(b.config.wsc_top,10),e=parseInt(b.config.wsc_width,10),g=parseInt(b.config.wsc_height,10),m=CKEDITOR.document.getWindow().getViewPaneSize();a.getPosition();
var n=a.getSize(),r=0;if(!a._.resized){var r=n.height-a.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.opera||CKEDITOR.env.ie&&CKEDITOR.env.quirks)),E=n.width-a.parts.contents.getSize("width",1);if(e<f.minWidth||isNaN(e))e=f.minWidth;e>m.width-E&&(e=m.width-E);if(g<f.minHeight||isNaN(g))g=f.minHeight;g>m.height-r&&(g=m.height-r);n.width=e+E;n.height=g+r;a._.fromResizeEvent=!1;a.resize(e,g);setTimeout(function(){a._.fromResizeEvent=!1;CKEDITOR.dialog.fire("resize",{dialog:a,width:e,
height:g},b)},300)}a._.moved||(r=isNaN(c)&&isNaN(d)?0:1,isNaN(c)&&(c=(m.width-n.width)/2),0>c&&(c=0),c>m.width-n.width&&(c=m.width-n.width),isNaN(d)&&(d=(m.height-n.height)/2),0>d&&(d=0),d>m.height-n.height&&(d=m.height-n.height),a.move(c,d,r))}function c(){b.wsc={};(function(a){var b={separator:"\x3c$\x3e",getDataType:function(a){return"undefined"===typeof a?"undefined":null===a?"null":Object.prototype.toString.call(a).slice(8,-1)},convertDataToString:function(a){return this.getDataType(a).toLowerCase()+
this.separator+a},restoreDataFromString:function(a){var b=a,c;a=this.backCompatibility(a);if("string"===typeof a)switch(b=a.indexOf(this.separator),c=a.substring(0,b),b=a.substring(b+this.separator.length),c){case "boolean":b="true"===b;break;case "number":b=parseFloat(b);break;case "array":b=""===b?[]:b.split(",");break;case "null":b=null;break;case "undefined":b=void 0}return b},backCompatibility:function(a){var b=a,c;"string"===typeof a&&(c=a.indexOf(this.separator),0>c&&(b=parseFloat(a),isNaN(b)&&
("["===a[0]&&"]"===a[a.length-1]?(a=a.replace("[",""),a=a.replace("]",""),b=""===a?[]:a.split(",")):b="true"===a||"false"===a?"true"===a:a),b=this.convertDataToString(b)));return b}},c={get:function(a){return b.restoreDataFromString(window.localStorage.getItem(a))},set:function(a,c){var d=b.convertDataToString(c);window.localStorage.setItem(a,d)},del:function(a){window.localStorage.removeItem(a)},clear:function(){window.localStorage.clear()}},d={expiration:31622400,get:function(a){return b.restoreDataFromString(this.getCookie(a))},
set:function(a,c){var d=b.convertDataToString(c);this.setCookie(a,d,{expires:this.expiration})},del:function(a){this.deleteCookie(a)},getCookie:function(a){return(a=document.cookie.match(new RegExp("(?:^|; )"+a.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"\x3d([^;]*)")))?decodeURIComponent(a[1]):void 0},setCookie:function(a,b,c){c=c||{};var d=c.expires;if("number"===typeof d&&d){var e=new Date;e.setTime(e.getTime()+1E3*d);d=c.expires=e}d&&d.toUTCString&&(c.expires=d.toUTCString());b=encodeURIComponent(b);
a=a+"\x3d"+b;for(var h in c)b=c[h],a+="; "+h,!0!==b&&(a+="\x3d"+b);document.cookie=a},deleteCookie:function(a){this.setCookie(a,null,{expires:-1})},clear:function(){for(var a=document.cookie.split(";"),b=0;b<a.length;b++){var c=a[b],d=c.indexOf("\x3d"),c=-1<d?c.substr(0,d):c;this.deleteCookie(c)}}},e=window.localStorage?c:d;a.DataStorage={getData:function(a){return e.get(a)},setData:function(a,b){e.set(a,b)},deleteData:function(a){e.del(a)},clear:function(){e.clear()}}})(b.wsc);b.wsc.operationWithUDN=
function(b,c){g.postMessage.send({message:{udn:c,id:"operationWithUDN",udnCmd:b},target:a.targetFromFrame[a.iframeNumber+"_"+a.dialog._.currentTabId]})};b.wsc.getLocalStorageUDN=function(){var a=b.wsc.DataStorage.getData("scayt_user_dictionary_name");if(a)return a};b.wsc.getLocalStorageUD=function(){var a=b.wsc.DataStorage.getData("scayt_user_dictionary");if(a)return a};b.wsc.addWords=function(a,c){var d=b.config.wsc.DefaultParams.serviceHost+b.config.wsc.DefaultParams.ssrvHost+"?cmd\x3ddictionary\x26format\x3djson\x26customerid\x3d1%3AncttD3-fIoSf2-huzwE4-Y5muI2-mD0Tt-kG9Wz-UEDFC-tYu243-1Uq474-d9Z2l3\x26action\x3daddword\x26word\x3d"+
a+"\x26callback\x3dtoString\x26synchronization\x3dtrue",e=document.createElement("script");e.type="text/javascript";e.src=d;document.getElementsByTagName("head")[0].appendChild(e);e.onload=c;e.onreadystatechange=function(){"loaded"===this.readyState&&c()}};b.wsc.cgiOrigin=function(){var a=b.config.wsc.DefaultParams.serviceHost.split("/");return a[0]+"//"+a[2]};b.wsc.isSsrvSame=!1}var e=function(c){this.getElement().focus();a.div_overlay.setEnable();c=a.dialog._.currentTabId;var d=a.iframeNumber+"_"+
c,e=a.textNode[c].getValue(),f=this.getElement().getAttribute("title-cmd");g.postMessage.send({message:{cmd:f,tabId:c,new_word:e},target:a.targetFromFrame[d],id:"cmd_outer__page"});"ChangeTo"!=f&&"ChangeAll"!=f||b.fire("saveSnapshot");"FinishChecking"==f&&b.config.wsc_onFinish.call(CKEDITOR.document.getWindow().getFrame())},f={minWidth:560,minHeight:444};return{title:b.config.wsc_dialogTitle||b.lang.wsc.title,minWidth:f.minWidth,minHeight:f.minHeight,buttons:[CKEDITOR.dialog.cancelButton],onLoad:function(){a.dialog=
this;y();u();q();b.plugins.scayt&&c()},onShow:function(){a.dialog=this;b.lockSelection(b.getSelection());a.TextAreaNumber="cke_textarea_"+b.name;g.postMessage.init(H);a.dataTemp=b.getData();a.OverlayPlace=a.dialog.parts.tabs.getParent().$;if(CKEDITOR&&CKEDITOR.config){a.wsc_customerId=b.config.wsc_customerId;a.cust_dic_ids=b.config.wsc_customDictionaryIds;a.userDictionaryName=b.config.wsc_userDictionaryName;a.defaultLanguage=CKEDITOR.config.defaultLanguage;var c="file:"==document.location.protocol?
"http:":document.location.protocol,c=b.config.wsc_customLoaderScript||c+"//www.webspellchecker.net/spellcheck31/lf/22/js/wsc_fck2plugin.js";d(this);CKEDITOR.scriptLoader.load(c,function(c){CKEDITOR.config&&CKEDITOR.config.wsc&&CKEDITOR.config.wsc.DefaultParams?(a.serverLocationHash=CKEDITOR.config.wsc.DefaultParams.serviceHost,a.logotype=CKEDITOR.config.wsc.DefaultParams.logoPath,a.loadIcon=CKEDITOR.config.wsc.DefaultParams.iconPath,a.loadIconEmptyEditor=CKEDITOR.config.wsc.DefaultParams.iconPathEmptyEditor,
a.LangComparer=new CKEDITOR.config.wsc.DefaultParams._SP_FCK_LangCompare):(a.serverLocationHash=DefaultParams.serviceHost,a.logotype=DefaultParams.logoPath,a.loadIcon=DefaultParams.iconPath,a.loadIconEmptyEditor=DefaultParams.iconPathEmptyEditor,a.LangComparer=new _SP_FCK_LangCompare);a.pluginPath=CKEDITOR.getUrl(b.plugins.wsc.path);a.iframeNumber=a.TextAreaNumber;a.templatePath=a.pluginPath+"dialogs/tmp.html";a.LangComparer.setDefaulLangCode(a.defaultLanguage);a.currentLang=b.config.wsc_lang||a.LangComparer.getSPLangCode(b.langCode)||
"en_US";a.interfaceLang=b.config.wsc_interfaceLang;a.selectingLang=a.currentLang;a.div_overlay=new C({opacity:"1",background:"#fff url("+a.loadIcon+") no-repeat 50% 50%",target:a.OverlayPlace});var d=a.dialog.parts.tabs.getId(),d=CKEDITOR.document.getById(d);d.setStyle("width","97%");d.getElementsByTag("DIV").count()||d.append(a.buildSelectLang(a.dialog.getParentEditor().name));a.div_overlay_no_check=new C({opacity:"1",id:"no_check_over",background:"#fff url("+a.loadIconEmptyEditor+") no-repeat 50% 50%",
target:a.OverlayPlace});c&&(I(a.dialog),a.dialog.setupContent(a.dialog));b.plugins.scayt&&(b.wsc.isSsrvSame=function(){var a=CKEDITOR.config.wsc.DefaultParams.serviceHost.replace("lf/22/js/../../../","").split("//")[1],c=CKEDITOR.config.wsc.DefaultParams.ssrvHost,d=b.config.scayt_srcUrl,e,f,h,g,l;window.SCAYT&&window.SCAYT.CKSCAYT&&(h=SCAYT.CKSCAYT.prototype.basePath,h.split("//"),g=h.split("//")[1].split("/")[0],l=h.split(g+"/")[1].replace("/lf/scayt3/ckscayt/","")+"/script/ssrv.cgi");!d||h||b.config.scayt_servicePath||
(d.split("//"),e=d.split("//")[1].split("/")[0],f=d.split(e+"/")[1].replace("/lf/scayt3/ckscayt/ckscayt.js","")+"/script/ssrv.cgi");return"//"+a+c==="//"+(b.config.scayt_serviceHost||g||e)+"/"+(b.config.scayt_servicePath||l||f)}());if(window.SCAYT&&b.wsc){var e=b.wsc.cgiOrigin();b.wsc.syncIsDone=!1;c=function(a){a.origin===e&&(a=JSON.parse(a.data),a.ud&&"undefined"!==a.ud?b.wsc.ud=a.ud:"undefined"===a.ud&&(b.wsc.ud=void 0),a.udn&&"undefined"!==a.udn?b.wsc.udn=a.udn:"undefined"===a.udn&&(b.wsc.udn=
void 0),b.wsc.syncIsDone||(f(b.wsc.ud),b.wsc.syncIsDone=!0))};var f=function(c){c=b.wsc.getLocalStorageUD();var d;c instanceof Array&&(d=c.toString());void 0!==d&&""!==d&&setTimeout(function(){b.wsc.addWords(d,function(){I(a.dialog);a.dialog.setupContent(a.dialog)})},400)};window.addEventListener?addEventListener("message",c,!1):window.attachEvent("onmessage",c);setTimeout(function(){var a=b.wsc.getLocalStorageUDN();void 0!==a&&b.wsc.operationWithUDN("restore",a)},500)}})}else a.dialog.hide()},onHide:function(){b.unlockSelection();
a.dataTemp="";a.sessionid="";g.postMessage.unbindHandler(H)},contents:[{id:"SpellTab",label:"SpellChecker",accessKey:"S",elements:[{type:"html",id:"banner",label:"banner",style:"",html:"\x3cdiv\x3e\x3c/div\x3e"},{type:"html",id:"Content",label:"spellContent",html:"",setup:function(b){b=a.iframeNumber+"_"+b._.currentTabId;var c=document.getElementById(b);a.targetFromFrame[b]=c.contentWindow}},{type:"hbox",id:"bottomGroup",style:"width:560px; margin: 0 auto;",widths:["50%","50%"],className:"wsc-spelltab-bottom",
children:[{type:"hbox",id:"leftCol",align:"left",width:"50%",children:[{type:"vbox",id:"rightCol1",widths:["50%","50%"],children:[{type:"text",id:"ChangeTo_label",label:a.LocalizationLabel.ChangeTo_label.text+":",labelLayout:"horizontal",labelStyle:"font: 12px/25px arial, sans-serif;",width:"140px","default":"",onShow:function(){a.textNode.SpellTab=this;a.LocalizationLabel.ChangeTo_label.instance=this},onHide:function(){this.reset()}},{type:"hbox",id:"rightCol",align:"right",width:"30%",children:[{type:"vbox",
id:"rightCol_col__left",children:[{type:"text",id:"labelSuggestions",label:a.LocalizationLabel.Suggestions.text+":",onShow:function(){a.LocalizationLabel.Suggestions.instance=this;this.getInputElement().setStyles({display:"none"})}},{type:"html",id:"logo",html:"",setup:function(b){this.getElement().$.src=a.logotype;this.getElement().getParent().setStyles({"text-align":"left"})}}]},{type:"select",id:"list_of_suggestions",labelStyle:"font: 12px/25px arial, sans-serif;",size:"6",inputStyle:"width: 140px; height: auto;",
items:[["loading..."]],onShow:function(){B=this},onChange:function(){a.textNode.SpellTab.setValue(this.getValue())}}]}]}]},{type:"hbox",id:"rightCol",align:"right",width:"50%",children:[{type:"vbox",id:"rightCol_col__left",widths:["50%","50%","50%","50%"],children:[{type:"button",id:"ChangeTo_button",label:a.LocalizationButton.ChangeTo_button.text,title:"Change to",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd","ChangeTo");a.LocalizationButton.ChangeTo_button.instance=
this},onClick:e},{type:"button",id:"ChangeAll",label:a.LocalizationButton.ChangeAll.text,title:"Change All",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id);a.LocalizationButton.ChangeAll.instance=this},onClick:e},{type:"button",id:"AddWord",label:a.LocalizationButton.AddWord.text,title:"Add word",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id);a.LocalizationButton.AddWord.instance=this},onClick:e},{type:"button",
id:"FinishChecking_button",label:a.LocalizationButton.FinishChecking_button.text,title:"Finish Checking",style:"width: 100%;margin-top: 9px;",onLoad:function(){this.getElement().setAttribute("title-cmd","FinishChecking");a.LocalizationButton.FinishChecking_button.instance=this},onClick:e}]},{type:"vbox",id:"rightCol_col__right",widths:["50%","50%","50%"],children:[{type:"button",id:"IgnoreWord",label:a.LocalizationButton.IgnoreWord.text,title:"Ignore word",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",
this.id);a.LocalizationButton.IgnoreWord.instance=this},onClick:e},{type:"button",id:"IgnoreAllWords",label:a.LocalizationButton.IgnoreAllWords.text,title:"Ignore all words",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id);a.LocalizationButton.IgnoreAllWords.instance=this},onClick:e},{type:"button",id:"Options",label:a.LocalizationButton.Options.text,title:"Option",style:"width: 100%;",onLoad:function(){a.LocalizationButton.Options.instance=this;"file:"==
document.location.protocol&&this.disable()},onClick:function(){this.getElement().focus();"file:"==document.location.protocol?alert("WSC: Options functionality is disabled when runing from file system"):(z=document.activeElement,b.openDialog("options"))}}]}]}]},{type:"hbox",id:"BlockFinishChecking",style:"width:560px; margin: 0 auto;",widths:["70%","30%"],onShow:function(){this.getElement().setStyles({display:"block",position:"absolute",left:"-9999px"})},onHide:p,children:[{type:"hbox",id:"leftCol",
align:"left",width:"70%",children:[{type:"vbox",id:"rightCol1",setup:function(){this.getChild()[0].getElement().$.src=a.logotype;this.getChild()[0].getElement().getParent().setStyles({"text-align":"center"})},children:[{type:"html",id:"logo",html:""}]}]},{type:"hbox",id:"rightCol",align:"right",width:"30%",children:[{type:"vbox",id:"rightCol_col__left",children:[{type:"button",id:"Option_button",label:a.LocalizationButton.Options.text,title:"Option",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",
this.id);"file:"==document.location.protocol&&this.disable()},onClick:function(){this.getElement().focus();"file:"==document.location.protocol?alert("WSC: Options functionality is disabled when runing from file system"):(z=document.activeElement,b.openDialog("options"))}},{type:"button",id:"FinishChecking_button_block",label:a.LocalizationButton.FinishChecking_button_block.text,title:"Finish Checking",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd","FinishChecking")},
onClick:e}]}]}]}]},{id:"GrammTab",label:"Grammar",accessKey:"G",elements:[{type:"html",id:"banner",label:"banner",style:"",html:"\x3cdiv\x3e\x3c/div\x3e"},{type:"html",id:"Content",label:"GrammarContent",html:"",setup:function(){var b=a.iframeNumber+"_"+a.dialog._.currentTabId,c=document.getElementById(b);a.targetFromFrame[b]=c.contentWindow}},{type:"vbox",id:"bottomGroup",style:"width:560px; margin: 0 auto;",children:[{type:"hbox",id:"leftCol",widths:["66%","34%"],children:[{type:"vbox",children:[{type:"text",
id:"text",label:"Change to:",labelLayout:"horizontal",labelStyle:"font: 12px/25px arial, sans-serif;",inputStyle:"float: right; width: 200px;","default":"",onShow:function(){a.textNode.GrammTab=this},onHide:function(){this.reset()}},{type:"html",id:"html_text",html:"\x3cdiv style\x3d'min-height: 17px; line-height: 17px; padding: 5px; text-align: left;background: #F1F1F1;color: #595959; white-space: normal!important;'\x3e\x3c/div\x3e",onShow:function(b){a.textNodeInfo.GrammTab=this}},{type:"html",
id:"radio",html:"",onShow:function(){a.grammerSuggest=this}}]},{type:"vbox",children:[{type:"button",id:"ChangeTo_button",label:"Change to",title:"Change to",style:"width: 133px; float: right;",onLoad:function(){this.getElement().setAttribute("title-cmd","ChangeTo")},onClick:e},{type:"button",id:"IgnoreWord",label:"Ignore word",title:"Ignore word",style:"width: 133px; float: right;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onClick:e},{type:"button",id:"IgnoreAllWords",
label:"Ignore Problem",title:"Ignore Problem",style:"width: 133px; float: right;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onClick:e},{type:"button",id:"FinishChecking_button",label:a.LocalizationButton.FinishChecking_button.text,title:"Finish Checking",style:"width: 133px; float: right; margin-top: 9px;",onLoad:function(){this.getElement().setAttribute("title-cmd","FinishChecking")},onClick:e}]}]}]},{type:"hbox",id:"BlockFinishChecking",style:"width:560px; margin: 0 auto;",
widths:["70%","30%"],onShow:function(){this.getElement().setStyles({display:"block",position:"absolute",left:"-9999px"})},onHide:p,children:[{type:"hbox",id:"leftCol",align:"left",width:"70%",children:[{type:"vbox",id:"rightCol1",children:[{type:"html",id:"logo",html:"",setup:function(){this.getElement().$.src=a.logotype;this.getElement().getParent().setStyles({"text-align":"center"})}}]}]},{type:"hbox",id:"rightCol",align:"right",width:"30%",children:[{type:"vbox",id:"rightCol_col__left",children:[{type:"button",
id:"FinishChecking_button_block",label:a.LocalizationButton.FinishChecking_button_block.text,title:"Finish Checking",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd","FinishChecking")},onClick:e}]}]}]}]},{id:"Thesaurus",label:"Thesaurus",accessKey:"T",elements:[{type:"html",id:"banner",label:"banner",style:"",html:"\x3cdiv\x3e\x3c/div\x3e"},{type:"html",id:"Content",label:"spellContent",html:"",setup:function(){var b=a.iframeNumber+"_"+a.dialog._.currentTabId,c=document.getElementById(b);
a.targetFromFrame[b]=c.contentWindow}},{type:"vbox",id:"bottomGroup",style:"width:560px; margin: -10px auto; overflow: hidden;",children:[{type:"hbox",widths:["75%","25%"],children:[{type:"vbox",children:[{type:"hbox",widths:["65%","35%"],children:[{type:"text",id:"ChangeTo_label",label:a.LocalizationLabel.ChangeTo_label.text+":",labelLayout:"horizontal",inputStyle:"width: 160px;",labelStyle:"font: 12px/25px arial, sans-serif;","default":"",onShow:function(b){a.textNode.Thesaurus=this;a.LocalizationLabel.ChangeTo_label.instance=
this},onHide:function(){this.reset()}},{type:"button",id:"ChangeTo_button",label:a.LocalizationButton.ChangeTo_button.text,title:"Change to",style:"width: 121px; margin-top: 1px;",onLoad:function(){this.getElement().setAttribute("title-cmd","ChangeTo");a.LocalizationButton.ChangeTo_button.instance=this},onClick:e}]},{type:"hbox",children:[{type:"select",id:"Categories",label:a.LocalizationLabel.Categories.text+":",labelStyle:"font: 12px/25px arial, sans-serif;",size:"5",inputStyle:"width: 180px; height: auto;",
items:[],onShow:function(){a.selectNode.Categories=this;a.LocalizationLabel.Categories.instance=this},onChange:function(){a.buildOptionSynonyms(this.getValue())}},{type:"select",id:"Synonyms",label:a.LocalizationLabel.Synonyms.text+":",labelStyle:"font: 12px/25px arial, sans-serif;",size:"5",inputStyle:"width: 180px; height: auto;",items:[],onShow:function(){a.selectNode.Synonyms=this;a.textNode.Thesaurus.setValue(this.getValue());a.LocalizationLabel.Synonyms.instance=this},onChange:function(b){a.textNode.Thesaurus.setValue(this.getValue())}}]}]},
{type:"vbox",width:"120px",style:"margin-top:46px;",children:[{type:"html",id:"logotype",label:"WebSpellChecker.net",html:"",setup:function(){this.getElement().$.src=a.logotype;this.getElement().getParent().setStyles({"text-align":"center"})}},{type:"button",id:"FinishChecking_button",label:a.LocalizationButton.FinishChecking_button.text,title:"Finish Checking",style:"width: 100%; float: right; margin-top: 9px;",onLoad:function(){this.getElement().setAttribute("title-cmd","FinishChecking")},onClick:e}]}]}]},
{type:"hbox",id:"BlockFinishChecking",style:"width:560px; margin: 0 auto;",widths:["70%","30%"],onShow:function(){this.getElement().setStyles({display:"block",position:"absolute",left:"-9999px"})},children:[{type:"hbox",id:"leftCol",align:"left",width:"70%",children:[{type:"vbox",id:"rightCol1",children:[{type:"html",id:"logo",html:"",setup:function(){this.getElement().$.src=a.logotype;this.getElement().getParent().setStyles({"text-align":"center"})}}]}]},{type:"hbox",id:"rightCol",align:"right",
width:"30%",children:[{type:"vbox",id:"rightCol_col__left",children:[{type:"button",id:"FinishChecking_button_block",label:a.LocalizationButton.FinishChecking_button_block.text,title:"Finish Checking",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd","FinishChecking")},onClick:e}]}]}]}]}]}});var z=null;CKEDITOR.dialog.add("options",function(b){var d=null,c={},e={},f=null,h=null;g.cookie.get("udn");g.cookie.get("osp");b=function(a){h=this.getElement().getAttribute("title-cmd");
a=[];a[0]=e.IgnoreAllCapsWords;a[1]=e.IgnoreWordsNumbers;a[2]=e.IgnoreMixedCaseWords;a[3]=e.IgnoreDomainNames;a=a.toString().replace(/,/g,"");g.cookie.set("osp",a);g.cookie.set("udnCmd",h?h:"ignore");"delete"!=h&&(a="",""!==t.getValue()&&(a=t.getValue()),g.cookie.set("udn",a));g.postMessage.send({id:"options_dic_send"})};var k=function(){f.getElement().setHtml(a.LocalizationComing.error);f.getElement().show()};return{title:a.LocalizationComing.Options,minWidth:430,minHeight:130,resizable:CKEDITOR.DIALOG_RESIZE_NONE,
contents:[{id:"OptionsTab",label:"Options",accessKey:"O",elements:[{type:"hbox",id:"options_error",children:[{type:"html",style:"display: block;text-align: center;white-space: normal!important; font-size: 12px;color:red",html:"\x3cdiv\x3e\x3c/div\x3e",onShow:function(){f=this}}]},{type:"vbox",id:"Options_content",children:[{type:"hbox",id:"Options_manager",widths:["52%","48%"],children:[{type:"fieldset",label:"Spell Checking Options",style:"border: none;margin-top: 13px;padding: 10px 0 10px 10px",
onShow:function(){this.getInputElement().$.children[0].innerHTML=a.LocalizationComing.SpellCheckingOptions},children:[{type:"vbox",id:"Options_checkbox",children:[{type:"checkbox",id:"IgnoreAllCapsWords",label:"Ignore All-Caps Words",labelStyle:"margin-left: 5px; font: 12px/16px arial, sans-serif;display: inline-block;white-space: normal;",style:"float:left; min-height: 16px;","default":"",onClick:function(){e[this.id]=this.getValue()?1:0}},{type:"checkbox",id:"IgnoreWordsNumbers",label:"Ignore Words with Numbers",
labelStyle:"margin-left: 5px; font: 12px/16px arial, sans-serif;display: inline-block;white-space: normal;",style:"float:left; min-height: 16px;","default":"",onClick:function(){e[this.id]=this.getValue()?1:0}},{type:"checkbox",id:"IgnoreMixedCaseWords",label:"Ignore Mixed-Case Words",labelStyle:"margin-left: 5px; font: 12px/16px arial, sans-serif;display: inline-block;white-space: normal;",style:"float:left; min-height: 16px;","default":"",onClick:function(){e[this.id]=this.getValue()?1:0}},{type:"checkbox",
id:"IgnoreDomainNames",label:"Ignore Domain Names",labelStyle:"margin-left: 5px; font: 12px/16px arial, sans-serif;display: inline-block;white-space: normal;",style:"float:left; min-height: 16px;","default":"",onClick:function(){e[this.id]=this.getValue()?1:0}}]}]},{type:"vbox",id:"Options_DictionaryName",children:[{type:"text",id:"DictionaryName",style:"margin-bottom: 10px",label:"Dictionary Name:",labelLayout:"vertical",labelStyle:"font: 12px/25px arial, sans-serif;","default":"",onLoad:function(){t=
this;var b=a.userDictionaryName?a.userDictionaryName:(g.cookie.get("udn"),this.getValue());this.setValue(b)},onShow:function(){t=this;var b=g.cookie.get("udn")?g.cookie.get("udn"):this.getValue();this.setValue(b);this.setLabel(a.LocalizationComing.DictionaryName)},onHide:function(){this.reset()}},{type:"hbox",id:"Options_buttons",children:[{type:"vbox",id:"Options_leftCol_col",widths:["50%","50%"],children:[{type:"button",id:"create",label:"Create",title:"Create",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",
this.id)},onShow:function(){(this.getElement().getFirst()||this.getElement()).setText(a.LocalizationComing.Create)},onClick:b},{type:"button",id:"restore",label:"Restore",title:"Restore",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onShow:function(){(this.getElement().getFirst()||this.getElement()).setText(a.LocalizationComing.Restore)},onClick:b}]},{type:"vbox",id:"Options_rightCol_col",widths:["50%","50%"],children:[{type:"button",id:"rename",label:"Rename",
title:"Rename",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onShow:function(){(this.getElement().getFirst()||this.getElement()).setText(a.LocalizationComing.Rename)},onClick:b},{type:"button",id:"delete",label:"Remove",title:"Remove",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onShow:function(){(this.getElement().getFirst()||this.getElement()).setText(a.LocalizationComing.Remove)},onClick:b}]}]}]}]},{type:"hbox",
id:"Options_text",children:[{type:"html",style:"text-align: justify;margin-top: 15px;white-space: normal!important; font-size: 12px;color:#777;",html:"\x3cdiv\x3e"+a.LocalizationComing.OptionsTextIntro+"\x3c/div\x3e",onShow:function(){this.getElement().setText(a.LocalizationComing.OptionsTextIntro)}}]}]}]}],buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton],onOk:function(){var a=[];a[0]=e.IgnoreAllCapsWords;a[1]=e.IgnoreWordsNumbers;a[2]=e.IgnoreMixedCaseWords;a[3]=e.IgnoreDomainNames;
a=a.toString().replace(/,/g,"");g.cookie.set("osp",a);g.postMessage.send({id:"options_checkbox_send"});f.getElement().hide();f.getElement().setHtml(" ")},onLoad:function(){d=this;c.IgnoreAllCapsWords=d.getContentElement("OptionsTab","IgnoreAllCapsWords");c.IgnoreWordsNumbers=d.getContentElement("OptionsTab","IgnoreWordsNumbers");c.IgnoreMixedCaseWords=d.getContentElement("OptionsTab","IgnoreMixedCaseWords");c.IgnoreDomainNames=d.getContentElement("OptionsTab","IgnoreDomainNames")},onShow:function(){g.postMessage.init(k);
var b=g.cookie.get("osp").split("");e.IgnoreAllCapsWords=b[0];e.IgnoreWordsNumbers=b[1];e.IgnoreMixedCaseWords=b[2];e.IgnoreDomainNames=b[3];parseInt(e.IgnoreAllCapsWords,10)?c.IgnoreAllCapsWords.setValue("checked",!1):c.IgnoreAllCapsWords.setValue("",!1);parseInt(e.IgnoreWordsNumbers,10)?c.IgnoreWordsNumbers.setValue("checked",!1):c.IgnoreWordsNumbers.setValue("",!1);parseInt(e.IgnoreMixedCaseWords,10)?c.IgnoreMixedCaseWords.setValue("checked",!1):c.IgnoreMixedCaseWords.setValue("",!1);parseInt(e.IgnoreDomainNames,
10)?c.IgnoreDomainNames.setValue("checked",!1):c.IgnoreDomainNames.setValue("",!1);e.IgnoreAllCapsWords=c.IgnoreAllCapsWords.getValue()?1:0;e.IgnoreWordsNumbers=c.IgnoreWordsNumbers.getValue()?1:0;e.IgnoreMixedCaseWords=c.IgnoreMixedCaseWords.getValue()?1:0;e.IgnoreDomainNames=c.IgnoreDomainNames.getValue()?1:0;c.IgnoreAllCapsWords.getElement().$.lastChild.innerHTML=a.LocalizationComing.IgnoreAllCapsWords;c.IgnoreWordsNumbers.getElement().$.lastChild.innerHTML=a.LocalizationComing.IgnoreWordsWithNumbers;
c.IgnoreMixedCaseWords.getElement().$.lastChild.innerHTML=a.LocalizationComing.IgnoreMixedCaseWords;c.IgnoreDomainNames.getElement().$.lastChild.innerHTML=a.LocalizationComing.IgnoreDomainNames},onHide:function(){g.postMessage.unbindHandler(k);if(z)try{z.focus()}catch(a){}}}});CKEDITOR.dialog.on("resize",function(b){b=b.data;var d=b.dialog,c=CKEDITOR.document.getById(a.iframeNumber+"_"+d._.currentTabId);"checkspell"==d._.name&&(a.bnr?c&&c.setSize("height",b.height-310):c&&c.setSize("height",b.height-
220),d._.fromResizeEvent&&!d._.resized&&(d._.resized=!0),d._.fromResizeEvent=!0)});CKEDITOR.on("dialogDefinition",function(b){if("checkspell"===b.data.name){var d=b.data.definition;a.onLoadOverlay=new C({opacity:"1",background:"#fff",target:d.dialog.parts.tabs.getParent().$});a.onLoadOverlay.setEnable();d.dialog.on("cancel",function(b){d.dialog.getParentEditor().config.wsc_onClose.call(this.document.getWindow().getFrame());a.div_overlay.setDisable();a.onLoadOverlay.setDisable();return!1},this,null,
-1)}})})();

View File

@ -1,11 +0,0 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.dialog.add("checkspell",function(a){function c(a,c){var d=0;return function(){"function"==typeof window.doSpell?("undefined"!=typeof e&&window.clearInterval(e),l(a)):180==d++&&window._cancelOnError(c)}}function l(c){var f=new window._SP_FCK_LangCompare,b=CKEDITOR.getUrl(a.plugins.wsc.path+"dialogs/"),e=b+"tmpFrameset.html";window.gFCKPluginName="wsc";f.setDefaulLangCode(a.config.defaultLanguage);window.doSpell({ctrl:g,lang:a.config.wsc_lang||f.getSPLangCode(a.langCode),intLang:a.config.wsc_uiLang||
f.getSPLangCode(a.langCode),winType:d,onCancel:function(){c.hide()},onFinish:function(b){a.focus();c.getParentEditor().setData(b.value);c.hide()},staticFrame:e,framesetPath:e,iframePath:b+"ciframe.html",schemaURI:b+"wsc.css",userDictionaryName:a.config.wsc_userDictionaryName,customDictionaryName:a.config.wsc_customDictionaryIds&&a.config.wsc_customDictionaryIds.split(","),domainName:a.config.wsc_domainName});CKEDITOR.document.getById(h).setStyle("display","none");CKEDITOR.document.getById(d).setStyle("display",
"block")}var b=CKEDITOR.tools.getNextNumber(),d="cke_frame_"+b,g="cke_data_"+b,h="cke_error_"+b,e,b=document.location.protocol||"http:",k=a.lang.wsc.notAvailable,m='\x3ctextarea style\x3d"display: none" id\x3d"'+g+'" rows\x3d"10" cols\x3d"40"\x3e \x3c/textarea\x3e\x3cdiv id\x3d"'+h+'" style\x3d"display:none;color:red;font-size:16px;font-weight:bold;padding-top:160px;text-align:center;z-index:11;"\x3e\x3c/div\x3e\x3ciframe src\x3d"" style\x3d"width:100%;background-color:#f1f1e3;" frameborder\x3d"0" name\x3d"'+
d+'" id\x3d"'+d+'" allowtransparency\x3d"1"\x3e\x3c/iframe\x3e',n=a.config.wsc_customLoaderScript||b+"//loader.webspellchecker.net/sproxy_fck/sproxy.php?plugin\x3dfck2\x26customerid\x3d"+a.config.wsc_customerId+"\x26cmd\x3dscript\x26doc\x3dwsc\x26schema\x3d22";a.config.wsc_customLoaderScript&&(k+='\x3cp style\x3d"color:#000;font-size:11px;font-weight: normal;text-align:center;padding-top:10px"\x3e'+a.lang.wsc.errorLoading.replace(/%s/g,a.config.wsc_customLoaderScript)+"\x3c/p\x3e");window._cancelOnError=
function(c){if("undefined"==typeof window.WSC_Error){CKEDITOR.document.getById(d).setStyle("display","none");var b=CKEDITOR.document.getById(h);b.setStyle("display","block");b.setHtml(c||a.lang.wsc.notAvailable)}};return{title:a.config.wsc_dialogTitle||a.lang.wsc.title,minWidth:485,minHeight:380,buttons:[CKEDITOR.dialog.cancelButton],onShow:function(){var b=this.getContentElement("general","content").getElement();b.setHtml(m);b.getChild(2).setStyle("height",this._.contentSize.height+"px");"function"!=
typeof window.doSpell&&CKEDITOR.document.getHead().append(CKEDITOR.document.createElement("script",{attributes:{type:"text/javascript",src:n}}));b=a.getData();CKEDITOR.document.getById(g).setValue(b);e=window.setInterval(c(this,k),250)},onHide:function(){window.ooo=void 0;window.int_framsetLoaded=void 0;window.framesetLoaded=void 0;window.is_window_opened=!1},contents:[{id:"general",label:a.config.wsc_dialogTitle||a.lang.wsc.title,padding:0,elements:[{type:"html",id:"content",html:""}]}]}});
CKEDITOR.dialog.on("resize",function(a){a=a.data;var c=a.dialog;"checkspell"==c._.name&&((c=(c=c.getContentElement("general","content").getElement())&&c.getChild(2))&&c.setSize("height",a.height),c&&c.setSize("width",a.width))});

View File

@ -1,43 +0,0 @@
.cke_dialog_body #overlayBlock,
.cke_dialog_body #no_check_over
{
top: 39px !important;
}
div[name=SpellTab] .wsc-spelltab-bottom .cke_dialog_ui_vbox td > .cke_dialog_ui_button:first-child
{
margin-top: 4px;
}
div[name=SpellTab] .wsc-spelltab-bottom .cke_dialog_ui_hbox_first .cke_dialog_ui_select > label
{
margin-left: 0;
}
div[name=SpellTab] .wsc-spelltab-bottom .cke_dialog_ui_hbox_first .cke_dialog_ui_select div.cke_dialog_ui_input_select
{
width: 140px !important;
}
div[name=SpellTab] .wsc-spelltab-bottom .cke_dialog_ui_hbox_first .cke_dialog_ui_select select.cke_dialog_ui_input_select,
div[name=Thesaurus] div.cke_dialog_ui_input_select select.cke_dialog_ui_input_select
{
margin-top: 1px;
}
div[name=SpellTab] .wsc-spelltab-bottom .cke_dialog_ui_hbox_first .cke_dialog_ui_select select.cke_dialog_ui_input_select:focus,
div[name=Thesaurus] div.cke_dialog_ui_input_select select.cke_dialog_ui_input_select:focus
{
margin-top: 0;
}
div[name=GrammTab] .cke_dialog_ui_vbox tbody > tr:first-child .cke_dialog_ui_button,
div[name=Thesaurus] .cke_dialog_ui_vbox tbody > tr:first-child .cke_dialog_ui_button
{
margin-top: 4px !important;
}
div[name=Thesaurus] div.cke_dialog_ui_input_select
{
width: 180px !important;
}

View File

@ -1,734 +0,0 @@
<div id="wiki-wrapper" class="page">
<div id="head">
<h1 class="instapaper_title">API Reference</h1>
<ul class="wiki-actions readability-extra">
<li class="gollum-minibutton">
<a href="/phayes/geoPHP/wiki/API-Reference/_history"
class="minibutton bigger action-page-history">
<span>Page History</span>
</a>
</li>
</ul>
</div>
<div id="wiki-content">
<div class="wrap">
<div id="wiki-body" class="gollum-mediawiki-content instapaper_body">
<div class="markdown-body">
<table class="toc" summary="Contents">
<tr>
<td>
<div>Table of Contents</div>
<ul>
<ul>
<li>
<a href="#wiki-geoPHP_static_class" rel="nofollow">geoPHP static class</a>
<ul>
<li>
<a href="#wiki-Example" rel="nofollow">Example</a>
</li>
<li>
<a href="#wiki-Static_Methods" rel="nofollow">Static Methods</a>
</li>
</ul>
</li>
<li>
<a href="#wiki-Adapters" rel="nofollow">Adapters</a>
<ul>
<li>
<a href="#wiki-Class_Hierarchy" rel="nofollow">Class Hierarchy</a>
</li>
<li>
<a href="#wiki-Example-2" rel="nofollow">Example</a>
</li>
<li>
<a href="#wiki-Methods" rel="nofollow">Methods</a>
</li>
</ul>
</li>
<li>
<a href="#wiki-Geometries" rel="nofollow">Geometries</a>
<ul>
<li>
<a href="#wiki-Class_Hierarchy-2" rel="nofollow">Class Hierarchy</a>
</li>
<li>
<a href="#wiki-Example-3" rel="nofollow">Example</a>
</li>
<li>
<a href="#wiki-Methods-2" rel="nofollow">Methods</a>
</li>
</ul>
</li>
</ul>
</ul>
</td>
</tr>
</table>
<h2>
<span class="mw-headline">
<a name="wiki-geoPHP_static_class" rel="nofollow">geoPHP static class</a>
</span>
</h2>
<p>geoPHP provides a static class that contains useful utility functions. All methods must
be called statically. </p>
<h3>
<span class="mw-headline">
<a name="wiki-Example" rel="nofollow">Example</a>
</span>
</h3>
<pre>$geometry = geoPHP::load('MULTILINESTRING((10 10,20 20,10 40))','wkt');</pre>
<pre>$reduced_geometry = geoPHP::geometryReduce($geometry);</pre>
<h3>
<span class="mw-headline">
<a name="wiki-Static_Methods" rel="nofollow">Static Methods</a>
</span>
</h3>
<table>
<tr>
<td>
<b>Method</b>
</td>
<td>
<b>Description</b>
</td>
<td>
<b>Returns</b>
</td>
</tr>
<tr>
<td> version </td>
<td> Provides the current geoPHP version. Useful if you need to check compatablity </td>
<td> Numeric String </td>
</tr>
<tr>
<td> load </td>
<td> Load from an adapter format (like wkt) into a geometry. The first argument is the
data, the second one is the format of the data
('wkt','wkb','json','kml','gpx','google_geocode'). All additional arguments are
passed along to the read method of the relevant adapte </td>
<td> Geometry </td>
</tr>
<tr>
<td> getAdapterMap </td>
<td> Get a list of adapters as an array keyed by the value that should be passed to
geoPHP::load </td>
<td> Array </td>
</tr>
<tr>
<td> geometryList </td>
<td> List all geometry types </td>
<td> Array </td>
</tr>
<tr>
<td> geosToGeometry </td>
<td> Given a GEOSGeometry, get a geoPHP geometry </td>
<td> Geometry </td>
</tr>
<tr>
<td> geometryReduce </td>
<td> Reduce a geometry, or an array of geometries, into their \'lowest\' available
common geometry. For example a GeometryCollection of only points will become a
MultiPoint, while a multi-point containing a single point will return a point. An
array of geometries can be passed and they will be compiled into a single geometry. </td>
<td> Geometry </td>
</tr>
<tr>
<td> geosInstalled </td>
<td> Check if the GEOS php extension is installed and working </td>
<td> Boolean </td>
</tr>
</table>
<h2>
<span class="mw-headline">
<a name="wiki-Adapters" rel="nofollow">Adapters</a>
</span>
</h2>
<p>Adapters are responsible for getting data in and out of geoPHP Geometries. Generally
you will use an adapter to load data into a geoPHP geometry, do various manipulations on
the geometry, then use another adapter to write it out to another (or the same) format.
You can also use adapters by themselves to simply do conversion from one format to
another (See <a class="internal present"
href="/phayes/geoPHP/wiki/Example-format-converter" rel="nofollow"
>example-format-converter</a> for an example of this). Adapters should be instantiated
and not called statically. </p>
<h3>
<span class="mw-headline">
<a name="wiki-Class_Hierarchy" rel="nofollow">Class Hierarchy</a>
</span>
</h3>
<ul>
<li>GeoAdapter Abtract Class<ul>
<li>WKT Enables reading and writing WKT (Well Known Text)</li>
<li>WKB Enables reading and writing WKB (Well Known Binary). This is very fast.</li>
<li>GeoJSON Enables reading and writing GeoJSON</li>
<li>KML Enables reading and writing KML (Google Earth)</li>
<li>GoogleGeocode Enables geocoding and reverse-geocoding via google geocoding
API</li>
<li>GPX Enables reading and writing GPX (from handheld GPS devices)</li>
<li>GeoRSS Enables reading and writing of GeoRSS</li>
</ul>
</li>
</ul>
<h3>
<span class="mw-headline">
<a name="wiki-Example-2" rel="nofollow">Example</a>
</span>
</h3>
<pre>$wkb_reader = new WKB();</pre>
<pre>$geometry = $wkb_reader-&gt;read('0101000000000000000000f03f000000000000f03f',TRUE);</pre>
<pre>$wkt_writer = new wkt();</pre>
<pre>$wkt = $wkt_writer-&gt;write($geometry);</pre>
<h3>
<span class="mw-headline">
<a name="wiki-Methods" rel="nofollow">Methods</a>
</span>
</h3>
<table>
<tr>
<td>
<b>Method</b>
</td>
<td>
<b>Description</b>
</td>
<td>
<b>Returns</b>
</td>
</tr>
<tr>
<td> read </td>
<td> Read in input (generally a string) and return a Geometry </td>
<td> Geometry </td>
</tr>
<tr>
<td> write </td>
<td> Write out the given geometry into the adapter formater </td>
<td> String </td>
</tr>
</table>
<h2>
<span class="mw-headline">
<a name="wiki-Geometries" rel="nofollow">Geometries</a>
</span>
</h2>
<p>Geometries form the heart of the geoPHP library. Once you have loaded your data into a
Geometry object, you have access to all the various methods detailed below for doing
conversions, transformations, and operations. While generally you would use an adapter
to get a Geometry object, they can also be built by hand. See the constructor methods in
the classes to see how to do this. GEOS-php extension needs to be installed in order to
use some of the advanced methods (detailed below). </p>
<h3>
<span class="mw-headline">
<a name="wiki-Class_Hierarchy-2" rel="nofollow">Class Hierarchy</a>
</span>
</h3>
<ul>
<li>Geometry<ul>
<li>Point</li>
<li>Collection<ul>
<li>LineString</li>
<li>Polygon</li>
<li>MultiLineString</li>
<li>MultiPoint</li>
<li>MultiPolygon</li>
<li>GeometryCollection</li>
</ul>
</li>
</ul>
</li>
</ul>
<h3>
<span class="mw-headline">
<a name="wiki-Example-3" rel="nofollow">Example</a>
</span>
</h3>
<pre>$poly1 = $geoPHP::load('POLYGON((30 10,10 20,20 40,40 40,30 10))','wkt');</pre>
<pre>$poly2 = $geoPHP::load('POLYGON((35 10,10 20,15 40,45 45,35 10),(20 30, 35 35, 30 20, 20 30))','wkt');</pre>
<pre>$combined_poly = $poly1-&gt;union($poly2);</pre>
<pre>$kml = $combined_poly-&gt;out('kml');</pre>
<h3>
<span class="mw-headline">
<a name="wiki-Methods-2" rel="nofollow">Methods</a>
</span>
</h3>
<p>
<b>Common Methods</b>
</p>
<table>
<tr>
<td>
<b>Method</b>
</td>
<td>
<b>Description</b>
</td>
<td>
<b>Returns</b>
</td>
</tr>
<tr>
<td> out </td>
<td> Outputs the geometry into the specified adapter format. Available formats are
<i>wkt</i>, <i>wkb</i>, <i>json</i>, <i>kml</i>, <i>gpx</i>, <i>google_geocode</i>
</td>
<td> String </td>
</tr>
<tr>
<td> area </td>
<td> The area of this Polygon (or GeometryCollection), as measured in the spatial
reference system of the geometry </td>
<td> Float </td>
</tr>
<tr>
<td> boundary </td>
<td> Returns the closure of the combinatorial boundary of this geometric object. </td>
<td> LinearRing </td>
</tr>
<tr>
<td> envelope </td>
<td> The minimum bounding box for this Geometry, returned as a Geometry. </td>
<td> Polygon </td>
</tr>
<tr>
<td> getBBox </td>
<td> The minimum bounding box for this Geometry, returned as an array. Also see
envelope() </td>
<td> Array </td>
</tr>
<tr>
<td> centroid </td>
<td> The mathematical centroid for this geometry as a Point. For polygons, the result
is not guaranteed to be interior. </td>
<td> Point </td>
</tr>
<tr>
<td> length </td>
<td> The length of this Curve in its associated spatial reference. </td>
<td> Float </td>
</tr>
<tr>
<td> y </td>
<td> The y-coordinate value for this Point. </td>
<td> Float </td>
</tr>
<tr>
<td> x </td>
<td> The x-coordinate value for this Point. </td>
<td> Float </td>
</tr>
<tr>
<td> numGeometries </td>
<td> The number of component geometries in this collection </td>
<td> Integer </td>
</tr>
<tr>
<td> geometryN </td>
<td> Returns the geometry N in this collection. Note that the index starts at 1. </td>
<td> Geometry </td>
</tr>
<tr>
<td> startPoint </td>
<td> The start Point of this LineString </td>
<td> Point </td>
</tr>
<tr>
<td> endPoint </td>
<td> The end Point of this LineString </td>
<td> Point </td>
</tr>
<tr>
<td> isRing </td>
<td> Returns 1 (TRUE) if this Curve is closed() and this Curve isSimple(). </td>
<td> Boolean </td>
</tr>
<tr>
<td> isClosed </td>
<td> Returns 1 (TRUE) if this Curve is closed. StartPoint() == EndPoint(). </td>
<td> Boolean </td>
</tr>
<tr>
<td> getComponents </td>
<td> Get all sub-geometry components of the geometry </td>
<td> Array of geometries </td>
</tr>
<tr>
<td> numPoints </td>
<td> The number of Points in this LineString </td>
<td> Integer </td>
</tr>
<tr>
<td> pointN </td>
<td> Returns the specified Point N in this LineString. Note that the index starts at
1. </td>
<td> Point </td>
</tr>
<tr>
<td> exteriorRing </td>
<td> Returns the exterior ring of this Polygon. </td>
<td> LineString </td>
</tr>
<tr>
<td> numInteriorRings </td>
<td> Returns the number of interior rings in this Polygon. </td>
<td> Integer </td>
</tr>
<tr>
<td> interiorRingN </td>
<td> Returns the Nth interior ring for this Polygon as a LineString. Note that the
index starts at 1. </td>
<td> LineString </td>
</tr>
<tr>
<td> dimension </td>
<td> The inherent dimension of this geometric object. In non-homogeneous collections,
this will return the largest topological dimension of the contained objects. </td>
<td> Integer </td>
</tr>
<tr>
<td> geometryType </td>
<td> Returns the name of the instantiable subtype of Geometry of which this geometric
object is an instantiable member. The name of the subtype of Geometry is returned as
a string. </td>
<td> String </td>
</tr>
<tr>
<td> SRID </td>
<td> Returns the Spatial Reference System ID for this geometric object. </td>
<td> integer </td>
</tr>
<tr>
<td> setSRID </td>
<td> Set the Spatial Reference System ID for this geometric object. </td>
<td> NULL </td>
</tr>
<tr>
<td> asArray </td>
<td> Get the given geometry as an array of components (recursive) </td>
<td> Array </td>
</tr>
<tr>
<td> getGeoInterface </td>
<td> Get the geometryType and Coordinates as an array </td>
<td> Array </td>
</tr>
</table>
<p>
<b>Aliases</b>
</p>
<table>
<tr>
<td>
<b>Method</b>
</td>
<td>
<b>Description</b>
</td>
<td>
<b>Returns</b>
</td>
</tr>
<tr>
<td> getCentroid </td>
<td> Alias for centroid() </td>
<td> Point </td>
</tr>
<tr>
<td> getArea </td>
<td> Alias for area() </td>
<td> Float </td>
</tr>
<tr>
<td> getX </td>
<td> Alias for x() </td>
<td> Float </td>
</tr>
<tr>
<td> getY </td>
<td> Alias for y() </td>
<td> Float </td>
</tr>
<tr>
<td> getGeos </td>
<td> Alias for geos() </td>
<td> GEOSGeometry </td>
</tr>
<tr>
<td> getGeomType </td>
<td> Alias for geometryType() </td>
<td> String </td>
</tr>
<tr>
<td> getSRID </td>
<td> Alias for SRID() </td>
<td> Integer </td>
</tr>
<tr>
<td> asText </td>
<td> Alias for <i>$this-&gt;out('wkt')</i>
</td>
<td> String </td>
</tr>
<tr>
<td> asBinary </td>
<td> Alias for <i>$this-&gt;out('wkb')</i>
</td>
<td> String </td>
</tr>
</table>
<p>
<b>Advanced Methods</b>
</p>
<p>The <a class="internal present" href="/phayes/geoPHP/wiki/GEOS" rel="nofollow">GEOS-php
extension</a> needs to be installed for these functions to be available </p>
<table>
<tr>
<td>
<b>Method</b>
</td>
<td>
<b>Description</b>
</td>
<td>
<b>Returns</b>
</td>
</tr>
<tr>
<td> geos </td>
<td> Return a GEOSGeometry object representing this geometry </td>
<td> GEOSGeometry </td>
</tr>
<tr>
<td> setGeos </td>
<td> Set a GEOSGeometry object representing this geometry </td>
<td> NULL </td>
</tr>
<tr>
<td> pointOnSurface </td>
<td> A Point guaranteed to be within a polygon </td>
<td> Point </td>
</tr>
<tr>
<td> equals </td>
<td> Returns 1 (TRUE) if this geometry is “spatially equal” to another Geometry </td>
<td> Boolean </td>
</tr>
<tr>
<td> equalsExact </td>
<td> Returns 1 (TRUE) if this gemometric object is exactly the same as another object,
including the ordering of component parts </td>
<td> Boolean </td>
</tr>
<tr>
<td> relate </td>
<td> Returns 1 (TRUE) if this geometric object is spatially related to anotherGeometry
by testing for intersections between the interior, boundary and exterior of the two
geometric objects as specified by the values in the intersectionPatternMatrix. This
returns FALSE if all the tested intersections are empty except exterior (this)
intersect exterior (another). </td>
<td> Boolean </td>
</tr>
<tr>
<td> checkValidity </td>
<td> Boolean </td>
</tr>
<tr>
<td> isSimple </td>
<td> Returns 1 (TRUE) if this geometry does not pass through the same point in space
more than once </td>
<td> Boolean </td>
</tr>
<tr>
<td> project </td>
<td> Project the geometry from from one SRID to another </td>
<td> Geometry </td>
</tr>
<tr>
<td> buffer </td>
<td> Returns a geometric object that represents all Points whose distance from this
geometric object is less than or equal to distance. Calculations are in the spatial
reference system of this geometric object. Because of the limitations of linear
interpolation, there will often be some relatively small error in this distance, but
it should be near the resolution of the coordinates used. </td>
<td> Geometry </td>
</tr>
<tr>
<td> intersection </td>
<td> Returns a geometric object that represents the Point set intersection of this
geometric object with anotherGeometry. See <a
href="http://en.wikipedia.org/wiki/Intersection_(set_theory)" rel="nofollow"
>http://en.wikipedia.org/wiki/Intersection_(set_theory)</a>
</td>
<td> Geometry </td>
</tr>
<tr>
<td> convexHull </td>
<td> Returns a geometric object that represents the convex hull of this geometric
object. See <a href="http://en.wikipedia.org/wiki/Convex_hull" rel="nofollow"
>http://en.wikipedia.org/wiki/Convex_hull</a>
</td>
<td> Geometry </td>
</tr>
<tr>
<td> difference </td>
<td> Returns a geometric object that represents the Point set difference of this
geometric object with anotherGeometry. </td>
<td> Geometry </td>
</tr>
<tr>
<td> symDifference </td>
<td> Returns a geometric object that represents the Point set symmetric difference of
this geometric object with another Geometry. See <a
href="http://en.wikipedia.org/wiki/Symmetric_difference" rel="nofollow"
>http://en.wikipedia.org/wiki/Symmetric_difference</a>
</td>
<td> Geometry </td>
</tr>
<tr>
<td> union </td>
<td> Returns a geometric object that represents the Point set union of this geometric
object with anotherGeometry. See <a
href="http://en.wikipedia.org/wiki/Union_(set_theory)" rel="nofollow"
>http://en.wikipedia.org/wiki/Union_(set_theory)</a>
</td>
<td> Geometry </td>
</tr>
<tr>
<td> simplify </td>
<td> Simplify the geometry </td>
<td> Geometry </td>
</tr>
<tr>
<td> disjoint </td>
<td> Returns 1 (TRUE) if this geometric object is “spatially disjoint” from another
Geometry. </td>
<td> Boolean </td>
</tr>
<tr>
<td> touches </td>
<td> Returns 1 (TRUE) if this geometric object “spatially touches” another Geometry. </td>
<td> Boolean </td>
</tr>
<tr>
<td> intersects </td>
<td> Returns 1 (TRUE) if this geometric object “spatially intersects” another
Geometry. </td>
<td> Boolean </td>
</tr>
<tr>
<td> crosses </td>
<td> Returns 1 (TRUE) if this geometric object “spatially crosses? another Geometry. </td>
<td> Boolean </td>
</tr>
<tr>
<td> within </td>
<td> Returns 1 (TRUE) if this geometric object is “spatially within” another Geometry. </td>
<td> Boolean </td>
</tr>
<tr>
<td> contains </td>
<td> Returns 1 (TRUE) if this geometric object “spatially contains” another Geometry. </td>
<td> Boolean </td>
</tr>
<tr>
<td> overlaps </td>
<td> Returns 1 (TRUE) if this geometric object “spatially overlaps” another Geometry. </td>
<td> Boolean </td>
</tr>
<tr>
<td> covers </td>
<td> Alias for contains() </td>
<td> Boolean </td>
</tr>
<tr>
<td> coveredBy </td>
<td> Alias for within() </td>
<td> Boolean </td>
</tr>
<tr>
<td> distance </td>
<td> Returns the shortest distance between any two Points in the two geometric objects
as calculated in the spatial reference system of this geometric object. Because the
geometries are closed, it is possible to find a point on each geometric object
involved, such that the distance between these 2 points is the returned distance
between their geometric objects. </td>
<td> Float </td>
</tr>
<tr>
<td> hausdorffDistance </td>
<td> See <a href="http://en.wikipedia.org/wiki/Hausdorff_distance" rel="nofollow"
>http://en.wikipedia.org/wiki/Hausdorff_distance</a>
</td>
<td> Float </td>
</tr>
</table>
<p>
<b>Placeholders</b>
</p>
<p>These methods are part of the specification, but are not really supported by geoPHP. </p>
<table>
<tr>
<td>
<b>Method</b>
</td>
<td>
<b>Description</b>
</td>
<td>
<b>Returns</b>
</td>
</tr>
<tr>
<td> hasZ </td>
<td> returns FALSE. geoPHP does not support Z values at the moment. </td>
<td> Boolean </td>
</tr>
<tr>
<td> is3D </td>
<td> returns FALSE. geoPHP does not support 3D geometries at the moment. </td>
<td> Boolean </td>
</tr>
<tr>
<td> isMeasured </td>
<td> returns FALSE. geoPHP does not yet support M values </td>
<td> Boolean </td>
</tr>
<tr>
<td> isEmpty </td>
<td> returns FALSE. geoPHP does not yet support empty geometries </td>
<td> Boolean </td>
</tr>
<tr>
<td> coordinateDimension </td>
<td> returns 2. geoPHP only supports 2-dimentional space </td>
<td> Integer </td>
</tr>
<tr>
<td> z </td>
<td> returns NULL. geoPHP does not support Z values at the moment </td>
<td> NULL </td>
</tr>
<tr>
<td> m </td>
<td> returns NULL. geoPHP does not support M values </td>
<td> NULL </td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>