Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176
This commit is contained in:
commit
9921556621
13277 changed files with 1459781 additions and 0 deletions
.csslintrc.editorconfig.eslintignore.eslintrc.gitattributes.htaccessREADME.txtautoload.phpcomposer.json
core
.gitignoreCHANGELOG.txtCOPYRIGHT.txtINSTALL.mysql.txtINSTALL.pgsql.txtINSTALL.sqlite.txtINSTALL.txtLICENSE.txtMAINTAINERS.txtUPGRADE.txt
assets/vendor
.gitignore
backbone
ckeditor
CHANGES.mdLICENSE.mdbuild-config.jsckeditor.js
lang
_translationstatus.txtaf.jsar.jsbg.jsbn.jsbs.jsca.jscs.jscy.jsda.jsde.jsel.jsen-au.jsen-ca.jsen-gb.jsen.jseo.jses.jset.jseu.jsfa.jsfi.jsfo.jsfr-ca.jsfr.jsgl.jsgu.jshe.jshi.jshr.jshu.jsid.jsis.jsit.jsja.jska.jskm.jsko.jsku.jslt.jslv.jsmk.jsmn.jsms.jsnb.jsnl.jsno.jspl.jspt-br.jspt.jsro.jsru.jssi.jssk.jssl.jssq.jssr-latn.jssr.jssv.jsth.jstr.jstt.jsug.jsuk.jsvi.jszh-cn.jszh.js
plugins/a11yhelp/dialogs
37
.csslintrc
Normal file
37
.csslintrc
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"important": true,
|
||||
"adjoining-classes": false,
|
||||
"known-properties": true,
|
||||
"box-sizing": false,
|
||||
"box-model": true,
|
||||
"overqualified-elements": true,
|
||||
"display-property-grouping": true,
|
||||
"bulletproof-font-face": false,
|
||||
"compatible-vendor-prefixes": false,
|
||||
"regex-selectors": false,
|
||||
"errors": false,
|
||||
"duplicate-background-images": true,
|
||||
"duplicate-properties": true,
|
||||
"empty-rules": true,
|
||||
"selector-max-approaching": false,
|
||||
"gradients": false,
|
||||
"fallback-colors": false,
|
||||
"font-sizes": false,
|
||||
"font-faces": false,
|
||||
"floats": false,
|
||||
"star-property-hack": true,
|
||||
"outline-none": true,
|
||||
"import": true,
|
||||
"ids": true,
|
||||
"underscore-property-hack": true,
|
||||
"rules-count": false,
|
||||
"qualified-headings": true,
|
||||
"selector-max": false,
|
||||
"shorthand": true,
|
||||
"text-indent": true,
|
||||
"unique-headings": true,
|
||||
"universal-selector": false,
|
||||
"unqualified-attributes": true,
|
||||
"vendor-prefix": true,
|
||||
"zero-units": true
|
||||
}
|
14
.editorconfig
Normal file
14
.editorconfig
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Drupal editor configuration normalization
|
||||
# @see http://editorconfig.org/
|
||||
|
||||
# This is the top-most .editorconfig file; do not search in parent directories.
|
||||
root = true
|
||||
|
||||
# All files.
|
||||
[*]
|
||||
end_of_line = LF
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
8
.eslintignore
Normal file
8
.eslintignore
Normal file
|
@ -0,0 +1,8 @@
|
|||
core/assets/vendor/**/*
|
||||
core/modules/locale/tests/locale_test.js
|
||||
core/vendor/**/*
|
||||
sites/**/files/**/*
|
||||
libraries/**/*
|
||||
sites/**/libraries/**/*
|
||||
profiles/**/libraries/**/*
|
||||
**/js_test_files/**/*
|
65
.eslintrc
Normal file
65
.eslintrc
Normal file
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
"env": {
|
||||
"browser": true
|
||||
},
|
||||
"globals": {
|
||||
"Drupal": true,
|
||||
"drupalSettings": true,
|
||||
"drupalTranslations": true,
|
||||
"domready": true,
|
||||
"jQuery": true,
|
||||
"_": true,
|
||||
"matchMedia": true,
|
||||
"Backbone": true,
|
||||
"Modernizr": true,
|
||||
"CKEDITOR": true
|
||||
},
|
||||
"rules": {
|
||||
// Errors.
|
||||
"block-scoped-var": 2,
|
||||
"brace-style": [2, "stroustrup", {"allowSingleLine": true}],
|
||||
"comma-style": [2, "last"],
|
||||
"eqeqeq": [2, "smart"],
|
||||
"guard-for-in": 2,
|
||||
"indent": [2, 2, {"indentSwitchCase": true}],
|
||||
"key-spacing": [2, {"beforeColon": false, "afterColon": true}],
|
||||
"lines-around-comment": [2, {"beforeBlockComment": true, "afterBlockComment": false}],
|
||||
"no-implied-eval": 2,
|
||||
"no-mixed-spaces-and-tabs": 2,
|
||||
"no-nested-ternary": 2,
|
||||
"no-reserved-keys": 2,
|
||||
"no-trailing-spaces": 2,
|
||||
"no-undef": 2,
|
||||
"no-undefined": 2,
|
||||
"no-unused-vars": [2, {"vars": "local", "args": "none"}],
|
||||
"one-var": [2, "never"],
|
||||
"semi": [2, "always"],
|
||||
"space-after-keywords": [2, "always"],
|
||||
"space-before-blocks": [2, "always"],
|
||||
"space-before-function-paren": [2, {"anonymous": "always", "named": "never"}],
|
||||
"space-in-brackets": [2, "never"],
|
||||
"space-in-parens": [2, "never"],
|
||||
"spaced-line-comment": [2, "always"],
|
||||
"strict": 2,
|
||||
// Warnings.
|
||||
"max-nested-callbacks": [1, 3],
|
||||
"valid-jsdoc": [1, {
|
||||
"prefer": {
|
||||
"returns": "return",
|
||||
"property": "prop"
|
||||
},
|
||||
"requireReturn": false
|
||||
}],
|
||||
// Disabled.
|
||||
"camelcase": 0,
|
||||
"consistent-return": 0,
|
||||
"dot-notation": 0,
|
||||
"new-cap": 0,
|
||||
"no-alert": 0,
|
||||
"no-new": 0,
|
||||
"no-shadow": 0,
|
||||
"no-underscore-dangle": 0,
|
||||
"no-use-before-define": 0,
|
||||
"quotes": 0
|
||||
}
|
||||
}
|
53
.gitattributes
vendored
Normal file
53
.gitattributes
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
# Drupal git normalization
|
||||
# @see https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
|
||||
# @see https://www.drupal.org/node/1542048
|
||||
|
||||
# Normally these settings would be done with macro attributes for improved
|
||||
# readability and easier maintenance. However macros can only be defined at the
|
||||
# repository root directory. Drupal avoids making any assumptions about where it
|
||||
# is installed.
|
||||
|
||||
# Define text file attributes.
|
||||
# - Treat them as text.
|
||||
# - Ensure no CRLF line-endings, neither on checkout nor on checkin.
|
||||
# - Detect whitespace errors.
|
||||
# - Exposed by default in `git diff --color` on the CLI.
|
||||
# - Validate with `git diff --check`.
|
||||
# - Deny applying with `git apply --whitespace=error-all`.
|
||||
# - Fix automatically with `git apply --whitespace=fix`.
|
||||
|
||||
# Auto-detect text files, ensure they use LF.
|
||||
* text=auto eol=lf
|
||||
|
||||
*.css text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.engine text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
|
||||
*.html text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=html
|
||||
*.inc text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
|
||||
*.info text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.install text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
|
||||
*.js text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.json text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.lock text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.md text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.module text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
|
||||
*.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
|
||||
*.po text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.script text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.sh text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
|
||||
*.sql text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.test text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
|
||||
*.theme text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
|
||||
*.txt text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.xml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.yml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
|
||||
# Define binary file attributes.
|
||||
# - Do not treat them as text.
|
||||
# - Include binary diff in patches instead of "binary files differ."
|
||||
*.gif -text diff
|
||||
*.gz -text diff
|
||||
*.ico -text diff
|
||||
*.jpg -text diff
|
||||
*.png -text diff
|
||||
*.phar -text diff
|
||||
*.exe -text diff
|
181
.htaccess
Normal file
181
.htaccess
Normal file
|
@ -0,0 +1,181 @@
|
|||
#
|
||||
# Apache/PHP/Drupal settings:
|
||||
#
|
||||
|
||||
# Protect files and directories from prying eyes.
|
||||
<FilesMatch "\.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$">
|
||||
<IfModule mod_authz_core.c>
|
||||
Require all denied
|
||||
</IfModule>
|
||||
<IfModule !mod_authz_core.c>
|
||||
Order allow,deny
|
||||
</IfModule>
|
||||
</FilesMatch>
|
||||
|
||||
# Don't show directory listings for URLs which map to a directory.
|
||||
Options -Indexes
|
||||
|
||||
# Follow symbolic links in this directory.
|
||||
Options +FollowSymLinks
|
||||
|
||||
# Make Drupal handle any 404 errors.
|
||||
ErrorDocument 404 /index.php
|
||||
|
||||
# Set the default handler.
|
||||
DirectoryIndex index.php index.html index.htm
|
||||
|
||||
# Add correct encoding for SVGZ.
|
||||
AddType image/svg+xml svg svgz
|
||||
AddEncoding gzip svgz
|
||||
|
||||
# Override PHP settings that cannot be changed at runtime. See
|
||||
# sites/default/default.settings.php and
|
||||
# Drupal\Core\DrupalKernel::bootEnvironment() for settings that can be
|
||||
# changed at runtime.
|
||||
|
||||
# PHP 5, Apache 1 and 2.
|
||||
<IfModule mod_php5.c>
|
||||
php_flag session.auto_start off
|
||||
php_value mbstring.http_input pass
|
||||
php_value mbstring.http_output pass
|
||||
php_flag mbstring.encoding_translation off
|
||||
# PHP 5.6 has deprecated $HTTP_RAW_POST_DATA and produces warnings if this is
|
||||
# not set.
|
||||
php_value always_populate_raw_post_data -1
|
||||
</IfModule>
|
||||
|
||||
# Requires mod_expires to be enabled.
|
||||
<IfModule mod_expires.c>
|
||||
# Enable expirations.
|
||||
ExpiresActive On
|
||||
|
||||
# Cache all files for 2 weeks after access (A).
|
||||
ExpiresDefault A1209600
|
||||
|
||||
<FilesMatch \.php$>
|
||||
# Do not allow PHP scripts to be cached unless they explicitly send cache
|
||||
# headers themselves. Otherwise all scripts would have to overwrite the
|
||||
# headers set by mod_expires if they want another caching behavior. This may
|
||||
# fail if an error occurs early in the bootstrap process, and it may cause
|
||||
# problems if a non-Drupal PHP file is installed in a subdirectory.
|
||||
ExpiresActive Off
|
||||
</FilesMatch>
|
||||
</IfModule>
|
||||
|
||||
# Various rewrite rules.
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine on
|
||||
|
||||
# Set "protossl" to "s" if we were accessed via https://. This is used later
|
||||
# if you enable "www." stripping or enforcement, in order to ensure that
|
||||
# you don't bounce between http and https.
|
||||
RewriteRule ^ - [E=protossl]
|
||||
RewriteCond %{HTTPS} on
|
||||
RewriteRule ^ - [E=protossl:s]
|
||||
|
||||
# Make sure Authorization HTTP header is available to PHP
|
||||
# even when running as CGI or FastCGI.
|
||||
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||
|
||||
# Block access to "hidden" directories whose names begin with a period. This
|
||||
# includes directories used by version control systems such as Subversion or
|
||||
# Git to store control files. Files whose names begin with a period, as well
|
||||
# as the control files used by CVS, are protected by the FilesMatch directive
|
||||
# above.
|
||||
#
|
||||
# NOTE: This only works when mod_rewrite is loaded. Without mod_rewrite, it is
|
||||
# not possible to block access to entire directories from .htaccess because
|
||||
# <DirectoryMatch> is not allowed here.
|
||||
#
|
||||
# If you do not have mod_rewrite installed, you should remove these
|
||||
# directories from your webroot or otherwise protect them from being
|
||||
# downloaded.
|
||||
RewriteRule "(^|/)\." - [F]
|
||||
|
||||
# If your site can be accessed both with and without the 'www.' prefix, you
|
||||
# can use one of the following settings to redirect users to your preferred
|
||||
# URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
|
||||
#
|
||||
# To redirect all users to access the site WITH the 'www.' prefix,
|
||||
# (http://example.com/foo will be redirected to http://www.example.com/foo)
|
||||
# uncomment the following:
|
||||
# RewriteCond %{HTTP_HOST} .
|
||||
# RewriteCond %{HTTP_HOST} !^www\. [NC]
|
||||
# RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
|
||||
#
|
||||
# To redirect all users to access the site WITHOUT the 'www.' prefix,
|
||||
# (http://www.example.com/foo will be redirected to http://example.com/foo)
|
||||
# uncomment the following:
|
||||
# RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
|
||||
# RewriteRule ^ http%{ENV:protossl}://%1%{REQUEST_URI} [L,R=301]
|
||||
|
||||
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
|
||||
# VirtualDocumentRoot and the rewrite rules are not working properly.
|
||||
# For example if your site is at http://example.com/drupal uncomment and
|
||||
# modify the following line:
|
||||
# RewriteBase /drupal
|
||||
#
|
||||
# If your site is running in a VirtualDocumentRoot at http://example.com/,
|
||||
# uncomment the following line:
|
||||
# RewriteBase /
|
||||
|
||||
# Redirect common PHP files to their new locations.
|
||||
RewriteCond %{REQUEST_URI} ^(.*)?/(install.php) [OR]
|
||||
RewriteCond %{REQUEST_URI} ^(.*)?/(rebuild.php)
|
||||
RewriteCond %{REQUEST_URI} !core
|
||||
RewriteRule ^ %1/core/%2 [L,QSA,R=301]
|
||||
|
||||
# Pass all requests not referring directly to files in the filesystem to
|
||||
# index.php.
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_URI} !=/favicon.ico
|
||||
RewriteRule ^ index.php [L]
|
||||
|
||||
# For security reasons, deny access to other PHP files on public sites.
|
||||
# Note: The following URI conditions are not anchored at the start (^),
|
||||
# because Drupal may be located in a subdirectory. To further improve
|
||||
# security, you can replace '!/' with '!^/'.
|
||||
# Allow access to PHP files in /core (like authorize.php or install.php):
|
||||
RewriteCond %{REQUEST_URI} !/core/[^/]*\.php$
|
||||
# Allow access to test-specific PHP files:
|
||||
RewriteCond %{REQUEST_URI} !/core/modules/system/tests/https?.php
|
||||
# Allow access to Statistics module's custom front controller.
|
||||
# Copy and adapt this rule to directly execute PHP files in contributed or
|
||||
# custom modules or to run another PHP application in the same directory.
|
||||
RewriteCond %{REQUEST_URI} !/core/modules/statistics/statistics.php$
|
||||
# Deny access to any other PHP files that do not match the rules above.
|
||||
# Specifically, disallow autoload.php from being served directly.
|
||||
RewriteRule "^(.+/.*|autoload)\.php($|/)" - [F]
|
||||
|
||||
# Rules to correctly serve gzip compressed CSS and JS files.
|
||||
# Requires both mod_rewrite and mod_headers to be enabled.
|
||||
<IfModule mod_headers.c>
|
||||
# Serve gzip compressed CSS files if they exist and the client accepts gzip.
|
||||
RewriteCond %{HTTP:Accept-encoding} gzip
|
||||
RewriteCond %{REQUEST_FILENAME}\.gz -s
|
||||
RewriteRule ^(.*)\.css $1\.css\.gz [QSA]
|
||||
|
||||
# Serve gzip compressed JS files if they exist and the client accepts gzip.
|
||||
RewriteCond %{HTTP:Accept-encoding} gzip
|
||||
RewriteCond %{REQUEST_FILENAME}\.gz -s
|
||||
RewriteRule ^(.*)\.js $1\.js\.gz [QSA]
|
||||
|
||||
# Serve correct content types, and prevent mod_deflate double gzip.
|
||||
RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1]
|
||||
RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1]
|
||||
|
||||
<FilesMatch "(\.js\.gz|\.css\.gz)$">
|
||||
# Serve correct encoding type.
|
||||
Header set Content-Encoding gzip
|
||||
# Force proxies to cache gzipped & non-gzipped css/js files separately.
|
||||
Header append Vary Accept-Encoding
|
||||
</FilesMatch>
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
|
||||
# Add headers to all responses.
|
||||
<IfModule mod_headers.c>
|
||||
# Disable content sniffing, since it's an attack vector.
|
||||
Header always set X-Content-Type-Options nosniff
|
||||
</IfModule>
|
139
README.txt
Normal file
139
README.txt
Normal file
|
@ -0,0 +1,139 @@
|
|||
|
||||
CONTENTS OF THIS FILE
|
||||
---------------------
|
||||
|
||||
* About Drupal
|
||||
* Configuration and features
|
||||
* Installation profiles
|
||||
* Appearance
|
||||
* Developing for Drupal
|
||||
* More information
|
||||
|
||||
ABOUT DRUPAL
|
||||
------------
|
||||
|
||||
Drupal is an open source content management platform supporting a variety of
|
||||
websites ranging from personal weblogs to large community-driven websites. For
|
||||
more information, see the Drupal website at https://www.drupal.org, and join
|
||||
the Drupal community at https://www.drupal.org/community.
|
||||
|
||||
Legal information about Drupal:
|
||||
* Know your rights when using Drupal:
|
||||
See LICENSE.txt in the "core" directory.
|
||||
* Learn about the Drupal trademark and logo policy:
|
||||
https://www.drupal.com/trademark
|
||||
|
||||
CONFIGURATION AND FEATURES
|
||||
--------------------------
|
||||
|
||||
Drupal core (what you get when you download and extract a drupal-x.y.tar.gz or
|
||||
drupal-x.y.zip file from https://www.drupal.org/project/drupal) has what you
|
||||
need to get started with your website. It includes several modules (extensions
|
||||
that add functionality) for common website features, such as managing content,
|
||||
user accounts, image uploading, and search. Core comes with many options that
|
||||
allow site-specific configuration. In addition to the core modules, there are
|
||||
thousands of contributed modules (for functionality not included with Drupal
|
||||
core) available for download.
|
||||
|
||||
More about configuration:
|
||||
* Install, upgrade, and maintain Drupal:
|
||||
See INSTALL.txt and UPGRADE.txt in the "core" directory.
|
||||
* Learn about how to use Drupal to create your site:
|
||||
https://www.drupal.org/documentation
|
||||
* Follow best practices:
|
||||
https://www.drupal.org/best-practices
|
||||
* Download contributed modules to /modules to extend Drupal's functionality:
|
||||
https://www.drupal.org/project/modules
|
||||
* See also: "Developing for Drupal" for writing your own modules, below.
|
||||
|
||||
|
||||
INSTALLATION PROFILES
|
||||
---------------------
|
||||
|
||||
Installation profiles define additional steps (such as enabling modules,
|
||||
defining content types, etc.) that run after the base installation provided
|
||||
by core when Drupal is first installed. There are two basic installation
|
||||
profiles provided with Drupal core.
|
||||
|
||||
Installation profiles from the Drupal community modify the installation process
|
||||
to provide a website for a specific use case, such as a CMS for media
|
||||
publishers, a web-based project tracking tool, or a full-fledged CRM for
|
||||
non-profit organizations raising money and accepting donations. They can be
|
||||
distributed as bare installation profiles or as "distributions". Distributions
|
||||
include Drupal core, the installation profile, and all other required
|
||||
extensions, such as contributed and custom modules, themes, and third-party
|
||||
libraries. Bare installation profiles require you to download Drupal Core and
|
||||
the required extensions separately; place the downloaded profile in the
|
||||
/profiles directory before you start the installation process.
|
||||
|
||||
More about installation profiles and distributions:
|
||||
* Read about the difference between installation profiles and distributions:
|
||||
https://www.drupal.org/node/1089736
|
||||
* Download contributed installation profiles and distributions:
|
||||
https://www.drupal.org/project/distributions
|
||||
* Develop your own installation profile or distribution:
|
||||
https://www.drupal.org/developing/distributions
|
||||
|
||||
|
||||
APPEARANCE
|
||||
----------
|
||||
|
||||
In Drupal, the appearance of your site is set by the theme (themes are
|
||||
extensions that set fonts, colors, and layout). Drupal core comes with several
|
||||
themes. More themes are available for download, and you can also create your own
|
||||
custom theme.
|
||||
|
||||
More about themes:
|
||||
* Download contributed themes to /themes to modify Drupal's appearance:
|
||||
https://www.drupal.org/project/themes
|
||||
* Develop your own theme:
|
||||
https://www.drupal.org/documentation/theme
|
||||
|
||||
DEVELOPING FOR DRUPAL
|
||||
---------------------
|
||||
|
||||
Drupal contains an extensive API that allows you to add to and modify the
|
||||
functionality of your site. The API consists of "hooks", which allow modules to
|
||||
react to system events and customize Drupal's behavior, and functions that
|
||||
standardize common operations such as database queries and form generation. The
|
||||
flexible hook architecture means that you should never need to directly modify
|
||||
the files that come with Drupal core to achieve the functionality you want;
|
||||
instead, functionality modifications take the form of modules.
|
||||
|
||||
When you need new functionality for your Drupal site, search for existing
|
||||
contributed modules. If you find a module that matches except for a bug or an
|
||||
additional needed feature, change the module and contribute your improvements
|
||||
back to the project in the form of a "patch". Create new custom modules only
|
||||
when nothing existing comes close to what you need.
|
||||
|
||||
More about developing:
|
||||
* Search for existing contributed modules:
|
||||
https://www.drupal.org/project/modules
|
||||
* Contribute a patch:
|
||||
https://www.drupal.org/patch/submit
|
||||
* Develop your own module:
|
||||
https://www.drupal.org/developing/modules
|
||||
* Follow programming best practices:
|
||||
https://www.drupal.org/developing/best-practices
|
||||
* Refer to the API documentation:
|
||||
https://api.drupal.org/api/drupal/8
|
||||
* Learn from documented Drupal API examples:
|
||||
https://www.drupal.org/project/examples
|
||||
|
||||
MORE INFORMATION
|
||||
----------------
|
||||
|
||||
* See the Drupal.org online documentation:
|
||||
https://www.drupal.org/documentation
|
||||
|
||||
* For a list of security announcements, see the "Security advisories" page at
|
||||
https://www.drupal.org/security (available as an RSS feed). This page also
|
||||
describes how to subscribe to these announcements via email.
|
||||
|
||||
* For information about the Drupal security process, or to find out how to
|
||||
report a potential security issue to the Drupal security team, see the
|
||||
"Security team" page at https://www.drupal.org/security-team
|
||||
|
||||
* For information about the wide range of available support options, visit
|
||||
https://www.drupal.org and click on Community and Support in the top or
|
||||
bottom navigation.
|
19
autoload.php
Normal file
19
autoload.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Includes the autoloader created by Composer.
|
||||
*
|
||||
* This file can be edited to change the autoloader if you are managing a
|
||||
* project's dependencies using Composer. If Drupal code requires the
|
||||
* autoloader, it should always be loaded using this file so that projects
|
||||
* using Composer continue to work.
|
||||
*
|
||||
* @see composer.json
|
||||
* @see index.php
|
||||
* @see core/install.php
|
||||
* @see core/rebuild.php
|
||||
* @see core/modules/statistics/statistics.php
|
||||
*/
|
||||
|
||||
return require __DIR__ . '/core/vendor/autoload.php';
|
22
composer.json
Normal file
22
composer.json
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"name": "drupal/drupal",
|
||||
"description": "Drupal is an open source content management platform powering millions of websites and applications.",
|
||||
"type": "project",
|
||||
"license": "GPL-2.0+",
|
||||
"require": {
|
||||
"composer/installers": "^1.0.20",
|
||||
"drupal/core": "~8.0"
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true,
|
||||
"config": {
|
||||
"preferred-install": "dist",
|
||||
"autoloader-suffix": "Drupal8"
|
||||
},
|
||||
"extra": {
|
||||
"_readme": [
|
||||
"By default Drupal loads the autoloader from ./core/vendor/autoload.php.",
|
||||
"To change the autoloader you can edit ./autoload.php."
|
||||
]
|
||||
}
|
||||
}
|
16
core/.gitignore
vendored
Normal file
16
core/.gitignore
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
# SimpleTest breaks with the following files, so avoid adding them.
|
||||
vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php
|
||||
vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/Fixtures/php5.4/traits.php
|
||||
vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services11.php
|
||||
|
||||
# The resources for the Validator component are not required.
|
||||
vendor/symfony/validator/Symfony/Component/Validator/Resources
|
||||
|
||||
# Symfony Validator depends on Symfony Translation but only requires the
|
||||
# TranslatorInterface. Thus, we add only the required interface from Symfony
|
||||
# Translation by ignoring everything except the interface.
|
||||
vendor/symfony/translation/Symfony/Component/Translation/*
|
||||
!vendor/symfony/translation/Symfony/Component/Translation/TranslatorInterface.php
|
||||
|
||||
# PHPUnit provides some binary dependencies that are already available.
|
||||
vendor/phpunit/phpunit/build/dependencies
|
1178
core/CHANGELOG.txt
Normal file
1178
core/CHANGELOG.txt
Normal file
File diff suppressed because it is too large
Load diff
68
core/COPYRIGHT.txt
Normal file
68
core/COPYRIGHT.txt
Normal file
|
@ -0,0 +1,68 @@
|
|||
All Drupal code is Copyright 2001 - 2013 by the original authors.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or (at
|
||||
your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program as the file LICENSE.txt; if not, please see
|
||||
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
|
||||
Drupal is a registered trademark of Dries Buytaert.
|
||||
|
||||
Drupal includes works under other copyright notices and distributed
|
||||
according to the terms of the GNU General Public License or a compatible
|
||||
license, including:
|
||||
|
||||
Javascript
|
||||
|
||||
Farbtastic - Copyright (c) 2010 Matt Farina
|
||||
|
||||
HTML5 Shiv - Copyright (c) 2012 Alexander Farkas, Jonathan Neal, Paul Irish,
|
||||
and John-David Dalton
|
||||
|
||||
jQuery - Copyright (c) 2011 John Resig
|
||||
|
||||
jQuery Bgiframe - Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
|
||||
|
||||
jQuery BBQ - Copyright (c) 2010 "Cowboy" Ben Alman
|
||||
|
||||
jQuery Cookie - Copyright (c) 2010 Klaus Hartl
|
||||
|
||||
jQuery Form - Copyright (c) 2011 Mike Alsup
|
||||
|
||||
jQuery Globalize - Copyright (c) 2012 Software Freedom Conservancy, Inc.
|
||||
|
||||
jQuery Mousewheel - Copyright (c) 2010 Brandon Aaron
|
||||
(http://brandonaaron.net)
|
||||
|
||||
jQuery Metadata - Copyright (c) 2006 John Resig, Yehuda Katz, Jörn Zaefferer,
|
||||
Paul McLanahan
|
||||
|
||||
jQuery Once - Copyright (c) 2009 Konstantin Käfer
|
||||
|
||||
jQuery UI - Copyright (c) 2012 by the original authors
|
||||
(http://jqueryui.com/about)
|
||||
|
||||
Sizzle.js - Copyright (c) 2011 The Dojo Foundation (http://sizzlejs.com/)
|
||||
|
||||
PHP
|
||||
|
||||
ArchiveTar - Copyright (c) 1997 - 2008 Vincent Blavet
|
||||
|
||||
Doctrine Common - Copyright (c) 2006 - 2012 Alexander Mols, Benjamin Eberlei,
|
||||
Fabio B. Silva, Guilherme Blanco, Johannes M. Schmitt, Jonathan Wage,
|
||||
Lukas K. Smith, Marco Pivetta et al.
|
||||
|
||||
Symfony2 - Copyright (c) 2004 - 2012 Fabien Potencier
|
||||
- YUI - Copyright (c) 2010 Yahoo! Inc.
|
||||
- Zend Framework (1.10dev - 2010-01-24) - Copyright (c) 2005-2010 Zend
|
||||
Technologies USA Inc. (http://www.zend.com)
|
||||
|
||||
Twig - Copyright (c) 2009 Twig Team
|
45
core/INSTALL.mysql.txt
Normal file
45
core/INSTALL.mysql.txt
Normal file
|
@ -0,0 +1,45 @@
|
|||
|
||||
CREATE THE MySQL DATABASE
|
||||
--------------------------
|
||||
|
||||
This step is only necessary if you don't already have a database set up (e.g.,
|
||||
by your host). In the following examples, 'username' is an example MySQL user
|
||||
which has the CREATE and GRANT privileges. Use the appropriate user name for
|
||||
your system.
|
||||
|
||||
First, you must create a new database for your Drupal site (here, 'databasename'
|
||||
is the name of the new database):
|
||||
|
||||
mysqladmin -u username -p create databasename
|
||||
|
||||
MySQL will prompt for the 'username' database password and then create the
|
||||
initial database files. Next you must log in and set the access database rights:
|
||||
|
||||
mysql -u username -p
|
||||
|
||||
Again, you will be asked for the 'username' database password. At the MySQL
|
||||
prompt, enter the following command:
|
||||
|
||||
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER,
|
||||
CREATE TEMPORARY TABLES ON databasename.*
|
||||
TO 'username'@'localhost' IDENTIFIED BY 'password';
|
||||
|
||||
where:
|
||||
|
||||
'databasename' is the name of your database
|
||||
'username' is the username of your MySQL account
|
||||
'localhost' is the web server host where Drupal is installed
|
||||
'password' is the password required for that username
|
||||
|
||||
Note: Unless the database user/host combination for your Drupal installation
|
||||
has all of the privileges listed above (except possibly CREATE TEMPORARY TABLES,
|
||||
which is currently only used by Drupal core automated tests and some
|
||||
contributed modules), you will not be able to install or run Drupal.
|
||||
|
||||
If successful, MySQL will reply with:
|
||||
|
||||
Query OK, 0 rows affected
|
||||
|
||||
If the InnoDB storage engine is available, it will be used for all database
|
||||
tables. InnoDB provides features over MyISAM such as transaction support,
|
||||
row-level locks, and consistent non-locking reads.
|
44
core/INSTALL.pgsql.txt
Normal file
44
core/INSTALL.pgsql.txt
Normal file
|
@ -0,0 +1,44 @@
|
|||
|
||||
CREATE THE PostgreSQL DATABASE
|
||||
------------------------------
|
||||
|
||||
Note that the database must be created with UTF-8 (Unicode) encoding.
|
||||
|
||||
1. CREATE DATABASE USER
|
||||
|
||||
This step is only necessary if you don't already have a user set up (e.g., by
|
||||
your host), or want to create a new user for use with Drupal only. The
|
||||
following command creates a new user named 'username' and asks for a password
|
||||
for that user:
|
||||
|
||||
createuser --pwprompt --encrypted --no-createrole --no-createdb username
|
||||
|
||||
If there are no errors, then the command was successful.
|
||||
|
||||
2. CREATE DRUPAL DATABASE
|
||||
|
||||
This step is only necessary if you don't already have a database set up
|
||||
(e.g., by your host) or want to create a new database for use with Drupal
|
||||
only. The following command creates a new database named 'databasename',
|
||||
which is owned by the previously created 'username':
|
||||
|
||||
createdb --encoding=UTF8 --owner=username databasename
|
||||
|
||||
If there are no errors, then the command was successful.
|
||||
|
||||
3. CREATE SCHEMA OR SCHEMAS (Optional advanced step)
|
||||
|
||||
Drupal will run across different schemas within your database if you so wish.
|
||||
By default, Drupal runs inside the 'public' schema but you can use $db_prefix
|
||||
inside settings.php to define a schema for Drupal to run inside of, or
|
||||
specify tables that are shared inside of a separate schema. Drupal will not
|
||||
create schemas for you. In fact, the user that Drupal runs as should not be
|
||||
allowed to do this. You'll need to execute the SQL below as a superuser,
|
||||
replace 'username' with the username that Drupal uses to connect to
|
||||
PostgreSQL, and replace 'schema_name' with a schema name you wish to use,
|
||||
such as 'shared':
|
||||
|
||||
CREATE SCHEMA schema_name AUTHORIZATION username;
|
||||
|
||||
Do this for as many schemas as you need. See default.settings.php for
|
||||
instructions on how to set which tables use which schemas.
|
31
core/INSTALL.sqlite.txt
Normal file
31
core/INSTALL.sqlite.txt
Normal file
|
@ -0,0 +1,31 @@
|
|||
|
||||
SQLITE REQUIREMENTS
|
||||
-------------------
|
||||
|
||||
To use SQLite with your Drupal installation, the following requirements must be
|
||||
met: Server has PHP 5.3.10 or later with PDO, and the PDO SQLite driver must be
|
||||
enabled.
|
||||
|
||||
SQLITE DATABASE CREATION
|
||||
------------------------
|
||||
|
||||
The Drupal installer will create the SQLite database for you. The only
|
||||
requirement is that the installer must have write permissions to the directory
|
||||
where the database file resides. This directory (not just the database file) also
|
||||
has to remain writeable by the web server going forward for SQLite to continue to
|
||||
be able to operate.
|
||||
|
||||
On the "Database configuration" form in the "Database file" field, you must
|
||||
supply the exact path to where you wish your database file to reside. It is
|
||||
strongly suggested that you choose a path that is outside of the webroot, yet
|
||||
ensure that the directory is writeable by the web server.
|
||||
|
||||
If you must place your database file in your webroot, you could try using the
|
||||
following in your "Database file" field:
|
||||
|
||||
sites/default/files/.ht.sqlite
|
||||
|
||||
Note: The .ht in the name will tell Apache to prevent the database from being
|
||||
downloaded. Please check that the file is, indeed, protected by your webserver.
|
||||
If not, please consult the documentation of your webserver on how to protect a
|
||||
file from downloading.
|
410
core/INSTALL.txt
Normal file
410
core/INSTALL.txt
Normal file
|
@ -0,0 +1,410 @@
|
|||
|
||||
CONTENTS OF THIS FILE
|
||||
---------------------
|
||||
|
||||
* Requirements and notes
|
||||
* Optional server requirements
|
||||
* Installation
|
||||
* Reinstall
|
||||
* Building and customizing your site
|
||||
* Multisite configuration
|
||||
* Multilingual configuration
|
||||
|
||||
REQUIREMENTS AND NOTES
|
||||
----------------------
|
||||
|
||||
Drupal requires:
|
||||
|
||||
- A web server with PHP support, for example:
|
||||
- Apache 2.0 (or greater) (http://httpd.apache.org/).
|
||||
- Nginx 1.1 (or greater) (http://nginx.com/).
|
||||
- PHP 5.4.5 (or greater) (http://php.net/). For better security support it is
|
||||
recommended to update to at least 5.5.21 or 5.6.5.
|
||||
- One of the following databases:
|
||||
- MySQL 5.5.3 (or greater) (http://www.mysql.com/).
|
||||
- MariaDB 5.5.20 (or greater) (https://mariadb.org/). MariaDB is a fully
|
||||
compatible drop-in replacement for MySQL.
|
||||
- Percona Server 5.5.8 (or greater) (http://www.percona.com/). Percona
|
||||
Server is a backwards-compatible replacement for MySQL.
|
||||
- PostgreSQL 8.3 (or greater) (http://www.postgresql.org/).
|
||||
- SQLite 3.4.2 (or greater) (http://www.sqlite.org/).
|
||||
|
||||
For more detailed information about Drupal requirements, including a list of
|
||||
PHP extensions and configurations that are required, see "System requirements"
|
||||
(https://www.drupal.org/requirements) in the Drupal.org online documentation.
|
||||
|
||||
For detailed information on how to configure a test server environment using a
|
||||
variety of operating systems and web servers, see "Local server setup"
|
||||
(https://www.drupal.org/node/157602) in the Drupal.org online documentation.
|
||||
|
||||
Note that all directories mentioned in this document are always relative to the
|
||||
directory of your Drupal installation, and commands are meant to be run from
|
||||
this directory (except for the initial commands that create that directory).
|
||||
|
||||
OPTIONAL SERVER REQUIREMENTS
|
||||
----------------------------
|
||||
|
||||
- If you want to use Drupal's "Clean URLs" feature on an Apache web server, you
|
||||
will need the mod_rewrite module and the ability to use local .htaccess
|
||||
files. For Clean URLs support on IIS, see "Clean URLs with IIS"
|
||||
(https://www.drupal.org/node/3854) in the Drupal.org online documentation.
|
||||
|
||||
- If you plan to use XML-based services such as RSS aggregation, you will need
|
||||
PHP's XML extension. This extension is enabled by default on most PHP
|
||||
installations.
|
||||
|
||||
- To serve gzip compressed CSS and JS files on an Apache web server, you will
|
||||
need the mod_headers module and the ability to use local .htaccess files.
|
||||
|
||||
- Some Drupal functionality (e.g., checking whether Drupal and contributed
|
||||
modules need updates, RSS aggregation, etc.) require that the web server be
|
||||
able to go out to the web and download information. If you want to use this
|
||||
functionality, you need to verify that your hosting provider or server
|
||||
configuration allows the web server to initiate outbound connections. Most web
|
||||
hosting setups allow this.
|
||||
|
||||
- PHP 5.5.21 provides features for improved security when used with MySQL. While
|
||||
this is not required, it is highly encouraged to use PHP 5.5.21 or 5.6.5 and
|
||||
above.
|
||||
|
||||
INSTALLATION
|
||||
------------
|
||||
|
||||
1. Download and extract Drupal.
|
||||
|
||||
You can obtain the latest Drupal release from https://www.drupal.org -- the
|
||||
files are available in .tar.gz and .zip formats and can be extracted using
|
||||
most compression tools.
|
||||
|
||||
To download and extract the files, on a typical Unix/Linux command line, use
|
||||
the following commands (assuming you want version x.y.z of Drupal in .tar.gz
|
||||
format):
|
||||
|
||||
wget https://www.drupal.org/files/projects/drupal-x.y.z.tar.gz
|
||||
tar -zxvf drupal-x.y.z.tar.gz
|
||||
|
||||
This will create a new directory drupal-x.y.z/ containing all Drupal files
|
||||
and directories. Then, to move the contents of that directory into a
|
||||
directory within your web server's document root or your public HTML
|
||||
directory, continue with this command:
|
||||
|
||||
mv drupal-x.y.z/* drupal-x.y.z/.htaccess drupal-x.y.z/.csslintrc drupal-x.y.z/.editorconfig drupal-x.y.z/.eslintignore drupal-x.y.z/.eslintrc /path/to/your/installation
|
||||
|
||||
2. Create the Drupal database.
|
||||
|
||||
Because Drupal stores all site information in a database, the Drupal
|
||||
installer will attempt to create this database for you. If you create the
|
||||
database manually, you must grant Drupal certain database privileges (such as
|
||||
the ability to create tables). For details, consult INSTALL.mysql.txt,
|
||||
INSTALL.pgsql.txt, or INSTALL.sqlite.txt. You may also need to consult your
|
||||
web hosting provider for instructions specific to your web host.
|
||||
|
||||
Take note of the username, password, database name, and hostname as you
|
||||
create the database. You will enter this information during the install.
|
||||
|
||||
3. Run the install script.
|
||||
|
||||
To run the install script, point your browser to the base URL of your
|
||||
website (e.g., http://www.example.com).
|
||||
|
||||
You will be guided through several screens to set up the database, add the
|
||||
site maintenance account (the first user, also known as user/1), and provide
|
||||
basic web site settings.
|
||||
|
||||
During installation, several files and directories need to be created, which
|
||||
the install script will try to do automatically. However, on some hosting
|
||||
environments, manual steps are required, and the install script will tell
|
||||
you that it cannot proceed until you fix certain issues. This is normal and
|
||||
does not indicate a problem with your server.
|
||||
|
||||
The most common steps you may need to perform are:
|
||||
|
||||
a. Missing files directory.
|
||||
|
||||
The install script will attempt to create a file storage directory in
|
||||
the default location at sites/default/files (the location of the files
|
||||
directory may be changed after Drupal is installed).
|
||||
|
||||
If auto-creation fails, you can make it work by changing permissions on
|
||||
the sites/default directory so that the web server can create the files
|
||||
directory within it for you. (If you are creating a multisite
|
||||
installation, substitute the correct sites directory for sites/default;
|
||||
see the Multisite Configuration section of this file, below.)
|
||||
|
||||
For example, on a Unix/Linux command line, you can grant everyone
|
||||
(including the web server) permission to write to the sites/default
|
||||
directory with this command:
|
||||
|
||||
chmod a+w sites/default
|
||||
|
||||
Be sure to set the permissions back after the installation is finished!
|
||||
Sample command:
|
||||
|
||||
chmod go-w sites/default
|
||||
|
||||
Alternatively, instead of allowing the web server to create the files
|
||||
directory for you as described above, you can create it yourself. Sample
|
||||
commands from a Unix/Linux command line:
|
||||
|
||||
mkdir sites/default/files
|
||||
chmod a+w sites/default/files
|
||||
|
||||
b. Missing settings file.
|
||||
|
||||
Drupal will try to automatically create settings.php and services.yml
|
||||
files, which are normally in the directory sites/default (to avoid
|
||||
problems when upgrading, Drupal is not packaged with this file). If
|
||||
auto-creation of either file fails, you will need to create the file
|
||||
yourself. Use the template sites/default/default.settings.php or
|
||||
sites/default/default.services.yml respectively.
|
||||
|
||||
For example, on a Unix/Linux command line, you can make a copy of the
|
||||
default.settings.php and default.services.yml files with the commands:
|
||||
|
||||
cp sites/default/default.settings.php sites/default/settings.php
|
||||
cp sites/default/default.services.yml sites/default/services.yml
|
||||
|
||||
Next, grant write privileges to the file to everyone (including the web
|
||||
server) with the command:
|
||||
|
||||
chmod a+w sites/default/settings.php
|
||||
chmod a+w sites/default/services.yml
|
||||
|
||||
Be sure to set the permissions back after the installation is finished!
|
||||
Sample command:
|
||||
|
||||
chmod go-w sites/default/settings.php
|
||||
chmod go-w sites/default/services.yml
|
||||
|
||||
c. Write permissions after install.
|
||||
|
||||
The install script will attempt to write-protect the settings.php file and
|
||||
the sites/default directory after saving your configuration. If this
|
||||
fails, you will be notified, and you can do it manually. Sample commands
|
||||
from a Unix/Linux command line:
|
||||
|
||||
chmod go-w sites/default/settings.php
|
||||
chmod go-w sites/default/services.yml
|
||||
chmod go-w sites/default
|
||||
|
||||
4. Verify that the site is working.
|
||||
|
||||
When the install script finishes, you will be logged in with the site
|
||||
maintenance account on a "Welcome" page. If the default Drupal theme is not
|
||||
displaying properly and links on the page result in "Page Not Found" errors,
|
||||
you may be experiencing problems with clean URLs. Visit
|
||||
https://www.drupal.org/getting-started/clean-urls to troubleshoot.
|
||||
|
||||
5. Change file system storage settings (optional).
|
||||
|
||||
The files directory created in step 4 is the default file system path used to
|
||||
store all uploaded files, as well as some temporary files created by
|
||||
Drupal. After installation, you can modify the file system path to store
|
||||
uploaded files in a different location.
|
||||
|
||||
It is not necessary to modify this path, but you may wish to change it if:
|
||||
|
||||
- Your site runs multiple Drupal installations from a single codebase (modify
|
||||
the file system path of each installation to a different directory so that
|
||||
uploads do not overlap between installations).
|
||||
|
||||
- Your site runs on a number of web servers behind a load balancer or reverse
|
||||
proxy (modify the file system path on each server to point to a shared file
|
||||
repository).
|
||||
|
||||
- You want to restrict access to uploaded files.
|
||||
|
||||
To modify the file system path:
|
||||
|
||||
a. Ensure that the new location for the path exists and is writable by the
|
||||
web server. For example, to create a new directory named uploads and grant
|
||||
write permissions, use the following commands on a Unix/Linux command
|
||||
line:
|
||||
|
||||
mkdir uploads
|
||||
chmod a+w uploads
|
||||
|
||||
b. Navigate to Administration > Configuration > Media > File system, and
|
||||
enter the desired path. Note that if you want to use private file storage,
|
||||
you need to first enter the path for private files and save the
|
||||
configuration, and then change the "Default download method" setting and
|
||||
save again.
|
||||
|
||||
Changing the file system path after files have been uploaded may cause
|
||||
unexpected problems on an existing site. If you modify the file system path
|
||||
on an existing site, remember to copy all files from the original location
|
||||
to the new location.
|
||||
|
||||
6. Revoke documentation file permissions (optional).
|
||||
|
||||
Some administrators suggest making the documentation files, especially
|
||||
CHANGELOG.txt, non-readable so that the exact version of Drupal you are
|
||||
running is slightly more difficult to determine. If you wish to implement
|
||||
this optional security measure, from a Unix/Linux command line you can use
|
||||
the following command:
|
||||
|
||||
chmod a-r CHANGELOG.txt
|
||||
|
||||
Note that the example only affects CHANGELOG.txt. To completely hide all
|
||||
documentation files from public view, repeat this command for each of the
|
||||
Drupal documentation files in the installation directory, substituting the
|
||||
name of each file for CHANGELOG.txt in the example.
|
||||
|
||||
For more information on setting file permissions, see "Modifying Linux,
|
||||
Unix, and Mac file permissions" (https://www.drupal.org/node/202483) or
|
||||
"Modifying Windows file permissions" (https://www.drupal.org/node/202491) in
|
||||
the Drupal.org online documentation.
|
||||
|
||||
7. Set up independent "cron" maintenance jobs.
|
||||
|
||||
Many Drupal modules have tasks that must be run periodically, including the
|
||||
Search module (building and updating the index used for keyword searching),
|
||||
the Aggregator module (retrieving feeds from other sites), and the System
|
||||
module (performing routine maintenance and pruning of database tables). These
|
||||
tasks are known as "cron maintenance tasks", named after the Unix/Linux
|
||||
"cron" utility.
|
||||
|
||||
When you install Drupal, its built-in cron feature is enabled, which
|
||||
automatically runs the cron tasks periodically, triggered by people visiting
|
||||
pages of your site. You can configure the built-in cron feature by navigating
|
||||
to Administration > Configuration > System > Cron.
|
||||
|
||||
It is also possible to run the cron tasks independent of site visits; this is
|
||||
recommended for most sites. To do this, you will need to set up an automated
|
||||
process to visit the page /cron on your site, which executes the cron
|
||||
tasks.
|
||||
|
||||
The URL of the cron page requires a "cron key" to protect against
|
||||
unauthorized access. Your site's cron key is automatically generated during
|
||||
installation and is specific to your site. The full URL of the page, with the
|
||||
cron key, is available in the "Cron maintenance tasks" section of the Status
|
||||
report page at Administration > Reports > Status report.
|
||||
|
||||
As an example for how to set up this automated process, you can use the
|
||||
crontab utility on Unix/Linux systems. The following crontab line uses the
|
||||
wget command to visit the cron page, and runs each hour, on the hour:
|
||||
|
||||
0 * * * * wget -O - -q -t 1 http://example.com/cron/YOURKEY
|
||||
|
||||
Replace the text "http://example.com/cron/YOURKEY" in the example with the
|
||||
full URL displayed under "Cron maintenance tasks" on the "Status report"
|
||||
page.
|
||||
|
||||
More information about cron maintenance tasks is available at
|
||||
https://www.drupal.org/cron, and sample cron shell scripts can be found in
|
||||
the core/scripts/ directory. (Note that these scripts must be customized like
|
||||
the above example, to add your site-specific cron key and domain name.)
|
||||
|
||||
REINSTALL
|
||||
------------
|
||||
|
||||
Drupal can be reinstalled without downloading and extracting the Drupal release.
|
||||
|
||||
1. Drop all the tables in your database.
|
||||
|
||||
2. Remove everything in sites/default/files.
|
||||
|
||||
3. Remove sites/default/settings.php.
|
||||
|
||||
4. Follow the Installation Instructions above starting from Step 3 (Run the
|
||||
install script).
|
||||
|
||||
BUILDING AND CUSTOMIZING YOUR SITE
|
||||
----------------------------------
|
||||
|
||||
A new installation of Drupal defaults to a very basic configuration. To extend
|
||||
your site, you use "modules" and "themes". A module is a plugin that adds
|
||||
functionality to Drupal, while a theme changes the look of your site. The core
|
||||
of Drupal provides several optional modules and themes, and you can download
|
||||
more at https://www.drupal.org/project/project_module and
|
||||
https://www.drupal.org/project/project_theme
|
||||
|
||||
Do not mix downloaded or custom modules and themes with Drupal's core modules
|
||||
and themes. Drupal's modules and themes are located in the /core/modules and
|
||||
/core/themes directories, while the modules and themes you add to Drupal are
|
||||
normally placed in the /modules and /themes directories. If you run a multisite
|
||||
installation, you can also place modules and themes in the site-specific
|
||||
directories -- see the Multisite Configuration section, below.
|
||||
|
||||
Never edit Drupal's core modules and themes; instead, use the hooks available in
|
||||
the Drupal API. To modify the behavior of Drupal, develop a module as described
|
||||
at https://www.drupal.org/developing/modules. To modify the look of Drupal,
|
||||
create a subtheme as described at https://www.drupal.org/node/2165673, or a
|
||||
completely new theme as described at https://www.drupal.org/documentation/theme
|
||||
|
||||
MULTISITE CONFIGURATION
|
||||
-----------------------
|
||||
|
||||
A single Drupal installation can host several Drupal-powered sites, each with
|
||||
its own individual configuration.
|
||||
|
||||
For this to work you need the file sites/sites.php to exist. Make a copy of
|
||||
the example.sites.php file:
|
||||
|
||||
$ cp sites/example.sites.php sites/sites.php
|
||||
|
||||
Additional site configurations are created in subdirectories within the 'sites'
|
||||
directory. Each subdirectory must have a 'settings.php' file, which specifies
|
||||
the configuration settings. The easiest way to create additional sites is to
|
||||
copy file 'default.settings.php' from the 'sites/default' directory into the
|
||||
new site directory with file name 'settings.php' and modify as appropriate.
|
||||
The new directory name is constructed from the site's URL. The configuration
|
||||
for www.example.com could be in 'sites/example.com/settings.php' (note that
|
||||
'www.' should be omitted if users can access your site at http://example.com/).
|
||||
|
||||
$ cp sites/default/defaults.settings.php sites/example.com/settings.php
|
||||
|
||||
Sites do not have to have a different domain. You can also use subdomains and
|
||||
subdirectories for Drupal sites. For example, example.com, sub.example.com, and
|
||||
sub.example.com/site3 can all be defined as independent Drupal sites. The setup
|
||||
for a configuration such as this would look like the following:
|
||||
|
||||
sites/default/settings.php
|
||||
sites/example.com/settings.php
|
||||
sites/sub.example.com/settings.php
|
||||
sites/sub.example.com.site3/settings.php
|
||||
|
||||
When searching for a site configuration (for example www.sub.example.com/site3),
|
||||
Drupal will search for configuration files in the following order, using the
|
||||
first configuration it finds:
|
||||
|
||||
sites/www.sub.example.com.site3/settings.php
|
||||
sites/sub.example.com.site3/settings.php
|
||||
sites/example.com.site3/settings.php
|
||||
sites/www.sub.example.com/settings.php
|
||||
sites/sub.example.com/settings.php
|
||||
sites/example.com/settings.php
|
||||
sites/default/settings.php
|
||||
|
||||
If you are installing on a non-standard port, the port number is treated as the
|
||||
deepest subdomain. For example: http://www.example.com:8080/ could be loaded
|
||||
from sites/8080.www.example.com/. The port number will be removed according to
|
||||
the pattern above if no port-specific configuration is found, just like a real
|
||||
subdomain.
|
||||
|
||||
Each site configuration can have its own site-specific modules and themes in
|
||||
addition to those installed in the standard 'modules' and 'themes' directories.
|
||||
To use site-specific modules or themes, simply create a 'modules' or 'themes'
|
||||
directory within the site configuration directory. For example, if
|
||||
sub.example.com has a custom theme and a custom module that should not be
|
||||
accessible to other sites, the setup would look like this:
|
||||
|
||||
sites/sub.example.com/
|
||||
settings.php
|
||||
themes/custom_theme
|
||||
modules/custom_module
|
||||
|
||||
For more information about multiple virtual hosts or the configuration
|
||||
settings, consult https://www.drupal.org/documentation/install/multi-site
|
||||
|
||||
For more information on configuring Drupal's file system path in a multisite
|
||||
configuration, see step 6 above.
|
||||
|
||||
MULTILINGUAL CONFIGURATION
|
||||
--------------------------
|
||||
|
||||
By default, Drupal is installed in one language, and further languages may be
|
||||
installed later.
|
||||
|
||||
For detailed instructions, visit
|
||||
https://www.drupal.org/documentation/multilingual
|
339
core/LICENSE.txt
Normal file
339
core/LICENSE.txt
Normal file
|
@ -0,0 +1,339 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
523
core/MAINTAINERS.txt
Normal file
523
core/MAINTAINERS.txt
Normal file
|
@ -0,0 +1,523 @@
|
|||
Drupal core is built and maintained by the Drupal project community. Everyone is
|
||||
encouraged to submit issues and changes (patches) to improve Drupal, and to
|
||||
contribute in other ways -- see https://www.drupal.org/contribute to find out
|
||||
how.
|
||||
|
||||
|
||||
Core committers
|
||||
---------------
|
||||
|
||||
The Drupal Core committers oversee the development of Drupal as a whole. The
|
||||
core committers for Drupal are (per major version, in alphabetical order):
|
||||
|
||||
Drupal 8
|
||||
- Alex Bronstein 'effulgentsia' https://www.drupal.org/u/effulgentsia
|
||||
(Framework Manager)
|
||||
- Dries Buytaert 'dries' https://www.drupal.org/u/dries
|
||||
(BDFL, Product Manager)
|
||||
- Angela Byron 'webchick' https://www.drupal.org/u/webchick
|
||||
(Product Manager)
|
||||
- Nathaniel Catchpole 'catch' https://www.drupal.org/u/catch
|
||||
(Framework Manager, Release Manager)
|
||||
- Jess Myrbo 'xjm' https://www.drupal.org/u/xjm
|
||||
(Release Manager)
|
||||
- Alex Pott 'alexpott' https://www.drupal.org/u/alexpott
|
||||
(Framework Manager)
|
||||
|
||||
Provisional membership: None at this time.
|
||||
|
||||
Drupal 7
|
||||
- David Rothstein 'David_Rothstein' https://www.drupal.org/u/david_rothstein
|
||||
(Release Manager, Framework Manager, Product Manager)
|
||||
|
||||
Provisional membership: None at this time.
|
||||
|
||||
Drupal 6
|
||||
- Gábor Hojtsy 'Gábor Hojtsy' https://www.drupal.org/u/gábor-hojtsy
|
||||
(Release Manager, Framework Manager, Product Manager)
|
||||
|
||||
Provisional membership: None at this time.
|
||||
|
||||
Subsystem maintainers
|
||||
---------------------
|
||||
|
||||
The Drupal Core subsystem maintainers oversee the development of Drupal
|
||||
subsystems. See https://www.drupal.org/contribute/core-maintainers for more
|
||||
information on their responsibilities, and to find out how to become a subsystem
|
||||
maintainer. Current subsystem maintainers for Drupal 8:
|
||||
|
||||
Ajax system
|
||||
- Alex Bronstein 'effulgentsia' https://www.drupal.org/u/effulgentsia
|
||||
- Earl Miles 'merlinofchaos' https://www.drupal.org/u/merlinofchaos
|
||||
|
||||
Asset library system
|
||||
- ?
|
||||
|
||||
Authentication and authorization system
|
||||
- ?
|
||||
|
||||
Base system
|
||||
- Damien Tournoud 'DamZ' https://www.drupal.org/u/damz
|
||||
- Moshe Weitzman 'moshe weitzman' https://www.drupal.org/u/moshe-weitzman
|
||||
|
||||
Batch system
|
||||
- Yves Chedemois 'yched' https://www.drupal.org/u/yched
|
||||
|
||||
Bootstrap system
|
||||
- ?
|
||||
|
||||
Cache system
|
||||
- Damien Tournoud 'DamZ' https://www.drupal.org/u/damz
|
||||
- Nathaniel Catchpole 'catch' https://www.drupal.org/u/catch
|
||||
- Mark Sonnabaum 'msonnabaum' https://www.drupal.org/u/msonnabaum
|
||||
|
||||
Configuration system
|
||||
- Daniel F. Kudwien 'sun' https://www.drupal.org/u/sun
|
||||
- Alex Pott 'alexpott' https://www.drupal.org/u/alexpott
|
||||
- Matthew Tift 'mtift' https://www.drupal.org/u/mtift
|
||||
|
||||
Configuration entity system
|
||||
- Alex Pott 'alexpott' https://www.drupal.org/u/alexpott
|
||||
- Daniel F. Kudwien 'sun' https://www.drupal.org/u/sun
|
||||
- Tim Plunkett 'tim.plunkett' https://www.drupal.org/u/tim.plunkett
|
||||
|
||||
Cron system
|
||||
- Derek Wright 'dww' https://www.drupal.org/u/dww
|
||||
|
||||
CSS
|
||||
- John Albin Wilkins 'JohnAlbin' https://www.drupal.org/u/johnalbin
|
||||
- Lewis Nyman 'LewisNyman' https://www.drupal.org/u/lewisnyman
|
||||
|
||||
Database system
|
||||
- Larry Garfield 'Crell' https://www.drupal.org/u/crell
|
||||
|
||||
MySQL DB driver
|
||||
- Larry Garfield 'Crell' https://www.drupal.org/u/crell
|
||||
- David Strauss 'David Strauss' https://www.drupal.org/u/david-strauss
|
||||
|
||||
PostgreSQL DB driver
|
||||
- Damien Tournoud 'DamZ' https://www.drupal.org/u/damz
|
||||
- Josh Waihi 'fiasco' https://www.drupal.org/u/fiasco
|
||||
|
||||
Sqlite DB driver
|
||||
- Damien Tournoud 'DamZ' https://www.drupal.org/u/damz
|
||||
|
||||
Database update system
|
||||
- ?
|
||||
|
||||
Entity system
|
||||
- Wolfgang Ziegler 'fago' https://www.drupal.org/u/fago
|
||||
- Nathaniel Catchpole 'catch' https://www.drupal.org/u/catch
|
||||
- Franz Heinzmann 'Frando' https://www.drupal.org/u/frando
|
||||
- Sascha Grossenbacher 'Berdir' https://www.drupal.org/u/berdir
|
||||
|
||||
Extension system
|
||||
- ?
|
||||
|
||||
Field system
|
||||
- Yves Chedemois 'yched' https://www.drupal.org/u/yched
|
||||
- Kristof De Jaeger 'swentel' https://www.drupal.org/u/swentel
|
||||
- Andrei Mateescu 'amateescu' https://www.drupal.org/u/amateescu
|
||||
|
||||
File system
|
||||
- Andrew Morton 'drewish' https://www.drupal.org/u/drewish
|
||||
- Aaron Winborn 'aaron' https://www.drupal.org/u/aaron
|
||||
|
||||
Form system
|
||||
- Alex Bronstein 'effulgentsia' https://www.drupal.org/u/effulgentsia
|
||||
- Wolfgang Ziegler 'fago' https://www.drupal.org/u/fago
|
||||
- Daniel F. Kudwien 'sun' https://www.drupal.org/u/sun
|
||||
- Tim Plunkett 'tim.plunkett' https://www.drupal.org/u/tim.plunkett
|
||||
- Franz Heinzmann 'Frando' https://www.drupal.org/u/frando
|
||||
|
||||
Image system
|
||||
- Claudiu Cristea 'claudiu.cristea' https://www.drupal.org/u/claudiu.cristea
|
||||
|
||||
Install system
|
||||
- ?
|
||||
|
||||
JavaScript
|
||||
- Théodore Biadala 'nod_' https://www.drupal.org/u/nod_
|
||||
- Kay Leung 'droplet' https://www.drupal.org/u/droplet
|
||||
|
||||
Language system
|
||||
- Francesco Placella 'plach' https://www.drupal.org/u/plach
|
||||
- Daniel F. Kudwien 'sun' https://www.drupal.org/u/sun
|
||||
|
||||
Lock system
|
||||
- Damien Tournoud 'DamZ' https://www.drupal.org/u/damz
|
||||
|
||||
Mail system
|
||||
- ?
|
||||
|
||||
Markup
|
||||
- Daniel F. Kudwien 'sun' https://www.drupal.org/u/sun
|
||||
|
||||
Migrate
|
||||
- Ben Dougherty 'benjy' https://www.drupal.org/u/benjy
|
||||
- Michael Anello 'ultimike' https://www.drupal.org/u/ultimike
|
||||
- Mike Ryan 'mikeryan' https://www.drupal.org/u/mikeryan
|
||||
|
||||
Menu system
|
||||
- Daniel Wehner 'dawehner' https://www.drupal.org/u/dawehner
|
||||
- Peter Wolanin 'pwolanin' https://www.drupal.org/u/pwolanin
|
||||
|
||||
Node Access
|
||||
- Moshe Weitzman 'moshe weitzman' https://www.drupal.org/u/moshe-weitzman
|
||||
- Ken Rickard 'agentrickard' https://www.drupal.org/u/agentrickard
|
||||
- Jess Myrbo 'xjm' https://www.drupal.org/u/xjm
|
||||
|
||||
Path system
|
||||
- Nathaniel Catchpole 'catch' https://www.drupal.org/u/catch
|
||||
|
||||
Plugin system
|
||||
- Kris Vanderwater 'EclipseGc' https://www.drupal.org/u/eclipseGc
|
||||
- Alex Bronstein 'effulgentsia' https://www.drupal.org/u/effulgentsia
|
||||
- Tim Plunkett 'tim.plunkett' https://www.drupal.org/u/tim.plunkett
|
||||
|
||||
Queue system
|
||||
- James Gilliland 'neclimdul' https://www.drupal.org/u/neclimdul
|
||||
- Mark Sonnabaum 'msonnabaum' https://www.drupal.org/u/msonnabaum
|
||||
|
||||
Render system
|
||||
- Moshe Weitzman 'moshe weitzman' https://www.drupal.org/u/moshe-weitzman
|
||||
- Alex Bronstein 'effulgentsia' https://www.drupal.org/u/effulgentsia
|
||||
- Franz Heinzmann 'Frando' https://www.drupal.org/u/frando
|
||||
|
||||
Request processing system
|
||||
- Larry Garfield 'Crell' https://www.drupal.org/u/crell
|
||||
|
||||
Routing system
|
||||
- Larry Garfield 'Crell' https://www.drupal.org/u/crell
|
||||
- Tim Plunkett 'tim.plunkett' https://www.drupal.org/u/tim.plunkett
|
||||
|
||||
Theme system
|
||||
- Alex Bronstein 'effulgentsia' https://www.drupal.org/u/effulgentsia
|
||||
- John Albin Wilkins 'JohnAlbin' https://www.drupal.org/u/johnalbin
|
||||
- Jen Lampton 'jenlampton' https://www.drupal.org/u/jenlampton
|
||||
- Scott Reeves 'Cottser' https://www.drupal.org/u/cottser
|
||||
- Fabian Franz 'Fabianx' https://www.drupal.org/u/fabianx
|
||||
- Joël Pittet 'joelpittet' https://www.drupal.org/u/joelpittet
|
||||
|
||||
Token system
|
||||
- Dave Reid 'davereid' https://www.drupal.org/u/davereid
|
||||
|
||||
Translations
|
||||
- ?
|
||||
|
||||
Transliteration system
|
||||
- Andrei Mateescu 'amateescu' https://www.drupal.org/u/amateescu
|
||||
- Damien Tournoud 'DamZ' https://www.drupal.org/u/damz
|
||||
- Daniel F. Kudwien 'sun' https://www.drupal.org/u/sun
|
||||
- Jennifer Hodgdon 'jhodgdon' https://www.drupal.org/u/jhodgdon
|
||||
|
||||
Topic maintainers
|
||||
-----------------
|
||||
|
||||
Accessibility
|
||||
- Mike Gifford 'mgifford' https://www.drupal.org/u/mgifford
|
||||
- Jesse Renée Beach 'jessebeach' https://www.drupal.org/u/jessebeach
|
||||
|
||||
Documentation
|
||||
- Jennifer Hodgdon 'jhodgdon' https://www.drupal.org/u/jhodgdon
|
||||
|
||||
Performance
|
||||
- Nathaniel Catchpole 'catch' https://www.drupal.org/u/catch
|
||||
|
||||
Testing
|
||||
- ?
|
||||
|
||||
Usability
|
||||
- Roy Scholten 'yoroy' https://www.drupal.org/u/yoroy
|
||||
- Bojhan Somers 'Bojhan' https://www.drupal.org/u/bojhan
|
||||
|
||||
Provisional membership: None at this time.
|
||||
|
||||
Security team
|
||||
-----------------
|
||||
|
||||
To report a security issue, see:
|
||||
https://www.drupal.org/security-team/report-issue
|
||||
|
||||
The Drupal security team provides Security Advisories for vulnerabilities,
|
||||
assists developers in resolving security issues, and provides security
|
||||
documentation. See https://www.drupal.org/security-team for more information.
|
||||
The security team lead is:
|
||||
|
||||
- Michael Hess 'mlhess' https://www.drupal.org/u/mlhess
|
||||
|
||||
|
||||
Module maintainers
|
||||
------------------
|
||||
|
||||
Action module
|
||||
- ?
|
||||
|
||||
Aggregator module
|
||||
- Paris Liakos 'ParisLiakos' https://www.drupal.org/u/parisliakos
|
||||
|
||||
Ban module
|
||||
- ?
|
||||
|
||||
Basic Auth module
|
||||
- Klaus Purer 'klausi' https://www.drupal.org/u/klausi
|
||||
- Juampy Novillo Requena 'juampy' https://www.drupal.org/u/juampy
|
||||
|
||||
Block module
|
||||
- Tim Plunkett 'tim.plunkett' https://www.drupal.org/u/tim.plunkett
|
||||
- Ben Dougherty 'benjy' https://www.drupal.org/u/benjy
|
||||
|
||||
Block Content module
|
||||
- Lee Rowlands 'larowlan' https://www.drupal.org/u/larowlan
|
||||
|
||||
Book module
|
||||
- Peter Wolanin 'pwolanin' https://www.drupal.org/u/pwolanin
|
||||
|
||||
Breakpoint module
|
||||
- Peter Droogmans 'attiks' https://www.drupal.org/u/attiks
|
||||
- Marc Drummond 'mdrummond' https://www.drupal.org/u/mdrummond
|
||||
|
||||
CKEditor module
|
||||
- Wim Leers 'Wim Leers' https://www.drupal.org/u/wim-leers
|
||||
|
||||
Color module
|
||||
- ?
|
||||
|
||||
Comment module
|
||||
- Dick Olsson 'dixon_' https://www.drupal.org/u/dixon_
|
||||
- Lee Rowlands 'larowlan' https://www.drupal.org/u/larowlan
|
||||
- Andrey Postnikov 'andypost' https://www.drupal.org/u/andypost
|
||||
|
||||
Configuration module
|
||||
- Tim Plunkett 'tim.plunkett' https://www.drupal.org/u/tim.plunkett
|
||||
|
||||
Configuration Translation module
|
||||
- Gábor Hojtsy 'Gábor Hojtsy' https://www.drupal.org/u/gábor-hojtsy
|
||||
- Tobias Stöckler 'tstoeckler' https://www.drupal.org/u/tstoeckler
|
||||
- Vijayachandran Mani 'vijaycs85' https://www.drupal.org/u/vijaycs85
|
||||
|
||||
Contact module
|
||||
- Lee Rowlands 'larowlan' https://www.drupal.org/u/larowlan
|
||||
- Tim Eisenhuth 'tim-e' https://www.drupal.org/u/tim-e
|
||||
|
||||
Content Translation module
|
||||
- Francesco Placella 'plach' https://www.drupal.org/u/plach
|
||||
|
||||
Contextual module
|
||||
- Daniel F. Kudwien 'sun' https://www.drupal.org/u/sun
|
||||
|
||||
Database Logging module
|
||||
- Khalid Baheyeldin 'kbahey' https://www.drupal.org/u/kbahey
|
||||
|
||||
DateTime module
|
||||
- Matthew Donadio 'mpdonadio' https://www.drupal.org/u/mpdonadio
|
||||
|
||||
Email module
|
||||
- Nils Destoop 'zuuperman' https://www.drupal.org/u/zuuperman
|
||||
|
||||
Editor module
|
||||
- Wim Leers 'Wim Leers' https://www.drupal.org/u/wim-leers
|
||||
|
||||
Entity Reference module
|
||||
- Amitai Burstein 'Amitaibu' https://www.drupal.org/u/amitaibu
|
||||
- Andrei Mateescu 'amateescu' https://www.drupal.org/u/amateescu
|
||||
|
||||
Field UI module
|
||||
- Yves Chedemois 'yched' https://www.drupal.org/u/yched
|
||||
- Kristof De Jaeger 'swentel' https://www.drupal.org/u/swentel
|
||||
- Andrei Mateescu 'amateescu' https://www.drupal.org/u/amateescu
|
||||
|
||||
File module
|
||||
- Aaron Winborn 'aaron' https://www.drupal.org/u/aaron
|
||||
|
||||
Filter module
|
||||
- Daniel F. Kudwien 'sun' https://www.drupal.org/u/sun
|
||||
|
||||
Forum module
|
||||
- Lee Rowlands 'larowlan' https://www.drupal.org/u/larowlan
|
||||
|
||||
History module
|
||||
- Andrey Postnikov 'andypost' https://www.drupal.org/u/andypost
|
||||
|
||||
Hypertext Application Language (HAL) module
|
||||
- ?
|
||||
|
||||
Help module
|
||||
- ?
|
||||
|
||||
Image module
|
||||
- Claudiu Cristea 'claudiu.cristea' https://www.drupal.org/u/claudiu.cristea
|
||||
|
||||
Interface Translation (locale) module
|
||||
- Gábor Hojtsy 'Gábor Hojtsy' https://www.drupal.org/u/gábor-hojtsy
|
||||
|
||||
Language module
|
||||
- Francesco Placella 'plach' https://www.drupal.org/u/plach
|
||||
- Gábor Hojtsy 'Gábor Hojtsy' https://www.drupal.org/u/gábor-hojtsy
|
||||
|
||||
Link module
|
||||
- Weber Macedo 'Mac_Weber' https://www.drupal.org/u/mac_weber
|
||||
|
||||
Menu link content module
|
||||
- Daniel Wehner 'dawehner' https://www.drupal.org/u/dawehner
|
||||
- Peter Wolanin 'pwolanin' https://www.drupal.org/u/pwolanin
|
||||
|
||||
Menu UI module
|
||||
- ?
|
||||
|
||||
Migrate module
|
||||
- Ben Dougherty 'benjy' https://www.drupal.org/u/benjy
|
||||
- Michael Anello 'ultimike' https://www.drupal.org/u/ultimike
|
||||
- Mike Ryan 'mikeryan' https://www.drupal.org/u/mikeryan
|
||||
|
||||
Migrate (Drupal) module
|
||||
- Ben Dougherty 'benjy' https://www.drupal.org/u/benjy
|
||||
- Michael Anello 'ultimike' https://www.drupal.org/u/ultimike
|
||||
- Mike Ryan 'mikeryan' https://www.drupal.org/u/mikeryan
|
||||
|
||||
Node module
|
||||
- Moshe Weitzman 'moshe weitzman' https://www.drupal.org/u/moshe-weitzman
|
||||
- David Strauss 'David Strauss' https://www.drupal.org/u/david-strauss
|
||||
|
||||
Number module
|
||||
- Kristof De Jaeger 'swentel' https://www.drupal.org/u/swentel
|
||||
|
||||
Options module
|
||||
- Yves Chedemois 'yched' https://www.drupal.org/u/yched
|
||||
|
||||
Path module
|
||||
- ?
|
||||
|
||||
Phone module
|
||||
- Dave Reid 'davereid' https://www.drupal.org/u/davereid
|
||||
|
||||
Quick Edit module
|
||||
- Wim Leers 'Wim Leers' https://www.drupal.org/u/wim-leers
|
||||
- Théodore Biadala 'nod_' https://www.drupal.org/u/nod_
|
||||
|
||||
RDF module
|
||||
- Stéphane Corlosquet 'scor' https://www.drupal.org/u/scor
|
||||
|
||||
REST module
|
||||
- Klaus Purer 'klausi' https://www.drupal.org/u/klausi
|
||||
- Larry Garfield 'Crell' https://www.drupal.org/u/crell
|
||||
|
||||
Responsive Image module
|
||||
- Peter Droogmans 'attiks' https://www.drupal.org/u/attiks
|
||||
- Marc Drummond 'mdrummond' https://www.drupal.org/u/mdrummond
|
||||
- Jelle Sebreghts 'Jelle_S' https://www.drupal.org/u/jelle_s
|
||||
|
||||
Search module
|
||||
- Jennifer Hodgdon 'jhodgdon' https://www.drupal.org/u/jhodgdon
|
||||
- Peter Wolanin 'pwolanin' https://www.drupal.org/u/pwolanin
|
||||
|
||||
Serialization module
|
||||
- Damian Lee 'damiankloip' https://www.drupal.org/u/damiankloip
|
||||
|
||||
Shortcut module
|
||||
- Tobias Stöckler 'tstoeckler' https://www.drupal.org/u/tstoeckler
|
||||
- Jibran Ijaz 'jibran' https://www.drupal.org/u/jibran
|
||||
|
||||
Simpletest module
|
||||
- Daniel F. Kudwien 'sun' https://www.drupal.org/u/sun
|
||||
- Sascha Grossenbacher 'Berdir' https://www.drupal.org/u/berdir
|
||||
- Alex Pott 'alexpott' https://www.drupal.org/u/alexpott
|
||||
|
||||
Statistics module
|
||||
- Tim Millwood 'timmillwood' https://www.drupal.org/u/timmillwood
|
||||
|
||||
Syslog module
|
||||
- Khalid Baheyeldin 'kbahey' https://www.drupal.org/u/kbahey
|
||||
|
||||
System module
|
||||
- ?
|
||||
|
||||
Taxonomy module
|
||||
- Jess Myrbo 'xjm' https://www.drupal.org/u/xjm
|
||||
- Nathaniel Catchpole 'catch' https://www.drupal.org/u/catch
|
||||
- Benjamin Doherty 'bangpound' https://www.drupal.org/u/bangpound
|
||||
|
||||
Text module
|
||||
- ?
|
||||
|
||||
Toolbar module
|
||||
- Théodore Biadala 'nod_' https://www.drupal.org/u/nod_
|
||||
|
||||
Tour module
|
||||
- Nick Schuch 'nick_schuch' https://www.drupal.org/u/nick_schuch
|
||||
|
||||
Tracker module
|
||||
- David Strauss 'David Strauss' https://www.drupal.org/u/david-strauss
|
||||
|
||||
Update module
|
||||
- Derek Wright 'dww' https://www.drupal.org/u/dww
|
||||
|
||||
User module
|
||||
- Moshe Weitzman 'moshe weitzman' https://www.drupal.org/u/moshe-weitzman
|
||||
- David Strauss 'David Strauss' https://www.drupal.org/u/david-strauss
|
||||
|
||||
Views module
|
||||
- Daniel Wehner 'dawehner' https://www.drupal.org/u/dawehner
|
||||
- Tim Plunkett 'tim.plunkett' https://www.drupal.org/u/tim.plunkett
|
||||
- Damian Lee 'damiankloip' https://www.drupal.org/u/damiankloip
|
||||
- Jess Myrbo 'xjm' https://www.drupal.org/u/xjm
|
||||
|
||||
Views UI module
|
||||
- Daniel Wehner 'dawehner' https://www.drupal.org/u/dawehner
|
||||
- Tim Plunkett 'tim.plunkett' https://www.drupal.org/u/tim.plunkett
|
||||
- Damian Lee 'damiankloip' https://www.drupal.org/u/damiankloip
|
||||
|
||||
|
||||
Theme maintainers
|
||||
-----------------
|
||||
|
||||
Bartik theme
|
||||
- Jen Simmons 'jensimmons' https://www.drupal.org/u/jensimmons
|
||||
- Emma Maria Karayiannis 'emma.maria' https://www.drupal.org/u/emma.maria
|
||||
|
||||
Classy theme
|
||||
- David Hernandez 'davidhernandez' https://www.drupal.org/u/davidhernandez
|
||||
- Morten Birch Heide-Jørgensen 'mortendk' https://www.drupal.org/u/mortendk
|
||||
|
||||
Seven theme
|
||||
- Lewis Nyman 'LewisNyman' https://www.drupal.org/u/lewisnyman
|
||||
|
||||
Stark theme
|
||||
- John Albin Wilkins 'JohnAlbin' https://www.drupal.org/u/johnalbin
|
||||
|
||||
|
||||
Initiative coordinators
|
||||
-----------------------
|
||||
|
||||
The Drupal Core Initiative coordinators oversee approved projects that
|
||||
re-architect or otherwise improve large areas of Drupal core. See
|
||||
https://www.drupal.org/community-initiatives/drupal-core for more information on
|
||||
their responsibilities. The initiative coordinators for Drupal 8 are:
|
||||
|
||||
Configuration management
|
||||
- Greg Dunlap 'heyrocker' https://www.drupal.org/u/heyrocker
|
||||
|
||||
Design
|
||||
- Jeff Burns 'Jeff Burnz' https://www.drupal.org/u/jeff-burnz
|
||||
|
||||
Mobile
|
||||
- John Albin Wilkins 'JohnAlbin' https://www.drupal.org/u/johnalbin
|
||||
|
||||
Multi-lingual
|
||||
- Gábor Hojtsy 'Gábor Hojtsy' https://www.drupal.org/u/gábor-hojtsy
|
||||
|
||||
Web services
|
||||
- Larry Garfield 'Crell' https://www.drupal.org/u/crell
|
||||
|
||||
Provisional membership: None at this time.
|
||||
|
||||
Core mentoring leads
|
||||
---------------------
|
||||
|
||||
The Drupal Core mentoring leads inspire, enable, and encourage new core
|
||||
contributors. They also work on the core tools, process, and community to make
|
||||
it easier for new contributors to get involved. The mentoring leads are:
|
||||
|
||||
- Jess Myrbo 'xjm' https://www.drupal.org/u/xjm
|
||||
- Cathy Theys 'YesCT' https://www.drupal.org/u/yesct
|
||||
- Andrea Soper 'ZenDoodles' https://www.drupal.org/u/zendoodles
|
134
core/UPGRADE.txt
Normal file
134
core/UPGRADE.txt
Normal file
|
@ -0,0 +1,134 @@
|
|||
INTRODUCTION
|
||||
------------
|
||||
This document describes how to:
|
||||
|
||||
* Update your Drupal site from one minor 8.x version to another minor 8.x
|
||||
version; for example, from 8.8 to 8.9, or from 8.6 to 8.10.
|
||||
|
||||
* Migrate your Drupal site to version 8.x.
|
||||
|
||||
First steps and definitions:
|
||||
|
||||
* If you are upgrading to Drupal version x.y, then x is known as the major
|
||||
version number, and y is known as the minor version number. The download
|
||||
file will be named drupal-x.y.tar.gz (or drupal-x.y.zip).
|
||||
|
||||
* All directories mentioned in this document are relative to the directory of
|
||||
your Drupal installation.
|
||||
|
||||
* Make a full backup of all files, directories, and your database(s) before
|
||||
starting, and save it outside your Drupal installation directory.
|
||||
Instructions may be found at
|
||||
https://www.drupal.org/upgrade/backing-up-the-db
|
||||
|
||||
* It is wise to try an update or upgrade on a test copy of your site before
|
||||
applying it to your live site. Even minor updates can cause your site's
|
||||
behavior to change.
|
||||
|
||||
* Each new release of Drupal has release notes, which explain the changes made
|
||||
since the previous version and any special instructions needed to update or
|
||||
upgrade to the new version. You can find a link to the release notes for the
|
||||
version you are upgrading or updating to on the Drupal project page
|
||||
(https://www.drupal.org/project/drupal).
|
||||
|
||||
UPGRADE PROBLEMS
|
||||
----------------
|
||||
If you encounter errors during this process,
|
||||
|
||||
* Note any error messages you see.
|
||||
|
||||
* Restore your site to its previous state, using the file and database backups
|
||||
you created before you started the upgrade process. Do not attempt to do
|
||||
further upgrades on a site that had update problems.
|
||||
|
||||
* Consult one of the support options listed on https://www.drupal.org/support
|
||||
|
||||
More in-depth information on upgrading can be found at
|
||||
https://www.drupal.org/upgrade
|
||||
|
||||
MINOR VERSION UPDATES
|
||||
---------------------
|
||||
To update from one minor 8.x version of Drupal to any later 8.x version, after
|
||||
following the instructions in the INTRODUCTION section at the top of this file:
|
||||
|
||||
1. Log in as a user with the permission "Administer software updates".
|
||||
|
||||
2. Go to Administration > Configuration > Development > Maintenance mode.
|
||||
Enable the "Put site into maintenance mode" checkbox and save the
|
||||
configuration.
|
||||
|
||||
3. Remove all old core files and directories, except for the 'sites' directory
|
||||
and any custom files you added elsewhere.
|
||||
|
||||
If you made modifications to files like .htaccess, composer.json, or
|
||||
robots.txt you will need to re-apply them from your backup, after the new
|
||||
files are in place.
|
||||
|
||||
Sometimes an update includes changes to default.settings.php (this will be
|
||||
noted in the release notes). If that's the case, follow these steps:
|
||||
|
||||
- Make a backup copy of your settings.php file, with a different file name.
|
||||
|
||||
- Make a copy of the new default.settings.php file, and name the copy
|
||||
settings.php (overwriting your previous settings.php file).
|
||||
|
||||
- Copy the custom and site-specific entries from the backup you made into the
|
||||
new settings.php file. You will definitely need the lines giving the
|
||||
database information, and you will also want to copy in any other
|
||||
customizations you have added.
|
||||
|
||||
4. Download the latest Drupal 8.x release from https://www.drupal.org to a
|
||||
directory outside of your web root. Extract the archive and copy the files
|
||||
into your Drupal directory.
|
||||
|
||||
On a typical Unix/Linux command line, use the following commands to download
|
||||
and extract:
|
||||
|
||||
wget https://www.drupal.org/files/projects/drupal-x.y.tar.gz
|
||||
tar -zxvf drupal-x.y.tar.gz
|
||||
|
||||
This creates a new directory drupal-x.y/ containing all Drupal files and
|
||||
directories. Copy the files into your Drupal installation directory:
|
||||
|
||||
cp -R drupal-x.y/* drupal-x.y/.htaccess /path/to/your/installation
|
||||
|
||||
If you do not have command line access to your server, download the archive
|
||||
from https://www.drupal.org using your web browser, extract it, and then use
|
||||
an FTP client to upload the files to your web root.
|
||||
|
||||
5. Re-apply any modifications to files such as .htaccess, composer.json, or
|
||||
robots.txt.
|
||||
|
||||
6. Run update.php by visiting http://www.example.com/update.php (replace
|
||||
www.example.com with your domain name). This will update the core database
|
||||
tables.
|
||||
|
||||
If you are unable to access update.php do the following:
|
||||
|
||||
- Open settings.php with a text editor.
|
||||
|
||||
- Find the line that says:
|
||||
$settings['update_free_access'] = FALSE;
|
||||
|
||||
- Change it into:
|
||||
$settings['update_free_access'] = TRUE;
|
||||
|
||||
- Once the upgrade is done, $settings['update_free_access'] must be
|
||||
reverted to FALSE.
|
||||
|
||||
7. Go to Administration > Reports > Status report. Verify that everything is
|
||||
working as expected.
|
||||
|
||||
8. Ensure that $settings['update_free_access'] is FALSE in settings.php.
|
||||
|
||||
9. Go to Administration > Configuration > Development > Maintenance mode.
|
||||
Disable the "Put site into maintenance mode" checkbox and save the
|
||||
configuration.
|
||||
|
||||
MAJOR VERSION MIGRATION
|
||||
-----------------------
|
||||
Upgrading from a prior major version of Drupal to Drupal 8.x is not possible.
|
||||
The process now requires a migration to a Drupal 8.x site, using the Migrate
|
||||
module in Drupal core.
|
||||
|
||||
Note that migration support in Drupal 8 is currently only partially implemented.
|
1
core/assets/vendor/.gitignore
vendored
Normal file
1
core/assets/vendor/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
ckeditor/samples
|
2
core/assets/vendor/backbone/backbone-min.js
vendored
Normal file
2
core/assets/vendor/backbone/backbone-min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
core/assets/vendor/backbone/backbone-min.map
vendored
Normal file
1
core/assets/vendor/backbone/backbone-min.map
vendored
Normal file
File diff suppressed because one or more lines are too long
720
core/assets/vendor/ckeditor/CHANGES.md
vendored
Normal file
720
core/assets/vendor/ckeditor/CHANGES.md
vendored
Normal file
|
@ -0,0 +1,720 @@
|
|||
CKEditor 4 Changelog
|
||||
====================
|
||||
|
||||
## CKEditor 4.4.7
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* [#12825](http://dev.ckeditor.com/ticket/12825): Fixed: Preventing the [Table Resize](http://ckeditor.com/addon/tableresize) plugin from operating on elements outside the editor. Thanks to [Paul Martin](https://github.com/Paul-Martin)!
|
||||
* [#12157](http://dev.ckeditor.com/ticket/12157): Fixed: Lost text formatting on pressing *Tab* when the [`config.tabSpaces`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-tabSpaces) configuration option value was greater than zero.
|
||||
* [#12777](http://dev.ckeditor.com/ticket/12777): Fixed: The `table-layout` CSS property should be reset by skins. Thanks to [vita10gy](https://github.com/vita10gy)!
|
||||
* [#12812](http://dev.ckeditor.com/ticket/12812): Fixed: An uncaught security exception is thrown when [Line Utilities](http://ckeditor.com/addon/lineutils) are used in an inline editor loaded in a cross-domain `iframe`. Thanks to [Vitaliy Zurian](https://github.com/thecatontheflat)!
|
||||
* [#12735](http://dev.ckeditor.com/ticket/12735): Fixed: [`config.fillEmptyBlocks`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-fillEmptyBlocks) should only apply when outputting data.
|
||||
* [#10032](http://dev.ckeditor.com/ticket/10032): Fixed: [Paste from Word](http://ckeditor.com/addon/pastefromword) filter is executed for every paste after using the button.
|
||||
* [#12597](http://dev.ckeditor.com/ticket/12597): [Blink/Webkit] Fixed: Multi-byte Japanese characters entry not working properly after *Shift+Enter*.
|
||||
* [#12387](http://dev.ckeditor.com/ticket/12387): Fixed: An error is thrown if a skin does not have the [`chameleon`](http://docs.ckeditor.com/#!/api/CKEDITOR.skin-method-chameleon) property defined and [`config.uiColor`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-uiColor) is defined.
|
||||
* [#12747](http://dev.ckeditor.com/ticket/12747): [IE8-10] Fixed: Opening a drop-down for a specific selection when the editor is maximized results in incorrect drop-down panel position.
|
||||
* [#12850](http://dev.ckeditor.com/ticket/12850): [IEQM] Fixed: An error is thrown after focusing the editor.
|
||||
|
||||
## CKEditor 4.4.6
|
||||
|
||||
**Security Updates:**
|
||||
|
||||
* Fixed XSS vulnerability in the HTML parser reported by [Maco Cortes](https://www.facebook.com/Maaacoooo).
|
||||
|
||||
Issue summary: It was possible to execute XSS inside CKEditor after persuading the victim to: (i) switch CKEditor to source mode, then (ii) paste a specially crafted HTML code, prepared by the attacker, into the opened CKEditor source area, and (iii) switch back to WYSIWYG mode.
|
||||
|
||||
**An upgrade is highly recommended!**
|
||||
|
||||
New Features:
|
||||
|
||||
* [#12501](http://dev.ckeditor.com/ticket/12501): Allowed dashes in element names in the [string format of allowed content rules](http://docs.ckeditor.com/#!/guide/dev_allowed_content_rules-section-string-format).
|
||||
* [#12550](http://dev.ckeditor.com/ticket/12550): Added the `<main>` element to the [`CKEDITOR.dtd`](http://docs.ckeditor.com/#!/api/CKEDITOR.dtd).
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* [#12506](http://dev.ckeditor.com/ticket/12506): [Safari] Fixed: Cannot paste into inline editor if the page has `user-select: none` style. Thanks to [shaohua](https://github.com/shaohua)!
|
||||
* [#12683](http://dev.ckeditor.com/ticket/12683): Fixed: [Filter](http://docs.ckeditor.com/#!/guide/dev_acf) fails to remove custom tags. Thanks to [timselier](https://github.com/timselier)!
|
||||
* [#12489](http://dev.ckeditor.com/ticket/12489) and [#12491](http://dev.ckeditor.com/ticket/12491): Fixed: Various issues related to restoring the selection after performing operations on filler character. See the [fixed cases](http://dev.ckeditor.com/ticket/12491#comment:4).
|
||||
* [#12621](http://dev.ckeditor.com/ticket/12621): Fixed: Cannot remove inline styles (bold, italic, etc.) in empty lines.
|
||||
* [#12630](http://dev.ckeditor.com/ticket/12630): [Chrome] Fixed: Selection is placed outside the paragraph when the [New Page](http://ckeditor.com/addon/newpage) button is clicked. This patch significantly simplified the way how the initial selection (a selection after the content of the editable is overwritten) is being fixed. That might have fixed many related scenarios in all browsers.
|
||||
* [#11647](http://dev.ckeditor.com/ticket/11647): Fixed: The [`editor.blur`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-blur) event is not fired on first blur after initializing the inline editor on an already focused element.
|
||||
* [#12601](http://dev.ckeditor.com/ticket/12601): Fixed: [Strikethrough](http://ckeditor.com/addon/basicstyles) button tooltip spelling.
|
||||
* [#12546](http://dev.ckeditor.com/ticket/12546): Fixed: The Preview tab in the [Document Properties](http://ckeditor.com/addon/docprops) dialog window is always disabled.
|
||||
* [#12300](http://dev.ckeditor.com/ticket/12300): Fixed: The [`editor.change`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-change) event fired on first navigation key press after typing.
|
||||
* [#12141](http://dev.ckeditor.com/ticket/12141): Fixed: List items are lost when indenting a list item with content wrapped with a block element.
|
||||
* [#12515](http://dev.ckeditor.com/ticket/12515): Fixed: Cursor is in the wrong position when undoing after adding an image and typing some text.
|
||||
* [#12484](http://dev.ckeditor.com/ticket/12484): [Blink/Webkit] Fixed: DOM is changed outside the editor area in a certain case.
|
||||
* [#12688](http://dev.ckeditor.com/ticket/12688): Improved the tests of the [styles system](http://docs.ckeditor.com/#!/api/CKEDITOR.style) and fixed two minor issues.
|
||||
* [#12403](http://dev.ckeditor.com/ticket/12403): Fixed: Changing the [font](http://ckeditor.com/addon/font) style should not lead to nesting it in the previous style element.
|
||||
* [#12609](http://dev.ckeditor.com/ticket/12609): Fixed: Incorrect `config.magicline_putEverywhere` name used for a [Magic Line](http://ckeditor.com/addon/magicline) all-encompassing [`config.magicline_everywhere`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-magicline_everywhere) configuration option.
|
||||
|
||||
|
||||
## CKEditor 4.4.5
|
||||
|
||||
New Features:
|
||||
|
||||
* [#12279](http://dev.ckeditor.com/ticket/12279): Added a possibility to pass a custom evaluator to [`node.getAscendant()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.node-method-getAscendant).
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* [#12423](http://dev.ckeditor.com/ticket/12423): [Safari7.1+] Fixed: *Enter* key moved cursor to a strange position.
|
||||
* [#12381](http://dev.ckeditor.com/ticket/12381): [iOS] Fixed: Selection issue. Thanks to [Remiremi](https://github.com/Remiremi)!
|
||||
* [#10804](http://dev.ckeditor.com/ticket/10804): Fixed: `CKEDITOR_GETURL` is not used with some plugins where it should be used. Thanks to [Thomas Andraschko](https://github.com/tandraschko)!
|
||||
* [#9137](http://dev.ckeditor.com/ticket/9137): Fixed: The `<base>` tag is not created when `<head>` has an attribute. Thanks to [naoki.fujikawa](https://github.com/naoki-fujikawa)!
|
||||
* [#12377](http://dev.ckeditor.com/ticket/12377): Fixed: Errors thrown in the [Image](http://ckeditor.com/addon/image) plugin when removing preview from the dialog window definition. Thanks to [Axinet](https://github.com/Axinet)!
|
||||
* [#12162](http://dev.ckeditor.com/ticket/12162): Fixed: Auto paragraphing and *Enter* key in nested editables.
|
||||
* [#12315](http://dev.ckeditor.com/ticket/12315): Fixed: Marked [`config.autoParagraph`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-autoParagraph) as deprecated.
|
||||
* [#12113](http://dev.ckeditor.com/ticket/12113): Fixed: A [code snippet](http://ckeditor.com/addon/codesnippet) should be presented in the [elements path](http://ckeditor.com/addon/elementspath) as "code snippet" (translatable).
|
||||
* [#12311](http://dev.ckeditor.com/ticket/12311): Fixed: [Remove Format](http://ckeditor.com/addon/removeformat) should also remove `<cite>` elements.
|
||||
* [#12261](http://dev.ckeditor.com/ticket/12261): Fixed: Filter has to be destroyed and removed from [`CKEDITOR.filter.instances`](http://docs.ckeditor.com/#!/api/CKEDITOR.filter-static-property-instances) on editor destroy.
|
||||
* [#12398](http://dev.ckeditor.com/ticket/12398): Fixed: [Maximize](http://ckeditor.com/addon/maximize) does not work on an instance without a [title](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-title).
|
||||
* [#12097](http://dev.ckeditor.com/ticket/12097): Fixed: JAWS not reading the number of options correctly in the [Text Color and Background Color](http://ckeditor.com/addon/colorbutton) button menu.
|
||||
* [#12411](http://dev.ckeditor.com/ticket/12411): Fixed: [Page Break](http://ckeditor.com/addon/pagebreak) used directly in the editable breaks the editor.
|
||||
* [#12354](http://dev.ckeditor.com/ticket/12354): Fixed: Various issues in undo manager when holding keys.
|
||||
* [#12324](http://dev.ckeditor.com/ticket/12324): [IE8] Fixed: Undo steps are not recorded when changing the caret position by clicking below the body.
|
||||
* [#12332](http://dev.ckeditor.com/ticket/12332): Fixed: Lowered DOM events listeners' priorities in undo manager in order to avoid ambiguity.
|
||||
* [#12402](http://dev.ckeditor.com/ticket/12402): [Blink] Fixed: Workaround for Blink bug with `document.title` which breaks updating title in the full HTML mode.
|
||||
* [#12338](http://dev.ckeditor.com/ticket/12338): Fixed: The CKEditor package contains unoptimized images.
|
||||
|
||||
|
||||
## CKEditor 4.4.4
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* [#12268](http://dev.ckeditor.com/ticket/12268): Cleanup of [UI Color](http://ckeditor.com/addon/uicolor) YUI styles. Thanks to [CasherWest](https://github.com/CasherWest)!
|
||||
* [#12263](http://dev.ckeditor.com/ticket/12263): Fixed: [Paste from Word](http://ckeditor.com/addon/pastefromword) filter does not properly normalize semicolons style text. Thanks to [Alin Purcaru](https://github.com/mesmerizero)!
|
||||
* [#12243](http://dev.ckeditor.com/ticket/12243): Fixed: Text formatting lost when pasting from Word. Thanks to [Alin Purcaru](https://github.com/mesmerizero)!
|
||||
* [#111739](http://dev.ckeditor.com/ticket/11739): Fixed: `keypress` listeners should not be used in the undo manager. A complete rewrite of keyboard handling in the undo manager was made. Numerous smaller issues were fixed, among others:
|
||||
* [#10926](http://dev.ckeditor.com/ticket/10926): [Chrome@Android] Fixed: Typing does not record snapshots and does not fire the [`editor.change`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-change) event.
|
||||
* [#11611](http://dev.ckeditor.com/ticket/11611): [Firefox] Fixed: The [`editor.change`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-change) event is fired when pressing Arrow keys.
|
||||
* [#12219](http://dev.ckeditor.com/ticket/12219): [Safari] Fixed: Some modifications of the [`UndoManager.locked`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.undo.UndoManager-property-locked) property violate strict mode in the [Undo](http://ckeditor.com/addon/undo) plugin.
|
||||
* [#10916](http://dev.ckeditor.com/ticket/10916): Fixed: [Magic Line](http://ckeditor.com/addon/magicline) icon in Right-To-Left environments.
|
||||
* [#11970](http://dev.ckeditor.com/ticket/11970): [IE] Fixed: CKEditor `paste` event is not fired when pasting with *Shift+Ins*.
|
||||
* [#12111](http://dev.ckeditor.com/ticket/12111): Fixed: Linked image attributes are not read when opening the image dialog window by doubleclicking.
|
||||
* [#10030](http://dev.ckeditor.com/ticket/10030): [IE] Fixed: Prevented "Unspecified Error" thrown in various cases when IE8-9 does not allow access to `document.activeElement`.
|
||||
* [#12273](http://dev.ckeditor.com/ticket/12273): Fixed: Applying block style in a description list breaks it.
|
||||
* [#12218](http://dev.ckeditor.com/ticket/12218): Fixed: Minor syntax issue in CSS files.
|
||||
* [#12178](http://dev.ckeditor.com/ticket/12178): [Blink/WebKit] Fixed: Iterator does not return the block if the selection is located at the end of it.
|
||||
* [#12185](http://dev.ckeditor.com/ticket/12185): [IE9QM] Fixed: Error thrown when moving the mouse over focused editor's scrollbar.
|
||||
* [#12215](http://dev.ckeditor.com/ticket/12215): Fixed: Basepath resolution does not recognize semicolon as a query separator.
|
||||
* [#12135](http://dev.ckeditor.com/ticket/12135): Fixed: [Remove Format](http://ckeditor.com/addon/removeformat) does not work on widgets.
|
||||
* [#12298](http://dev.ckeditor.com/ticket/12298): [IE11] Fixed: Clicking below `<body>` in Compatibility Mode will no longer reset selection to the first line.
|
||||
* [#12204](http://dev.ckeditor.com/ticket/12204): Fixed: Editor's voice label is not affected by [`config.title`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-title).
|
||||
* [#11915](http://dev.ckeditor.com/ticket/11915): Fixed: With [SCAYT](http://ckeditor.com/addon/scayt) enabled, cursor moves to the beginning of the first highlighted, misspelled word after typing or pasting into the editor.
|
||||
* [SCAYT](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/69): Fixed: Error thrown in the console after enabling [SCAYT](http://ckeditor.com/addon/scayt) and trying to add a new image.
|
||||
|
||||
|
||||
Other Changes:
|
||||
|
||||
* [#12296](http://dev.ckeditor.com/ticket/12296): Merged `benderjs-ckeditor` into the main CKEditor repository.
|
||||
|
||||
## CKEditor 4.4.3
|
||||
|
||||
**Security Updates:**
|
||||
|
||||
* Fixed XSS vulnerability in the Preview plugin reported by Mario Heiderich of [Cure53](https://cure53.de/).
|
||||
|
||||
**An upgrade is highly recommended!**
|
||||
|
||||
New Features:
|
||||
|
||||
* [#12164](http://dev.ckeditor.com/ticket/12164): Added the "Justify" option to the "Horizontal Alignment" drop-down in the Table Cell Properties dialog window.
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* [#12110](http://dev.ckeditor.com/ticket/12110): Fixed: Editor crash after deleting a table. Thanks to [Alin Purcaru](https://github.com/mesmerizero)!
|
||||
* [#11897](http://dev.ckeditor.com/ticket/11897): Fixed: *Enter* key used in an empty list item creates a new line instead of breaking the list. Thanks to [noam-si](https://github.com/noam-si)!
|
||||
* [#12140](http://dev.ckeditor.com/ticket/12140): Fixed: Double-clicking linked widgets opens two dialog windows.
|
||||
* [#12132](http://dev.ckeditor.com/ticket/12132): Fixed: Image is inserted with `width` and `height` styles even when they are not allowed.
|
||||
* [#9317](http://dev.ckeditor.com/ticket/9317): [IE] Fixed: [`config.disableObjectResizing`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-disableObjectResizing) does not work on IE. **Note**: We were not able to fix this issue on IE11+ because necessary events stopped working. See a [last resort workaround](http://dev.ckeditor.com/ticket/9317#comment:16) and make sure to [support our complaint to Microsoft](https://connect.microsoft.com/IE/feedback/details/742593/please-respect-execcommand-enableobjectresizing-in-contenteditable-elements).
|
||||
* [#9638](http://dev.ckeditor.com/ticket/9638): Fixed: There should be no information about accessibility help available under the *Alt+0* keyboard shortcut if the [Accessibility Help](http://ckeditor.com/addon/a11yhelp) plugin is not available.
|
||||
* [#8117](http://dev.ckeditor.com/ticket/8117) and [#9186](http://dev.ckeditor.com/ticket/9186): Fixed: In HTML5 `<meta>` tags should be allowed everywhere, including inside the `<body>` element.
|
||||
* [#10422](http://dev.ckeditor.com/ticket/10422): Fixed: [`config.fillEmptyBlocks`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-fillEmptyBlocks) not working properly if a function is specified.
|
||||
|
||||
## CKEditor 4.4.2
|
||||
|
||||
Important Notes:
|
||||
|
||||
* The CKEditor testing environment is now publicly available. Read more about how to set up the environment and execute tests in the [CKEditor Testing Environment](http://docs.ckeditor.com/#!/guide/dev_tests) guide.
|
||||
Please note that the [`tests/`](https://github.com/ckeditor/ckeditor-dev/tree/master/tests) directory which contains editor tests is not available in release packages. It can only be found in the development version of CKEditor on [GitHub](https://github.com/ckeditor/ckeditor-dev/).
|
||||
|
||||
New Features:
|
||||
|
||||
* [#11909](http://dev.ckeditor.com/ticket/11909): Introduced a parameter to prevent the [`editor.setData()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setData) method from recording undo snapshots.
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* [#11757](http://dev.ckeditor.com/ticket/11757): Fixed: Imperfections in the [Moono](http://ckeditor.com/addon/moono) skin. Thanks to [danyaPostfactum](https://github.com/danyaPostfactum)!
|
||||
* [#10091](http://dev.ckeditor.com/ticket/10091): Blockquote should be treated like an object by the styles system. Thanks to [dan-james-deeson](https://github.com/dan-james-deeson)!
|
||||
* [#11478](http://dev.ckeditor.com/ticket/11478): Fixed: Issue with passing jQuery objects to [adapter](http://docs.ckeditor.com/#!/guide/dev_jquery) configuration.
|
||||
* [#10867](http://dev.ckeditor.com/ticket/10867): Fixed: Issue with setting encoded URI as image link.
|
||||
* [#11983](http://dev.ckeditor.com/ticket/11983): Fixed: Clicking a nested widget does not focus it. Additionally, performance of the [`widget.repository.getByElement()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-method-getByElement) method was improved.
|
||||
* [#12000](http://dev.ckeditor.com/ticket/12000): Fixed: Nested widgets should be initialized on [`editor.setData()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setData) and [`nestedEditable.setData()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.nestedEditable-method-setData).
|
||||
* [#12022](http://dev.ckeditor.com/ticket/12022): Fixed: Outer widget's drag handler is not created at all if it has any nested widgets inside.
|
||||
* [#11960](http://dev.ckeditor.com/ticket/11960): [Blink/WebKit] Fixed: The caret should be scrolled into view on *Backspace* and *Delete* (covers only the merging blocks case).
|
||||
* [#11306](http://dev.ckeditor.com/ticket/11306): [OSX][Blink/WebKit] Fixed: No widget entries in the context menu on widget right-click.
|
||||
* [#11957](http://dev.ckeditor.com/ticket/11957): Fixed: Alignment labels in the [Enhanced Image](http://ckeditor.com/addon/image2) dialog window are not translated.
|
||||
* [#11980](http://dev.ckeditor.com/ticket/11980): [Blink/WebKit] Fixed: `<span>` elements created when joining adjacent elements (non-collapsed selection).
|
||||
* [#12009](http://dev.ckeditor.com/ticket/12009): [Nested widgets] Integration with the [Magic Line](http://ckeditor.com/addon/magicline) plugin.
|
||||
* [#11387](http://dev.ckeditor.com/ticket/11387): Fixed: `role="radiogroup"` should be applied only to radio inputs' container.
|
||||
* [#7975](http://dev.ckeditor.com/ticket/7975): [IE8] Fixed: Errors when trying to select an empty table cell.
|
||||
* [#11947](http://dev.ckeditor.com/ticket/11947): [Firefox+IE11] Fixed: *Shift+Enter* in lists produces two line breaks.
|
||||
* [#11972](http://dev.ckeditor.com/ticket/11972): Fixed: Feature detection in the [`element.setText()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-setText) method should not trigger the layout engine.
|
||||
* [#7634](http://dev.ckeditor.com/ticket/7634): Fixed: The [Flash Dialog](http://ckeditor.com/addon/flash) plugin omits the `allowFullScreen` parameter in the editor data if set to `true`.
|
||||
* [#11910](http://dev.ckeditor.com/ticket/11910): Fixed: [Enhanced Image](http://ckeditor.com/addon/image2) does not take [`config.baseHref`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-baseHref) into account when updating image dimensions.
|
||||
* [#11753](http://dev.ckeditor.com/ticket/11753): Fixed: Wrong [`checkDirty()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-checkDirty) method value after focusing or blurring a widget.
|
||||
* [#11830](http://dev.ckeditor.com/ticket/11830): Fixed: Impossible to pass some arguments to [CKBuilder](https://github.com/ckeditor/ckbuilder) when using the `/dev/builder/build.sh` script.
|
||||
* [#11945](http://dev.ckeditor.com/ticket/11945): Fixed: [Form Elements](http://ckeditor.com/addon/forms) plugin should not change a core method.
|
||||
* [#11384](http://dev.ckeditor.com/ticket/11384): [IE9+] Fixed: `IndexSizeError` thrown when pasting into a non-empty selection anchored in one text node.
|
||||
|
||||
## CKEditor 4.4.1
|
||||
|
||||
New Features:
|
||||
|
||||
* [#9661](http://dev.ckeditor.com/ticket/9661): Added the option to [configure](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-linkJavaScriptLinksAllowed) anchor tags with JavaScript code in the `href` attribute.
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* [#11861](http://dev.ckeditor.com/ticket/11861): [Webkit/Blink] Fixed: Span elements created while joining adjacent elements. **Note:** This patch only covers cases when *Backspace* or *Delete* is pressed on a collapsed (empty) selection. The remaining case, with a non-empty selection, will be fixed in the next release.
|
||||
* [#10714](http://dev.ckeditor.com/ticket/10714): [iOS] Fixed: Selection and drop-downs are broken if a touch event listener is used due to a [Webkit bug](https://bugs.webkit.org/show_bug.cgi?id=128924). Thanks to [Arty Gus](https://github.com/artygus)!
|
||||
* [#11911](http://dev.ckeditor.com/ticket/11911): Fixed setting the `dir` attribute for a preloaded language in [CKEDITOR.lang](http://docs.ckeditor.com/#!/api/CKEDITOR.lang). Thanks to [Akash Mohapatra](https://github.com/akashmohapatra)!
|
||||
* [#11926](http://dev.ckeditor.com/ticket/11926): Fixed: [Code Snippet](http://ckeditor.com/addon/codesnippet) does not decode HTML entities when loading code from the `<code>` element.
|
||||
* [#11223](http://dev.ckeditor.com/ticket/11223): Fixed: Issue when [Protected Source](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-protectedSource) was not working in the `<title>` element.
|
||||
* [#11859](http://dev.ckeditor.com/ticket/11859): Fixed: Removed the [Source Dialog](http://ckeditor.com/addon/sourcedialog) plugin dependency from the [Code Snippet](http://ckeditor.com/addon/codesnippet) sample.
|
||||
* [#11754](http://dev.ckeditor.com/ticket/11754): [Chrome] Fixed: Infinite loop when content includes not closed attributes.
|
||||
* [#11848](http://dev.ckeditor.com/ticket/11848): [IE] Fixed: [`editor.insertElement()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertElement) throwing an exception when there was no selection in the editor.
|
||||
* [#11801](http://dev.ckeditor.com/ticket/11801): Fixed: Editor anchors unavailable when linking the [Enhanced Image](http://ckeditor.com/addon/image2) widget.
|
||||
* [#11626](http://dev.ckeditor.com/ticket/11626): Fixed: [Table Resize](http://ckeditor.com/addon/tableresize) sets invalid column width.
|
||||
* [#11872](http://dev.ckeditor.com/ticket/11872): Made [`element.addClass()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-addClass) chainable symmetrically to [`element.removeClass()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-removeClass).
|
||||
* [#11813](http://dev.ckeditor.com/ticket/11813): Fixed: Link lost while pasting a captioned image and restoring an undo snapshot ([Enhanced Image](http://ckeditor.com/addon/image2)).
|
||||
* [#11814](http://dev.ckeditor.com/ticket/11814): Fixed: _Link_ and _Unlink_ entries persistently displayed in the [Enhanced Image](http://ckeditor.com/addon/image2) context menu.
|
||||
* [#11839](http://dev.ckeditor.com/ticket/11839): [IE9] Fixed: The caret jumps out of the editable area when resizing the editor in the source mode.
|
||||
* [#11822](http://dev.ckeditor.com/ticket/11822): [Webkit] Fixed: Editing anchors by double-click is broken in some cases.
|
||||
* [#11823](http://dev.ckeditor.com/ticket/11823): [IE8] Fixed: [Table Resize](http://ckeditor.com/addon/tableresize) throws an error over scrollbar.
|
||||
* [#11788](http://dev.ckeditor.com/ticket/11788): Fixed: It is not possible to change the language back to _Not set_ in the [Code Snippet](http://ckeditor.com/addon/codesnippet) dialog window.
|
||||
* [#11788](http://dev.ckeditor.com/ticket/11788): Fixed: [Filter](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.filter) rules are not applied inside elements with the `contenteditable` attribute set to `true`.
|
||||
* [#11798](http://dev.ckeditor.com/ticket/11798): Fixed: Inserting a non-editable element inside a table cell breaks the table.
|
||||
* [#11793](http://dev.ckeditor.com/ticket/11793): Fixed: Drop-down is not "on" when clicking it while the editor is blurred.
|
||||
* [#11850](http://dev.ckeditor.com/ticket/11850): Fixed: Fake objects with the `contenteditable` attribute set to `false` are not downcasted properly.
|
||||
* [#11811](http://dev.ckeditor.com/ticket/11811): Fixed: Widget's data is not encoded correctly when passed to an attribute.
|
||||
* [#11777](http://dev.ckeditor.com/ticket/11777): Fixed encoding ampersand in the [Mathematical Formulas](http://ckeditor.com/addon/mathjax) plugin.
|
||||
* [#11880](http://dev.ckeditor.com/ticket/11880): [IE8-9] Fixed: Linked image has a default thick border.
|
||||
|
||||
Other Changes:
|
||||
|
||||
* [#11807](http://dev.ckeditor.com/ticket/11807): Updated jQuery version used in the sample to 1.11.0 and tested CKEditor jQuery Adapter with version 1.11.0 and 2.1.0.
|
||||
* [#9504](http://dev.ckeditor.com/ticket/9504): Stopped using deprecated `attribute.specified` in all browsers except Internet Explorer.
|
||||
* [#11809](http://dev.ckeditor.com/ticket/11809): Changed tab size in `<pre>` to 4 spaces.
|
||||
|
||||
## CKEditor 4.4
|
||||
|
||||
**Important Notes:**
|
||||
|
||||
* Marked the [`editor.beforePaste`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-beforePaste) event as deprecated.
|
||||
* The default class of captioned images has changed to `image` (was: `caption`). Please note that once edited in CKEditor 4.4+, all existing images of the `caption` class (`<figure class="caption">`) will be [filtered out](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter) unless the [`config.image2_captionedClass`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-image2_captionedClass) option is set to `caption`. For backward compatibility (i.e. when upgrading), it is highly recommended to use this setting, which also helps prevent CSS conflicts, etc. This does not apply to new CKEditor integrations.
|
||||
* Widgets without defined buttons are no longer registered automatically to the [Advanced Content Filter](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter). Before CKEditor 4.4 widgets were registered to the ACF which was an incorrect behavior ([#11567](http://dev.ckeditor.com/ticket/11567)). This change should not have any impact on standard scenarios, but if your button does not execute the widget command, you need to set [`allowedContent`](http://docs.ckeditor.com/#!/api/CKEDITOR.feature-property-allowedContent) and [`requiredContent`](http://docs.ckeditor.com/#!/api/CKEDITOR.feature-property-requiredContent) properties for it manually, because the editor will not be able to find them.
|
||||
* The [Show Borders](http://ckeditor.com/addon/showborders) plugin was added to the Standard installation package in order to ensure that unstyled tables are still visible for the user ([#11665](http://dev.ckeditor.com/ticket/11665)).
|
||||
* Since CKEditor 4.4 the editor instance should be passed to [`CKEDITOR.style`](http://docs.ckeditor.com/#!/api/CKEDITOR.style) methods to ensure full compatibility with other features (e.g. applying styles to widgets requires that). We ensured backward compatibility though, so the [`CKEDITOR.style`](http://docs.ckeditor.com/#!/api/CKEDITOR.style) will work even when the editor instance is not provided.
|
||||
|
||||
New Features:
|
||||
|
||||
* [#11297](http://dev.ckeditor.com/ticket/11297): Styles can now be applied to widgets. The definition of a style which can be applied to a specific widget must contain two additional properties — `type` and `widget`. Read more in the [Widget Styles](http://docs.ckeditor.com/#!/guide/dev_styles-section-widget-styles) section of the "Syles Drop-down" guide. Note that by default, widgets support only classes and no other attributes or styles. Related changes and features:
|
||||
* Introduced the [`CKEDITOR.style.addCustomHandler()`](http://docs.ckeditor.com/#!/api/CKEDITOR.style-static-method-addCustomHandler) method for registering custom style handlers.
|
||||
* The [`CKEDITOR.style.apply()`](http://docs.ckeditor.com/#!/api/CKEDITOR.style-method-apply) and [`CKEDITOR.style.remove()`](http://docs.ckeditor.com/#!/api/CKEDITOR.style-method-remove) methods are now called with an editor instance instead of the document so they can be reused by the [`CKEDITOR.editor.applyStyle()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-applyStyle) and [`CKEDITOR.editor.removeStyle()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-removeStyle) methods. Backward compatibility was preserved, but from CKEditor 4.4 it is highly recommended to pass an editor instead of a document to these methods.
|
||||
* Many new methods and properties were introduced in the [Widget API](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget) to make the handling of styles by widgets fully customizable. See: [`widget.definition.styleableElements`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.definition-property-styleableElements), [`widget.definition.styleToAllowedContentRule`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.definition-property-styleToAllowedContentRules), [`widget.addClass()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-addClass), [`widget.removeClass()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-removeClass), [`widget.getClasses()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-getClasses), [`widget.hasClass()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-hasClass), [`widget.applyStyle()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-applyStyle), [`widget.removeStyle()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-removeStyle), [`widget.checkStyleActive()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-checkStyleActive).
|
||||
* Integration with the [Allowed Content Filter](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter) required an introduction of the [`CKEDITOR.style.toAllowedContent()`](http://docs.ckeditor.com/#!/api/CKEDITOR.style-method-toAllowedContentRules) method which can be implemented by the custom style handler and if exists, it is used by the [`CKEDITOR.filter`](http://docs.ckeditor.com/#!/api/CKEDITOR.filter) to translate a style to [allowed content rules](http://docs.ckeditor.com/#!/api/CKEDITOR.filter.allowedContentRules).
|
||||
* [#11300](http://dev.ckeditor.com/ticket/11300): Various changes in the [Enhanced Image](http://ckeditor.com/addon/image2) plugin:
|
||||
* Introduced the [`config.image2_captionedClass`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-image2_captionedClass) option to configure the class of captioned images.
|
||||
* Introduced the [`config.image2_alignClasses`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-image2_alignClasses) option to configure the way images are aligned with CSS classes.
|
||||
If this setting is defined, the editor produces classes instead of inline styles for aligned images.
|
||||
* Default image caption can be translated (customized) with the `editor.lang.image2.captionPlaceholder` string.
|
||||
* [#11341](http://dev.ckeditor.com/ticket/11341): [Enhanced Image](http://ckeditor.com/addon/image2) plugin: It is now possible to add a link to any image type.
|
||||
* [#10202](http://dev.ckeditor.com/ticket/10202): Introduced wildcard support in the [Allowed Content Rules](http://docs.ckeditor.com/#!/guide/dev_allowed_content_rules) format.
|
||||
* [#10276](http://dev.ckeditor.com/ticket/10276): Introduced blacklisting in the [Allowed Content Filter](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter).
|
||||
* [#10480](http://dev.ckeditor.com/ticket/10480): Introduced code snippets with code highlighting. There are two versions available so far — the default [Code Snippet](http://ckeditor.com/addon/codesnippet) which uses the [highlight.js](http://highlightjs.org) library and the [Code Snippet GeSHi](http://ckeditor.com/addon/codesnippetgeshi) which uses the [GeSHi](http://qbnz.com/highlighter/) library.
|
||||
* [#11737](http://dev.ckeditor.com/ticket/11737): Introduced an option to prevent [filtering](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter) of an element that matches custom criteria (see [`filter.addElementCallback()`](http://docs.ckeditor.com/#!/api/CKEDITOR.filter-method-addElementCallback)).
|
||||
* [#11532](http://dev.ckeditor.com/ticket/11532): Introduced the [`editor.addContentsCss()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-addContentsCss) method that can be used for [adding custom CSS files](http://docs.ckeditor.com/#!/guide/plugin_sdk_styles).
|
||||
* [#11536](http://dev.ckeditor.com/ticket/11536): Added the [`CKEDITOR.tools.htmlDecode()`](http://docs.ckeditor.com/#!/api/CKEDITOR.tools-method-htmlDecode) method for decoding HTML entities.
|
||||
* [#11225](http://dev.ckeditor.com/ticket/11225): Introduced the [`CKEDITOR.tools.transparentImageData`](http://docs.ckeditor.com/#!/api/CKEDITOR.tools-property-transparentImageData) property which contains transparent image data to be used in CSS or as image source.
|
||||
|
||||
Other Changes:
|
||||
|
||||
* [#11377](http://dev.ckeditor.com/ticket/11377): Unified internal representation of empty anchors using the [fake objects](http://ckeditor.com/addon/fakeobjects).
|
||||
* [#11422](http://dev.ckeditor.com/ticket/11422): Removed Firefox 3.x, Internet Explorer 6 and Opera 12.x leftovers in code.
|
||||
* [#5217](http://dev.ckeditor.com/ticket/5217): Setting data (including switching between modes) creates a new undo snapshot. Besides that:
|
||||
* Introduced the [`editable.status`](http://docs.ckeditor.com/#!/api/CKEDITOR.editable-property-status) property.
|
||||
* Introduced a new `forceUpdate` option for the [`editor.lockSnapshot`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-lockSnapshot) event.
|
||||
* Fixed: Selection not being unlocked in inline editor after setting data ([#11500](http://dev.ckeditor.com/ticket/11500)).
|
||||
* The [WebSpellChecker](http://ckeditor.com/addon/wsc) plugin was updated to the latest version.
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* [#10190](http://dev.ckeditor.com/ticket/10190): Fixed: Removing block style with [`editor.removeStyle()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-removeStyle) should result in a paragraph and not a div.
|
||||
* [#11727](http://dev.ckeditor.com/ticket/11727): Fixed: The editor tries to select a non-editable image which was clicked.
|
||||
|
||||
## CKEditor 4.3.5
|
||||
|
||||
New Features:
|
||||
|
||||
* Added new translation: Tatar.
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* [#11677](http://dev.ckeditor.com/ticket/11677): Fixed: Undo/Redo keystrokes are blocked in the source mode.
|
||||
* [#11717](http://dev.ckeditor.com/ticket/11717): [Document Properties](http://ckeditor.com/addon/docprops) plugin requires the [Color Dialog](http://ckeditor.com/addon/colordialog) plugin to work.
|
||||
|
||||
## CKEditor 4.3.4
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* [#11597](http://dev.ckeditor.com/ticket/11597): [IE11] Fixed: Error thrown when trying to open the [preview](http://ckeditor.com/addon/preview) using the keyboard.
|
||||
* [#11544](http://dev.ckeditor.com/ticket/11544): [Placeholders](http://ckeditor.com/addon/placeholder) will no longer be upcasted in parents not accepting `<span>` elements.
|
||||
* [#8663](http://dev.ckeditor.com/ticket/8663): Fixed [`element.renameNode()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-renameNode) not clearing the [`element.getName()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-getName) cache.
|
||||
* [#11574](http://dev.ckeditor.com/ticket/11574): Fixed: *Backspace* destroying the DOM structure if an inline editable is placed in a list item.
|
||||
* [#11603](http://dev.ckeditor.com/ticket/11603): Fixed: [Table Resize](http://ckeditor.com/addon/tableresize) attaches to tables outside the editable.
|
||||
* [#9205](http://dev.ckeditor.com/ticket/9205), [#7805](http://dev.ckeditor.com/ticket/7805), [#8216](http://dev.ckeditor.com/ticket/8216): Fixed: `{cke_protected_1}` appearing in data in various cases where HTML comments are placed next to `"` or `'`.
|
||||
* [#11635](http://dev.ckeditor.com/ticket/11635): Fixed: Some attributes are not protected before the content is passed through the fix bin.
|
||||
* [#11660](http://dev.ckeditor.com/ticket/11660): [IE] Fixed: Table content is lost when some extra markup is inside the table.
|
||||
* [#11641](http://dev.ckeditor.com/ticket/11641): Fixed: Switching between modes in the classic editor removes content styles for the inline editor.
|
||||
* [#11568](http://dev.ckeditor.com/ticket/11568): Fixed: [Styles](http://ckeditor.com/addon/stylescombo) drop-down list is not enabled on selection change.
|
||||
|
||||
## CKEditor 4.3.3
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* [#11500](http://dev.ckeditor.com/ticket/11500): [Webkit/Blink] Fixed: Selection lost when setting data in another inline editor. Additionally, [`selection.removeAllRanges()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.selection-method-removeAllRanges) is now scoped to selection's [root](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.selection-property-root).
|
||||
* [#11104](http://dev.ckeditor.com/ticket/11104): [IE] Fixed: Various issues with scrolling and selection when focusing widgets.
|
||||
* [#11487](http://dev.ckeditor.com/ticket/11487): Moving mouse over the [Enhanced Image](http://ckeditor.com/addon/image2) widget will no longer change the value returned by the [`editor.checkDirty()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-checkDirty) method.
|
||||
* [#8673](http://dev.ckeditor.com/ticket/8673): [WebKit] Fixed: Cannot select and remove the [Page Break](http://ckeditor.com/addon/pagebreak).
|
||||
* [#11413](http://dev.ckeditor.com/ticket/11413): Fixed: Incorrect [`editor.execCommand()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-execCommand) behavior.
|
||||
* [#11438](http://dev.ckeditor.com/ticket/11438): Splitting table cells vertically is no longer changing table structure.
|
||||
* [#8899](http://dev.ckeditor.com/ticket/8899): Fixed: Links in the [About CKEditor](http://ckeditor.com/addon/about) dialog window now open in a new browser window or tab.
|
||||
* [#11490](http://dev.ckeditor.com/ticket/11490): Fixed: [Menu button](http://ckeditor.com/addon/menubutton) panel not showing in the source mode.
|
||||
* [#11417](http://dev.ckeditor.com/ticket/11417): The [`widget.doubleclick`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-event-doubleclick) event is not canceled anymore after editing was triggered.
|
||||
* [#11253](http://dev.ckeditor.com/ticket/11253): [IE] Fixed: Clipped upload button in the [Enhanced Image](http://ckeditor.com/addon/image2) dialog window.
|
||||
* [#11359](http://dev.ckeditor.com/ticket/11359): Standardized the way anchors are discovered by the [Link](http://ckeditor.com/addon/link) plugin.
|
||||
* [#11058](http://dev.ckeditor.com/ticket/11058): [IE8] Fixed: Error when deleting a table row.
|
||||
* [#11508](http://dev.ckeditor.com/ticket/11508): Fixed: [`htmlDataProcessor`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlDataProcessor) discovering protected attributes within other attributes' values.
|
||||
* [#11533](http://dev.ckeditor.com/ticket/11533): Widgets: Avoid recurring upcasts if the DOM structure was modified during an upcast.
|
||||
* [#11400](http://dev.ckeditor.com/ticket/11400): Fixed: The [`domObject.removeAllListeners()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.domObject-method-removeAllListeners) method does not remove custom listeners completely.
|
||||
* [#11493](http://dev.ckeditor.com/ticket/11493): Fixed: The [`selection.getRanges()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.selection-method-getRanges) method does not override cached ranges when used with the `onlyEditables` argument.
|
||||
* [#11390](http://dev.ckeditor.com/ticket/11390): [IE] All [XML](http://ckeditor.com/addon/xml) plugin [methods](http://docs.ckeditor.com/#!/api/CKEDITOR.xml) now work in IE10+.
|
||||
* [#11542](http://dev.ckeditor.com/ticket/11542): [IE11] Fixed: Blurry toolbar icons when Right-to-Left UI language is set.
|
||||
* [#11504](http://dev.ckeditor.com/ticket/11504): Fixed: When [`config.fullPage`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-fullPage) is set to `true`, entities are not encoded in editor output.
|
||||
* [#11004](http://dev.ckeditor.com/ticket/11004): Integrated [Enhanced Image](http://ckeditor.com/addon/image2) dialog window with [Advanced Content Filter](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter).
|
||||
* [#11439](http://dev.ckeditor.com/ticket/11439): Fixed: Properties get cloned in the Cell Properties dialog window if multiple cells are selected.
|
||||
|
||||
## CKEditor 4.3.2
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* [#11331](http://dev.ckeditor.com/ticket/11331): A menu button will have a changed label when selected instead of using the `aria-pressed` attribute.
|
||||
* [#11177](http://dev.ckeditor.com/ticket/11177): Widget drag handler improvements:
|
||||
* [#11176](http://dev.ckeditor.com/ticket/11176): Fixed: Initial position is not updated when the widget data object is empty.
|
||||
* [#11001](http://dev.ckeditor.com/ticket/11001): Fixed: Multiple synchronous layout recalculations are caused by initial drag handler positioning causing performance issues.
|
||||
* [#11161](http://dev.ckeditor.com/ticket/11161): Fixed: Drag handler is not repositioned in various situations.
|
||||
* [#11281](http://dev.ckeditor.com/ticket/11281): Fixed: Drag handler and mask are duplicated after widget reinitialization.
|
||||
* [#11207](http://dev.ckeditor.com/ticket/11207): [Firefox] Fixed: Misplaced [Enhanced Image](http://ckeditor.com/addon/image2) resizer in the inline editor.
|
||||
* [#11102](http://dev.ckeditor.com/ticket/11102): `CKEDITOR.template` improvements:
|
||||
* [#11102](http://dev.ckeditor.com/ticket/11102): Added newline character support.
|
||||
* [#11216](http://dev.ckeditor.com/ticket/11216): Added "\\'" substring support.
|
||||
* [#11121](http://dev.ckeditor.com/ticket/11121): [Firefox] Fixed: High Contrast mode is enabled when the editor is loaded in a hidden iframe.
|
||||
* [#11350](http://dev.ckeditor.com/ticket/11350): The default value of [`config.contentsCss`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-contentsCss) is affected by [`CKEDITOR.getUrl()`](http://docs.ckeditor.com/#!/api/CKEDITOR-method-getUrl).
|
||||
* [#11097](http://dev.ckeditor.com/ticket/11097): Improved the [Autogrow](http://ckeditor.com/addon/autogrow) plugin performance when dealing with very big tables.
|
||||
* [#11290](http://dev.ckeditor.com/ticket/11290): Removed redundant code in the [Source Dialog](http://ckeditor.com/addon/sourcedialog) plugin.
|
||||
* [#11133](http://dev.ckeditor.com/ticket/11133): [Page Break](http://ckeditor.com/addon/pagebreak) becomes editable if pasted.
|
||||
* [#11126](http://dev.ckeditor.com/ticket/11126): Fixed: Native Undo executed once the bottom of the snapshot stack is reached.
|
||||
* [#11131](http://dev.ckeditor.com/ticket/11131): [Div Editing Area](http://ckeditor.com/addon/divarea): Fixed: Error thrown when switching to source mode if the selection was in widget's nested editable.
|
||||
* [#11139](http://dev.ckeditor.com/ticket/11139): [Div Editing Area](http://ckeditor.com/addon/divarea): Fixed: Elements Path is not cleared after switching to source mode.
|
||||
* [#10778](http://dev.ckeditor.com/ticket/10778): Fixed a bug with range enlargement. The range no longer expands to visible whitespace.
|
||||
* [#11146](http://dev.ckeditor.com/ticket/11146): [IE] Fixed: Preview window switches Internet Explorer to Quirks Mode.
|
||||
* [#10762](http://dev.ckeditor.com/ticket/10762): [IE] Fixed: JavaScript code displayed in preview window's URL bar.
|
||||
* [#11186](http://dev.ckeditor.com/ticket/11186): Introduced the [`widgets.repository.addUpcastCallback()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-method-addUpcastCallback) method that allows to block upcasting given element to a widget.
|
||||
* [#11307](http://dev.ckeditor.com/ticket/11307): Fixed: Paste as Plain Text conflict with the [MooTools](http://mootools.net) library.
|
||||
* [#11140](http://dev.ckeditor.com/ticket/11140): [IE11] Fixed: Anchors are not draggable.
|
||||
* [#11379](http://dev.ckeditor.com/ticket/11379): Changed default contents `line-height` to unitless values to avoid huge text overlapping (like in [#9696](http://dev.ckeditor.com/ticket/9696)).
|
||||
* [#10787](http://dev.ckeditor.com/ticket/10787): [Firefox] Fixed: Broken replacement of text while pasting into `div`-based editor.
|
||||
* [#10884](http://dev.ckeditor.com/ticket/10884): Widgets integration with the [Show Blocks](http://ckeditor.com/addon/showblocks) plugin.
|
||||
* [#11021](http://dev.ckeditor.com/ticket/11021): Fixed: An error thrown when selecting entire editable contents while fake selection is on.
|
||||
* [#11086](http://dev.ckeditor.com/ticket/11086): [IE8] Re-enable inline widgets drag&drop in Internet Explorer 8.
|
||||
* [#11372](http://dev.ckeditor.com/ticket/11372): Widgets: Special characters encoded twice in nested editables.
|
||||
* [#10068](http://dev.ckeditor.com/ticket/10068): Fixed: Support for protocol-relative URLs.
|
||||
* [#11283](http://dev.ckeditor.com/ticket/11283): [Enhanced Image](http://ckeditor.com/addon/image2): A `<div>` element with `text-align: center` and an image inside is not recognised correctly.
|
||||
* [#11196](http://dev.ckeditor.com/ticket/11196): [Accessibility Instructions](http://ckeditor.com/addon/a11yhelp): Allowed additional keyboard button labels to be translated in the dialog window.
|
||||
|
||||
## CKEditor 4.3.1
|
||||
|
||||
**Important Notes:**
|
||||
|
||||
* To match the naming convention, the `language` button is now `Language` ([#11201](http://dev.ckeditor.com/ticket/11201)).
|
||||
* [Enhanced Image](http://ckeditor.com/addon/image2) button, context menu, command, and icon names match those of the [Image](http://ckeditor.com/addon/image) plugin ([#11222](http://dev.ckeditor.com/ticket/11222)).
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* [#11244](http://dev.ckeditor.com/ticket/11244): Changed: The [`widget.repository.checkWidgets()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-method-checkWidgets) method now fires the [`widget.repository.checkWidgets`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-event-checkWidgets) event, so from CKEditor 4.3.1 it is preferred to use the method rather than fire the event.
|
||||
* [#11171](http://dev.ckeditor.com/ticket/11171): Fixed: [`editor.insertElement()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertElement) and [`editor.insertText()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertText) methods do not call the [`widget.repository.checkWidgets()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-method-checkWidgets) method.
|
||||
* [#11085](http://dev.ckeditor.com/ticket/11085): [IE8] Replaced preview generated by the [Mathematical Formulas](http://ckeditor.com/addon/mathjax) widget with a placeholder.
|
||||
* [#11044](http://dev.ckeditor.com/ticket/11044): Enhanced WAI-ARIA support for the [Language](http://ckeditor.com/addon/language) plugin drop-down menu.
|
||||
* [#11075](http://dev.ckeditor.com/ticket/11075): With drop-down menu button focused, pressing the *Down Arrow* key will now open the menu and focus its first option.
|
||||
* [#11165](http://dev.ckeditor.com/ticket/11165): Fixed: The [File Browser](http://ckeditor.com/addon/filebrowser) plugin cannot be removed from the editor.
|
||||
* [#11159](http://dev.ckeditor.com/ticket/11159): [IE9-10] [Enhanced Image](http://ckeditor.com/addon/image2): Fixed buggy discovery of image dimensions.
|
||||
* [#11101](http://dev.ckeditor.com/ticket/11101): Drop-down lists no longer break when given double quotes.
|
||||
* [#11077](http://dev.ckeditor.com/ticket/11077): [Enhanced Image](http://ckeditor.com/addon/image2): Empty undo step recorded when resizing the image.
|
||||
* [#10853](http://dev.ckeditor.com/ticket/10853): [Enhanced Image](http://ckeditor.com/addon/image2): Widget has paragraph wrapper when de-captioning unaligned image.
|
||||
* [#11198](http://dev.ckeditor.com/ticket/11198): Widgets: Drag handler is not fully visible when an inline widget is in a heading.
|
||||
* [#11132](http://dev.ckeditor.com/ticket/11132): [Firefox] Fixed: Caret is lost after drag and drop of an inline widget.
|
||||
* [#11182](http://dev.ckeditor.com/ticket/11182): [IE10-11] Fixed: Editor crashes (IE11) or works with minor issues (IE10) if a page is loaded in Quirks Mode. See [`env.quirks`](http://docs.ckeditor.com/#!/api/CKEDITOR.env-property-quirks) for more details.
|
||||
* [#11204](http://dev.ckeditor.com/ticket/11204): Added `figure` and `figcaption` styles to the `contents.css` file so [Enhanced Image](http://ckeditor.com/addon/image2) looks nicer.
|
||||
* [#11202](http://dev.ckeditor.com/ticket/11202): Fixed: No newline in [BBCode](http://ckeditor.com/addon/bbcode) mode.
|
||||
* [#10890](http://dev.ckeditor.com/ticket/10890): Fixed: Error thrown when pressing the *Delete* key in a list item.
|
||||
* [#10055](http://dev.ckeditor.com/ticket/10055): [IE8-10] Fixed: *Delete* pressed on a selected image causes the browser to go back.
|
||||
* [#11183](http://dev.ckeditor.com/ticket/11183): Fixed: Inserting a horizontal rule or a table in multiple row selection causes a browser crash. Additionally, the [`editor.insertElement()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertElement) method does not insert the element into every range of a selection any more.
|
||||
* [#11042](http://dev.ckeditor.com/ticket/11042): Fixed: Selection made on an element containing a non-editable element was not auto faked.
|
||||
* [#11125](http://dev.ckeditor.com/ticket/11125): Fixed: Keyboard navigation through menu and drop-down items will now cycle.
|
||||
* [#11011](http://dev.ckeditor.com/ticket/11011): Fixed: The [`editor.applyStyle()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-applyStyle) method removes attributes from nested elements.
|
||||
* [#11179](http://dev.ckeditor.com/ticket/11179): Fixed: [`editor.destroy()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-destroy) does not cleanup content generated by the [Table Resize](http://ckeditor.com/addon/tableresize) plugin for inline editors.
|
||||
* [#11237](http://dev.ckeditor.com/ticket/11237): Fixed: Table border attribute value is deleted when pasting content from Microsoft Word.
|
||||
* [#11250](http://dev.ckeditor.com/ticket/11250): Fixed: HTML entities inside the `<textarea>` element are not encoded.
|
||||
* [#11260](http://dev.ckeditor.com/ticket/11260): Fixed: Initially disabled buttons are not read by JAWS as disabled.
|
||||
* [#11200](http://dev.ckeditor.com/ticket/11200): Added [Clipboard](http://ckeditor.com/addon/clipboard) plugin as a dependency for [Widget](http://ckeditor.com/addon/widget) to fix drag and drop.
|
||||
|
||||
## CKEditor 4.3
|
||||
|
||||
New Features:
|
||||
|
||||
* [#10612](http://dev.ckeditor.com/ticket/10612): Internet Explorer 11 support.
|
||||
* [#10869](http://dev.ckeditor.com/ticket/10869): Widgets: Added better integration with the [Elements Path](http://ckeditor.com/addon/elementspath) plugin.
|
||||
* [#10886](http://dev.ckeditor.com/ticket/10886): Widgets: Added tooltip to the drag handle.
|
||||
* [#10933](http://dev.ckeditor.com/ticket/10933): Widgets: Introduced drag and drop of block widgets with the [Line Utilities](http://ckeditor.com/addon/lineutils) plugin.
|
||||
* [#10936](http://dev.ckeditor.com/ticket/10936): Widget System changes for easier integration with other dialog systems.
|
||||
* [#10895](http://dev.ckeditor.com/ticket/10895): [Enhanced Image](http://ckeditor.com/addon/image2): Added file browser integration.
|
||||
* [#11002](http://dev.ckeditor.com/ticket/11002): Added the [`draggable`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.definition-property-draggable) option to disable drag and drop support for widgets.
|
||||
* [#10937](http://dev.ckeditor.com/ticket/10937): [Mathematical Formulas](http://ckeditor.com/addon/mathjax) widget improvements:
|
||||
* loading indicator ([#10948](http://dev.ckeditor.com/ticket/10948)),
|
||||
* applying paragraph changes (like font color change) to iframe ([#10841](http://dev.ckeditor.com/ticket/10841)),
|
||||
* Firefox and IE9 clipboard fixes ([#10857](http://dev.ckeditor.com/ticket/10857)),
|
||||
* fixing same origin policy issue ([#10840](http://dev.ckeditor.com/ticket/10840)),
|
||||
* fixing undo bugs ([#10842](http://dev.ckeditor.com/ticket/10842), [#10930](http://dev.ckeditor.com/ticket/10930)),
|
||||
* fixing other minor bugs.
|
||||
* [#10862](http://dev.ckeditor.com/ticket/10862): [Placeholder](http://ckeditor.com/addon/placeholder) plugin was rewritten as a widget.
|
||||
* [#10822](http://dev.ckeditor.com/ticket/10822): Added styles system integration with non-editable elements (for example widgets) and their nested editables. Styles cannot change non-editable content and are applied in nested editable only if allowed by its type and content filter.
|
||||
* [#10856](http://dev.ckeditor.com/ticket/10856): Menu buttons will now toggle the visibility of their panels when clicked multiple times. [Language](http://ckeditor.com/addon/language) plugin fixes: Added active language highlighting, added an option to remove the language.
|
||||
* [#10028](http://dev.ckeditor.com/ticket/10028): New [`config.dialog_noConfirmCancel`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-dialog_noConfirmCancel) configuration option that eliminates the need to confirm closing of a dialog window when the user changed any of its fields.
|
||||
* [#10848](http://dev.ckeditor.com/ticket/10848): Integrate remaining plugins ([Styles](http://ckeditor.com/addon/stylescombo), [Format](http://ckeditor.com/addon/format), [Font](http://ckeditor.com/addon/font), [Color Button](http://ckeditor.com/addon/colorbutton), [Language](http://ckeditor.com/addon/language) and [Indent](http://ckeditor.com/addon/indent)) with [active filter](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-activeFilter).
|
||||
* [#10855](http://dev.ckeditor.com/ticket/10855): Change the extension of emoticons in the [BBCode](http://ckeditor.com/addon/bbcode) sample from GIF to PNG.
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* [#10831](http://dev.ckeditor.com/ticket/10831): [Enhanced Image](http://ckeditor.com/addon/image2): Merged `image2inline` and `image2block` into one `image2` widget.
|
||||
* [#10835](http://dev.ckeditor.com/ticket/10835): [Enhanced Image](http://ckeditor.com/addon/image2): Improved visibility of the resize handle.
|
||||
* [#10836](http://dev.ckeditor.com/ticket/10836): [Enhanced Image](http://ckeditor.com/addon/image2): Preserve custom mouse cursor while resizing the image.
|
||||
* [#10939](http://dev.ckeditor.com/ticket/10939): [Firefox] [Enhanced Image](http://ckeditor.com/addon/image2): hovering the image causes it to change.
|
||||
* [#10866](http://dev.ckeditor.com/ticket/10866): Fixed: Broken *Tab* key navigation in the [Enhanced Image](http://ckeditor.com/addon/image2) dialog window.
|
||||
* [#10833](http://dev.ckeditor.com/ticket/10833): Fixed: *Lock ratio* option should be on by default in the [Enhanced Image](http://ckeditor.com/addon/image2) dialog window.
|
||||
* [#10881](http://dev.ckeditor.com/ticket/10881): Various improvements to *Enter* key behavior in nested editables.
|
||||
* [#10879](http://dev.ckeditor.com/ticket/10879): [Remove Format](http://ckeditor.com/addon/removeformat) should not leak from a nested editable.
|
||||
* [#10877](http://dev.ckeditor.com/ticket/10877): Fixed: [WebSpellChecker](http://ckeditor.com/addon/wsc) fails to apply changes if a nested editable was focused.
|
||||
* [#10877](http://dev.ckeditor.com/ticket/10877): Fixed: [SCAYT](http://ckeditor.com/addon/wsc) blocks typing in nested editables.
|
||||
* [#11079](http://dev.ckeditor.com/ticket/11079): Add button icons to the [Placeholder](http://ckeditor.com/addon/placeholder) sample.
|
||||
* [#10870](http://dev.ckeditor.com/ticket/10870): The `paste` command is no longer being disabled when the clipboard is empty.
|
||||
* [#10854](http://dev.ckeditor.com/ticket/10854): Fixed: Firefox prepends `<br>` to `<body>`, so it is stripped by the HTML data processor.
|
||||
* [#10823](http://dev.ckeditor.com/ticket/10823): Fixed: [Link](http://ckeditor.com/addon/link) plugin does not work with non-editable content.
|
||||
* [#10828](http://dev.ckeditor.com/ticket/10828): [Magic Line](http://ckeditor.com/addon/magicline) integration with the Widget System.
|
||||
* [#10865](http://dev.ckeditor.com/ticket/10865): Improved hiding copybin, so copying widgets works smoothly.
|
||||
* [#11066](http://dev.ckeditor.com/ticket/11066): Widget's private parts use CSS reset.
|
||||
* [#11027](http://dev.ckeditor.com/ticket/11027): Fixed: Block commands break on widgets; added the [`contentDomInvalidated`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-contentDomInvalidated) event.
|
||||
* [#10430](http://dev.ckeditor.com/ticket/10430): Resolve dependence of the [Image](http://ckeditor.com/addon/image) plugin on the [Form Elements](http://ckeditor.com/addon/forms) plugin.
|
||||
* [#10911](http://dev.ckeditor.com/ticket/10911): Fixed: Browser *Alt* hotkeys will no longer be blocked while a widget is focused.
|
||||
* [#11082](http://dev.ckeditor.com/ticket/11082): Fixed: Selected widget is not copied or cut when using toolbar buttons or context menu.
|
||||
* [#11083](http://dev.ckeditor.com/ticket/11083): Fixed list and div element application to block widgets.
|
||||
* [#10887](http://dev.ckeditor.com/ticket/10887): Internet Explorer 8 compatibility issues related to the Widget System.
|
||||
* [#11074](http://dev.ckeditor.com/ticket/11074): Temporarily disabled inline widget drag and drop, because of seriously buggy native `range#moveToPoint` method.
|
||||
* [#11098](http://dev.ckeditor.com/ticket/11098): Fixed: Wrong selection position after undoing widget drag and drop.
|
||||
* [#11110](http://dev.ckeditor.com/ticket/11110): Fixed: IFrame and Flash objects are being incorrectly pasted in certain conditions.
|
||||
* [#11129](http://dev.ckeditor.com/ticket/11129): Page break is lost when loading data.
|
||||
* [#11123](http://dev.ckeditor.com/ticket/11123): [Firefox] Widget is destroyed after being dragged outside of `<body>`.
|
||||
* [#11124](http://dev.ckeditor.com/ticket/11124): Fixed the [Elements Path](http://ckeditor.com/addon/elementspath) in an editor using the [Div Editing Area](http://ckeditor.com/addon/divarea).
|
||||
|
||||
## CKEditor 4.3 Beta
|
||||
|
||||
New Features:
|
||||
|
||||
* [#9764](http://dev.ckeditor.com/ticket/9764): Widget System.
|
||||
* [Widget plugin](http://ckeditor.com/addon/widget) introducing the [Widget API](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget).
|
||||
* New [`editor.enterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-enterMode) and [`editor.shiftEnterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-shiftEnterMode) properties – normalized versions of [`config.enterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-enterMode) and [`config.shiftEnterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-shiftEnterMode).
|
||||
* Dynamic editor settings. Starting from CKEditor 4.3 Beta, *Enter* mode values and [content filter](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter) instances may be changed dynamically (for example when the caret was placed in an element in which editor features should be adjusted). When you are implementing a new editor feature, you should base its behavior on [dynamic](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-activeEnterMode) or [static](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-enterMode) *Enter* mode values depending on whether this feature works in selection context or globally on editor content.
|
||||
* Dynamic *Enter* mode values – [`editor.setActiveEnterMode()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setActiveEnterMode) method, [`editor.activeEnterModeChange`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-activeEnterModeChange) event, and two properties: [`editor.activeEnterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-activeEnterMode) and [`editor.activeShiftEnterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-activeShiftEnterMode).
|
||||
* Dynamic content filter instances – [`editor.setActiveFilter()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setActiveFilter) method, [`editor.activeFilterChange`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-activeFilterChange) event, and [`editor.activeFilter`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-activeFilter) property.
|
||||
* "Fake" selection was introduced. It makes it possible to virtually select any element when the real selection remains hidden. See the [`selection.fake()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.selection-method-fake) method.
|
||||
* Default [`htmlParser.filter`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.filter) rules are not applied to non-editable elements (elements with `contenteditable` attribute set to `false` and their descendants) anymore. To add a rule which will be applied to all elements you need to pass an additional argument to the [`filter.addRules()`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.filter-method-addRules) method.
|
||||
* Dozens of new methods were introduced – most interesting ones:
|
||||
* [`document.find()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.document-method-find),
|
||||
* [`document.findOne()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.document-method-findOne),
|
||||
* [`editable.insertElementIntoRange()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editable-method-insertElementIntoRange),
|
||||
* [`range.moveToClosestEditablePosition()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.range-method-moveToClosestEditablePosition),
|
||||
* New methods for [`htmlParser.node`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.node) and [`htmlParser.element`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.element).
|
||||
* [#10659](http://dev.ckeditor.com/ticket/10659): New [Enhanced Image](http://ckeditor.com/addon/image2) plugin that introduces a widget with integrated image captions, an option to center images, and dynamic "click and drag" resizing.
|
||||
* [#10664](http://dev.ckeditor.com/ticket/10664): New [Mathematical Formulas](http://ckeditor.com/addon/mathjax) plugin that introduces the MathJax widget.
|
||||
* [#7987](https://dev.ckeditor.com/ticket/7987): New [Language](http://ckeditor.com/addon/language) plugin that implements Language toolbar button to support [WCAG 3.1.2 Language of Parts](http://www.w3.org/TR/UNDERSTANDING-WCAG20/meaning-other-lang-id.html).
|
||||
* [#10708](http://dev.ckeditor.com/ticket/10708): New [smileys](http://ckeditor.com/addon/smiley).
|
||||
|
||||
## CKEditor 4.2.3
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* [#10994](http://dev.ckeditor.com/ticket/10994): Fixed: Loading external jQuery library when opening the [jQuery Adapter](http://docs.ckeditor.com/#!/guide/dev_jquery) sample directly from file.
|
||||
* [#10975](http://dev.ckeditor.com/ticket/10975): [IE] Fixed: Error thrown while opening the color palette.
|
||||
* [#9929](http://dev.ckeditor.com/ticket/9929): [Blink/WebKit] Fixed: A non-breaking space is created once a character is deleted and a regular space is typed.
|
||||
* [#10963](http://dev.ckeditor.com/ticket/10963): Fixed: JAWS issue with the keyboard shortcut for [Magic Line](http://ckeditor.com/addon/magicline).
|
||||
* [#11096](http://dev.ckeditor.com/ticket/11096): Fixed: TypeError: Object has no method 'is'.
|
||||
|
||||
## CKEditor 4.2.2
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* [#9314](http://dev.ckeditor.com/ticket/9314): Fixed: Incorrect error message on closing a dialog window without saving changs.
|
||||
* [#10308](http://dev.ckeditor.com/ticket/10308): [IE10] Fixed: Unspecified error when deleting a row.
|
||||
* [#10945](http://dev.ckeditor.com/ticket/10945): [Chrome] Fixed: Clicking with a mouse inside the editor does not show the caret.
|
||||
* [#10912](http://dev.ckeditor.com/ticket/10912): Prevent default action when content of a non-editable link is clicked.
|
||||
* [#10913](http://dev.ckeditor.com/ticket/10913): Fixed [`CKEDITOR.plugins.addExternal()`](http://docs.ckeditor.com/#!/api/CKEDITOR.resourceManager-method-addExternal) not handling paths including file name specified.
|
||||
* [#10666](http://dev.ckeditor.com/ticket/10666): Fixed [`CKEDITOR.tools.isArray()`](http://docs.ckeditor.com/#!/api/CKEDITOR.tools-method-isArray) not working cross frame.
|
||||
* [#10910](http://dev.ckeditor.com/ticket/10910): [IE9] Fixed JavaScript error thrown in Compatibility Mode when clicking and/or typing in the editing area.
|
||||
* [#10868](http://dev.ckeditor.com/ticket/10868): [IE8] Prevent the browser from crashing when applying the Inline Quotation style.
|
||||
* [#10915](http://dev.ckeditor.com/ticket/10915): Fixed: Invalid CSS filter in the Kama skin.
|
||||
* [#10914](http://dev.ckeditor.com/ticket/10914): Plugins [Indent List](http://ckeditor.com/addon/indentlist) and [Indent Block](http://ckeditor.com/addon/indentblock) are now included in the build configuration.
|
||||
* [#10812](http://dev.ckeditor.com/ticket/10812): Fixed [`range.createBookmark2()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.range-method-createBookmark2) incorrectly normalizing offsets. This bug was causing many issues: [#10850](http://dev.ckeditor.com/ticket/10850), [#10842](http://dev.ckeditor.com/ticket/10842).
|
||||
* [#10951](http://dev.ckeditor.com/ticket/10951): Reviewed and optimized focus handling on panels (combo, menu buttons, color buttons, and context menu) to enhance accessibility. Fixed [#10705](http://dev.ckeditor.com/ticket/10705), [#10706](http://dev.ckeditor.com/ticket/10706) and [#10707](http://dev.ckeditor.com/ticket/10707).
|
||||
* [#10704](http://dev.ckeditor.com/ticket/10704): Fixed a JAWS issue with the Select Color dialog window title not being announced.
|
||||
* [#10753](http://dev.ckeditor.com/ticket/10753): The floating toolbar in inline instances now has a dedicated accessibility label.
|
||||
|
||||
## CKEditor 4.2.1
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* [#10301](http://dev.ckeditor.com/ticket/10301): [IE9-10] Undo fails after 3+ consecutive paste actions with a JavaScript error.
|
||||
* [#10689](http://dev.ckeditor.com/ticket/10689): Save toolbar button saves only the first editor instance.
|
||||
* [#10368](http://dev.ckeditor.com/ticket/10368): Move language reading direction definition (`dir`) from main language file to core.
|
||||
* [#9330](http://dev.ckeditor.com/ticket/9330): Fixed pasting anchors from MS Word.
|
||||
* [#8103](http://dev.ckeditor.com/ticket/8103): Fixed pasting nested lists from MS Word.
|
||||
* [#9958](http://dev.ckeditor.com/ticket/9958): [IE9] Pressing the "OK" button will trigger the `onbeforeunload` event in the popup dialog.
|
||||
* [#10662](http://dev.ckeditor.com/ticket/10662): Fixed styles from the Styles drop-down list not registering to the ACF in case when the [Shared Spaces plugin](http://ckeditor.com/addon/sharedspace) is used.
|
||||
* [#9654](http://dev.ckeditor.com/ticket/9654): Problems with Internet Explorer 10 Quirks Mode.
|
||||
* [#9816](http://dev.ckeditor.com/ticket/9816): Floating toolbar does not reposition vertically in several cases.
|
||||
* [#10646](http://dev.ckeditor.com/ticket/10646): Removing a selected sublist or nested table with *Backspace/Delete* removes the parent element.
|
||||
* [#10623](http://dev.ckeditor.com/ticket/10623): [WebKit] Page is scrolled when opening a drop-down list.
|
||||
* [#10004](http://dev.ckeditor.com/ticket/10004): [ChromeVox] Button names are not announced.
|
||||
* [#10731](http://dev.ckeditor.com/ticket/10731): [WebSpellChecker](http://ckeditor.com/addon/wsc) plugin breaks cloning of editor configuration.
|
||||
* It is now possible to set per instance [WebSpellChecker](http://ckeditor.com/addon/wsc) plugin configuration instead of setting the configuration globally.
|
||||
|
||||
## CKEditor 4.2
|
||||
|
||||
**Important Notes:**
|
||||
|
||||
* Dropped compatibility support for Internet Explorer 7 and Firefox 3.6.
|
||||
|
||||
* Both the Basic and the Standard distribution packages will not contain the new [Indent Block](http://ckeditor.com/addon/indentblock) plugin. Because of this the [Advanced Content Filter](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter) might remove block indentations from existing contents. If you want to prevent this, either [add an appropriate ACF rule to your filter](http://docs.ckeditor.com/#!/guide/dev_allowed_content_rules) or create a custom build based on the Basic/Standard package and add the Indent Block plugin in [CKBuilder](http://ckeditor.com/builder).
|
||||
|
||||
New Features:
|
||||
|
||||
* [#10027](http://dev.ckeditor.com/ticket/10027): Separated list and block indentation into two plugins: [Indent List](http://ckeditor.com/addon/indentlist) and [Indent Block](http://ckeditor.com/addon/indentblock).
|
||||
* [#8244](http://dev.ckeditor.com/ticket/8244): Use *(Shift+)Tab* to indent and outdent lists.
|
||||
* [#10281](http://dev.ckeditor.com/ticket/10281): The [jQuery Adapter](http://docs.ckeditor.com/#!/guide/dev_jquery) is now available. Several jQuery-related issues fixed: [#8261](http://dev.ckeditor.com/ticket/8261), [#9077](http://dev.ckeditor.com/ticket/9077), [#8710](http://dev.ckeditor.com/ticket/8710), [#8530](http://dev.ckeditor.com/ticket/8530), [#9019](http://dev.ckeditor.com/ticket/9019), [#6181](http://dev.ckeditor.com/ticket/6181), [#7876](http://dev.ckeditor.com/ticket/7876), [#6906](http://dev.ckeditor.com/ticket/6906).
|
||||
* [#10042](http://dev.ckeditor.com/ticket/10042): Introduced [`config.title`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-title) setting to change the human-readable title of the editor.
|
||||
* [#9794](http://dev.ckeditor.com/ticket/9794): Added [`editor.change`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-change) event.
|
||||
* [#9923](http://dev.ckeditor.com/ticket/9923): HiDPI support in the editor UI. HiDPI icons for [Moono skin](http://ckeditor.com/addon/moono) added.
|
||||
* [#8031](http://dev.ckeditor.com/ticket/8031): Handle `required` attributes on `<textarea>` elements — introduced [`editor.required`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-required) event.
|
||||
* [#10280](http://dev.ckeditor.com/ticket/10280): Ability to replace `<textarea>` elements with the inline editor.
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* [#10599](http://dev.ckeditor.com/ticket/10599): [Indent](http://ckeditor.com/addon/indent) plugin is no longer required by the [List](http://ckeditor.com/addon/list) plugin.
|
||||
* [#10370](http://dev.ckeditor.com/ticket/10370): Inconsistency in data events between framed and inline editors.
|
||||
* [#10438](http://dev.ckeditor.com/ticket/10438): [FF, IE] No selection is done on an editable element on executing [`editor.setData()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setData).
|
||||
|
||||
## CKEditor 4.1.3
|
||||
|
||||
New Features:
|
||||
|
||||
* Added new translation: Indonesian.
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* [#10644](http://dev.ckeditor.com/ticket/10644): Fixed a critical bug when pasting plain text in Blink-based browsers.
|
||||
* [#5189](http://dev.ckeditor.com/ticket/5189): [Find/Replace](http://ckeditor.com/addon/find) dialog window: rename "Cancel" button to "Close".
|
||||
* [#10562](http://dev.ckeditor.com/ticket/10562): [Housekeeping] Unified CSS gradient filter formats in the [Moono](http://ckeditor.com/addon/moono) skin.
|
||||
* [#10537](http://dev.ckeditor.com/ticket/10537): Advanced Content Filter should register a default rule for [`config.shiftEnterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-shiftEnterMode).
|
||||
* [#10610](http://dev.ckeditor.com/ticket/10610): [`CKEDITOR.dialog.addIframe()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dialog-static-method-addIframe) incorrectly sets the iframe size in dialog windows.
|
||||
|
||||
## CKEditor 4.1.2
|
||||
|
||||
New Features:
|
||||
|
||||
* Added new translation: Sinhala.
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* [#10339](http://dev.ckeditor.com/ticket/10339): Fixed: Error thrown when inserted data was totally stripped out after filtering and processing.
|
||||
* [#10298](http://dev.ckeditor.com/ticket/10298): Fixed: Data processor breaks attributes containing protected parts.
|
||||
* [#10367](http://dev.ckeditor.com/ticket/10367): Fixed: [`editable.insertText()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editable-method-insertText) loses characters when `RegExp` replace controls are being inserted.
|
||||
* [#10165](http://dev.ckeditor.com/ticket/10165): [IE] Access denied error when `document.domain` has been altered.
|
||||
* [#9761](http://dev.ckeditor.com/ticket/9761): Update the *Backspace* key state in [`keystrokeHandler.blockedKeystrokes`](http://docs.ckeditor.com/#!/api/CKEDITOR.keystrokeHandler-property-blockedKeystrokes) when calling [`editor.setReadOnly()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setReadOnly).
|
||||
* [#6504](http://dev.ckeditor.com/ticket/6504): Fixed: Race condition while loading several [`config.customConfig`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-customConfig) files.
|
||||
* [#10146](http://dev.ckeditor.com/ticket/10146): [Firefox] Empty lines are being removed while [`config.enterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-enterMode) is [`CKEDITOR.ENTER_BR`](http://docs.ckeditor.com/#!/api/CKEDITOR-property-ENTER_BR).
|
||||
* [#10360](http://dev.ckeditor.com/ticket/10360): Fixed: ARIA `role="application"` should not be used for dialog windows.
|
||||
* [#10361](http://dev.ckeditor.com/ticket/10361): Fixed: ARIA `role="application"` should not be used for floating panels.
|
||||
* [#10510](http://dev.ckeditor.com/ticket/10510): Introduced unique voice labels to differentiate between different editor instances.
|
||||
* [#9945](http://dev.ckeditor.com/ticket/9945): [iOS] Scrolling not possible on iPad.
|
||||
* [#10389](http://dev.ckeditor.com/ticket/10389): Fixed: Invalid HTML in the "Text and Table" template.
|
||||
* [WebSpellChecker](http://ckeditor.com/addon/wsc) plugin user interface was changed to match CKEditor 4 style.
|
||||
|
||||
## CKEditor 4.1.1
|
||||
|
||||
New Features:
|
||||
|
||||
* Added new translation: Albanian.
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* [#10172](http://dev.ckeditor.com/ticket/10172): Pressing *Delete* or *Backspace* in an empty table cell moves the cursor to the next/previous cell.
|
||||
* [#10219](http://dev.ckeditor.com/ticket/10219): Error thrown when destroying an editor instance in parallel with a `mouseup` event.
|
||||
* [#10265](http://dev.ckeditor.com/ticket/10265): Wrong loop type in the [File Browser](http://ckeditor.com/addon/filebrowser) plugin.
|
||||
* [#10249](http://dev.ckeditor.com/ticket/10249): Wrong undo/redo states at start.
|
||||
* [#10268](http://dev.ckeditor.com/ticket/10268): [Show Blocks](http://ckeditor.com/addon/showblocks) does not recover after switching to Source view.
|
||||
* [#9995](http://dev.ckeditor.com/ticket/9995): HTML code in the `<textarea>` should not be modified by the [`htmlDataProcessor`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlDataProcessor).
|
||||
* [#10320](http://dev.ckeditor.com/ticket/10320): [Justify](http://ckeditor.com/addon/justify) plugin should add elements to Advanced Content Filter based on current [Enter mode](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-enterMode).
|
||||
* [#10260](http://dev.ckeditor.com/ticket/10260): Fixed: Advanced Content Filter blocks [`tabSpaces`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-tabSpaces). Unified `data-cke-*` attributes filtering.
|
||||
* [#10315](http://dev.ckeditor.com/ticket/10315): [WebKit] [Undo manager](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.undo.UndoManager) should not record snapshots after a filling character was added/removed.
|
||||
* [#10291](http://dev.ckeditor.com/ticket/10291): [WebKit] Space after a filling character should be secured.
|
||||
* [#10330](http://dev.ckeditor.com/ticket/10330): [WebKit] The filling character is not removed on `keydown` in specific cases.
|
||||
* [#10285](http://dev.ckeditor.com/ticket/10285): Fixed: Styled text pasted from MS Word causes an infinite loop.
|
||||
* [#10131](http://dev.ckeditor.com/ticket/10131): Fixed: [`undoManager.update()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.undo.UndoManager-method-update) does not refresh the command state.
|
||||
* [#10337](http://dev.ckeditor.com/ticket/10337): Fixed: Unable to remove `<s>` using [Remove Format](http://ckeditor.com/addon/removeformat).
|
||||
|
||||
## CKEditor 4.1
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* [#10192](http://dev.ckeditor.com/ticket/10192): Closing lists with the *Enter* key does not work with [Advanced Content Filter](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter) in several cases.
|
||||
* [#10191](http://dev.ckeditor.com/ticket/10191): Fixed allowed content rules unification, so the [`filter.allowedContent`](http://docs.ckeditor.com/#!/api/CKEDITOR.filter-property-allowedContent) property always contains rules in the same format.
|
||||
* [#10224](http://dev.ckeditor.com/ticket/10224): Advanced Content Filter does not remove non-empty `<a>` elements anymore.
|
||||
* Minor issues in plugin integration with Advanced Content Filter:
|
||||
* [#10166](http://dev.ckeditor.com/ticket/10166): Added transformation from the `align` attribute to `float` style to preserve backward compatibility after the introduction of Advanced Content Filter.
|
||||
* [#10195](http://dev.ckeditor.com/ticket/10195): [Image](http://ckeditor.com/addon/image) plugin no longer registers rules for links to Advanced Content Filter.
|
||||
* [#10213](http://dev.ckeditor.com/ticket/10213): [Justify](http://ckeditor.com/addon/justify) plugin is now correctly registering rules to Advanced Content Filter when [`config.justifyClasses`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-justifyClasses) is defined.
|
||||
|
||||
## CKEditor 4.1 RC
|
||||
|
||||
New Features:
|
||||
|
||||
* [#9829](http://dev.ckeditor.com/ticket/9829): Advanced Content Filter - data and features activation based on editor configuration.
|
||||
|
||||
Brand new data filtering system that works in 2 modes:
|
||||
|
||||
* Based on loaded features (toolbar items, plugins) - the data will be filtered according to what the editor in its
|
||||
current configuration can handle.
|
||||
* Based on [`config.allowedContent`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent) rules - the data
|
||||
will be filtered and the editor features (toolbar items, commands, keystrokes) will be enabled if they are allowed.
|
||||
|
||||
See the `datafiltering.html` sample, [guides](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter) and [`CKEDITOR.filter` API documentation](http://docs.ckeditor.com/#!/api/CKEDITOR.filter).
|
||||
* [#9387](http://dev.ckeditor.com/ticket/9387): Reintroduced [Shared Spaces](http://ckeditor.com/addon/sharedspace) - the ability to display toolbar and bottom editor space in selected locations and to share them by different editor instances.
|
||||
* [#9907](http://dev.ckeditor.com/ticket/9907): Added the [`contentPreview`](http://docs.ckeditor.com/#!/api/CKEDITOR-event-contentPreview) event for preview data manipulation.
|
||||
* [#9713](http://dev.ckeditor.com/ticket/9713): Introduced the [Source Dialog](http://ckeditor.com/addon/sourcedialog) plugin that brings raw HTML editing for inline editor instances.
|
||||
* Included in [#9829](http://dev.ckeditor.com/ticket/9829): Introduced new events, [`toHtml`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-toHtml) and [`toDataFormat`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-toDataFormat), allowing for better integration with data processing.
|
||||
* [#9981](http://dev.ckeditor.com/ticket/9981): Added ability to filter [`htmlParser.fragment`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.fragment), [`htmlParser.element`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.element) etc. by many [`htmlParser.filter`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.filter)s before writing structure to an HTML string.
|
||||
* Included in [#10103](http://dev.ckeditor.com/ticket/10103):
|
||||
* Introduced the [`editor.status`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-status) property to make it easier to check the current status of the editor.
|
||||
* Default [`command`](http://docs.ckeditor.com/#!/api/CKEDITOR.command) state is now [`CKEDITOR.TRISTATE_DISABLE`](http://docs.ckeditor.com/#!/api/CKEDITOR-property-TRISTATE_DISABLED). It will be activated on [`editor.instanceReady`](http://docs.ckeditor.com/#!/api/CKEDITOR-event-instanceReady) or immediately after being added if the editor is already initialized.
|
||||
* [#9796](http://dev.ckeditor.com/ticket/9796): Introduced `<s>` as a default tag for strikethrough, which replaces obsolete `<strike>` in HTML5.
|
||||
|
||||
## CKEditor 4.0.3
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* [#10196](http://dev.ckeditor.com/ticket/10196): Fixed context menus not opening with keyboard shortcuts when [Autogrow](http://ckeditor.com/addon/autogrow) is enabled.
|
||||
* [#10212](http://dev.ckeditor.com/ticket/10212): [IE7-10] Undo command throws errors after multiple switches between Source and WYSIWYG view.
|
||||
* [#10219](http://dev.ckeditor.com/ticket/10219): [Inline editor] Error thrown after calling [`editor.destroy()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-destroy).
|
||||
|
||||
## CKEditor 4.0.2
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* [#9779](http://dev.ckeditor.com/ticket/9779): Fixed overriding [`CKEDITOR.getUrl()`](http://docs.ckeditor.com/#!/api/CKEDITOR-method-getUrl) with `CKEDITOR_GETURL`.
|
||||
* [#9772](http://dev.ckeditor.com/ticket/9772): Custom buttons in the dialog window footer have different look and size ([Moono](http://ckeditor.com/addon/moono), [Kama](http://ckeditor.com/addon/kama) skins).
|
||||
* [#9029](http://dev.ckeditor.com/ticket/9029): Custom styles added with the [`stylesSet.add()`](http://docs.ckeditor.com/#!/api/CKEDITOR.stylesSet-method-add) are displayed in the wrong order.
|
||||
* [#9887](http://dev.ckeditor.com/ticket/9887): Disable [Magic Line](http://ckeditor.com/addon/magicline) when [`editor.readOnly`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-readOnly) is set.
|
||||
* [#9882](http://dev.ckeditor.com/ticket/9882): Fixed empty document title on [`editor.getData()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-getData) if set via the Document Properties dialog window.
|
||||
* [#9773](http://dev.ckeditor.com/ticket/9773): Fixed rendering problems with selection fields in the Kama skin.
|
||||
* [#9851](http://dev.ckeditor.com/ticket/9851): The [`selectionChange`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-selectionChange) event is not fired when mouse selection ended outside editable.
|
||||
* [#9903](http://dev.ckeditor.com/ticket/9903): [Inline editor] Bad positioning of floating space with page horizontal scroll.
|
||||
* [#9872](http://dev.ckeditor.com/ticket/9872): [`editor.checkDirty()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-checkDirty) returns `true` when called onload. Removed the obsolete `editor.mayBeDirty` flag.
|
||||
* [#9893](http://dev.ckeditor.com/ticket/9893): [IE] Fixed broken toolbar when editing mixed direction content in Quirks mode.
|
||||
* [#9845](http://dev.ckeditor.com/ticket/9845): Fixed TAB navigation in the [Link](http://ckeditor.com/addon/link) dialog window when the Anchor option is used and no anchors are available.
|
||||
* [#9883](http://dev.ckeditor.com/ticket/9883): Maximizing was making the entire page editable with [divarea](http://ckeditor.com/addon/divarea)-based editors.
|
||||
* [#9940](http://dev.ckeditor.com/ticket/9940): [Firefox] Navigating back to a page with the editor was making the entire page editable.
|
||||
* [#9966](http://dev.ckeditor.com/ticket/9966): Fixed: Unable to type square brackets with French keyboard layout. Changed [Magic Line](http://ckeditor.com/addon/magicline) keystrokes.
|
||||
* [#9507](http://dev.ckeditor.com/ticket/9507): [Firefox] Selection is moved before editable position when the editor is focused for the first time.
|
||||
* [#9947](http://dev.ckeditor.com/ticket/9947): [WebKit] Editor overflows parent container in some edge cases.
|
||||
* [#10105](http://dev.ckeditor.com/ticket/10105): Fixed: Broken [sourcearea](http://ckeditor.com/addon/sourcearea) view when an RTL language is set.
|
||||
* [#10123](http://dev.ckeditor.com/ticket/10123): [WebKit] Fixed: Several dialog windows have broken layout since the latest WebKit release.
|
||||
* [#10152](http://dev.ckeditor.com/ticket/10152): Fixed: Invalid ARIA property used on menu items.
|
||||
|
||||
## CKEditor 4.0.1.1
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* Security update: Added protection against XSS attack and possible path disclosure in the PHP sample.
|
||||
|
||||
## CKEditor 4.0.1
|
||||
|
||||
Fixed Issues:
|
||||
|
||||
* [#9655](http://dev.ckeditor.com/ticket/9655): Support for IE Quirks Mode in the new [Moono skin](http://ckeditor.com/addon/moono).
|
||||
* Accessibility issues (mainly in inline editor): [#9364](http://dev.ckeditor.com/ticket/9364), [#9368](http://dev.ckeditor.com/ticket/9368), [#9369](http://dev.ckeditor.com/ticket/9369), [#9370](http://dev.ckeditor.com/ticket/9370), [#9541](http://dev.ckeditor.com/ticket/9541), [#9543](http://dev.ckeditor.com/ticket/9543), [#9841](http://dev.ckeditor.com/ticket/9841), [#9844](http://dev.ckeditor.com/ticket/9844).
|
||||
* [Magic Line](http://ckeditor.com/addon/magicline) plugin:
|
||||
* [#9481](http://dev.ckeditor.com/ticket/9481): Added accessibility support for Magic Line.
|
||||
* [#9509](http://dev.ckeditor.com/ticket/9509): Added Magic Line support for forms.
|
||||
* [#9573](http://dev.ckeditor.com/ticket/9573): Magic Line does not disappear on `mouseout` in a specific case.
|
||||
* [#9754](http://dev.ckeditor.com/ticket/9754): [WebKit] Cutting & pasting simple unformatted text generates an inline wrapper in WebKit browsers.
|
||||
* [#9456](http://dev.ckeditor.com/ticket/9456): [Chrome] Properly paste bullet list style from MS Word.
|
||||
* [#9699](http://dev.ckeditor.com/ticket/9699), [#9758](http://dev.ckeditor.com/ticket/9758): Improved selection locking when selecting by dragging.
|
||||
* Context menu:
|
||||
* [#9712](http://dev.ckeditor.com/ticket/9712): Opening the context menu destroys editor focus.
|
||||
* [#9366](http://dev.ckeditor.com/ticket/9366): Context menu should be displayed over the floating toolbar.
|
||||
* [#9706](http://dev.ckeditor.com/ticket/9706): Context menu generates a JavaScript error in inline mode when the editor is attached to a header element.
|
||||
* [#9800](http://dev.ckeditor.com/ticket/9800): Hide float panel when resizing the window.
|
||||
* [#9721](http://dev.ckeditor.com/ticket/9721): Padding in content of div-based editor puts the editing area under the bottom UI space.
|
||||
* [#9528](http://dev.ckeditor.com/ticket/9528): Host page `box-sizing` style should not influence the editor UI elements.
|
||||
* [#9503](http://dev.ckeditor.com/ticket/9503): [Form Elements](http://ckeditor.com/addon/forms) plugin adds context menu listeners only on supported input types. Added support for `tel`, `email`, `search` and `url` input types.
|
||||
* [#9769](http://dev.ckeditor.com/ticket/9769): Improved floating toolbar positioning in a narrow window.
|
||||
* [#9875](http://dev.ckeditor.com/ticket/9875): Table dialog window does not populate width correctly.
|
||||
* [#8675](http://dev.ckeditor.com/ticket/8675): Deleting cells in a nested table removes the outer table cell.
|
||||
* [#9815](http://dev.ckeditor.com/ticket/9815): Cannot edit dialog window fields in an editor initialized in the jQuery UI modal dialog.
|
||||
* [#8888](http://dev.ckeditor.com/ticket/8888): CKEditor dialog windows do not show completely in a small window.
|
||||
* [#9360](http://dev.ckeditor.com/ticket/9360): [Inline editor] Blocks shown for a `<div>` element stay permanently even after the user exits editing the `<div>`.
|
||||
* [#9531](http://dev.ckeditor.com/ticket/9531): [Firefox & Inline editor] Toolbar is lost when closing the Format drop-down list by clicking its button.
|
||||
* [#9553](http://dev.ckeditor.com/ticket/9553): Table width incorrectly set when the `border-width` style is specified.
|
||||
* [#9594](http://dev.ckeditor.com/ticket/9594): Cannot tab past CKEditor when it is in read-only mode.
|
||||
* [#9658](http://dev.ckeditor.com/ticket/9658): [IE9] Justify not working on selected images.
|
||||
* [#9686](http://dev.ckeditor.com/ticket/9686): Added missing contents styles for `<pre>` elements.
|
||||
* [#9709](http://dev.ckeditor.com/ticket/9709): [Paste from Word](http://ckeditor.com/addon/pastefromword) should not depend on configuration from other styles.
|
||||
* [#9726](http://dev.ckeditor.com/ticket/9726): Removed [Color Dialog](http://ckeditor.com/addon/colordialog) plugin dependency from [Table Tools](http://ckeditor.com/addon/tabletools).
|
||||
* [#9765](http://dev.ckeditor.com/ticket/9765): Toolbar Collapse command documented incorrectly in the [Accessibility Instructions](http://ckeditor.com/addon/a11yhelp) dialog window.
|
||||
* [#9771](http://dev.ckeditor.com/ticket/9771): [WebKit & Opera] Fixed scrolling issues when pasting.
|
||||
* [#9787](http://dev.ckeditor.com/ticket/9787): [IE9] `onChange` is not fired for checkboxes in dialogs.
|
||||
* [#9842](http://dev.ckeditor.com/ticket/9842): [Firefox 17] When opening a toolbar menu for the first time and pressing the *Down Arrow* key, focus goes to the next toolbar button instead of the menu options.
|
||||
* [#9847](http://dev.ckeditor.com/ticket/9847): [Elements Path](http://ckeditor.com/addon/elementspath) should not be initialized in the inline editor.
|
||||
* [#9853](http://dev.ckeditor.com/ticket/9853): [`editor.addRemoveFormatFilter()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-addRemoveFormatFilter) is exposed before it really works.
|
||||
* [#8893](http://dev.ckeditor.com/ticket/8893): Value of the [`pasteFromWordCleanupFile`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-pasteFromWordCleanupFile) configuration option is now taken from the instance configuration.
|
||||
* [#9693](http://dev.ckeditor.com/ticket/9693): Removed "Live Preview" checkbox from UI color picker.
|
||||
|
||||
|
||||
## CKEditor 4.0
|
||||
|
||||
The first stable release of the new CKEditor 4 code line.
|
||||
|
||||
The CKEditor JavaScript API has been kept compatible with CKEditor 4, whenever
|
||||
possible. The list of relevant changes can be found in the [API Changes page of
|
||||
the CKEditor 4 documentation][1].
|
||||
|
||||
[1]: http://docs.ckeditor.com/#!/guide/dev_api_changes "API Changes"
|
1264
core/assets/vendor/ckeditor/LICENSE.md
vendored
Normal file
1264
core/assets/vendor/ckeditor/LICENSE.md
vendored
Normal file
File diff suppressed because it is too large
Load diff
85
core/assets/vendor/ckeditor/build-config.js
vendored
Normal file
85
core/assets/vendor/ckeditor/build-config.js
vendored
Normal file
|
@ -0,0 +1,85 @@
|
|||
/**
|
||||
* This is a Drupal-optimized build of CKEditor.
|
||||
*
|
||||
* You may re-use it at any time at http://ckeditor.com/builder to build
|
||||
* CKEditor again. Alternatively, use the "build.sh" script to build it locally.
|
||||
* If you do so, be sure to pass it the "-s" flag. So: "sh build.sh -s".
|
||||
*
|
||||
* NOTE:
|
||||
* This file is not used by CKEditor, you may remove it.
|
||||
* Changing this file will not change your CKEditor configuration.
|
||||
*/
|
||||
|
||||
/* exported CKBUILDER_CONFIG */
|
||||
|
||||
var CKBUILDER_CONFIG = {
|
||||
skin: 'moono',
|
||||
ignore: [
|
||||
// CKEditor repository structure: unrelated to the usage of CKEditor itself.
|
||||
'dev',
|
||||
'README.md',
|
||||
'.editorconfig',
|
||||
'.gitignore',
|
||||
'.gitattributes',
|
||||
'.idea',
|
||||
'.mailmap',
|
||||
'.DS_Store',
|
||||
'tests',
|
||||
'package.json',
|
||||
'bender.js',
|
||||
'.bender',
|
||||
'bender-err.log',
|
||||
'bender-out.log',
|
||||
'node_modules',
|
||||
// Parts of CKEditor that we consciously don't ship with Drupal.
|
||||
'adapters',
|
||||
'config.js',
|
||||
'contents.css',
|
||||
'Gruntfile.js',
|
||||
'styles.js',
|
||||
'samples',
|
||||
'skins/moono/readme.md'
|
||||
],
|
||||
plugins : {
|
||||
'about' : 1,
|
||||
'a11yhelp' : 1,
|
||||
'basicstyles' : 1,
|
||||
'blockquote' : 1,
|
||||
'clipboard' : 1,
|
||||
'contextmenu' : 1,
|
||||
'resize' : 1,
|
||||
'toolbar' : 1,
|
||||
'elementspath' : 1,
|
||||
'enterkey' : 1,
|
||||
'entities' : 1,
|
||||
'filebrowser' : 1,
|
||||
'floatingspace' : 1,
|
||||
'format' : 1,
|
||||
'htmlwriter' : 1,
|
||||
'horizontalrule' : 1,
|
||||
'wysiwygarea' : 1,
|
||||
'indent' : 1,
|
||||
'indentlist' : 1,
|
||||
'list' : 1,
|
||||
'magicline' : 1,
|
||||
'maximize' : 1,
|
||||
'pastetext' : 1,
|
||||
'pastefromword' : 1,
|
||||
'removeformat' : 1,
|
||||
'sourcearea' : 1,
|
||||
'specialchar' : 1,
|
||||
'stylescombo' : 1,
|
||||
'tab' : 1,
|
||||
'table' : 1,
|
||||
'tabletools' : 1,
|
||||
'undo' : 1,
|
||||
'justify' : 1,
|
||||
'showblocks' : 1,
|
||||
'showborders' : 1,
|
||||
'tableresize' : 1,
|
||||
'sharedspace' : 1,
|
||||
'sourcedialog' : 1,
|
||||
'widget' : 1,
|
||||
'image2' : 1
|
||||
}
|
||||
};
|
992
core/assets/vendor/ckeditor/ckeditor.js
vendored
Normal file
992
core/assets/vendor/ckeditor/ckeditor.js
vendored
Normal file
|
@ -0,0 +1,992 @@
|
|||
/*
|
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
(function(){if(!window.CKEDITOR||!window.CKEDITOR.dom)window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,f={timestamp:"F0RG",version:"4.4.7",revision:"3a35b3d",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var b=window.CKEDITOR_BASEPATH||"";if(!b)for(var i=document.getElementsByTagName("script"),e=0;e<i.length;e++){var d=i[e].src.match(a);if(d){b=d[1];break}}-1==b.indexOf(":/")&&"//"!=b.slice(0,
|
||||
2)&&(b=0===b.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+b:location.href.match(/^[^\?]*\/(?:)/)[0]+b);if(!b)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return b}(),getUrl:function(b){-1==b.indexOf(":/")&&0!==b.indexOf("/")&&(b=this.basePath+b);this.timestamp&&("/"!=b.charAt(b.length-1)&&!/[&?]t=/.test(b))&&(b+=(0<=b.indexOf("?")?"&":"?")+"t="+this.timestamp);return b},domReady:function(){function b(){try{document.addEventListener?
|
||||
(document.removeEventListener("DOMContentLoaded",b,!1),a()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",b),a())}catch(d){}}function a(){for(var b;b=e.shift();)b()}var e=[];return function(a){function i(){try{document.documentElement.doScroll("left")}catch(k){setTimeout(i,1);return}b()}e.push(a);"complete"===document.readyState&&setTimeout(b,1);if(1==e.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",b,!1),window.addEventListener("load",
|
||||
b,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",b);window.attachEvent("onload",b);a=!1;try{a=!window.frameElement}catch(c){}document.documentElement.doScroll&&a&&i()}}}()},c=window.CKEDITOR_GETURL;if(c){var e=f.getUrl;f.getUrl=function(b){return c.call(f,b)||e.call(f,b)}}return f}()),CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(a){var f=CKEDITOR.event.prototype,c;for(c in f)a[c]==null&&(a[c]=f[c])},CKEDITOR.event.prototype=function(){function a(a){var b=
|
||||
f(this);return b[a]||(b[a]=new c(a))}var f=function(a){a=a.getPrivate&&a.getPrivate()||a._||(a._={});return a.events||(a.events={})},c=function(a){this.name=a;this.listeners=[]};c.prototype={getListenerIndex:function(a){for(var b=0,i=this.listeners;b<i.length;b++)if(i[b].fn==a)return b;return-1}};return{define:function(e,b){var i=a.call(this,e);CKEDITOR.tools.extend(i,b,true)},on:function(e,b,i,c,d){function g(k,a,d,m){k={name:e,sender:this,editor:k,data:a,listenerData:c,stop:d,cancel:m,removeListener:h};
|
||||
return b.call(i,k)===false?false:k.data}function h(){m.removeListener(e,b)}var k=a.call(this,e);if(k.getListenerIndex(b)<0){k=k.listeners;i||(i=this);isNaN(d)&&(d=10);var m=this;g.fn=b;g.priority=d;for(var f=k.length-1;f>=0;f--)if(k[f].priority<=d){k.splice(f+1,0,g);return{removeListener:h}}k.unshift(g)}return{removeListener:h}},once:function(){var a=Array.prototype.slice.call(arguments),b=a[1];a[1]=function(a){a.removeListener();return b.apply(this,arguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=
|
||||
1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,b=function(){a=1},i=0,c=function(){i=1};return function(d,g,h){var k=f(this)[d],d=a,m=i;a=i=0;if(k){var q=k.listeners;if(q.length)for(var q=q.slice(0),p,o=0;o<q.length;o++){if(k.errorProof)try{p=q[o].call(this,h,g,b,c)}catch(n){}else p=q[o].call(this,h,g,b,c);p===false?i=1:typeof p!="undefined"&&(g=p);if(a||i)break}}g=i?false:typeof g=="undefined"?true:g;a=d;i=m;return g}}(),fireOnce:function(a,b,i){b=
|
||||
this.fire(a,b,i);delete f(this)[a];return b},removeListener:function(a,b){var i=f(this)[a];if(i){var c=i.getListenerIndex(b);c>=0&&i.listeners.splice(c,1)}},removeAllListeners:function(){var a=f(this),b;for(b in a)delete a[b]},hasListeners:function(a){return(a=f(this)[a])&&a.listeners.length>0}}}()),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(a,f){a in{instanceReady:1,loaded:1}&&(this[a]=
|
||||
true);return CKEDITOR.event.prototype.fire.call(this,a,f,this)},CKEDITOR.editor.prototype.fireOnce=function(a,f){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fireOnce.call(this,a,f,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)),CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),f={ie:a.indexOf("trident/")>-1,webkit:a.indexOf(" applewebkit/")>-1,air:a.indexOf(" adobeair/")>-1,mac:a.indexOf("macintosh")>-1,quirks:document.compatMode==
|
||||
"BackCompat"&&(!document.documentMode||document.documentMode<10),mobile:a.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return false;var b=document.domain,a=window.location.hostname;return b!=a&&b!="["+a+"]"},secure:location.protocol=="https:"};f.gecko=navigator.product=="Gecko"&&!f.webkit&&!f.ie;if(f.webkit)a.indexOf("chrome")>-1?f.chrome=true:f.safari=true;var c=0;if(f.ie){c=f.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode;
|
||||
f.ie9Compat=c==9;f.ie8Compat=c==8;f.ie7Compat=c==7;f.ie6Compat=c<7||f.quirks}if(f.gecko){var e=a.match(/rv:([\d\.]+)/);if(e){e=e[1].split(".");c=e[0]*1E4+(e[1]||0)*100+(e[2]||0)*1}}f.air&&(c=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));f.webkit&&(c=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));f.version=c;f.isCompatible=f.iOS&&c>=534||!f.mobile&&(f.ie&&c>6||f.gecko&&c>=2E4||f.air&&c>=1||f.webkit&&c>=522||false);f.hidpi=window.devicePixelRatio>=2;f.needsBrFiller=f.gecko||f.webkit||f.ie&&c>10;f.needsNbspFiller=
|
||||
f.ie&&c<11;f.cssClass="cke_browser_"+(f.ie?"ie":f.gecko?"gecko":f.webkit?"webkit":"unknown");if(f.quirks)f.cssClass=f.cssClass+" cke_browser_quirks";if(f.ie)f.cssClass=f.cssClass+(" cke_browser_ie"+(f.quirks?"6 cke_browser_iequirks":f.version));if(f.air)f.cssClass=f.cssClass+" cke_browser_air";if(f.iOS)f.cssClass=f.cssClass+" cke_browser_ios";if(f.hidpi)f.cssClass=f.cssClass+" cke_hidpi";return f}()),"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=
|
||||
function(){if(CKEDITOR.status!="basic_ready")CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a=CKEDITOR.loadFullCore,f=CKEDITOR.loadFullCoreTimeout;if(a){CKEDITOR.status="basic_ready";
|
||||
a&&a._load?a():f&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},f*1E3)}})})();CKEDITOR.status="basic_loaded"}(),CKEDITOR.dom={},function(){var a=[],f=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",c=/&/g,e=/>/g,b=/</g,i=/"/g,j=/&/g,d=/>/g,g=/</g,h=/"/g;CKEDITOR.on("reset",function(){a=[]});CKEDITOR.tools={arrayCompare:function(b,a){if(!b&&!a)return true;if(!b||!a||b.length!=a.length)return false;for(var i=0;i<b.length;i++)if(b[i]!=
|
||||
a[i])return false;return true},clone:function(b){var a;if(b&&b instanceof Array){a=[];for(var i=0;i<b.length;i++)a[i]=CKEDITOR.tools.clone(b[i]);return a}if(b===null||typeof b!="object"||b instanceof String||b instanceof Number||b instanceof Boolean||b instanceof Date||b instanceof RegExp||b.nodeType||b.window===b)return b;a=new b.constructor;for(i in b)a[i]=CKEDITOR.tools.clone(b[i]);return a},capitalize:function(b,a){return b.charAt(0).toUpperCase()+(a?b.slice(1):b.slice(1).toLowerCase())},extend:function(b){var a=
|
||||
arguments.length,i,d;if(typeof(i=arguments[a-1])=="boolean")a--;else if(typeof(i=arguments[a-2])=="boolean"){d=arguments[a-1];a=a-2}for(var c=1;c<a;c++){var e=arguments[c],l;for(l in e)if(i===true||b[l]==null)if(!d||l in d)b[l]=e[l]}return b},prototypedCopy:function(b){var a=function(){};a.prototype=b;return new a},copy:function(b){var a={},i;for(i in b)a[i]=b[i];return a},isArray:function(b){return Object.prototype.toString.call(b)=="[object Array]"},isEmpty:function(b){for(var a in b)if(b.hasOwnProperty(a))return false;
|
||||
return true},cssVendorPrefix:function(b,a,i){if(i)return f+b+":"+a+";"+b+":"+a;i={};i[b]=a;i[f+b]=a;return i},cssStyleToDomStyle:function(){var b=document.createElement("div").style,a=typeof b.cssFloat!="undefined"?"cssFloat":typeof b.styleFloat!="undefined"?"styleFloat":"float";return function(b){return b=="float"?a:b.replace(/-./g,function(b){return b.substr(1).toUpperCase()})}}(),buildStyleHtml:function(b){for(var b=[].concat(b),a,i=[],d=0;d<b.length;d++)if(a=b[d])/@import|[{}]/.test(a)?i.push("<style>"+
|
||||
a+"</style>"):i.push('<link type="text/css" rel=stylesheet href="'+a+'">');return i.join("")},htmlEncode:function(k){return(""+k).replace(c,"&").replace(e,">").replace(b,"<")},htmlDecode:function(b){return b.replace(j,"&").replace(d,">").replace(g,"<")},htmlEncodeAttr:function(k){return k.replace(i,""").replace(b,"<").replace(e,">")},htmlDecodeAttr:function(b){return b.replace(h,'"').replace(g,"<").replace(d,">")},getNextNumber:function(){var b=0;return function(){return++b}}(),
|
||||
getNextId:function(){return"cke_"+this.getNextNumber()},override:function(b,a){var i=a(b);i.prototype=b.prototype;return i},setTimeout:function(b,a,i,d,c){c||(c=window);i||(i=c);return c.setTimeout(function(){d?b.apply(i,[].concat(d)):b.apply(i)},a||0)},trim:function(){var b=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(a){return a.replace(b,"")}}(),ltrim:function(){var b=/^[ \t\n\r]+/g;return function(a){return a.replace(b,"")}}(),rtrim:function(){var b=/[ \t\n\r]+$/g;return function(a){return a.replace(b,
|
||||
"")}}(),indexOf:function(b,a){if(typeof a=="function")for(var i=0,d=b.length;i<d;i++){if(a(b[i]))return i}else{if(b.indexOf)return b.indexOf(a);i=0;for(d=b.length;i<d;i++)if(b[i]===a)return i}return-1},search:function(b,a){var i=CKEDITOR.tools.indexOf(b,a);return i>=0?b[i]:null},bind:function(b,a){return function(){return b.apply(a,arguments)}},createClass:function(b){var a=b.$,i=b.base,d=b.privates||b._,c=b.proto,b=b.statics;!a&&(a=function(){i&&this.base.apply(this,arguments)});if(d)var e=a,a=function(){var b=
|
||||
this._||(this._={}),a;for(a in d){var k=d[a];b[a]=typeof k=="function"?CKEDITOR.tools.bind(k,this):k}e.apply(this,arguments)};if(i){a.prototype=this.prototypedCopy(i.prototype);a.prototype.constructor=a;a.base=i;a.baseProto=i.prototype;a.prototype.base=function(){this.base=i.prototype.base;i.apply(this,arguments);this.base=arguments.callee}}c&&this.extend(a.prototype,c,true);b&&this.extend(a,b,true);return a},addFunction:function(b,i){return a.push(function(){return b.apply(i||this,arguments)})-1},
|
||||
removeFunction:function(b){a[b]=null},callFunction:function(b){var i=a[b];return i&&i.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var b=/^-?\d+\.?\d*px$/,a;return function(i){a=CKEDITOR.tools.trim(i+"")+"px";return b.test(a)?a:i||""}}(),convertToPx:function(){var b;return function(a){if(!b){b=CKEDITOR.dom.element.createFromHtml('<div style="position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"></div>',CKEDITOR.document);CKEDITOR.document.getBody().append(b)}if(!/%$/.test(a)){b.setStyle("width",
|
||||
a);return b.$.clientWidth}return a}}(),repeat:function(b,a){return Array(a+1).join(b)},tryThese:function(){for(var b,a=0,i=arguments.length;a<i;a++){var d=arguments[a];try{b=d();break}catch(c){}}return b},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(b){return function(){var a=arguments,i=this;window.setTimeout(function(){b.apply(i,a)},0)}},normalizeCssText:function(b,a){var i=[],d,c=CKEDITOR.tools.parseCssText(b,true,a);for(d in c)i.push(d+":"+c[d]);i.sort();
|
||||
return i.length?i.join(";")+";":""},convertRgbToHex:function(b){return b.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(b,a,k,i){b=[a,k,i];for(a=0;a<3;a++)b[a]=("0"+parseInt(b[a],10).toString(16)).slice(-2);return"#"+b.join("")})},parseCssText:function(b,a,i){var d={};if(i){i=new CKEDITOR.dom.element("span");i.setAttribute("style",b);b=CKEDITOR.tools.convertRgbToHex(i.getAttribute("style")||"")}if(!b||b==";")return d;b.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,
|
||||
function(b,i,k){if(a){i=i.toLowerCase();i=="font-family"&&(k=k.toLowerCase().replace(/["']/g,"").replace(/\s*,\s*/g,","));k=CKEDITOR.tools.trim(k)}d[i]=k});return d},writeCssText:function(b,a){var i,d=[];for(i in b)d.push(i+":"+b[i]);a&&d.sort();return d.join("; ")},objectCompare:function(b,a,i){var d;if(!b&&!a)return true;if(!b||!a)return false;for(d in b)if(b[d]!=a[d])return false;if(!i)for(d in a)if(b[d]!=a[d])return false;return true},objectKeys:function(b){var a=[],i;for(i in b)a.push(i);return a},
|
||||
convertArrayToObject:function(b,a){var i={};arguments.length==1&&(a=true);for(var d=0,c=b.length;d<c;++d)i[b[d]]=a;return i},fixDomain:function(){for(var b;;)try{b=window.parent.document.domain;break}catch(a){b=b?b.replace(/.+?(?:\.|$)/,""):document.domain;if(!b)break;document.domain=b}return!!b},eventsBuffer:function(b,a){function i(){c=(new Date).getTime();d=false;a()}var d,c=0;return{input:function(){if(!d){var a=(new Date).getTime()-c;a<b?d=setTimeout(i,b-a):i()}},reset:function(){d&&clearTimeout(d);
|
||||
d=c=0}}},enableHtml5Elements:function(b,a){for(var i=["abbr","article","aside","audio","bdi","canvas","data","datalist","details","figcaption","figure","footer","header","hgroup","mark","meter","nav","output","progress","section","summary","time","video"],d=i.length,c;d--;){c=b.createElement(i[d]);a&&b.appendChild(c)}},checkIfAnyArrayItemMatches:function(b,a){for(var i=0,d=b.length;i<d;++i)if(b[i].match(a))return true;return false},checkIfAnyObjectPropertyMatches:function(b,a){for(var i in b)if(i.match(a))return true;
|
||||
return false},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw=="}}(),CKEDITOR.dtd=function(){var a=CKEDITOR.tools.extend,f=function(b,a){for(var i=CKEDITOR.tools.clone(b),d=1;d<arguments.length;d++){var a=arguments[d],c;for(c in a)delete i[c]}return i},c={},e={},b={address:1,article:1,aside:1,blockquote:1,details:1,div:1,dl:1,fieldset:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,main:1,menu:1,nav:1,ol:1,p:1,
|
||||
pre:1,section:1,table:1,ul:1},i={command:1,link:1,meta:1,noscript:1,script:1,style:1},j={},d={"#":1},g={center:1,dir:1,noframes:1};a(c,{a:1,abbr:1,area:1,audio:1,b:1,bdi:1,bdo:1,br:1,button:1,canvas:1,cite:1,code:1,command:1,datalist:1,del:1,dfn:1,em:1,embed:1,i:1,iframe:1,img:1,input:1,ins:1,kbd:1,keygen:1,label:1,map:1,mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,"var":1,video:1,wbr:1},d,
|
||||
{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});a(e,b,c,g);f={a:f(c,{a:1,button:1}),abbr:c,address:e,area:j,article:e,aside:e,audio:a({source:1,track:1},e),b:c,base:j,bdi:c,bdo:c,blockquote:e,body:e,br:j,button:f(c,{a:1,button:1}),canvas:c,caption:e,cite:c,code:c,col:j,colgroup:{col:1},command:j,datalist:a({option:1},c),dd:e,del:c,details:a({summary:1},e),dfn:c,div:e,dl:{dt:1,dd:1},dt:e,em:c,embed:j,fieldset:a({legend:1},e),figcaption:e,figure:a({figcaption:1},e),footer:e,
|
||||
form:e,h1:c,h2:c,h3:c,h4:c,h5:c,h6:c,head:a({title:1,base:1},i),header:e,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:j,html:a({head:1,body:1},e,i),i:c,iframe:d,img:j,input:j,ins:c,kbd:c,keygen:j,label:c,legend:c,li:e,link:j,main:e,map:e,mark:c,menu:a({li:1},e),meta:j,meter:f(c,{meter:1}),nav:e,noscript:a({link:1,meta:1,style:1},c),object:a({param:1},c),ol:{li:1},optgroup:{option:1},option:d,output:c,p:c,param:j,pre:c,progress:f(c,{progress:1}),q:c,rp:c,rt:c,ruby:a({rp:1,rt:1},c),s:c,samp:c,script:d,
|
||||
section:e,select:{optgroup:1,option:1},small:c,source:j,span:c,strong:c,style:d,sub:c,summary:c,sup:c,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:e,textarea:d,tfoot:{tr:1},th:e,thead:{tr:1},time:f(c,{time:1}),title:d,tr:{th:1,td:1},track:j,u:c,ul:{li:1},"var":c,video:a({source:1,track:1},e),wbr:j,acronym:c,applet:a({param:1},e),basefont:j,big:c,center:e,dialog:j,dir:{li:1},font:c,isindex:j,noframes:e,strike:c,tt:c};a(f,{$block:a({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},
|
||||
b,g),$blockLimit:{article:1,aside:1,audio:1,body:1,caption:1,details:1,dir:1,div:1,dl:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup:1,main:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1},$cdata:{script:1,style:1},$editable:{address:1,article:1,aside:1,blockquote:1,body:1,details:1,div:1,fieldset:1,figcaption:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,main:1,nav:1,p:1,pre:1,section:1},$empty:{area:1,base:1,basefont:1,br:1,col:1,command:1,
|
||||
dialog:1,embed:1,hr:1,img:1,input:1,isindex:1,keygen:1,link:1,meta:1,param:1,source:1,track:1,wbr:1},$inline:c,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:a({body:1,head:1,html:1},f.head),$nonEditable:{applet:1,audio:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,param:1,script:1,textarea:1,video:1},$object:{applet:1,audio:1,button:1,hr:1,iframe:1,img:1,input:1,object:1,select:1,table:1,textarea:1,video:1},$removeEmpty:{abbr:1,acronym:1,b:1,bdi:1,bdo:1,big:1,cite:1,code:1,
|
||||
del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,mark:1,meter:1,output:1,q:1,ruby:1,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,"var":1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},$transparent:{a:1,audio:1,canvas:1,del:1,ins:1,map:1,noscript:1,object:1,video:1},$intermediate:{caption:1,colgroup:1,dd:1,dt:1,figcaption:1,legend:1,li:1,optgroup:1,option:1,rp:1,rt:1,summary:1,
|
||||
tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1}});return f}(),CKEDITOR.dom.event=function(a){this.$=a},CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var a=this.getKey();if(this.$.ctrlKey||this.$.metaKey)a=a+CKEDITOR.CTRL;this.$.shiftKey&&(a=a+CKEDITOR.SHIFT);this.$.altKey&&(a=a+CKEDITOR.ALT);return a},preventDefault:function(a){var f=this.$;f.preventDefault?f.preventDefault():f.returnValue=false;a&&this.stopPropagation()},stopPropagation:function(){var a=
|
||||
this.$;a.stopPropagation?a.stopPropagation():a.cancelBubble=true},getTarget:function(){var a=this.$.target||this.$.srcElement;return a?new CKEDITOR.dom.node(a):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var a=this.getTarget().getDocument().$;return{x:this.$.pageX||this.$.clientX+(a.documentElement.scrollLeft||a.body.scrollLeft),y:this.$.pageY||this.$.clientY+(a.documentElement.scrollTop||a.body.scrollTop)}}},CKEDITOR.CTRL=1114112,CKEDITOR.SHIFT=2228224,CKEDITOR.ALT=
|
||||
4456448,CKEDITOR.EVENT_PHASE_CAPTURING=1,CKEDITOR.EVENT_PHASE_AT_TARGET=2,CKEDITOR.EVENT_PHASE_BUBBLING=3,CKEDITOR.dom.domObject=function(a){if(a)this.$=a},CKEDITOR.dom.domObject.prototype=function(){var a=function(a,c){return function(e){typeof CKEDITOR!="undefined"&&a.fire(c,new CKEDITOR.dom.event(e))}};return{getPrivate:function(){var a;if(!(a=this.getCustomData("_")))this.setCustomData("_",a={});return a},on:function(f){var c=this.getCustomData("_cke_nativeListeners");if(!c){c={};this.setCustomData("_cke_nativeListeners",
|
||||
c)}if(!c[f]){c=c[f]=a(this,f);this.$.addEventListener?this.$.addEventListener(f,c,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+f,c)}return CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(a){CKEDITOR.event.prototype.removeListener.apply(this,arguments);if(!this.hasListeners(a)){var c=this.getCustomData("_cke_nativeListeners"),e=c&&c[a];if(e){this.$.removeEventListener?this.$.removeEventListener(a,e,false):this.$.detachEvent&&this.$.detachEvent("on"+
|
||||
a,e);delete c[a]}}},removeAllListeners:function(){var a=this.getCustomData("_cke_nativeListeners"),c;for(c in a){var e=a[c];this.$.detachEvent?this.$.detachEvent("on"+c,e):this.$.removeEventListener&&this.$.removeEventListener(c,e,false);delete a[c]}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}(),function(a){var f={};CKEDITOR.on("reset",function(){f={}});a.equals=function(a){try{return a&&a.$===this.$}catch(e){return false}};a.setCustomData=function(a,e){var b=this.getUniqueId();(f[b]||
|
||||
(f[b]={}))[a]=e;return this};a.getCustomData=function(a){var e=this.$["data-cke-expando"];return(e=e&&f[e])&&a in e?e[a]:null};a.removeCustomData=function(a){var e=this.$["data-cke-expando"],e=e&&f[e],b,i;if(e){b=e[a];i=a in e;delete e[a]}return i?b:null};a.clearCustomData=function(){this.removeAllListeners();var a=this.$["data-cke-expando"];a&&delete f[a]};a.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.event.implementOn(a)}(CKEDITOR.dom.domObject.prototype),
|
||||
CKEDITOR.dom.node=function(a){return a?new CKEDITOR.dom[a.nodeType==CKEDITOR.NODE_DOCUMENT?"document":a.nodeType==CKEDITOR.NODE_ELEMENT?"element":a.nodeType==CKEDITOR.NODE_TEXT?"text":a.nodeType==CKEDITOR.NODE_COMMENT?"comment":a.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](a):this},CKEDITOR.dom.node.prototype=new CKEDITOR.dom.domObject,CKEDITOR.NODE_ELEMENT=1,CKEDITOR.NODE_DOCUMENT=9,CKEDITOR.NODE_TEXT=3,CKEDITOR.NODE_COMMENT=8,CKEDITOR.NODE_DOCUMENT_FRAGMENT=11,CKEDITOR.POSITION_IDENTICAL=
|
||||
0,CKEDITOR.POSITION_DISCONNECTED=1,CKEDITOR.POSITION_FOLLOWING=2,CKEDITOR.POSITION_PRECEDING=4,CKEDITOR.POSITION_IS_CONTAINED=8,CKEDITOR.POSITION_CONTAINS=16,CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(a,f){a.append(this,f);return a},clone:function(a,f){var c=this.$.cloneNode(a),e=function(b){b["data-cke-expando"]&&(b["data-cke-expando"]=false);if(b.nodeType==CKEDITOR.NODE_ELEMENT){f||b.removeAttribute("id",false);if(a)for(var b=b.childNodes,i=0;i<b.length;i++)e(b[i])}};e(c);
|
||||
return new CKEDITOR.dom.node(c)},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(a){a.$.parentNode.insertBefore(this.$,a.$.nextSibling);return a},insertBefore:function(a){a.$.parentNode.insertBefore(this.$,a.$);return a},insertBeforeMe:function(a){this.$.parentNode.insertBefore(a.$,this.$);return a},getAddress:function(a){for(var f=[],c=this.getDocument().$.documentElement,e=this.$;e&&e!=c;){var b=e.parentNode;b&&f.unshift(this.getIndex.call({$:e},
|
||||
a));e=b}return f},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(a){function f(b,a){var d=a?b.nextSibling:b.previousSibling;return!d||d.nodeType!=CKEDITOR.NODE_TEXT?null:d.nodeValue?d:f(d,a)}var c=this.$,e=-1,b;if(!this.$.parentNode||a&&c.nodeType==CKEDITOR.NODE_TEXT&&!c.nodeValue&&!f(c)&&!f(c,true))return-1;do if(!a||!(c!=this.$&&c.nodeType==CKEDITOR.NODE_TEXT&&(b||!c.nodeValue))){e++;b=c.nodeType==CKEDITOR.NODE_TEXT}while(c=
|
||||
c.previousSibling);return e},getNextSourceNode:function(a,f,c){if(c&&!c.call)var e=c,c=function(b){return!b.equals(e)};var a=!a&&this.getFirst&&this.getFirst(),b;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&c&&c(this,true)===false)return null;a=this.getNext()}for(;!a&&(b=(b||this).getParent());){if(c&&c(b,true)===false)return null;a=b.getNext()}return!a||c&&c(a)===false?null:f&&f!=a.type?a.getNextSourceNode(false,f,c):a},getPreviousSourceNode:function(a,f,c){if(c&&!c.call)var e=c,c=function(b){return!b.equals(e)};
|
||||
var a=!a&&this.getLast&&this.getLast(),b;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&c&&c(this,true)===false)return null;a=this.getPrevious()}for(;!a&&(b=(b||this).getParent());){if(c&&c(b,true)===false)return null;a=b.getPrevious()}return!a||c&&c(a)===false?null:f&&a.type!=f?a.getPreviousSourceNode(false,f,c):a},getPrevious:function(a){var f=this.$,c;do c=(f=f.previousSibling)&&f.nodeType!=10&&new CKEDITOR.dom.node(f);while(c&&a&&!a(c));return c},getNext:function(a){var f=this.$,c;do c=(f=f.nextSibling)&&
|
||||
new CKEDITOR.dom.node(f);while(c&&a&&!a(c));return c},getParent:function(a){var f=this.$.parentNode;return f&&(f.nodeType==CKEDITOR.NODE_ELEMENT||a&&f.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(f):null},getParents:function(a){var f=this,c=[];do c[a?"push":"unshift"](f);while(f=f.getParent());return c},getCommonAncestor:function(a){if(a.equals(this))return this;if(a.contains&&a.contains(this))return a;var f=this.contains?this:this.getParent();do if(f.contains(a))return f;while(f=
|
||||
f.getParent());return null},getPosition:function(a){var f=this.$,c=a.$;if(f.compareDocumentPosition)return f.compareDocumentPosition(c);if(f==c)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&a.type==CKEDITOR.NODE_ELEMENT){if(f.contains){if(f.contains(c))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(c.contains(f))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in f)return f.sourceIndex<0||c.sourceIndex<0?CKEDITOR.POSITION_DISCONNECTED:
|
||||
f.sourceIndex<c.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}for(var f=this.getAddress(),a=a.getAddress(),c=Math.min(f.length,a.length),e=0;e<=c-1;e++)if(f[e]!=a[e]){if(e<c)return f[e]<a[e]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;break}return f.length<a.length?CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(a,f){var c=this.$,e,b;if(!f)c=c.parentNode;if(typeof a=="function"){b=
|
||||
true;e=a}else{b=false;e=function(b){b=typeof b.nodeName=="string"?b.nodeName.toLowerCase():"";return typeof a=="string"?b==a:b in a}}for(;c;){if(e(b?new CKEDITOR.dom.node(c):c))return new CKEDITOR.dom.node(c);try{c=c.parentNode}catch(i){c=null}}return null},hasAscendant:function(a,f){var c=this.$;if(!f)c=c.parentNode;for(;c;){if(c.nodeName&&c.nodeName.toLowerCase()==a)return true;c=c.parentNode}return false},move:function(a,f){a.append(this.remove(),f)},remove:function(a){var f=this.$,c=f.parentNode;
|
||||
if(c){if(a)for(;a=f.firstChild;)c.insertBefore(f.removeChild(a),f);c.removeChild(f)}return this},replace:function(a){this.insertBefore(a);a.remove()},trim:function(){this.ltrim();this.rtrim()},ltrim:function(){for(var a;this.getFirst&&(a=this.getFirst());){if(a.type==CKEDITOR.NODE_TEXT){var f=CKEDITOR.tools.ltrim(a.getText()),c=a.getLength();if(f){if(f.length<c){a.split(c-f.length);this.$.removeChild(this.$.firstChild)}}else{a.remove();continue}}break}},rtrim:function(){for(var a;this.getLast&&(a=
|
||||
this.getLast());){if(a.type==CKEDITOR.NODE_TEXT){var f=CKEDITOR.tools.rtrim(a.getText()),c=a.getLength();if(f){if(f.length<c){a.split(f.length);this.$.lastChild.parentNode.removeChild(this.$.lastChild)}}else{a.remove();continue}}break}if(CKEDITOR.env.needsBrFiller)(a=this.$.lastChild)&&(a.type==1&&a.nodeName.toLowerCase()=="br")&&a.parentNode.removeChild(a)},isReadOnly:function(){var a=this;this.type!=CKEDITOR.NODE_ELEMENT&&(a=this.getParent());if(a&&typeof a.$.isContentEditable!="undefined")return!(a.$.isContentEditable||
|
||||
a.data("cke-editable"));for(;a;){if(a.data("cke-editable"))break;if(a.getAttribute("contentEditable")=="false")return true;if(a.getAttribute("contentEditable")=="true")break;a=a.getParent()}return!a}}),CKEDITOR.dom.window=function(a){CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var a=this.$.document,f=a.compatMode=="CSS1Compat";return{width:(f?
|
||||
a.documentElement.clientWidth:a.body.clientWidth)||0,height:(f?a.documentElement.clientHeight:a.body.clientHeight)||0}},getScrollPosition:function(){var a=this.$;if("pageXOffset"in a)return{x:a.pageXOffset||0,y:a.pageYOffset||0};a=a.document;return{x:a.documentElement.scrollLeft||a.body.scrollLeft||0,y:a.documentElement.scrollTop||a.body.scrollTop||0}},getFrame:function(){var a=this.$.frameElement;return a?new CKEDITOR.dom.element.get(a):null}}),CKEDITOR.dom.document=function(a){CKEDITOR.dom.domObject.call(this,
|
||||
a)},CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(a){if(this.$.createStyleSheet)this.$.createStyleSheet(a);else{var f=new CKEDITOR.dom.element("link");f.setAttributes({rel:"stylesheet",type:"text/css",href:a});this.getHead().append(f)}},appendStyleText:function(a){if(this.$.createStyleSheet){var f=this.$.createStyleSheet("");f.cssText=a}else{var c=new CKEDITOR.dom.element("style",
|
||||
this);c.append(new CKEDITOR.dom.text(a,this));this.getHead().append(c)}return f||c.$.sheet},createElement:function(a,f){var c=new CKEDITOR.dom.element(a,this);if(f){f.attributes&&c.setAttributes(f.attributes);f.styles&&c.setStyles(f.styles)}return c},createText:function(a){return new CKEDITOR.dom.text(a,this)},focus:function(){this.getWindow().focus()},getActive:function(){var a;try{a=this.$.activeElement}catch(f){return null}return new CKEDITOR.dom.element(a)},getById:function(a){return(a=this.$.getElementById(a))?
|
||||
new CKEDITOR.dom.element(a):null},getByAddress:function(a,f){for(var c=this.$.documentElement,e=0;c&&e<a.length;e++){var b=a[e];if(f)for(var i=-1,j=0;j<c.childNodes.length;j++){var d=c.childNodes[j];if(!(f===true&&d.nodeType==3&&d.previousSibling&&d.previousSibling.nodeType==3)){i++;if(i==b){c=d;break}}}else c=c.childNodes[b]}return c?new CKEDITOR.dom.node(c):null},getElementsByTag:function(a,f){!(CKEDITOR.env.ie&&document.documentMode<=8)&&f&&(a=f+":"+a);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},
|
||||
getHead:function(){var a=this.$.getElementsByTagName("head")[0];return a=a?new CKEDITOR.dom.element(a):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),true)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(a){this.$.open("text/html","replace");CKEDITOR.env.ie&&(a=a.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i,
|
||||
'$&\n<script data-cke-temp="1">('+CKEDITOR.tools.fixDomain+")();<\/script>"));this.$.write(a);this.$.close()},find:function(a){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(a))},findOne:function(a){return(a=this.$.querySelector(a))?new CKEDITOR.dom.element(a):null},_getHtml5ShivFrag:function(){var a=this.getCustomData("html5ShivFrag");if(!a){a=this.$.createDocumentFragment();CKEDITOR.tools.enableHtml5Elements(a,true);this.setCustomData("html5ShivFrag",a)}return a}}),CKEDITOR.dom.nodeList=
|
||||
function(a){this.$=a},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(a){if(a<0||a>=this.$.length)return null;return(a=this.$[a])?new CKEDITOR.dom.node(a):null}},CKEDITOR.dom.element=function(a,f){typeof a=="string"&&(a=(f?f.$:document).createElement(a));CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.element.get=function(a){return(a=typeof a=="string"?document.getElementById(a)||document.getElementsByName(a)[0]:a)&&(a.$?a:new CKEDITOR.dom.element(a))},CKEDITOR.dom.element.prototype=
|
||||
new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(a,f){var c=new CKEDITOR.dom.element("div",f);c.setHtml(a);return c.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(a,f,c,e){var b=f.getCustomData("list_marker_id")||f.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),i=f.getCustomData("list_marker_names")||f.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[b]=f;i[c]=1;return f.setCustomData(c,e)},CKEDITOR.dom.element.clearAllMarkers=
|
||||
function(a){for(var f in a)CKEDITOR.dom.element.clearMarkers(a,a[f],1)},CKEDITOR.dom.element.clearMarkers=function(a,f,c){var e=f.getCustomData("list_marker_names"),b=f.getCustomData("list_marker_id"),i;for(i in e)f.removeCustomData(i);f.removeCustomData("list_marker_names");if(c){f.removeCustomData("list_marker_id");delete a[b]}},function(){function a(b){var a=true;if(!b.$.id){b.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber();a=false}return function(){a||b.removeAttribute("id")}}function f(b,a){return"#"+
|
||||
b.$.id+" "+a.split(/,\s*/).join(", #"+b.$.id+" ")}function c(b){for(var a=0,c=0,d=e[b].length;c<d;c++)a=a+(parseInt(this.getComputedStyle(e[b][c])||0,10)||0);return a}CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:function(b){var a=this.$.className;a&&(RegExp("(?:^|\\s)"+b+"(?:\\s|$)","").test(a)||(a=a+(" "+b)));this.$.className=a||b;return this},removeClass:function(b){var a=this.getAttribute("class");if(a){b=RegExp("(?:^|\\s+)"+b+"(?=\\s|$)","i");if(b.test(a))(a=
|
||||
a.replace(b,"").replace(/^\s+/,""))?this.setAttribute("class",a):this.removeAttribute("class")}return this},hasClass:function(b){return RegExp("(?:^|\\s+)"+b+"(?=\\s|$)","").test(this.getAttribute("class"))},append:function(b,a){typeof b=="string"&&(b=this.getDocument().createElement(b));a?this.$.insertBefore(b.$,this.$.firstChild):this.$.appendChild(b.$);return b},appendHtml:function(b){if(this.$.childNodes.length){var a=new CKEDITOR.dom.element("div",this.getDocument());a.setHtml(b);a.moveChildren(this)}else this.setHtml(b)},
|
||||
appendText:function(b){this.$.text!=null?this.$.text=this.$.text+b:this.append(new CKEDITOR.dom.text(b))},appendBogus:function(b){if(b||CKEDITOR.env.needsBrFiller){for(b=this.getLast();b&&b.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(b.getText());)b=b.getPrevious();if(!b||!b.is||!b.is("br")){b=this.getDocument().createElement("br");CKEDITOR.env.gecko&&b.setAttribute("type","_moz");this.append(b)}}},breakParent:function(b){var a=new CKEDITOR.dom.range(this.getDocument());a.setStartAfter(this);
|
||||
a.setEndAfter(b);b=a.extractContents();a.insertNode(this.remove());b.insertAfterNode(this)},contains:CKEDITOR.env.ie||CKEDITOR.env.webkit?function(b){var a=this.$;return b.type!=CKEDITOR.NODE_ELEMENT?a.contains(b.getParent().$):a!=b.$&&a.contains(b.$)}:function(b){return!!(this.$.compareDocumentPosition(b.$)&16)},focus:function(){function b(){try{this.$.focus()}catch(b){}}return function(a){a?CKEDITOR.tools.setTimeout(b,100,this):b.call(this)}}(),getHtml:function(){var b=this.$.innerHTML;return CKEDITOR.env.ie?
|
||||
b.replace(/<\?[^>]*>/g,""):b},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var b=this.$.ownerDocument.createElement("div");b.appendChild(this.$.cloneNode(true));return b.innerHTML},getClientRect:function(){var b=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!b.width&&(b.width=b.right-b.left);!b.height&&(b.height=b.bottom-b.top);return b},setHtml:CKEDITOR.env.ie&&CKEDITOR.env.version<9?function(b){try{var a=this.$;if(this.getParent())return a.innerHTML=
|
||||
b;var c=this.getDocument()._getHtml5ShivFrag();c.appendChild(a);a.innerHTML=b;c.removeChild(a);return b}catch(d){this.$.innerHTML="";a=new CKEDITOR.dom.element("body",this.getDocument());a.$.innerHTML=b;for(a=a.getChildren();a.count();)this.append(a.getItem(0));return b}}:function(b){return this.$.innerHTML=b},setText:function(){var b=document.createElement("p");b.innerHTML="x";b=b.textContent;return function(a){this.$[b?"textContent":"innerText"]=a}}(),getAttribute:function(){var b=function(b){return this.$.getAttribute(b,
|
||||
2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b){switch(b){case "class":b="className";break;case "http-equiv":b="httpEquiv";break;case "name":return this.$.name;case "tabindex":b=this.$.getAttribute(b,2);b!==0&&this.$.tabIndex===0&&(b=null);return b;case "checked":b=this.$.attributes.getNamedItem(b);return(b.specified?b.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[b];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?
|
||||
this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(b,2)}:b}(),getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getComputedStyle:CKEDITOR.env.ie?function(b){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(b)]}:function(b){var a=this.getWindow().$.getComputedStyle(this.$,null);return a?a.getPropertyValue(b):""},getDtd:function(){var b=CKEDITOR.dtd[this.getName()];this.getDtd=function(){return b};return b},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,
|
||||
getTabIndex:CKEDITOR.env.ie?function(){var b=this.$.tabIndex;b===0&&(!CKEDITOR.dtd.$tabIndex[this.getName()]&&parseInt(this.getAttribute("tabindex"),10)!==0)&&(b=-1);return b}:CKEDITOR.env.webkit?function(){var b=this.$.tabIndex;if(b===void 0){b=parseInt(this.getAttribute("tabindex"),10);isNaN(b)&&(b=-1)}return b}:function(){return this.$.tabIndex},getText:function(){return this.$.textContent||this.$.innerText||""},getWindow:function(){return this.getDocument().getWindow()},getId:function(){return this.$.id||
|
||||
null},getNameAtt:function(){return this.$.name||null},getName:function(){var b=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&document.documentMode<=8){var a=this.$.scopeName;a!="HTML"&&(b=a.toLowerCase()+":"+b)}this.getName=function(){return b};return this.getName()},getValue:function(){return this.$.value},getFirst:function(b){var a=this.$.firstChild;(a=a&&new CKEDITOR.dom.node(a))&&(b&&!b(a))&&(a=a.getNext(b));return a},getLast:function(b){var a=this.$.lastChild;(a=a&&new CKEDITOR.dom.node(a))&&
|
||||
(b&&!b(a))&&(a=a.getPrevious(b));return a},getStyle:function(b){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(b)]},is:function(){var b=this.getName();if(typeof arguments[0]=="object")return!!arguments[0][b];for(var a=0;a<arguments.length;a++)if(arguments[a]==b)return true;return false},isEditable:function(b){var a=this.getName();if(this.isReadOnly()||this.getComputedStyle("display")=="none"||this.getComputedStyle("visibility")=="hidden"||CKEDITOR.dtd.$nonEditable[a]||CKEDITOR.dtd.$empty[a]||
|
||||
this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount())return false;if(b!==false){b=CKEDITOR.dtd[a]||CKEDITOR.dtd.span;return!(!b||!b["#"])}return true},isIdentical:function(b){var a=this.clone(0,1),b=b.clone(0,1);a.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);b.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);if(a.$.isEqualNode){a.$.style.cssText=CKEDITOR.tools.normalizeCssText(a.$.style.cssText);
|
||||
b.$.style.cssText=CKEDITOR.tools.normalizeCssText(b.$.style.cssText);return a.$.isEqualNode(b.$)}a=a.getOuterHtml();b=b.getOuterHtml();if(CKEDITOR.env.ie&&CKEDITOR.env.version<9&&this.is("a")){var c=this.getParent();if(c.type==CKEDITOR.NODE_ELEMENT){c=c.clone();c.setHtml(a);a=c.getHtml();c.setHtml(b);b=c.getHtml()}}return a==b},isVisible:function(){var b=(this.$.offsetHeight||this.$.offsetWidth)&&this.getComputedStyle("visibility")!="hidden",a,c;if(b&&CKEDITOR.env.webkit){a=this.getWindow();if(!a.equals(CKEDITOR.document.getWindow())&&
|
||||
(c=a.$.frameElement))b=(new CKEDITOR.dom.element(c)).isVisible()}return!!b},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return false;for(var b=this.getChildren(),a=0,c=b.count();a<c;a++){var d=b.getItem(a);if(!(d.type==CKEDITOR.NODE_ELEMENT&&d.data("cke-bookmark"))&&(d.type==CKEDITOR.NODE_ELEMENT&&!d.isEmptyInlineRemoveable()||d.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(d.getText())))return false}return true},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||
|
||||
CKEDITOR.env.quirks)?function(){for(var b=this.$.attributes,a=0;a<b.length;a++){var c=b[a];switch(c.nodeName){case "class":if(this.getAttribute("class"))return true;case "data-cke-expando":continue;default:if(c.specified)return true}}return false}:function(){var b=this.$.attributes,a=b.length,c={"data-cke-expando":1,_moz_dirty:1};return a>0&&(a>2||!c[b[0].nodeName]||a==2&&!c[b[1].nodeName])},hasAttribute:function(){function b(b){var a=this.$.attributes.getNamedItem(b);if(this.getName()=="input")switch(b){case "class":return this.$.className.length>
|
||||
0;case "checked":return!!this.$.checked;case "value":b=this.getAttribute("type");return b=="checkbox"||b=="radio"?this.$.value!="on":!!this.$.value}return!a?false:a.specified}return CKEDITOR.env.ie?CKEDITOR.env.version<8?function(a){return a=="name"?!!this.$.name:b.call(this,a)}:b:function(b){return!!this.$.attributes.getNamedItem(b)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(b,a){var c=this.$,b=b.$;if(c!=b){var d;if(a)for(;d=c.lastChild;)b.insertBefore(c.removeChild(d),
|
||||
b.firstChild);else for(;d=c.firstChild;)b.appendChild(c.removeChild(d))}},mergeSiblings:function(){function b(b,a,d){if(a&&a.type==CKEDITOR.NODE_ELEMENT){for(var c=[];a.data("cke-bookmark")||a.isEmptyInlineRemoveable();){c.push(a);a=d?a.getNext():a.getPrevious();if(!a||a.type!=CKEDITOR.NODE_ELEMENT)return}if(b.isIdentical(a)){for(var e=d?b.getLast():b.getFirst();c.length;)c.shift().move(b,!d);a.moveChildren(b,!d);a.remove();e&&e.type==CKEDITOR.NODE_ELEMENT&&e.mergeSiblings()}}}return function(a){if(a===
|
||||
false||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a")){b(this,this.getNext(),true);b(this,this.getPrevious())}}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var b=function(b,a){this.$.setAttribute(b,a);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a,c){a=="class"?this.$.className=c:a=="style"?this.$.style.cssText=c:a=="tabindex"?this.$.tabIndex=c:a=="checked"?this.$.checked=c:a=="contenteditable"?b.call(this,
|
||||
"contentEditable",c):b.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(a,c){if(a=="src"&&c.match(/^http:\/\//))try{b.apply(this,arguments)}catch(d){}else b.apply(this,arguments);return this}:b}(),setAttributes:function(b){for(var a in b)this.setAttribute(a,b[a]);return this},setValue:function(b){this.$.value=b;return this},removeAttribute:function(){var b=function(b){this.$.removeAttribute(b)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?
|
||||
function(b){b=="class"?b="className":b=="tabindex"?b="tabIndex":b=="contenteditable"&&(b="contentEditable");this.$.removeAttribute(b)}:b}(),removeAttributes:function(b){if(CKEDITOR.tools.isArray(b))for(var a=0;a<b.length;a++)this.removeAttribute(b[a]);else for(a in b)b.hasOwnProperty(a)&&this.removeAttribute(a)},removeStyle:function(b){var a=this.$.style;if(!a.removeProperty&&(b=="border"||b=="margin"||b=="padding")){var c=["top","left","right","bottom"],d;b=="border"&&(d=["color","style","width"]);
|
||||
for(var a=[],e=0;e<c.length;e++)if(d)for(var h=0;h<d.length;h++)a.push([b,c[e],d[h]].join("-"));else a.push([b,c[e]].join("-"));for(b=0;b<a.length;b++)this.removeStyle(a[b])}else{a.removeProperty?a.removeProperty(b):a.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(b));this.$.style.cssText||this.removeAttribute("style")}},setStyle:function(b,a){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(b)]=a;return this},setStyles:function(b){for(var a in b)this.setStyle(a,b[a]);return this},setOpacity:function(b){if(CKEDITOR.env.ie&&
|
||||
CKEDITOR.env.version<9){b=Math.round(b*100);this.setStyle("filter",b>=100?"":"progid:DXImageTransform.Microsoft.Alpha(opacity="+b+")")}else this.setStyle("opacity",b)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var b,a=this.getElementsByTag("*"),c=0,d=a.count();c<d;c++){b=a.getItem(c);b.setAttribute("unselectable","on")}}},getPositionedAncestor:function(){for(var b=this;b.getName()!="html";){if(b.getComputedStyle("position")!=
|
||||
"static")return b;b=b.getParent()}return null},getDocumentPosition:function(b){var a=0,c=0,d=this.getDocument(),e=d.getBody(),h=CKEDITOR.env.quirks;if(document.documentElement.getBoundingClientRect){var k=this.$.getBoundingClientRect(),m=d.$.documentElement,f=m.clientTop||e.$.clientTop||0,p=m.clientLeft||e.$.clientLeft||0,o=true;if(CKEDITOR.env.ie){o=d.getDocumentElement().contains(this);d=d.getBody().contains(this);o=h&&d||!h&&o}if(o){if(CKEDITOR.env.webkit){a=e.$.scrollLeft||m.scrollLeft;c=e.$.scrollTop||
|
||||
m.scrollTop}else{c=h?e.$:m;a=c.scrollLeft;c=c.scrollTop}a=k.left+a-p;c=k.top+c-f}}else{f=this;for(p=null;f&&!(f.getName()=="body"||f.getName()=="html");){a=a+(f.$.offsetLeft-f.$.scrollLeft);c=c+(f.$.offsetTop-f.$.scrollTop);if(!f.equals(this)){a=a+(f.$.clientLeft||0);c=c+(f.$.clientTop||0)}for(;p&&!p.equals(f);){a=a-p.$.scrollLeft;c=c-p.$.scrollTop;p=p.getParent()}p=f;f=(k=f.$.offsetParent)?new CKEDITOR.dom.element(k):null}}if(b){k=this.getWindow();f=b.getWindow();if(!k.equals(f)&&k.$.frameElement){b=
|
||||
(new CKEDITOR.dom.element(k.$.frameElement)).getDocumentPosition(b);a=a+b.x;c=c+b.y}}if(!document.documentElement.getBoundingClientRect&&CKEDITOR.env.gecko&&!h){a=a+(this.$.clientLeft?1:0);c=c+(this.$.clientTop?1:0)}return{x:a,y:c}},scrollIntoView:function(b){var a=this.getParent();if(a){do{(a.$.clientWidth&&a.$.clientWidth<a.$.scrollWidth||a.$.clientHeight&&a.$.clientHeight<a.$.scrollHeight)&&!a.is("body")&&this.scrollIntoParent(a,b,1);if(a.is("html")){var c=a.getWindow();try{var d=c.$.frameElement;
|
||||
d&&(a=new CKEDITOR.dom.element(d))}catch(e){}}}while(a=a.getParent())}},scrollIntoParent:function(b,a,c){var d,e,h,k;function m(a,k){if(/body|html/.test(b.getName()))b.getWindow().$.scrollBy(a,k);else{b.$.scrollLeft=b.$.scrollLeft+a;b.$.scrollTop=b.$.scrollTop+k}}function f(b,a){var k={x:0,y:0};if(!b.is(o?"body":"html")){var d=b.$.getBoundingClientRect();k.x=d.left;k.y=d.top}d=b.getWindow();if(!d.equals(a)){d=f(CKEDITOR.dom.element.get(d.$.frameElement),a);k.x=k.x+d.x;k.y=k.y+d.y}return k}function p(b,
|
||||
a){return parseInt(b.getComputedStyle("margin-"+a)||0,10)||0}!b&&(b=this.getWindow());h=b.getDocument();var o=h.$.compatMode=="BackCompat";b instanceof CKEDITOR.dom.window&&(b=o?h.getBody():h.getDocumentElement());h=b.getWindow();e=f(this,h);var n=f(b,h),l=this.$.offsetHeight;d=this.$.offsetWidth;var s=b.$.clientHeight,v=b.$.clientWidth;h=e.x-p(this,"left")-n.x||0;k=e.y-p(this,"top")-n.y||0;d=e.x+d+p(this,"right")-(n.x+v)||0;e=e.y+l+p(this,"bottom")-(n.y+s)||0;if(k<0||e>0)m(0,a===true?k:a===false?
|
||||
e:k<0?k:e);if(c&&(h<0||d>0))m(h<0?h:d,0)},setState:function(b,a,c){a=a||"cke";switch(b){case CKEDITOR.TRISTATE_ON:this.addClass(a+"_on");this.removeClass(a+"_off");this.removeClass(a+"_disabled");c&&this.setAttribute("aria-pressed",true);c&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(a+"_disabled");this.removeClass(a+"_off");this.removeClass(a+"_on");c&&this.setAttribute("aria-disabled",true);c&&this.removeAttribute("aria-pressed");break;default:this.addClass(a+
|
||||
"_off");this.removeClass(a+"_on");this.removeClass(a+"_disabled");c&&this.removeAttribute("aria-pressed");c&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var b=this.$;try{b.contentWindow.document}catch(a){b.src=b.src}return b&&new CKEDITOR.dom.document(b.contentWindow.document)},copyAttributes:function(b,a){for(var c=this.$.attributes,a=a||{},d=0;d<c.length;d++){var e=c[d],h=e.nodeName.toLowerCase(),k;if(!(h in a))if(h=="checked"&&(k=this.getAttribute(h)))b.setAttribute(h,k);
|
||||
else if(!CKEDITOR.env.ie||this.hasAttribute(h)){k=this.getAttribute(h);if(k===null)k=e.nodeValue;b.setAttribute(h,k)}}if(this.$.style.cssText!=="")b.$.style.cssText=this.$.style.cssText},renameNode:function(b){if(this.getName()!=b){var a=this.getDocument(),b=new CKEDITOR.dom.element(b,a);this.copyAttributes(b);this.moveChildren(b);this.getParent()&&this.$.parentNode.replaceChild(b.$,this.$);b.$["data-cke-expando"]=this.$["data-cke-expando"];this.$=b.$;delete this.getName}},getChild:function(){function b(b,
|
||||
a){var d=b.childNodes;if(a>=0&&a<d.length)return d[a]}return function(a){var c=this.$;if(a.slice)for(;a.length>0&&c;)c=b(c,a.shift());else c=b(c,a);return c?new CKEDITOR.dom.node(c):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){this.on("contextmenu",function(a){a.data.getTarget().hasClass("cke_enable_context_menu")||a.data.preventDefault()})},getDirection:function(a){return a?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&
|
||||
this.getParent().getDirection(1)||this.getDocument().$.dir||"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(a,c){a="data-"+a;if(c===void 0)return this.getAttribute(a);c===false?this.removeAttribute(a):this.setAttribute(a,c);return null},getEditor:function(){var a=CKEDITOR.instances,c,e;for(c in a){e=a[c];if(e.element.equals(this)&&e.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO)return e}return null},find:function(b){var c=a(this),b=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(f(this,
|
||||
b)));c();return b},findOne:function(b){var c=a(this),b=this.$.querySelector(f(this,b));c();return b?new CKEDITOR.dom.element(b):null},forEach:function(a,c,e){if(!e&&(!c||this.type==c))var d=a(this);if(d!==false)for(var e=this.getChildren(),g=0;g<e.count();g++){d=e.getItem(g);d.type==CKEDITOR.NODE_ELEMENT?d.forEach(a,c):(!c||d.type==c)&&a(d)}}});var e={width:["border-left-width","border-right-width","padding-left","padding-right"],height:["border-top-width","border-bottom-width","padding-top","padding-bottom"]};
|
||||
CKEDITOR.dom.element.prototype.setSize=function(a,e,f){if(typeof e=="number"){if(f&&(!CKEDITOR.env.ie||!CKEDITOR.env.quirks))e=e-c.call(this,a);this.setStyle(a,e+"px")}};CKEDITOR.dom.element.prototype.getSize=function(a,e){var f=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(a)],this.$["client"+CKEDITOR.tools.capitalize(a)])||0;e&&(f=f-c.call(this,a));return f}}(),CKEDITOR.dom.documentFragment=function(a){a=a||CKEDITOR.document;this.$=a.type==CKEDITOR.NODE_DOCUMENT?a.$.createDocumentFragment():
|
||||
a},CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(a){a=a.$;a.parentNode.insertBefore(this.$,a.nextSibling)}},!0,{append:1,appendBogus:1,getFirst:1,getLast:1,getParent:1,getNext:1,getPrevious:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,getChildren:1}),function(){function a(a,b){var k=this.range;
|
||||
if(this._.end)return null;if(!this._.start){this._.start=1;if(k.collapsed){this.end();return null}k.optimize()}var c,d=k.startContainer;c=k.endContainer;var e=k.startOffset,g=k.endOffset,h,i=this.guard,f=this.type,j=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var y=c.type==CKEDITOR.NODE_ELEMENT?c:c.getParent(),r=c.type==CKEDITOR.NODE_ELEMENT?c.getChild(g):c.getNext();this._.guardLTR=function(a,b){return(!b||!y.equals(a))&&(!r||!a.equals(r))&&(a.type!=CKEDITOR.NODE_ELEMENT||
|
||||
!b||!a.equals(k.root))}}if(a&&!this._.guardRTL){var x=d.type==CKEDITOR.NODE_ELEMENT?d:d.getParent(),w=d.type==CKEDITOR.NODE_ELEMENT?e?d.getChild(e-1):null:d.getPrevious();this._.guardRTL=function(a,b){return(!b||!x.equals(a))&&(!w||!a.equals(w))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(k.root))}}var z=a?this._.guardRTL:this._.guardLTR;h=i?function(a,b){return z(a,b)===false?false:i(a,b)}:z;if(this.current)c=this.current[j](false,f,h);else{if(a)c.type==CKEDITOR.NODE_ELEMENT&&(c=g>0?c.getChild(g-
|
||||
1):h(c,true)===false?null:c.getPreviousSourceNode(true,f,h));else{c=d;if(c.type==CKEDITOR.NODE_ELEMENT&&!(c=c.getChild(e)))c=h(d,true)===false?null:d.getNextSourceNode(true,f,h)}c&&h(c)===false&&(c=null)}for(;c&&!this._.end;){this.current=c;if(!this.evaluator||this.evaluator(c)!==false){if(!b)return c}else if(b&&this.evaluator)return false;c=c[j](false,f,h)}this.end();return this.current=null}function f(b){for(var c,k=null;c=a.call(this,b);)k=c;return k}function c(a){if(h(a))return false;if(a.type==
|
||||
CKEDITOR.NODE_TEXT)return true;if(a.type==CKEDITOR.NODE_ELEMENT){if(a.is(CKEDITOR.dtd.$inline)||a.is("hr")||a.getAttribute("contenteditable")=="false")return true;var b;if(b=!CKEDITOR.env.needsBrFiller)if(b=a.is(k))a:{b=0;for(var c=a.getChildCount();b<c;++b)if(!h(a.getChild(b))){b=false;break a}b=true}if(b)return true}return false}CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(a){this.range=a;this._={}},proto:{end:function(){this._.end=1},next:function(){return a.call(this)},previous:function(){return a.call(this,
|
||||
1)},checkForward:function(){return a.call(this,0,1)!==false},checkBackward:function(){return a.call(this,1,1)!==false},lastForward:function(){return f.call(this)},lastBackward:function(){return f.call(this,1)},reset:function(){delete this.current;this._={}}}});var e={block:1,"list-item":1,table:1,"table-row-group":1,"table-header-group":1,"table-footer-group":1,"table-row":1,"table-column-group":1,"table-column":1,"table-cell":1,"table-caption":1},b={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=
|
||||
function(a){return this.getComputedStyle("float")=="none"&&!(this.getComputedStyle("position")in b)&&e[this.getComputedStyle("display")]?true:!!(this.is(CKEDITOR.dtd.$block)||a&&this.is(a))};CKEDITOR.dom.walker.blockBoundary=function(a){return function(b){return!(b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary=function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(a,b){function c(a){return a&&a.getName&&a.getName()=="span"&&
|
||||
a.data("cke-bookmark")}return function(k){var d,e;d=k&&k.type!=CKEDITOR.NODE_ELEMENT&&(e=k.getParent())&&c(e);d=a?d:d||c(k);return!!(b^d)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(b){var c;b&&b.type==CKEDITOR.NODE_TEXT&&(c=!CKEDITOR.tools.trim(b.getText())||CKEDITOR.env.webkit&&b.getText()=="");return!!(a^c)}};CKEDITOR.dom.walker.invisible=function(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.env.webkit?1:0;return function(k){if(b(k))k=1;else{k.type==CKEDITOR.NODE_TEXT&&
|
||||
(k=k.getParent());k=k.$.offsetWidth<=c}return!!(a^k)}};CKEDITOR.dom.walker.nodeType=function(a,b){return function(c){return!!(b^c.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function b(a){return!j(a)&&!d(a)}return function(c){var k=CKEDITOR.env.needsBrFiller?c.is&&c.is("br"):c.getText&&i.test(c.getText());if(k){k=c.getParent();c=c.getNext(b);k=k.isBlockBoundary()&&(!c||c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary())}return!!(a^k)}};CKEDITOR.dom.walker.temp=function(a){return function(b){b.type!=
|
||||
CKEDITOR.NODE_ELEMENT&&(b=b.getParent());b=b&&b.hasAttribute("data-cke-temp");return!!(a^b)}};var i=/^[\t\r\n ]*(?: |\xa0)$/,j=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(),g=CKEDITOR.dom.walker.temp();CKEDITOR.dom.walker.ignored=function(a){return function(b){b=j(b)||d(b)||g(b);return!!(a^b)}};var h=CKEDITOR.dom.walker.ignored(),k=function(a){var b={},c;for(c in a)CKEDITOR.dtd[c]["#"]&&(b[c]=1);return b}(CKEDITOR.dtd.$block);CKEDITOR.dom.walker.editable=function(a){return function(b){return!!(a^
|
||||
c(b))}};CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(d(a)||j(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$inline)&&!a.is(CKEDITOR.dtd.$empty));return a&&(CKEDITOR.env.needsBrFiller?a.is&&a.is("br"):a.getText&&i.test(a.getText()))?a:false}}(),CKEDITOR.dom.range=function(a){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null;this.collapsed=true;var f=a instanceof CKEDITOR.dom.document;this.document=f?a:a.getDocument();
|
||||
this.root=f?a.getBody():a},function(){function a(){var a=false,b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(true),d=CKEDITOR.dom.walker.bogus();return function(e){if(c(e)||b(e))return true;if(d(e)&&!a)return a=true;return e.type==CKEDITOR.NODE_TEXT&&(e.hasAscendant("pre")||CKEDITOR.tools.trim(e.getText()).length)||e.type==CKEDITOR.NODE_ELEMENT&&!e.is(i)?false:true}}function f(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(1);return function(d){return c(d)||
|
||||
b(d)?true:!a&&j(d)||d.type==CKEDITOR.NODE_ELEMENT&&d.is(CKEDITOR.dtd.$removeEmpty)}}function c(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&h(a)&&(b=a);return g(a)&&!(j(a)&&a.equals(b))})}}var e=function(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset},b=function(a,b,c,d){a.optimizeBookmark();var e=a.startContainer,h=a.endContainer,l=a.startOffset,g=a.endOffset,i,f;if(h.type==CKEDITOR.NODE_TEXT)h=
|
||||
h.split(g);else if(h.getChildCount()>0)if(g>=h.getChildCount()){h=h.append(a.document.createText(""));f=true}else h=h.getChild(g);if(e.type==CKEDITOR.NODE_TEXT){e.split(l);e.equals(h)&&(h=e.getNext())}else if(l)if(l>=e.getChildCount()){e=e.append(a.document.createText(""));i=true}else e=e.getChild(l).getPrevious();else{e=e.append(a.document.createText(""),1);i=true}var l=e.getParents(),g=h.getParents(),j,u,y;for(j=0;j<l.length;j++){u=l[j];y=g[j];if(!u.equals(y))break}for(var r=c,x,w,z,A=j;A<l.length;A++){x=
|
||||
l[A];r&&!x.equals(e)&&(w=r.append(x.clone()));for(x=x.getNext();x;){if(x.equals(g[A])||x.equals(h))break;z=x.getNext();if(b==2)r.append(x.clone(true));else{x.remove();b==1&&r.append(x)}x=z}r&&(r=w)}r=c;for(c=j;c<g.length;c++){x=g[c];b>0&&!x.equals(h)&&(w=r.append(x.clone()));if(!l[c]||x.$.parentNode!=l[c].$.parentNode)for(x=x.getPrevious();x;){if(x.equals(l[c])||x.equals(e))break;z=x.getPrevious();if(b==2)r.$.insertBefore(x.$.cloneNode(true),r.$.firstChild);else{x.remove();b==1&&r.$.insertBefore(x.$,
|
||||
r.$.firstChild)}x=z}r&&(r=w)}if(b==2){u=a.startContainer;if(u.type==CKEDITOR.NODE_TEXT){u.$.data=u.$.data+u.$.nextSibling.data;u.$.parentNode.removeChild(u.$.nextSibling)}a=a.endContainer;if(a.type==CKEDITOR.NODE_TEXT&&a.$.nextSibling){a.$.data=a.$.data+a.$.nextSibling.data;a.$.parentNode.removeChild(a.$.nextSibling)}}else{if(u&&y&&(e.$.parentNode!=u.$.parentNode||h.$.parentNode!=y.$.parentNode)){b=y.getIndex();i&&y.$.parentNode==e.$.parentNode&&b--;if(d&&u.type==CKEDITOR.NODE_ELEMENT){d=CKEDITOR.dom.element.createFromHtml('<span data-cke-bookmark="1" style="display:none"> </span>',
|
||||
a.document);d.insertAfter(u);u.mergeSiblings(false);a.moveToBookmark({startNode:d})}else a.setStart(y.getParent(),b)}a.collapse(true)}i&&e.remove();f&&h.$.parentNode&&h.remove()},i={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},j=CKEDITOR.dom.walker.bogus(),d=/^[\t\r\n ]*(?: |\xa0)$/,g=CKEDITOR.dom.walker.editable(),h=CKEDITOR.dom.walker.ignored(true);CKEDITOR.dom.range.prototype=
|
||||
{clone:function(){var a=new CKEDITOR.dom.range(this.root);a._setStartContainer(this.startContainer);a.startOffset=this.startOffset;a._setEndContainer(this.endContainer);a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){if(a){this._setEndContainer(this.startContainer);this.endOffset=this.startOffset}else{this._setStartContainer(this.endContainer);this.startOffset=this.endOffset}this.collapsed=true},cloneContents:function(){var a=new CKEDITOR.dom.documentFragment(this.document);
|
||||
this.collapsed||b(this,2,a);return a},deleteContents:function(a){this.collapsed||b(this,0,null,a)},extractContents:function(a){var c=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||b(this,1,c,a);return c},createBookmark:function(a){var b,c,d,e,h=this.collapsed;b=this.document.createElement("span");b.data("cke-bookmark",1);b.setStyle("display","none");b.setHtml(" ");if(a){d="cke_bm_"+CKEDITOR.tools.getNextNumber();b.setAttribute("id",d+(h?"C":"S"))}if(!h){c=b.clone();c.setHtml(" ");
|
||||
a&&c.setAttribute("id",d+"E");e=this.clone();e.collapse();e.insertNode(c)}e=this.clone();e.collapse(true);e.insertNode(b);if(c){this.setStartAfter(b);this.setEndBefore(c)}else this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?d+(h?"C":"S"):b,endNode:a?d+"E":c,serializable:a,collapsed:h}},createBookmark2:function(){function a(c){var d=c.container,k=c.offset,e;e=d;var l=k;e=e.type!=CKEDITOR.NODE_ELEMENT||l===0||l==e.getChildCount()?0:e.getChild(l-1).type==CKEDITOR.NODE_TEXT&&e.getChild(l).type==
|
||||
CKEDITOR.NODE_TEXT;if(e){d=d.getChild(k-1);k=d.getLength()}d.type==CKEDITOR.NODE_ELEMENT&&k>1&&(k=d.getChild(k-1).getIndex(true)+1);if(d.type==CKEDITOR.NODE_TEXT){e=d;for(l=0;(e=e.getPrevious())&&e.type==CKEDITOR.NODE_TEXT;)l=l+e.getLength();e=l;if(d.getText())k=k+e;else{l=d.getPrevious(b);if(e){k=e;d=l?l.getNext():d.getParent().getFirst()}else{d=d.getParent();k=l?l.getIndex(true)+1:0}}}c.container=d;c.offset=k}var b=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,true);return function(b){var c=this.collapsed,
|
||||
d={container:this.startContainer,offset:this.startOffset},e={container:this.endContainer,offset:this.endOffset};if(b){a(d);c||a(e)}return{start:d.container.getAddress(b),end:c?null:e.container.getAddress(b),startOffset:d.offset,endOffset:e.offset,normalized:b,collapsed:c,is2:true}}}(),moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),c=a.startOffset,d=a.end&&this.document.getByAddress(a.end,a.normalized),a=a.endOffset;this.setStart(b,c);d?this.setEnd(d,a):
|
||||
this.collapse(true)}else{b=(c=a.serializable)?this.document.getById(a.startNode):a.startNode;a=c?this.document.getById(a.endNode):a.endNode;this.setStartBefore(b);b.remove();if(a){this.setEndBefore(a);a.remove()}else this.collapse(true)}},getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,c=this.startOffset,d=this.endOffset,e;if(a.type==CKEDITOR.NODE_ELEMENT){e=a.getChildCount();if(e>c)a=a.getChild(c);else if(e<1)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;
|
||||
a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()||a}}if(b.type==CKEDITOR.NODE_ELEMENT){e=b.getChildCount();if(e>d)b=b.getChild(d).getPreviousSourceNode(true);else if(e<1)b=b.getPreviousSourceNode();else{for(b=b.$;b.lastChild;)b=b.lastChild;b=new CKEDITOR.dom.node(b)}}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var c=this.startContainer,d=this.endContainer,c=c.equals(d)?a&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-
|
||||
1?c.getChild(this.startOffset):c:c.getCommonAncestor(d);return b&&!c.is?c.getParent():c},optimize:function(){var a=this.startContainer,b=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;b=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&(a.is("span")&&a.data("cke-bookmark"))&&
|
||||
this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);b&&(b.is&&b.is("span")&&b.data("cke-bookmark"))&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a,b){var c=this.startContainer,d=this.startOffset,e=this.collapsed;if((!a||e)&&c&&c.type==CKEDITOR.NODE_TEXT){if(d)if(d>=c.getLength()){d=c.getIndex()+1;c=c.getParent()}else{var h=c.split(d),d=c.getIndex()+1,c=c.getParent();if(this.startContainer.equals(this.endContainer))this.setEnd(h,this.endOffset-this.startOffset);else if(c.equals(this.endContainer))this.endOffset=
|
||||
this.endOffset+1}else{d=c.getIndex();c=c.getParent()}this.setStart(c,d);if(e){this.collapse(true);return}}c=this.endContainer;d=this.endOffset;if(!b&&!e&&c&&c.type==CKEDITOR.NODE_TEXT){if(d){d>=c.getLength()||c.split(d);d=c.getIndex()+1}else d=c.getIndex();c=c.getParent();this.setEnd(c,d)}},enlarge:function(a,b){function c(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var d=RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var e=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;
|
||||
var h=this.getCommonAncestor(),l=this.root,g,i,f,j,u,y=false,r,x;r=this.startContainer;var w=this.startOffset;if(r.type==CKEDITOR.NODE_TEXT){if(w){r=!CKEDITOR.tools.trim(r.substring(0,w)).length&&r;y=!!r}if(r&&!(j=r.getPrevious()))f=r.getParent()}else{w&&(j=r.getChild(w-1)||r.getLast());j||(f=r)}for(f=c(f);f||j;){if(f&&!j){!u&&f.equals(h)&&(u=true);if(e?f.isBlockBoundary():!l.contains(f))break;if(!y||f.getComputedStyle("display")!="inline"){y=false;u?g=f:this.setStartBefore(f)}j=f.getPrevious()}for(;j;){r=
|
||||
false;if(j.type==CKEDITOR.NODE_COMMENT)j=j.getPrevious();else{if(j.type==CKEDITOR.NODE_TEXT){x=j.getText();d.test(x)&&(j=null);r=/[\s\ufeff]$/.test(x)}else if((j.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||b&&j.is("br"))&&!j.data("cke-bookmark"))if(y&&CKEDITOR.dtd.$removeEmpty[j.getName()]){x=j.getText();if(d.test(x))j=null;else for(var w=j.$.getElementsByTagName("*"),z=0,A;A=w[z++];)if(!CKEDITOR.dtd.$removeEmpty[A.nodeName.toLowerCase()]){j=null;break}j&&(r=!!x.length)}else j=null;r&&(y?u?g=f:f&&this.setStartBefore(f):
|
||||
y=true);if(j){r=j.getPrevious();if(!f&&!r){f=j;j=null;break}j=r}else f=null}}f&&(f=c(f.getParent()))}r=this.endContainer;w=this.endOffset;f=j=null;u=y=false;var F=function(a,b){var c=new CKEDITOR.dom.range(l);c.setStart(a,b);c.setEndAt(l,CKEDITOR.POSITION_BEFORE_END);var c=new CKEDITOR.dom.walker(c),e;for(c.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};e=c.next();){if(e.type!=CKEDITOR.NODE_TEXT)return false;x=e!=a?e.getText():e.substring(b);if(d.test(x))return false}return true};
|
||||
if(r.type==CKEDITOR.NODE_TEXT)if(CKEDITOR.tools.trim(r.substring(w)).length)y=true;else{y=!r.getLength();if(w==r.getLength()){if(!(j=r.getNext()))f=r.getParent()}else F(r,w)&&(f=r.getParent())}else(j=r.getChild(w))||(f=r);for(;f||j;){if(f&&!j){!u&&f.equals(h)&&(u=true);if(e?f.isBlockBoundary():!l.contains(f))break;if(!y||f.getComputedStyle("display")!="inline"){y=false;u?i=f:f&&this.setEndAfter(f)}j=f.getNext()}for(;j;){r=false;if(j.type==CKEDITOR.NODE_TEXT){x=j.getText();F(j,0)||(j=null);r=/^[\s\ufeff]/.test(x)}else if(j.type==
|
||||
CKEDITOR.NODE_ELEMENT){if((j.$.offsetWidth>0||b&&j.is("br"))&&!j.data("cke-bookmark"))if(y&&CKEDITOR.dtd.$removeEmpty[j.getName()]){x=j.getText();if(d.test(x))j=null;else{w=j.$.getElementsByTagName("*");for(z=0;A=w[z++];)if(!CKEDITOR.dtd.$removeEmpty[A.nodeName.toLowerCase()]){j=null;break}}j&&(r=!!x.length)}else j=null}else r=1;r&&y&&(u?i=f:this.setEndAfter(f));if(j){r=j.getNext();if(!f&&!r){f=j;j=null;break}j=r}else f=null}f&&(f=c(f.getParent()))}if(g&&i){h=g.contains(i)?i:g;this.setStartBefore(h);
|
||||
this.setEndAfter(h)}break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:f=new CKEDITOR.dom.range(this.root);l=this.root;f.setStartAt(l,CKEDITOR.POSITION_AFTER_START);f.setEnd(this.startContainer,this.startOffset);f=new CKEDITOR.dom.walker(f);var C,K,G=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),D=null,E=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&a.getAttribute("contenteditable")=="false")if(D){if(D.equals(a)){D=null;return}}else D=
|
||||
a;else if(D)return;var b=G(a);b||(C=a);return b},e=function(a){var b=E(a);!b&&(a.is&&a.is("br"))&&(K=a);return b};f.guard=E;f=f.lastBackward();C=C||l;this.setStartAt(C,!C.is("br")&&(!f&&this.checkStartOfBlock()||f&&C.contains(f))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){f=this.clone();f=new CKEDITOR.dom.walker(f);var J=CKEDITOR.dom.walker.whitespaces(),N=CKEDITOR.dom.walker.bookmark();f.evaluator=function(a){return!J(a)&&!N(a)};if((f=f.previous())&&
|
||||
f.type==CKEDITOR.NODE_ELEMENT&&f.is("br"))break}f=this.clone();f.collapse();f.setEndAt(l,CKEDITOR.POSITION_BEFORE_END);f=new CKEDITOR.dom.walker(f);f.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?e:E;C=D=K=null;f=f.lastForward();C=C||l;this.setEndAt(C,!f&&this.checkEndOfBlock()||f&&C.contains(f)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);K&&this.setEndAfter(K)}},shrink:function(a,b,c){if(!this.collapsed){var a=a||CKEDITOR.SHRINK_TEXT,d=this.clone(),e=this.startContainer,h=this.endContainer,
|
||||
l=this.startOffset,f=this.endOffset,g=1,i=1;if(e&&e.type==CKEDITOR.NODE_TEXT)if(l)if(l>=e.getLength())d.setStartAfter(e);else{d.setStartBefore(e);g=0}else d.setStartBefore(e);if(h&&h.type==CKEDITOR.NODE_TEXT)if(f)if(f>=h.getLength())d.setEndAfter(h);else{d.setEndAfter(h);i=0}else d.setEndBefore(h);var d=new CKEDITOR.dom.walker(d),j=CKEDITOR.dom.walker.bookmark();d.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var u;d.guard=function(b,d){if(j(b))return true;
|
||||
if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||d&&b.equals(u)||c===false&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return false;!d&&b.type==CKEDITOR.NODE_ELEMENT&&(u=b);return true};if(g)(e=d[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(e,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);if(i){d.reset();(d=d[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(d,
|
||||
b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)}return!(!g&&!i)}},insertNode:function(a){this.optimizeBookmark();this.trim(false,true);var b=this.startContainer,c=b.getChild(this.startOffset);c?a.insertBefore(c):b.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,b){this.setStartAt(a,b);this.collapse(true)},moveToRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer,
|
||||
a.endOffset)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},setStart:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]){b=a.getIndex();a=a.getParent()}this._setStartContainer(a);this.startOffset=b;if(!this.endContainer){this._setEndContainer(a);this.endOffset=b}e(this)},setEnd:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]){b=a.getIndex()+1;a=a.getParent()}this._setEndContainer(a);
|
||||
this.endOffset=b;if(!this.startContainer){this._setStartContainer(a);this.startOffset=b}e(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(a,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setStart(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==
|
||||
CKEDITOR.NODE_TEXT?this.setStart(a,a.getLength()):this.setStart(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(a)}e(this)},setEndAt:function(a,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setEnd(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setEnd(a,a.getLength()):this.setEnd(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(a);break;
|
||||
case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(a)}e(this)},fixBlock:function(a,b){var c=this.createBookmark(),d=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(d);d.trim();d.appendBogus();this.insertNode(d);this.moveToBookmark(c);return d},splitBlock:function(a){var b=new CKEDITOR.dom.elementPath(this.startContainer,this.root),c=new CKEDITOR.dom.elementPath(this.endContainer,this.root),d=b.block,e=c.block,h=null;if(!b.blockLimit.equals(c.blockLimit))return null;
|
||||
if(a!="br"){if(!d){d=this.fixBlock(true,a);e=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block}e||(e=this.fixBlock(false,a))}a=d&&this.checkStartOfBlock();b=e&&this.checkEndOfBlock();this.deleteContents();if(d&&d.equals(e))if(b){h=new CKEDITOR.dom.elementPath(this.startContainer,this.root);this.moveToPosition(e,CKEDITOR.POSITION_AFTER_END);e=null}else if(a){h=new CKEDITOR.dom.elementPath(this.startContainer,this.root);this.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);d=null}else{e=
|
||||
this.splitElement(d);d.is("ul","ol")||d.appendBogus()}return{previousBlock:d,nextBlock:e,wasStartOfBlock:a,wasEndOfBlock:b,elementPath:h}},splitElement:function(a){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var b=this.extractContents(),c=a.clone(false);b.appendTo(c);c.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return c},removeEmptyBlocksAtEnd:function(){function a(d){return function(a){return b(a)||(c(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable())||
|
||||
d.is("table")&&a.is("caption")?false:true}}var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(false);return function(b){for(var c=this.createBookmark(),d=this[b?"endPath":"startPath"](),e=d.block||d.blockLimit,h;e&&!e.equals(d.root)&&!e.getFirst(a(e));){h=e.getParent();this[b?"setEndAt":"setStartAt"](e,CKEDITOR.POSITION_AFTER_END);e.remove(1);e=h}this.moveToBookmark(c)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,
|
||||
this.root)},checkBoundaryOfElement:function(a,b){var c=b==CKEDITOR.START,d=this.clone();d.collapse(c);d[c?"setStartAt":"setEndAt"](a,c?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d);d.evaluator=f(c);return d[c?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var b=this.startContainer,c=this.startOffset;if(CKEDITOR.env.ie&&c&&b.type==CKEDITOR.NODE_TEXT){b=CKEDITOR.tools.ltrim(b.substring(0,c));d.test(b)&&this.trim(0,1)}this.trim();b=new CKEDITOR.dom.elementPath(this.startContainer,
|
||||
this.root);c=this.clone();c.collapse(true);c.setStartAt(b.block||b.blockLimit,CKEDITOR.POSITION_AFTER_START);b=new CKEDITOR.dom.walker(c);b.evaluator=a();return b.checkBackward()},checkEndOfBlock:function(){var b=this.endContainer,c=this.endOffset;if(CKEDITOR.env.ie&&b.type==CKEDITOR.NODE_TEXT){b=CKEDITOR.tools.rtrim(b.substring(c));d.test(b)&&this.trim(1,0)}this.trim();b=new CKEDITOR.dom.elementPath(this.endContainer,this.root);c=this.clone();c.collapse(false);c.setEndAt(b.block||b.blockLimit,CKEDITOR.POSITION_BEFORE_END);
|
||||
b=new CKEDITOR.dom.walker(c);b.evaluator=a();return b.checkForward()},getPreviousNode:function(a,b,c){var d=this.clone();d.collapse(1);d.setStartAt(c||this.root,CKEDITOR.POSITION_AFTER_START);c=new CKEDITOR.dom.walker(d);c.evaluator=a;c.guard=b;return c.previous()},getNextNode:function(a,b,c){var d=this.clone();d.collapse();d.setEndAt(c||this.root,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(d);c.evaluator=a;c.guard=b;return c.next()},checkReadOnly:function(){function a(b,c){for(;b;){if(b.type==
|
||||
CKEDITOR.NODE_ELEMENT){if(b.getAttribute("contentEditable")=="false"&&!b.data("cke-editable"))return 0;if(b.is("html")||b.getAttribute("contentEditable")=="true"&&(b.contains(c)||b.equals(c)))break}b=b.getParent()}return 1}return function(){var b=this.startContainer,c=this.endContainer;return!(a(b,c)&&a(c,b))}}(),moveToElementEditablePosition:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(false)){this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);return true}for(var c=
|
||||
0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&&this.checkEndOfBlock()&&d.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);c=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable()){this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START);c=1}else if(b&&a.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);
|
||||
else if(a.getAttribute("contenteditable")=="false"&&a.is(CKEDITOR.dtd.$block)){this.setStartBefore(a);this.setEndAfter(a);return true}var e=a,f=c,g=void 0;e.type==CKEDITOR.NODE_ELEMENT&&e.isEditable(false)&&(g=e[b?"getLast":"getFirst"](h));!f&&!g&&(g=e[b?"getPrevious":"getNext"](h));a=g}return!!c},moveToClosestEditablePosition:function(a,b){var c=new CKEDITOR.dom.range(this.root),d=0,e,h=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];c.moveToPosition(a,h[b?0:1]);if(a.is(CKEDITOR.dtd.$block)){if(e=
|
||||
c[b?"getNextEditableNode":"getPreviousEditableNode"]()){d=1;if(e.type==CKEDITOR.NODE_ELEMENT&&e.is(CKEDITOR.dtd.$block)&&e.getAttribute("contenteditable")=="false"){c.setStartAt(e,CKEDITOR.POSITION_BEFORE_START);c.setEndAt(e,CKEDITOR.POSITION_AFTER_END)}else c.moveToPosition(e,h[b?1:0])}}else d=1;d&&this.moveToRange(c);return!!d},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,true)},getEnclosedNode:function(){var a=
|
||||
this.clone();a.optimize();if(a.startContainer.type!=CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),b=CKEDITOR.dom.walker.bookmark(false,true),c=CKEDITOR.dom.walker.whitespaces(true);a.evaluator=function(a){return c(a)&&b(a)};var d=a.next();a.reset();return d&&d.equals(a.previous())?d:null},getTouchedStartNode:function(){var a=this.startContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=
|
||||
this.endContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},getNextEditableNode:c(),getPreviousEditableNode:c(1),scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("<span> </span>",this.document),b,c,d,e=this.clone();e.optimize();if(d=e.startContainer.type==CKEDITOR.NODE_TEXT){c=e.startContainer.getText();b=e.startContainer.split(e.startOffset);a.insertAfter(e.startContainer)}else e.insertNode(a);a.scrollIntoView();if(d){e.startContainer.setText(c);
|
||||
b.remove()}a.remove()},_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a}}}(),CKEDITOR.POSITION_AFTER_START=1,CKEDITOR.POSITION_BEFORE_END=2,CKEDITOR.POSITION_BEFORE_START=3,CKEDITOR.POSITION_AFTER_END=4,CKEDITOR.ENLARGE_ELEMENT=1,CKEDITOR.ENLARGE_BLOCK_CONTENTS=2,CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3,CKEDITOR.ENLARGE_INLINE=4,CKEDITOR.START=1,CKEDITOR.END=2,CKEDITOR.SHRINK_ELEMENT=1,CKEDITOR.SHRINK_TEXT=2,"use strict",function(){function a(a){if(!(arguments.length<
|
||||
1)){this.range=a;this.forceBrBreak=0;this.enlargeBr=1;this.enforceRealBlocks=0;this._||(this._={})}}function f(a){var b=[];a.forEach(function(a){if(a.getAttribute("contenteditable")=="true"){b.push(a);return false}},CKEDITOR.NODE_ELEMENT,true);return b}function c(a,b,d,e){a:{e==null&&(e=f(d));for(var g;g=e.shift();)if(g.getDtd().p){e={element:g,remaining:e};break a}e=null}if(!e)return 0;if((g=CKEDITOR.filter.instances[e.element.data("cke-filter")])&&!g.check(b))return c(a,b,d,e.remaining);b=new CKEDITOR.dom.range(e.element);
|
||||
b.selectNodeContents(e.element);b=b.createIterator();b.enlargeBr=a.enlargeBr;b.enforceRealBlocks=a.enforceRealBlocks;b.activeFilter=b.filter=g;a._.nestedEditable={element:e.element,container:d,remaining:e.remaining,iterator:b};return 1}function e(a,b,c){if(!b)return false;a=a.clone();a.collapse(!c);return a.checkBoundaryOfElement(b,c?CKEDITOR.START:CKEDITOR.END)}var b=/^[\r\n\t ]+$/,i=CKEDITOR.dom.walker.bookmark(false,true),j=CKEDITOR.dom.walker.whitespaces(true),d=function(a){return i(a)&&j(a)},
|
||||
g={dd:1,dt:1,li:1};a.prototype={getNextParagraph:function(a){var f,j,q,p,o,a=a||"p";if(this._.nestedEditable){if(f=this._.nestedEditable.iterator.getNextParagraph(a)){this.activeFilter=this._.nestedEditable.iterator.activeFilter;return f}this.activeFilter=this.filter;if(c(this,a,this._.nestedEditable.container,this._.nestedEditable.remaining)){this.activeFilter=this._.nestedEditable.iterator.activeFilter;return this._.nestedEditable.iterator.getNextParagraph(a)}this._.nestedEditable=null}if(!this.range.root.getDtd()[a])return null;
|
||||
if(!this._.started){var n=this.range.clone();j=n.startPath();var l=n.endPath(),s=!n.collapsed&&e(n,j.block),v=!n.collapsed&&e(n,l.block,1);n.shrink(CKEDITOR.SHRINK_ELEMENT,true);s&&n.setStartAt(j.block,CKEDITOR.POSITION_BEFORE_END);v&&n.setEndAt(l.block,CKEDITOR.POSITION_AFTER_START);j=n.endContainer.hasAscendant("pre",true)||n.startContainer.hasAscendant("pre",true);n.enlarge(this.forceBrBreak&&!j||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(!n.collapsed){j=
|
||||
new CKEDITOR.dom.walker(n.clone());l=CKEDITOR.dom.walker.bookmark(true,true);j.evaluator=l;this._.nextNode=j.next();j=new CKEDITOR.dom.walker(n.clone());j.evaluator=l;j=j.previous();this._.lastNode=j.getNextSourceNode(true,null,n.root);if(this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()){l=this.range.clone();l.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END);if(l.checkEndOfBlock()){l=
|
||||
new CKEDITOR.dom.elementPath(l.endContainer,l.root);this._.lastNode=(l.block||l.blockLimit).getNextSourceNode(true)}}if(!this._.lastNode||!n.root.contains(this._.lastNode)){this._.lastNode=this._.docEndMarker=n.document.createText("");this._.lastNode.insertAfter(j)}n=null}this._.started=1;j=n}l=this._.nextNode;n=this._.lastNode;for(this._.nextNode=null;l;){var s=0,v=l.hasAscendant("pre"),t=l.type!=CKEDITOR.NODE_ELEMENT,B=0;if(t)l.type==CKEDITOR.NODE_TEXT&&b.test(l.getText())&&(t=0);else{var u=l.getName();
|
||||
if(CKEDITOR.dtd.$block[u]&&l.getAttribute("contenteditable")=="false"){f=l;c(this,a,f);break}else if(l.isBlockBoundary(this.forceBrBreak&&!v&&{br:1})){if(u=="br")t=1;else if(!j&&!l.getChildCount()&&u!="hr"){f=l;q=l.equals(n);break}if(j){j.setEndAt(l,CKEDITOR.POSITION_BEFORE_START);if(u!="br")this._.nextNode=l}s=1}else{if(l.getFirst()){if(!j){j=this.range.clone();j.setStartAt(l,CKEDITOR.POSITION_BEFORE_START)}l=l.getFirst();continue}t=1}}if(t&&!j){j=this.range.clone();j.setStartAt(l,CKEDITOR.POSITION_BEFORE_START)}q=
|
||||
(!s||t)&&l.equals(n);if(j&&!s)for(;!l.getNext(d)&&!q;){u=l.getParent();if(u.isBlockBoundary(this.forceBrBreak&&!v&&{br:1})){s=1;t=0;q||u.equals(n);j.setEndAt(u,CKEDITOR.POSITION_BEFORE_END);break}l=u;t=1;q=l.equals(n);B=1}t&&j.setEndAt(l,CKEDITOR.POSITION_AFTER_END);l=this._getNextSourceNode(l,B,n);if((q=!l)||s&&j)break}if(!f){if(!j){this._.docEndMarker&&this._.docEndMarker.remove();return this._.nextNode=null}f=new CKEDITOR.dom.elementPath(j.startContainer,j.root);l=f.blockLimit;s={div:1,th:1,td:1};
|
||||
f=f.block;if(!f&&l&&!this.enforceRealBlocks&&s[l.getName()]&&j.checkStartOfBlock()&&j.checkEndOfBlock()&&!l.equals(j.root))f=l;else if(!f||this.enforceRealBlocks&&f.is(g)){f=this.range.document.createElement(a);j.extractContents().appendTo(f);f.trim();j.insertNode(f);p=o=true}else if(f.getName()!="li"){if(!j.checkStartOfBlock()||!j.checkEndOfBlock()){f=f.clone(false);j.extractContents().appendTo(f);f.trim();o=j.splitBlock();p=!o.wasStartOfBlock;o=!o.wasEndOfBlock;j.insertNode(f)}}else if(!q)this._.nextNode=
|
||||
f.equals(n)?null:this._getNextSourceNode(j.getBoundaryNodes().endNode,1,n)}if(p)(p=f.getPrevious())&&p.type==CKEDITOR.NODE_ELEMENT&&(p.getName()=="br"?p.remove():p.getLast()&&p.getLast().$.nodeName.toLowerCase()=="br"&&p.getLast().remove());if(o)(p=f.getLast())&&p.type==CKEDITOR.NODE_ELEMENT&&p.getName()=="br"&&(!CKEDITOR.env.needsBrFiller||p.getPrevious(i)||p.getNext(i))&&p.remove();if(!this._.nextNode)this._.nextNode=q||f.equals(n)||!n?null:this._getNextSourceNode(f,1,n);return f},_getNextSourceNode:function(a,
|
||||
b,c){function d(a){return!(a.equals(c)||a.equals(e))}for(var e=this.range.root,a=a.getNextSourceNode(b,null,d);!i(a);)a=a.getNextSourceNode(b,null,d);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}}(),CKEDITOR.command=function(a,f){this.uiItems=[];this.exec=function(c){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return false;this.editorFocus&&a.focus();return this.fire("exec")===false?true:f.exec.call(this,a,c)!==false};this.refresh=function(a,
|
||||
b){if(!this.readOnly&&a.readOnly)return true;if(this.context&&!b.isContextFor(this.context)){this.disable();return true}if(!this.checkAllowed(true)){this.disable();return true}this.startDisabled||this.enable();this.modes&&!this.modes[a.mode]&&this.disable();return this.fire("refresh",{editor:a,path:b})===false?true:f.refresh&&f.refresh.apply(this,arguments)!==false};var c;this.checkAllowed=function(e){return!e&&typeof c=="boolean"?c:c=a.activeFilter.checkFeature(this)};CKEDITOR.tools.extend(this,
|
||||
f,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!f.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)},CKEDITOR.command.prototype={enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(!this.preserveState||typeof this.previousState=="undefined"?CKEDITOR.TRISTATE_OFF:this.previousState)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(a){if(this.state==a||a!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return false;
|
||||
this.previousState=this.state;this.state=a;this.fire("state");return true},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?this.setState(CKEDITOR.TRISTATE_ON):this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}},CKEDITOR.event.implementOn(CKEDITOR.command.prototype),CKEDITOR.ENTER_P=1,CKEDITOR.ENTER_BR=2,CKEDITOR.ENTER_DIV=3,CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,
|
||||
forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"<!DOCTYPE html>",bodyId:"",bodyClass:"",fullPage:!1,height:200,extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){function a(a,b,c,d,e){var f,g,a=[];for(f in b){g=b[f];g=typeof g=="boolean"?{}:typeof g=="function"?{match:g}:F(g);if(f.charAt(0)!="$")g.elements=f;if(c)g.featureName=c.toLowerCase();var l=g;l.elements=j(l.elements,
|
||||
/\s+/)||null;l.propertiesOnly=l.propertiesOnly||l.elements===true;var h=/\s*,\s*/,i=void 0;for(i in D){l[i]=j(l[i],h)||null;var k=l,o=E[i],u=j(l[E[i]],h),m=l[i],n=[],G=true,v=void 0;u?G=false:u={};for(v in m)if(v.charAt(0)=="!"){v=v.slice(1);n.push(v);u[v]=true;G=false}for(;v=n.pop();){m[v]=m["!"+v];delete m["!"+v]}k[o]=(G?false:u)||null}l.match=l.match||null;d.push(g);a.push(g)}for(var b=e.elements,e=e.generic,y,c=0,d=a.length;c<d;++c){f=F(a[c]);g=f.classes===true||f.styles===true||f.attributes===
|
||||
true;l=f;i=o=h=void 0;for(h in D)l[h]=s(l[h]);k=true;for(i in E){h=E[i];o=l[h];u=[];m=void 0;for(m in o)m.indexOf("*")>-1?u.push(RegExp("^"+m.replace(/\*/g,".*")+"$")):u.push(m);o=u;if(o.length){l[h]=o;k=false}}l.nothingRequired=k;l.noProperties=!(l.attributes||l.classes||l.styles);if(f.elements===true||f.elements===null)e[g?"unshift":"push"](f);else{l=f.elements;delete f.elements;for(y in l)if(b[y])b[y][g?"unshift":"push"](f);else b[y]=[f]}}}function f(a,b,e,f){if(!a.match||a.match(b))if(f||d(a,
|
||||
b)){if(!a.propertiesOnly)e.valid=true;if(!e.allAttributes)e.allAttributes=c(a.attributes,b.attributes,e.validAttributes);if(!e.allStyles)e.allStyles=c(a.styles,b.styles,e.validStyles);if(!e.allClasses){a=a.classes;b=b.classes;f=e.validClasses;if(a)if(a===true)a=true;else{for(var l=0,g=b.length,h;l<g;++l){h=b[l];f[h]||(f[h]=a(h))}a=false}else a=false;e.allClasses=a}}}function c(a,b,c){if(!a)return false;if(a===true)return true;for(var d in b)c[d]||(c[d]=a(d));return false}function e(a,c,d){if(!a.match||
|
||||
a.match(c)){if(a.noProperties)return false;d.hadInvalidAttribute=b(a.attributes,c.attributes)||d.hadInvalidAttribute;d.hadInvalidStyle=b(a.styles,c.styles)||d.hadInvalidStyle;a=a.classes;c=c.classes;if(a){for(var e=false,f=a===true,l=c.length;l--;)if(f||a(c[l])){c.splice(l,1);e=true}a=e}else a=false;d.hadInvalidClass=a||d.hadInvalidClass}}function b(a,b){if(!a)return false;var c=false,d=a===true,e;for(e in b)if(d||a(e)){delete b[e];c=true}return c}function i(a,b,c){if(a.disabled||a.customConfig&&
|
||||
!c||!b)return false;a._.cachedChecks={};return true}function j(a,b){if(!a)return false;if(a===true)return a;if(typeof a=="string"){a=C(a);return a=="*"?true:CKEDITOR.tools.convertArrayToObject(a.split(b))}if(CKEDITOR.tools.isArray(a))return a.length?CKEDITOR.tools.convertArrayToObject(a):false;var c={},d=0,e;for(e in a){c[e]=a[e];d++}return d?c:false}function d(a,b){if(a.nothingRequired)return true;var c,d,e,f;if(e=a.requiredClasses){f=b.classes;for(c=0;c<e.length;++c){d=e[c];if(typeof d=="string"){if(CKEDITOR.tools.indexOf(f,
|
||||
d)==-1)return false}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(f,d))return false}}return g(b.styles,a.requiredStyles)&&g(b.attributes,a.requiredAttributes)}function g(a,b){if(!b)return true;for(var c=0,d;c<b.length;++c){d=b[c];if(typeof d=="string"){if(!(d in a))return false}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,d))return false}return true}function h(a){if(!a)return{};for(var a=a.split(/\s*,\s*/).sort(),b={};a.length;)b[a.shift()]=K;return b}function k(a){for(var b,c,d,
|
||||
e,f={},l=1,a=C(a);b=a.match(J);){if(c=b[2]){d=m(c,"styles");e=m(c,"attrs");c=m(c,"classes")}else d=e=c=null;f["$"+l++]={elements:b[1],classes:c,styles:d,attributes:e};a=a.slice(b[0].length)}return f}function m(a,b){var c=a.match(N[b]);return c?C(c[1]):null}function q(a){var b=a.styleBackup=a.attributes.style,c=a.classBackup=a.attributes["class"];if(!a.styles)a.styles=CKEDITOR.tools.parseCssText(b||"",1);if(!a.classes)a.classes=c?c.split(/\s+/):[]}function p(a,b,c,d){var g=0,h;if(d.toHtml)b.name=b.name.replace(H,
|
||||
"$1");if(d.doCallbacks&&a.elementCallbacks){a:for(var i=a.elementCallbacks,j=0,k=i.length,o;j<k;++j)if(o=i[j](b)){h=o;break a}if(h)return h}if(d.doTransform)if(h=a._.transformations[b.name]){q(b);for(i=0;i<h.length;++i)u(a,b,h[i]);n(b)}if(d.doFilter){a:{i=b.name;j=a._;a=j.allowedRules.elements[i];h=j.allowedRules.generic;i=j.disallowedRules.elements[i];j=j.disallowedRules.generic;k=d.skipRequired;o={valid:false,validAttributes:{},validClasses:{},validStyles:{},allAttributes:false,allClasses:false,
|
||||
allStyles:false,hadInvalidAttribute:false,hadInvalidClass:false,hadInvalidStyle:false};var s,m;if(!a&&!h)a=null;else{q(b);if(i){s=0;for(m=i.length;s<m;++s)if(e(i[s],b,o)===false){a=null;break a}}if(j){s=0;for(m=j.length;s<m;++s)e(j[s],b,o)}if(a){s=0;for(m=a.length;s<m;++s)f(a[s],b,o,k)}if(h){s=0;for(m=h.length;s<m;++s)f(h[s],b,o,k)}a=o}}if(!a){c.push(b);return A}if(!a.valid){c.push(b);return A}m=a.validAttributes;var v=a.validStyles;h=a.validClasses;var i=b.attributes,G=b.styles,j=b.classes,k=b.classBackup,
|
||||
y=b.styleBackup,r,B,D=[];o=[];var w=/^data-cke-/;s=false;delete i.style;delete i["class"];delete b.classBackup;delete b.styleBackup;if(!a.allAttributes)for(r in i)if(!m[r])if(w.test(r)){if(r!=(B=r.replace(/^data-cke-saved-/,""))&&!m[B]){delete i[r];s=true}}else{delete i[r];s=true}if(!a.allStyles||a.hadInvalidStyle){for(r in G)a.allStyles||v[r]?D.push(r+":"+G[r]):s=true;if(D.length)i.style=D.sort().join("; ")}else if(y)i.style=y;if(!a.allClasses||a.hadInvalidClass){for(r=0;r<j.length;++r)(a.allClasses||
|
||||
h[j[r]])&&o.push(j[r]);o.length&&(i["class"]=o.sort().join(" "));k&&o.length<k.split(/\s+/).length&&(s=true)}else k&&(i["class"]=k);s&&(g=A);if(!d.skipFinalValidation&&!l(b)){c.push(b);return A}}if(d.toHtml)b.name=b.name.replace(T,"cke:$1");return g}function o(a){var b=[],c;for(c in a)c.indexOf("*")>-1&&b.push(c.replace(/\*/g,".*"));return b.length?RegExp("^(?:"+b.join("|")+")$"):null}function n(a){var b=a.attributes,c;delete b.style;delete b["class"];if(c=CKEDITOR.tools.writeCssText(a.styles,true))b.style=
|
||||
c;a.classes.length&&(b["class"]=a.classes.sort().join(" "))}function l(a){switch(a.name){case "a":if(!a.children.length&&!a.attributes.name)return false;break;case "img":if(!a.attributes.src)return false}return true}function s(a){if(!a)return false;if(a===true)return true;var b=o(a);return function(c){return c in a||b&&c.match(b)}}function v(){return new CKEDITOR.htmlParser.element("br")}function t(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.name=="br"||z.$block[a.name])}function B(a,b,c){var d=a.name;
|
||||
if(z.$empty[d]||!a.children.length)if(d=="hr"&&b=="br")a.replaceWith(v());else{a.parent&&c.push({check:"it",el:a.parent});a.remove()}else if(z.$block[d]||d=="tr")if(b=="br"){if(a.previous&&!t(a.previous)){b=v();b.insertBefore(a)}if(a.next&&!t(a.next)){b=v();b.insertAfter(a)}a.replaceWithChildren()}else{var d=a.children,e;b:{e=z[b];for(var f=0,l=d.length,g;f<l;++f){g=d[f];if(g.type==CKEDITOR.NODE_ELEMENT&&!e[g.name]){e=false;break b}}e=true}if(e){a.name=b;a.attributes={};c.push({check:"parent-down",
|
||||
el:a})}else{e=a.parent;for(var f=e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||e.name=="body",h,i,l=d.length;l>0;){g=d[--l];if(f&&(g.type==CKEDITOR.NODE_TEXT||g.type==CKEDITOR.NODE_ELEMENT&&z.$inline[g.name])){if(!h){h=new CKEDITOR.htmlParser.element(b);h.insertAfter(a);c.push({check:"parent-down",el:h})}h.add(g,0)}else{h=null;i=z[e.name]||z.span;g.insertAfter(a);e.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(g.type==CKEDITOR.NODE_ELEMENT&&!i[g.name])&&c.push({check:"el-up",el:g})}}a.remove()}}else if(d=="style")a.remove();
|
||||
else{a.parent&&c.push({check:"it",el:a.parent});a.replaceWithChildren()}}function u(a,b,c){var d,e;for(d=0;d<c.length;++d){e=c[d];if((!e.check||a.check(e.check,false))&&(!e.left||e.left(b))){e.right(b,O);break}}}function y(a,b){var c=b.getDefinition(),d=c.attributes,e=c.styles,f,l,g,h;if(a.name!=c.element)return false;for(f in d)if(f=="class"){c=d[f].split(/\s+/);for(g=a.classes.join("|");h=c.pop();)if(g.indexOf(h)==-1)return false}else if(a.attributes[f]!=d[f])return false;for(l in e)if(a.styles[l]!=
|
||||
e[l])return false;return true}function r(a,b){var c,d;if(typeof a=="string")c=a;else if(a instanceof CKEDITOR.style)d=a;else{c=a[0];d=a[1]}return[{element:c,left:d,right:function(a,c){c.transform(a,b)}}]}function x(a){return function(b){return y(b,a)}}function w(a){return function(b,c){c[a](b)}}var z=CKEDITOR.dtd,A=1,F=CKEDITOR.tools.copy,C=CKEDITOR.tools.trim,K="cke-test",G=["","p","br","div"];CKEDITOR.FILTER_SKIP_TREE=2;CKEDITOR.filter=function(a){this.allowedContent=[];this.disallowedContent=[];
|
||||
this.elementCallbacks=null;this.disabled=false;this.editor=null;this.id=CKEDITOR.tools.getNextNumber();this._={allowedRules:{elements:{},generic:[]},disallowedRules:{elements:{},generic:[]},transformations:{},cachedTests:{}};CKEDITOR.filter.instances[this.id]=this;if(a instanceof CKEDITOR.editor){a=this.editor=a;this.customConfig=true;var b=a.config.allowedContent;if(b===true)this.disabled=true;else{if(!b)this.customConfig=false;this.allow(b,"config",1);this.allow(a.config.extraAllowedContent,"extra",
|
||||
1);this.allow(G[a.enterMode]+" "+G[a.shiftEnterMode],"default",1);this.disallow(a.config.disallowedContent)}}else{this.customConfig=false;this.allow(a,"default",1)}};CKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(b,c,d){if(!i(this,b,d))return false;var e,f;if(typeof b=="string")b=k(b);else if(b instanceof CKEDITOR.style){if(b.toAllowedContentRules)return this.allow(b.toAllowedContentRules(this.editor),c,d);e=b.getDefinition();b={};d=e.attributes;b[e.element]=e={styles:e.styles,
|
||||
requiredStyles:e.styles&&CKEDITOR.tools.objectKeys(e.styles)};if(d){d=F(d);e.classes=d["class"]?d["class"].split(/\s+/):null;e.requiredClasses=e.classes;delete d["class"];e.attributes=d;e.requiredAttributes=d&&CKEDITOR.tools.objectKeys(d)}}else if(CKEDITOR.tools.isArray(b)){for(e=0;e<b.length;++e)f=this.allow(b[e],c,d);return f}a(this,b,c,this.allowedContent,this._.allowedRules);return true},applyTo:function(a,b,c,d){if(this.disabled)return false;var e=this,f=[],g=this.editor&&this.editor.config.protectedSource,
|
||||
h,i=false,j={doFilter:!c,doTransform:true,doCallbacks:true,toHtml:b};a.forEach(function(a){if(a.type==CKEDITOR.NODE_ELEMENT){if(a.attributes["data-cke-filter"]=="off")return false;if(!b||!(a.name=="span"&&~CKEDITOR.tools.objectKeys(a.attributes).join("|").indexOf("data-cke-"))){h=p(e,a,f,j);if(h&A)i=true;else if(h&2)return false}}else if(a.type==CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var c;a:{var d=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));c=[];var l,
|
||||
k,o;if(g)for(k=0;k<g.length;++k)if((o=d.match(g[k]))&&o[0].length==d.length){c=true;break a}d=CKEDITOR.htmlParser.fragment.fromHtml(d);d.children.length==1&&(l=d.children[0]).type==CKEDITOR.NODE_ELEMENT&&p(e,l,c,j);c=!c.length}c||f.push(a)}},null,true);f.length&&(i=true);for(var k,a=[],d=G[d||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)],o;c=f.pop();)c.type==CKEDITOR.NODE_ELEMENT?B(c,d,a):c.remove();for(;k=a.pop();){c=k.el;if(c.parent){o=z[c.parent.name]||z.span;switch(k.check){case "it":z.$removeEmpty[c.name]&&
|
||||
!c.children.length?B(c,d,a):l(c)||B(c,d,a);break;case "el-up":c.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&!o[c.name]&&B(c,d,a);break;case "parent-down":c.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&!o[c.name]&&B(c.parent,d,a)}}}return i},checkFeature:function(a){if(this.disabled||!a)return true;a.toFeature&&(a=a.toFeature(this.editor));return!a.requiredContent||this.check(a.requiredContent)},disable:function(){this.disabled=true},disallow:function(b){if(!i(this,b,true))return false;typeof b==
|
||||
"string"&&(b=k(b));a(this,b,null,this.disallowedContent,this._.disallowedRules);return true},addContentForms:function(a){if(!this.disabled&&a){var b,c,d=[],e;for(b=0;b<a.length&&!e;++b){c=a[b];if((typeof c=="string"||c instanceof CKEDITOR.style)&&this.check(c))e=c}if(e){for(b=0;b<a.length;++b)d.push(r(a[b],e));this.addTransformations(d)}}},addElementCallback:function(a){if(!this.elementCallbacks)this.elementCallbacks=[];this.elementCallbacks.push(a)},addFeature:function(a){if(this.disabled||!a)return true;
|
||||
a.toFeature&&(a=a.toFeature(this.editor));this.allow(a.allowedContent,a.name);this.addTransformations(a.contentTransformations);this.addContentForms(a.contentForms);return a.requiredContent&&(this.customConfig||this.disallowedContent.length)?this.check(a.requiredContent):true},addTransformations:function(a){var b,c;if(!this.disabled&&a){var d=this._.transformations,e;for(e=0;e<a.length;++e){b=a[e];var f=void 0,l=void 0,g=void 0,h=void 0,i=void 0,j=void 0;c=[];for(l=0;l<b.length;++l){g=b[l];if(typeof g==
|
||||
"string"){g=g.split(/\s*:\s*/);h=g[0];i=null;j=g[1]}else{h=g.check;i=g.left;j=g.right}if(!f){f=g;f=f.element?f.element:h?h.match(/^([a-z0-9]+)/i)[0]:f.left.getDefinition().element}i instanceof CKEDITOR.style&&(i=x(i));c.push({check:h==f?null:h,left:i,right:typeof j=="string"?w(j):j})}b=f;d[b]||(d[b]=[]);d[b].push(c)}}},check:function(a,b,c){if(this.disabled)return true;if(CKEDITOR.tools.isArray(a)){for(var d=a.length;d--;)if(this.check(a[d],b,c))return true;return false}var e,f;if(typeof a=="string"){f=
|
||||
a+"<"+(b===false?"0":"1")+(c?"1":"0")+">";if(f in this._.cachedChecks)return this._.cachedChecks[f];d=k(a).$1;e=d.styles;var g=d.classes;d.name=d.elements;d.classes=g=g?g.split(/\s*,\s*/):[];d.styles=h(e);d.attributes=h(d.attributes);d.children=[];g.length&&(d.attributes["class"]=g.join(" "));if(e)d.attributes.style=CKEDITOR.tools.writeCssText(d.styles);e=d}else{d=a.getDefinition();e=d.styles;g=d.attributes||{};if(e){e=F(e);g.style=CKEDITOR.tools.writeCssText(e,true)}else e={};e={name:d.element,attributes:g,
|
||||
classes:g["class"]?g["class"].split(/\s+/):[],styles:e,children:[]}}var g=CKEDITOR.tools.clone(e),l=[],i;if(b!==false&&(i=this._.transformations[e.name])){for(d=0;d<i.length;++d)u(this,e,i[d]);n(e)}p(this,g,l,{doFilter:true,doTransform:b!==false,skipRequired:!c,skipFinalValidation:!c});b=l.length>0?false:CKEDITOR.tools.objectCompare(e.attributes,g.attributes,true)?true:false;typeof a=="string"&&(this._.cachedChecks[f]=b);return b},getAllowedEnterMode:function(){var a=["p","div","br"],b={p:CKEDITOR.ENTER_P,
|
||||
div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(c,d){var e=a.slice(),f;if(this.check(G[c]))return c;for(d||(e=e.reverse());f=e.pop();)if(this.check(f))return b[f];return CKEDITOR.ENTER_BR}}(),destroy:function(){delete CKEDITOR.filter.instances[this.id];delete this._;delete this.allowedContent;delete this.disallowedContent}};var D={styles:1,attributes:1,classes:1},E={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},J=/^([a-z0-9\-*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,
|
||||
N={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},H=/^cke:(object|embed|param)$/,T=/^(object|embed|param)$/,O=CKEDITOR.filter.transformationsTools={sizeToStyle:function(a){this.lengthToStyle(a,"width");this.lengthToStyle(a,"height")},sizeToAttribute:function(a){this.lengthToAttribute(a,"width");this.lengthToAttribute(a,"height")},lengthToStyle:function(a,b,c){c=c||b;if(!(c in a.styles)){var d=a.attributes[b];if(d){/^\d+$/.test(d)&&(d=d+"px");a.styles[c]=d}}delete a.attributes[b]},
|
||||
lengthToAttribute:function(a,b,c){c=c||b;if(!(c in a.attributes)){var d=a.styles[b],e=d&&d.match(/^(\d+)(?:\.\d*)?px$/);e?a.attributes[c]=e[1]:d==K&&(a.attributes[c]=K)}delete a.styles[b]},alignmentToStyle:function(a){if(!("float"in a.styles)){var b=a.attributes.align;if(b=="left"||b=="right")a.styles["float"]=b}delete a.attributes.align},alignmentToAttribute:function(a){if(!("align"in a.attributes)){var b=a.styles["float"];if(b=="left"||b=="right")a.attributes.align=b}delete a.styles["float"]},matchesStyle:y,
|
||||
transform:function(a,b){if(typeof b=="string")a.name=b;else{var c=b.getDefinition(),d=c.styles,e=c.attributes,f,g,l,h;a.name=c.element;for(f in e)if(f=="class"){c=a.classes.join("|");for(l=e[f].split(/\s+/);h=l.pop();)c.indexOf(h)==-1&&a.classes.push(h)}else a.attributes[f]=e[f];for(g in d)a.styles[g]=d[g]}}}}(),function(){CKEDITOR.focusManager=function(a){if(a.focusManager)return a.focusManager;this.hasFocus=false;this.currentActive=null;this._={editor:a};return this};CKEDITOR.focusManager._={blurDelay:200};
|
||||
CKEDITOR.focusManager.prototype={focus:function(a){this._.timer&&clearTimeout(this._.timer);if(a)this.currentActive=a;if(!this.hasFocus&&!this._.locked){(a=CKEDITOR.currentInstance)&&a.focusManager.blur(1);this.hasFocus=true;(a=this._.editor.container)&&a.addClass("cke_focus");this._.editor.fire("focus")}},lock:function(){this._.locked=1},unlock:function(){delete this._.locked},blur:function(a){function f(){if(this.hasFocus){this.hasFocus=false;var a=this._.editor.container;a&&a.removeClass("cke_focus");
|
||||
this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var c=CKEDITOR.focusManager._.blurDelay;a||!c?f.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;f.call(this)},c,this)}},add:function(a,f){var c=a.getCustomData("focusmanager");if(!c||c!=this){c&&c.remove(a);var c="focus",e="blur";if(f)if(CKEDITOR.env.ie){c="focusin";e="focusout"}else CKEDITOR.event.useCapture=1;var b={blur:function(){a.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(a)}};
|
||||
a.on(c,b.focus,this);a.on(e,b.blur,this);if(f)CKEDITOR.event.useCapture=0;a.setCustomData("focusmanager",this);a.setCustomData("focusmanager_handlers",b)}},remove:function(a){a.removeCustomData("focusmanager");var f=a.removeCustomData("focusmanager_handlers");a.removeListener("blur",f.blur);a.removeListener("focus",f.focus)}}}(),CKEDITOR.keystrokeHandler=function(a){if(a.keystrokeHandler)return a.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes={};this._={editor:a};return this},function(){var a,
|
||||
f=function(c){var c=c.data,b=c.getKeystroke(),f=this.keystrokes[b],j=this._.editor;a=j.fire("key",{keyCode:b,domEvent:c})===false;if(!a){f&&(a=j.execCommand(f,{from:"keystrokeHandler"})!==false);a||(a=!!this.blockedKeystrokes[b])}a&&c.preventDefault(true);return!a},c=function(c){if(a){a=false;c.data.preventDefault(true)}};CKEDITOR.keystrokeHandler.prototype={attach:function(a){a.on("keydown",f,this);if(CKEDITOR.env.gecko&&CKEDITOR.env.mac)a.on("keypress",c,this)}}}(),function(){CKEDITOR.lang={languages:{af:1,
|
||||
ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,"fr-ca":1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,"zh-cn":1,zh:1},rtl:{ar:1,fa:1,he:1,ku:1,ug:1},load:function(a,f,c){if(!a||!CKEDITOR.lang.languages[a])a=this.detect(f,a);var e=this,f=function(){e[a].dir=
|
||||
e.rtl[a]?"rtl":"ltr";c(a,e[a])};this[a]?f():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+a+".js"),f,this)},detect:function(a,f){var c=this.languages,f=f||navigator.userLanguage||navigator.language||a,e=f.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),b=e[1],e=e[2];c[b+"-"+e]?b=b+"-"+e:c[b]||(b=null);CKEDITOR.lang.detect=b?function(){return b}:function(a){return a};return b||a}}}(),CKEDITOR.scriptLoader=function(){var a={},f={};return{load:function(c,e,b,i){var j=typeof c=="string";j&&(c=[c]);
|
||||
b||(b=CKEDITOR);var d=c.length,g=[],h=[],k=function(a){e&&(j?e.call(b,a):e.call(b,g,h))};if(d===0)k(true);else{var m=function(a,b){(b?g:h).push(a);if(--d<=0){i&&CKEDITOR.document.getDocumentElement().removeStyle("cursor");k(b)}},q=function(b,c){a[b]=1;var d=f[b];delete f[b];for(var e=0;e<d.length;e++)d[e](b,c)},p=function(b){if(a[b])m(b,true);else{var c=f[b]||(f[b]=[]);c.push(m);if(!(c.length>1)){var d=new CKEDITOR.dom.element("script");d.setAttributes({type:"text/javascript",src:b});if(e)if(CKEDITOR.env.ie&&
|
||||
CKEDITOR.env.version<11)d.$.onreadystatechange=function(){if(d.$.readyState=="loaded"||d.$.readyState=="complete"){d.$.onreadystatechange=null;q(b,true)}};else{d.$.onload=function(){setTimeout(function(){q(b,true)},0)};d.$.onerror=function(){q(b,false)}}d.appendTo(CKEDITOR.document.getHead())}}};i&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var o=0;o<d;o++)p(c[o])}},queue:function(){function a(){var b;(b=e[0])&&this.load(b.scriptUrl,b.callback,CKEDITOR,0)}var e=[];return function(b,
|
||||
f){var j=this;e.push({scriptUrl:b,callback:function(){f&&f.apply(this,arguments);e.shift();a.call(j)}});e.length==1&&a.call(this)}}()}}(),CKEDITOR.resourceManager=function(a,f){this.basePath=a;this.fileName=f;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}},CKEDITOR.resourceManager.prototype={add:function(a,f){if(this.registered[a])throw'[CKEDITOR.resourceManager.add] The resource name "'+a+'" is already registered.';var c=this.registered[a]=f||{};c.name=a;c.path=this.getPath(a);
|
||||
CKEDITOR.fire(a+CKEDITOR.tools.capitalize(this.fileName)+"Ready",c);return this.get(a)},get:function(a){return this.registered[a]||null},getPath:function(a){var f=this.externals[a];return CKEDITOR.getUrl(f&&f.dir||this.basePath+a+"/")},getFilePath:function(a){var f=this.externals[a];return CKEDITOR.getUrl(this.getPath(a)+(f?f.file:this.fileName+".js"))},addExternal:function(a,f,c){for(var a=a.split(","),e=0;e<a.length;e++){var b=a[e];c||(f=f.replace(/[^\/]+$/,function(a){c=a;return""}));this.externals[b]=
|
||||
{dir:f,file:c||this.fileName+".js"}}},load:function(a,f,c){CKEDITOR.tools.isArray(a)||(a=a?[a]:[]);for(var e=this.loaded,b=this.registered,i=[],j={},d={},g=0;g<a.length;g++){var h=a[g];if(h)if(!e[h]&&!b[h]){var k=this.getFilePath(h);i.push(k);k in j||(j[k]=[]);j[k].push(h)}else d[h]=this.get(h)}CKEDITOR.scriptLoader.load(i,function(a,b){if(b.length)throw'[CKEDITOR.resourceManager.load] Resource name "'+j[b[0]].join(",")+'" was not found at "'+b[0]+'".';for(var g=0;g<a.length;g++)for(var h=j[a[g]],
|
||||
i=0;i<h.length;i++){var l=h[i];d[l]=this.get(l);e[l]=1}f.call(c,d)},this)}},CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin"),CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(a){var f={};return function(c,e,b){var i={},j=function(c){a.call(this,c,function(a){CKEDITOR.tools.extend(i,a);var c=[],d;for(d in a){var m=a[d],q=m&&m.requires;if(!f[d]){if(m.icons)for(var p=m.icons.split(","),o=p.length;o--;)CKEDITOR.skin.addIcon(p[o],m.path+"icons/"+(CKEDITOR.env.hidpi&&
|
||||
m.hidpi?"hidpi/":"")+p[o]+".png");f[d]=1}if(q){q.split&&(q=q.split(","));for(m=0;m<q.length;m++)i[q[m]]||c.push(q[m])}}if(c.length)j.call(this,c);else{for(d in i){m=i[d];if(m.onLoad&&!m.onLoad._called){m.onLoad()===false&&delete i[d];m.onLoad._called=1}}e&&e.call(b||window,i)}},this)};j.call(this,c)}}),CKEDITOR.plugins.setLang=function(a,f,c){var e=this.get(a),a=e.langEntries||(e.langEntries={}),e=e.lang||(e.lang=[]);e.split&&(e=e.split(","));CKEDITOR.tools.indexOf(e,f)==-1&&e.push(f);a[f]=c},CKEDITOR.ui=
|
||||
function(a){if(a.ui)return a.ui;this.items={};this.instances={};this.editor=a;this._={handlers:{}};return this},CKEDITOR.ui.prototype={add:function(a,f,c){c.name=a.toLowerCase();var e=this.items[a]={type:f,command:c.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(e,c)},get:function(a){return this.instances[a]},create:function(a){var f=this.items[a],c=f&&this._.handlers[f.type],e=f&&f.command&&this.editor.getCommand(f.command),c=c&&c.create.apply(this,f.args);this.instances[a]=
|
||||
c;e&&e.uiItems.push(c);if(c&&!c.type)c.type=f.type;return c},addHandler:function(a,f){this._.handlers[a]=f},space:function(a){return CKEDITOR.document.getById(this.spaceId(a))},spaceId:function(a){return this.editor.id+"_"+a}},CKEDITOR.event.implementOn(CKEDITOR.ui),function(){function a(a,d,e){CKEDITOR.event.call(this);a=a&&CKEDITOR.tools.clone(a);if(d!==void 0){if(d instanceof CKEDITOR.dom.element){if(!e)throw Error("One of the element modes must be specified.");}else throw Error("Expect element of type CKEDITOR.dom.element.");
|
||||
if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&e==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");if(!(e==CKEDITOR.ELEMENT_MODE_INLINE?d.is(CKEDITOR.dtd.$editable)||d.is("textarea"):e==CKEDITOR.ELEMENT_MODE_REPLACE?!d.is(CKEDITOR.dtd.$nonBodyContent):1))throw Error('The specified element mode is not supported on element: "'+d.getName()+'".');this.element=d;this.elementMode=e;this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&(d.getId()||d.getNameAtt())}else this.elementMode=
|
||||
CKEDITOR.ELEMENT_MODE_NONE;this._={};this.commands={};this.templates={};this.name=this.name||f();this.id=CKEDITOR.tools.getNextId();this.status="unloaded";this.config=CKEDITOR.tools.prototypedCopy(CKEDITOR.config);this.ui=new CKEDITOR.ui(this);this.focusManager=new CKEDITOR.focusManager(this);this.keystrokeHandler=new CKEDITOR.keystrokeHandler(this);this.on("readOnly",c);this.on("selectionChange",function(a){b(this,a.data.path)});this.on("activeFilterChange",function(){b(this,this.elementPath(),true)});
|
||||
this.on("mode",c);this.on("instanceReady",function(){this.config.startupFocus&&this.focus()});CKEDITOR.fire("instanceCreated",null,this);CKEDITOR.add(this);CKEDITOR.tools.setTimeout(function(){j(this,a)},0,this)}function f(){do var a="editor"+ ++q;while(CKEDITOR.instances[a]);return a}function c(){var a=this.commands,b;for(b in a)e(this,a[b])}function e(a,b){b[b.startDisabled?"disable":a.readOnly&&!b.readOnly?"disable":b.modes[a.mode]?"enable":"disable"]()}function b(a,b,c){if(b){var d,e,f=a.commands;
|
||||
for(e in f){d=f[e];(c||d.contextSensitive)&&d.refresh(a,b)}}}function i(a){var b=a.config.customConfig;if(!b)return false;var b=CKEDITOR.getUrl(b),c=p[b]||(p[b]={});if(c.fn){c.fn.call(a,a.config);(CKEDITOR.getUrl(a.config.customConfig)==b||!i(a))&&a.fireOnce("customConfigLoaded")}else CKEDITOR.scriptLoader.queue(b,function(){c.fn=CKEDITOR.editorConfig?CKEDITOR.editorConfig:function(){};i(a)});return true}function j(a,b){a.on("customConfigLoaded",function(){if(b){if(b.on)for(var c in b.on)a.on(c,b.on[c]);
|
||||
CKEDITOR.tools.extend(a.config,b,true);delete a.config.on}c=a.config;a.readOnly=!(!c.readOnly&&!(a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.is("textarea")?a.element.hasAttribute("disabled"):a.element.isReadOnly():a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&a.element.hasAttribute("disabled")));a.blockless=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?!(a.element.is("textarea")||CKEDITOR.dtd[a.element.getName()].p):false;a.tabIndex=c.tabIndex||a.element&&a.element.getAttribute("tabindex")||
|
||||
0;a.activeEnterMode=a.enterMode=a.blockless?CKEDITOR.ENTER_BR:c.enterMode;a.activeShiftEnterMode=a.shiftEnterMode=a.blockless?CKEDITOR.ENTER_BR:c.shiftEnterMode;if(c.skin)CKEDITOR.skinName=c.skin;a.fireOnce("configLoaded");a.dataProcessor=new CKEDITOR.htmlDataProcessor(a);a.filter=a.activeFilter=new CKEDITOR.filter(a);d(a)});if(b&&b.customConfig!=null)a.config.customConfig=b.customConfig;i(a)||a.fireOnce("customConfigLoaded")}function d(a){CKEDITOR.skin.loadPart("editor",function(){g(a)})}function g(a){CKEDITOR.lang.load(a.config.language,
|
||||
a.config.defaultLanguage,function(b,c){var d=a.config.title;a.langCode=b;a.lang=CKEDITOR.tools.prototypedCopy(c);a.title=typeof d=="string"||d===false?d:[a.lang.editor,a.name].join(", ");if(!a.config.contentsLangDirection)a.config.contentsLangDirection=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.getDirection(1):a.lang.dir;a.fire("langLoaded");h(a)})}function h(a){a.getStylesSet(function(b){a.once("loaded",function(){a.fire("stylesSet",{styles:b})},null,null,1);k(a)})}function k(a){var b=
|
||||
a.config,c=b.plugins,d=b.extraPlugins,e=b.removePlugins;if(d)var f=RegExp("(?:^|,)(?:"+d.replace(/\s*,\s*/g,"|")+")(?=,|$)","g"),c=c.replace(f,""),c=c+(","+d);if(e)var g=RegExp("(?:^|,)(?:"+e.replace(/\s*,\s*/g,"|")+")(?=,|$)","g"),c=c.replace(g,"");CKEDITOR.env.air&&(c=c+",adobeair");CKEDITOR.plugins.load(c.split(","),function(c){var d=[],e=[],f=[];a.plugins=c;for(var h in c){var i=c[h],l=i.lang,j=null,k=i.requires,s;CKEDITOR.tools.isArray(k)&&(k=k.join(","));if(k&&(s=k.match(g)))for(;k=s.pop();)CKEDITOR.tools.setTimeout(function(a,
|
||||
b){throw Error('Plugin "'+a.replace(",","")+'" cannot be removed from the plugins list, because it\'s required by "'+b+'" plugin.');},0,null,[k,h]);if(l&&!a.lang[h]){l.split&&(l=l.split(","));if(CKEDITOR.tools.indexOf(l,a.langCode)>=0)j=a.langCode;else{j=a.langCode.replace(/-.*/,"");j=j!=a.langCode&&CKEDITOR.tools.indexOf(l,j)>=0?j:CKEDITOR.tools.indexOf(l,"en")>=0?"en":l[0]}if(!i.langEntries||!i.langEntries[j])f.push(CKEDITOR.getUrl(i.path+"lang/"+j+".js"));else{a.lang[h]=i.langEntries[j];j=null}}e.push(j);
|
||||
d.push(i)}CKEDITOR.scriptLoader.load(f,function(){for(var c=["beforeInit","init","afterInit"],f=0;f<c.length;f++)for(var g=0;g<d.length;g++){var h=d[g];f===0&&(e[g]&&h.lang&&h.langEntries)&&(a.lang[h.name]=h.langEntries[e[g]]);if(h[c[f]])h[c[f]](a)}a.fireOnce("pluginsLoaded");b.keystrokes&&a.setKeystroke(a.config.keystrokes);for(g=0;g<a.config.blockedKeystrokes.length;g++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[g]]=1;a.status="loaded";a.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",
|
||||
null,a)})})}function m(){var a=this.element;if(a&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var b=this.getData();this.config.htmlEncodeOutput&&(b=CKEDITOR.tools.htmlEncode(b));a.is("textarea")?a.setValue(b):a.setHtml(b);return true}return false}a.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=a;var q=0,p={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{addCommand:function(a,b){b.name=a.toLowerCase();var c=new CKEDITOR.command(this,b);this.mode&&e(this,c);return this.commands[a]=c},
|
||||
_attachToForm:function(){function a(d){b.updateElement();b._.required&&(!c.getValue()&&b.fire("required")===false)&&d.data.preventDefault()}var b=this,c=b.element,d=new CKEDITOR.dom.element(c.$.form);if(c.is("textarea")&&d){d.on("submit",a);if(d.$.submit&&d.$.submit.call&&d.$.submit.apply)d.$.submit=CKEDITOR.tools.override(d.$.submit,function(b){return function(){a();b.apply?b.apply(this):b()}});b.on("destroy",function(){d.removeListener("submit",a)})}},destroy:function(a){this.fire("beforeDestroy");
|
||||
!a&&m.call(this);this.editable(null);this.filter.destroy();delete this.filter;delete this.activeFilter;this.status="destroyed";this.fire("destroy");this.removeAllListeners();CKEDITOR.remove(this);CKEDITOR.fire("instanceDestroyed",null,this)},elementPath:function(a){if(!a){a=this.getSelection();if(!a)return null;a=a.getStartElement()}return a?new CKEDITOR.dom.elementPath(a,this.editable()):null},createRange:function(){var a=this.editable();return a?new CKEDITOR.dom.range(a):null},execCommand:function(a,
|
||||
b){var c=this.getCommand(a),d={name:a,commandData:b,command:c};if(c&&c.state!=CKEDITOR.TRISTATE_DISABLED&&this.fire("beforeCommandExec",d)!==false){d.returnValue=c.exec(d.commandData);if(!c.async&&this.fire("afterCommandExec",d)!==false)return d.returnValue}return false},getCommand:function(a){return this.commands[a]},getData:function(a){!a&&this.fire("beforeGetData");var b=this._.data;if(typeof b!="string")b=(b=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?b.is("textarea")?b.getValue():
|
||||
b.getHtml():"";b={dataValue:b};!a&&this.fire("getData",b);return b.dataValue},getSnapshot:function(){var a=this.fire("getSnapshot");if(typeof a!="string"){var b=this.element;b&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(a=b.is("textarea")?b.getValue():b.getHtml())}return a},loadSnapshot:function(a){this.fire("loadSnapshot",a)},setData:function(a,b,c){var d=true,e=b;if(b&&typeof b=="object"){c=b.internal;e=b.callback;d=!b.noSnapshot}!c&&d&&this.fire("saveSnapshot");if(e||!c)this.once("dataReady",
|
||||
function(a){!c&&d&&this.fire("saveSnapshot");e&&e.call(a.editor)});a={dataValue:a};!c&&this.fire("setData",a);this._.data=a.dataValue;!c&&this.fire("afterSetData",a)},setReadOnly:function(a){a=a==null||a;if(this.readOnly!=a){this.readOnly=a;this.keystrokeHandler.blockedKeystrokes[8]=+a;this.editable().setReadOnly(a);this.fire("readOnly")}},insertHtml:function(a,b){this.fire("insertHtml",{dataValue:a,mode:b})},insertText:function(a){this.fire("insertText",a)},insertElement:function(a){this.fire("insertElement",
|
||||
a)},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return this.status=="ready"&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return m.call(this)},setKeystroke:function(){for(var a=this.keystrokeHandler.keystrokes,b=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],c,d,e=b.length;e--;){c=b[e];d=0;if(CKEDITOR.tools.isArray(c)){d=c[1];c=c[0]}d?a[c]=d:delete a[c]}},addFeature:function(a){return this.filter.addFeature(a)},
|
||||
setActiveFilter:function(a){if(!a)a=this.filter;if(this.activeFilter!==a){this.activeFilter=a;this.fire("activeFilterChange");a===this.filter?this.setActiveEnterMode(null,null):this.setActiveEnterMode(a.getAllowedEnterMode(this.enterMode),a.getAllowedEnterMode(this.shiftEnterMode,true))}},setActiveEnterMode:function(a,b){a=a?this.blockless?CKEDITOR.ENTER_BR:a:this.enterMode;b=b?this.blockless?CKEDITOR.ENTER_BR:b:this.shiftEnterMode;if(this.activeEnterMode!=a||this.activeShiftEnterMode!=b){this.activeEnterMode=
|
||||
a;this.activeShiftEnterMode=b;this.fire("activeEnterModeChange")}}})}(),CKEDITOR.ELEMENT_MODE_NONE=0,CKEDITOR.ELEMENT_MODE_REPLACE=1,CKEDITOR.ELEMENT_MODE_APPENDTO=2,CKEDITOR.ELEMENT_MODE_INLINE=3,CKEDITOR.htmlParser=function(){this._={htmlPartsRegex:/<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)--\>)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}},function(){var a=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,f={checked:1,
|
||||
compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(c){for(var e,b,i=0,j;e=this._.htmlPartsRegex.exec(c);){b=e.index;if(b>i){i=c.substring(i,b);if(j)j.push(i);else this.onText(i)}i=this._.htmlPartsRegex.lastIndex;if(b=e[1]){b=b.toLowerCase();if(j&&CKEDITOR.dtd.$cdata[b]){this.onCDATA(j.join(""));
|
||||
j=null}if(!j){this.onTagClose(b);continue}}if(j)j.push(e[0]);else if(b=e[3]){b=b.toLowerCase();if(!/="/.test(b)){var d={},g,h=e[4];e=!!e[5];if(h)for(;g=a.exec(h);){var k=g[1].toLowerCase();g=g[2]||g[3]||g[4]||"";d[k]=!g&&f[k]?k:CKEDITOR.tools.htmlDecodeAttr(g)}this.onTagOpen(b,d,e);!j&&CKEDITOR.dtd.$cdata[b]&&(j=[])}}else if(b=e[2])this.onComment(b)}if(c.length>i)this.onText(c.substring(i,c.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},
|
||||
proto:{openTag:function(a){this._.output.push("<",a)},openTagClose:function(a,f){f?this._.output.push(" />"):this._.output.push(">")},attribute:function(a,f){typeof f=="string"&&(f=CKEDITOR.tools.htmlEncodeAttr(f));this._.output.push(" ",a,'="',f,'"')},closeTag:function(a){this._.output.push("</",a,">")},text:function(a){this._.output.push(a)},comment:function(a){this._.output.push("<\!--",a,"--\>")},write:function(a){this._.output.push(a)},reset:function(){this._.output=[];this._.indent=false},getHtml:function(a){var f=
|
||||
this._.output.join("");a&&this.reset();return f}}}),"use strict",function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var a=this.parent.children,f=CKEDITOR.tools.indexOf(a,this),c=this.previous,e=this.next;c&&(c.next=e);e&&(e.previous=c);a.splice(f,1);this.parent=null},replaceWith:function(a){var f=this.parent.children,c=CKEDITOR.tools.indexOf(f,this),e=a.previous=this.previous,b=a.next=this.next;e&&(e.next=a);b&&(b.previous=a);f[c]=a;a.parent=this.parent;
|
||||
this.parent=null},insertAfter:function(a){var f=a.parent.children,c=CKEDITOR.tools.indexOf(f,a),e=a.next;f.splice(c+1,0,this);this.next=a.next;this.previous=a;a.next=this;e&&(e.previous=this);this.parent=a.parent},insertBefore:function(a){var f=a.parent.children,c=CKEDITOR.tools.indexOf(f,a);f.splice(c,0,this);this.next=a;(this.previous=a.previous)&&(a.previous.next=this);a.previous=this;this.parent=a.parent},getAscendant:function(a){var f=typeof a=="function"?a:typeof a=="string"?function(c){return c.name==
|
||||
a}:function(c){return c.name in a},c=this.parent;for(;c&&c.type==CKEDITOR.NODE_ELEMENT;){if(f(c))return c;c=c.parent}return null},wrapWith:function(a){this.replaceWith(a);a.add(this);return a},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(a){return a||{}}}}(),"use strict",CKEDITOR.htmlParser.comment=function(a){this.value=a;this._={isBlockLike:false}},CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,
|
||||
{type:CKEDITOR.NODE_COMMENT,filter:function(a,f){var c=this.value;if(!(c=a.onComment(f,c,this))){this.remove();return false}if(typeof c!="string"){this.replaceWith(c);return false}this.value=c;return true},writeHtml:function(a,f){f&&this.filter(f);a.comment(this.value)}}),"use strict",function(){CKEDITOR.htmlParser.text=function(a){this.value=a;this._={isBlockLike:false}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(a,
|
||||
f){if(!(this.value=a.onText(f,this.value,this))){this.remove();return false}},writeHtml:function(a,f){f&&this.filter(f);a.text(this.value)}})}(),"use strict",function(){CKEDITOR.htmlParser.cdata=function(a){this.value=a};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(a){a.write(this.value)}})}(),"use strict",CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:true,
|
||||
hasInlineStarted:false}},function(){function a(a){return a.attributes["data-cke-survive"]?false:a.name=="a"&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var f=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),c={ol:1,ul:1},e=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),b={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=
|
||||
function(i,j,d){function g(a){var b;if(l.length>0)for(var c=0;c<l.length;c++){var d=l[c],e=d.name,f=CKEDITOR.dtd[e],g=v.name&&CKEDITOR.dtd[v.name];if((!g||g[e])&&(!a||!f||f[a]||!CKEDITOR.dtd[a])){if(!b){h();b=1}d=d.clone();d.parent=v;v=d;l.splice(c,1);c--}else if(e==v.name){m(v,v.parent,1);c--}}}function h(){for(;s.length;)m(s.shift(),v)}function k(a){if(a._.isBlockLike&&a.name!="pre"&&a.name!="textarea"){var b=a.children.length,c=a.children[b-1],d;if(c&&c.type==CKEDITOR.NODE_TEXT)(d=CKEDITOR.tools.rtrim(c.value))?
|
||||
c.value=d:a.children.length=b-1}}function m(b,c,e){var c=c||v||n,f=v;if(b.previous===void 0){if(q(c,b)){v=c;o.onTagOpen(d,{});b.returnPoint=c=v}k(b);(!a(b)||b.children.length)&&c.add(b);b.name=="pre"&&(B=false);b.name=="textarea"&&(t=false)}if(b.returnPoint){v=b.returnPoint;delete b.returnPoint}else v=e?c:f}function q(a,b){if((a==n||a.name=="body")&&d&&(!a.name||CKEDITOR.dtd[a.name][d])){var c,e;return(c=b.attributes&&(e=b.attributes["data-cke-real-element-type"])?e:b.name)&&c in CKEDITOR.dtd.$inline&&
|
||||
!(c in CKEDITOR.dtd.head)&&!b.isOrphan||b.type==CKEDITOR.NODE_TEXT}}function p(a,b){return a in CKEDITOR.dtd.$listItem||a in CKEDITOR.dtd.$tableContent?a==b||a=="dt"&&b=="dd"||a=="dd"&&b=="dt":false}var o=new CKEDITOR.htmlParser,n=j instanceof CKEDITOR.htmlParser.element?j:typeof j=="string"?new CKEDITOR.htmlParser.element(j):new CKEDITOR.htmlParser.fragment,l=[],s=[],v=n,t=n.name=="textarea",B=n.name=="pre";o.onTagOpen=function(b,d,i,j){d=new CKEDITOR.htmlParser.element(b,d);if(d.isUnknown&&i)d.isEmpty=
|
||||
true;d.isOptionalClose=j;if(a(d))l.push(d);else{if(b=="pre")B=true;else{if(b=="br"&&B){v.add(new CKEDITOR.htmlParser.text("\n"));return}b=="textarea"&&(t=true)}if(b=="br")s.push(d);else{for(;;){j=(i=v.name)?CKEDITOR.dtd[i]||(v._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):e;if(!d.isUnknown&&!v.isUnknown&&!j[b])if(v.isOptionalClose)o.onTagClose(i);else if(b in c&&i in c){i=v.children;(i=i[i.length-1])&&i.name=="li"||m(i=new CKEDITOR.htmlParser.element("li"),v);!d.returnPoint&&(d.returnPoint=v);
|
||||
v=i}else if(b in CKEDITOR.dtd.$listItem&&!p(b,i))o.onTagOpen(b=="li"?"ul":"dl",{},0,1);else if(i in f&&!p(b,i)){!d.returnPoint&&(d.returnPoint=v);v=v.parent}else{i in CKEDITOR.dtd.$inline&&l.unshift(v);if(v.parent)m(v,v.parent,1);else{d.isOrphan=1;break}}else break}g(b);h();d.parent=v;d.isEmpty?m(d):v=d}}};o.onTagClose=function(a){for(var b=l.length-1;b>=0;b--)if(a==l[b].name){l.splice(b,1);return}for(var c=[],e=[],f=v;f!=n&&f.name!=a;){f._.isBlockLike||e.unshift(f);c.push(f);f=f.returnPoint||f.parent}if(f!=
|
||||
n){for(b=0;b<c.length;b++){var g=c[b];m(g,g.parent)}v=f;f._.isBlockLike&&h();m(f,f.parent);if(f==v)v=v.parent;l=l.concat(e)}a=="body"&&(d=false)};o.onText=function(a){if((!v._.hasInlineStarted||s.length)&&!B&&!t){a=CKEDITOR.tools.ltrim(a);if(a.length===0)return}var c=v.name,i=c?CKEDITOR.dtd[c]||(v._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):e;if(!t&&!i["#"]&&c in f){o.onTagOpen(b[c]||"");o.onText(a)}else{h();g();!B&&!t&&(a=a.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));a=new CKEDITOR.htmlParser.text(a);
|
||||
if(q(v,a))this.onTagOpen(d,{},0,1);v.add(a)}};o.onCDATA=function(a){v.add(new CKEDITOR.htmlParser.cdata(a))};o.onComment=function(a){h();g();v.add(new CKEDITOR.htmlParser.comment(a))};o.parse(i);for(h();v!=n;)m(v,v.parent,1);k(n);return n};CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(a,b){isNaN(b)&&(b=this.children.length);var c=b>0?this.children[b-1]:null;if(c){if(a._.isBlockLike&&c.type==CKEDITOR.NODE_TEXT){c.value=CKEDITOR.tools.rtrim(c.value);if(c.value.length===
|
||||
0){this.children.pop();this.add(a);return}}c.next=a}a.previous=c;a.parent=this;this.children.splice(b,0,a);if(!this._.hasInlineStarted)this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike},filter:function(a,b){b=this.getFilterContext(b);a.onRoot(b,this);this.filterChildren(a,false,b)},filterChildren:function(a,b,c){if(this.childrenFilteredBy!=a.id){c=this.getFilterContext(c);if(b&&!this.parent)a.onRoot(c,this);this.childrenFilteredBy=a.id;for(b=0;b<this.children.length;b++)this.children[b].filter(a,
|
||||
c)===false&&b--}},writeHtml:function(a,b){b&&this.filter(b);this.writeChildrenHtml(a)},writeChildrenHtml:function(a,b,c){var e=this.getFilterContext();if(c&&!this.parent&&b)b.onRoot(e,this);b&&this.filterChildren(b,false,e);b=0;c=this.children;for(e=c.length;b<e;b++)c[b].writeHtml(a)},forEach:function(a,b,c){if(!c&&(!b||this.type==b))var e=a(this);if(e!==false)for(var c=this.children,f=0;f<c.length;f++){e=c[f];e.type==CKEDITOR.NODE_ELEMENT?e.forEach(a,b):(!b||e.type==b)&&a(e)}},getFilterContext:function(a){return a||
|
||||
{}}}}(),"use strict",function(){function a(){this.rules=[]}function f(c,e,b,f){var j,d;for(j in e){(d=c[j])||(d=c[j]=new a);d.add(e[j],b,f)}}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(c){this.id=CKEDITOR.tools.getNextNumber();this.elementNameRules=new a;this.attributeNameRules=new a;this.elementsRules={};this.attributesRules={};this.textRules=new a;this.commentRules=new a;this.rootRules=new a;c&&this.addRules(c,10)},proto:{addRules:function(a,e){var b;if(typeof e=="number")b=
|
||||
e;else if(e&&"priority"in e)b=e.priority;typeof b!="number"&&(b=10);typeof e!="object"&&(e={});a.elementNames&&this.elementNameRules.addMany(a.elementNames,b,e);a.attributeNames&&this.attributeNameRules.addMany(a.attributeNames,b,e);a.elements&&f(this.elementsRules,a.elements,b,e);a.attributes&&f(this.attributesRules,a.attributes,b,e);a.text&&this.textRules.add(a.text,b,e);a.comment&&this.commentRules.add(a.comment,b,e);a.root&&this.rootRules.add(a.root,b,e)},applyTo:function(a){a.filter(this)},onElementName:function(a,
|
||||
e){return this.elementNameRules.execOnName(a,e)},onAttributeName:function(a,e){return this.attributeNameRules.execOnName(a,e)},onText:function(a,e,b){return this.textRules.exec(a,e,b)},onComment:function(a,e,b){return this.commentRules.exec(a,e,b)},onRoot:function(a,e){return this.rootRules.exec(a,e)},onElement:function(a,e){for(var b=[this.elementsRules["^"],this.elementsRules[e.name],this.elementsRules.$],f,j=0;j<3;j++)if(f=b[j]){f=f.exec(a,e,this);if(f===false)return null;if(f&&f!=e)return this.onNode(a,
|
||||
f);if(e.parent&&!e.name)break}return e},onNode:function(a,e){var b=e.type;return b==CKEDITOR.NODE_ELEMENT?this.onElement(a,e):b==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(a,e.value)):b==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(a,e.value)):null},onAttribute:function(a,e,b,f){return(b=this.attributesRules[b])?b.exec(a,f,e,this):f}}});CKEDITOR.htmlParser.filterRulesGroup=a;a.prototype={add:function(a,e,b){this.rules.splice(this.findIndex(e),0,{value:a,priority:e,
|
||||
options:b})},addMany:function(a,e,b){for(var f=[this.findIndex(e),0],j=0,d=a.length;j<d;j++)f.push({value:a[j],priority:e,options:b});this.rules.splice.apply(this.rules,f)},findIndex:function(a){for(var e=this.rules,b=e.length-1;b>=0&&a<e[b].priority;)b--;return b+1},exec:function(a,e){var b=e instanceof CKEDITOR.htmlParser.node||e instanceof CKEDITOR.htmlParser.fragment,f=Array.prototype.slice.call(arguments,1),j=this.rules,d=j.length,g,h,k,m;for(m=0;m<d;m++){if(b){g=e.type;h=e.name}k=j[m];if(!(a.nonEditable&&
|
||||
!k.options.applyToAll||a.nestedEditable&&k.options.excludeNestedEditable)){k=k.value.apply(null,f);if(k===false||b&&k&&(k.name!=h||k.type!=g))return k;k!=null&&(f[0]=e=k)}}return e},execOnName:function(a,e){for(var b=0,f=this.rules,j=f.length,d;e&&b<j;b++){d=f[b];!(a.nonEditable&&!d.options.applyToAll||a.nestedEditable&&d.options.excludeNestedEditable)&&(e=e.replace(d.value[0],d.value[1]))}return e}}}(),function(){function a(a,d){function f(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):
|
||||
new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function g(a,b){return function(d){if(d.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var g=[],l=c(d),j,k;if(l)for(h(l,1)&&g.push(l);l;){if(i(l)&&(j=e(l))&&h(j))if((k=e(j))&&!i(k))g.push(j);else{f(s).insertAfter(j);j.remove()}l=l.previous}for(l=0;l<g.length;l++)g[l].remove();if(g=!a||(typeof b=="function"?b(d):b)!==false)if(!s&&!CKEDITOR.env.needsBrFiller&&d.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)g=false;else if(!s&&!CKEDITOR.env.needsBrFiller&&(document.documentMode>
|
||||
7||d.name in CKEDITOR.dtd.tr||d.name in CKEDITOR.dtd.$listItem))g=false;else{g=c(d);g=!g||d.name=="form"&&g.name=="input"}g&&d.add(f(a))}}}function h(a,b){if((!s||CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&a.name=="br"&&!a.attributes["data-cke-eol"])return true;var c;if(a.type==CKEDITOR.NODE_TEXT&&(c=a.value.match(l))){if(c.index){(new CKEDITOR.htmlParser.text(a.value.substring(0,c.index))).insertBefore(a);a.value=c[0]}if(!CKEDITOR.env.needsBrFiller&&s&&(!b||a.parent.name in m))return true;
|
||||
if(!s)if((c=a.previous)&&c.name=="br"||!c||i(c))return true}return false}var k={elements:{}},s=d=="html",m=CKEDITOR.tools.extend({},B),u;for(u in m)"#"in v[u]||delete m[u];for(u in m)k.elements[u]=g(s,a.config.fillEmptyBlocks);k.root=g(s,false);k.elements.br=function(a){return function(c){if(c.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var d=c.attributes;if("data-cke-bogus"in d||"data-cke-eol"in d)delete d["data-cke-bogus"];else{for(d=c.next;d&&b(d);)d=d.next;var g=e(c);!d&&i(c.parent)?j(c.parent,
|
||||
f(a)):i(d)&&(g&&!i(g))&&f(a).insertBefore(d)}}}}(s);return k}function f(a,b){return a!=CKEDITOR.ENTER_BR&&b!==false?a==CKEDITOR.ENTER_DIV?"div":"p":false}function c(a){for(a=a.children[a.children.length-1];a&&b(a);)a=a.previous;return a}function e(a){for(a=a.previous;a&&b(a);)a=a.previous;return a}function b(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]}function i(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in
|
||||
B||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function j(a,b){var c=a.children[a.children.length-1];a.children.push(b);b.parent=a;if(c){c.next=b;b.previous=c}}function d(a){a=a.attributes;a.contenteditable!="false"&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function g(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}function h(a){return a.replace(w,function(a,b,c){return"<"+b+c.replace(z,
|
||||
function(a,b){return A.test(b)&&c.indexOf("data-cke-saved-"+b)==-1?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+">"})}function k(a,b){return a.replace(b,function(a,b,c){a.indexOf("<textarea")===0&&(a=b+p(c).replace(/</g,"<").replace(/>/g,">")+"</textarea>");return"<cke:encoded>"+encodeURIComponent(a)+"</cke:encoded>"})}function m(a){return a.replace(K,function(a,b){return decodeURIComponent(b)})}function q(a){return a.replace(/<\!--(?!{cke_protected})[\s\S]+?--\>/g,function(a){return"<\!--"+
|
||||
s+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\>"})}function p(a){return a.replace(/<\!--\{cke_protected\}\{C\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)})}function o(a,b){var c=b._.dataStore;return a.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return c&&c[b]||""})}function n(a,b){for(var c=[],d=b.config.protectedSource,e=b._.dataStore||(b._.dataStore={id:1}),f=/<\!--\{cke_temp(comment)?\}(\d*?)--\>/g,
|
||||
d=[/<script[\s\S]*?<\/script>/gi,/<noscript[\s\S]*?<\/noscript>/gi,/<meta[\s\S]*?\/?>/gi].concat(d),a=a.replace(/<\!--[\s\S]*?--\>/g,function(a){return"<\!--{cke_tempcomment}"+(c.push(a)-1)+"--\>"}),g=0;g<d.length;g++)a=a.replace(d[g],function(a){a=a.replace(f,function(a,b,d){return c[d]});return/cke_temp(comment)?/.test(a)?a:"<\!--{cke_temp}"+(c.push(a)-1)+"--\>"});a=a.replace(f,function(a,b,d){return"<\!--"+s+(b?"{C}":"")+encodeURIComponent(c[d]).replace(/--/g,"%2D%2D")+"--\>"});a=a.replace(/<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=>]+))+\s*>/g,
|
||||
function(a){return a.replace(/<\!--\{cke_protected\}([^>]*)--\>/g,function(a,b){e[e.id]=decodeURIComponent(b);return"{cke_protected_"+e.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,c,d,e){return"<"+c+d+">"+o(p(e),b)+"</"+c+">"})}CKEDITOR.htmlDataProcessor=function(b){var c,d,e=this;this.editor=b;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=d=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(u);
|
||||
c.addRules(y,{applyToAll:true});c.addRules(a(b,"data"),{applyToAll:true});d.addRules(r);d.addRules(x,{applyToAll:true});d.addRules(a(b,"html"),{applyToAll:true});b.on("toHtml",function(a){var a=a.data,c=a.dataValue,d,c=n(c,b),c=k(c,C),c=h(c),c=k(c,F),c=c.replace(G,"$1cke:$2"),c=c.replace(E,"<cke:$1$2></cke:$1>"),c=c.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),c=c.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");d=a.context||b.editable().getName();var e;if(CKEDITOR.env.ie&&
|
||||
CKEDITOR.env.version<9&&d=="pre"){d="div";c="<pre>"+c+"</pre>";e=1}d=b.document.createElement(d);d.setHtml("a"+c);c=d.getHtml().substr(1);c=c.replace(RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");e&&(c=c.replace(/^<pre>|<\/pre>$/gi,""));c=c.replace(D,"$1$2");c=m(c);c=p(c);d=a.fixForBody===false?false:f(a.enterMode,b.config.autoParagraph);c=CKEDITOR.htmlParser.fragment.fromHtml(c,a.context,d);if(d){e=c;if(!e.children.length&&CKEDITOR.dtd[e.name][d]){d=new CKEDITOR.htmlParser.element(d);e.add(d)}}a.dataValue=
|
||||
c},null,null,5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,true,a.data.dontFilter,a.data.enterMode)&&b.fire("dataFiltered")},null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(e.dataFilter,true)},null,null,10);b.on("toHtml",function(a){var a=a.data,b=a.dataValue,c=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(c);b=c.getHtml(true);a.dataValue=q(b)},null,null,15);b.on("toDataFormat",function(a){var c=a.data.dataValue;a.data.enterMode!=CKEDITOR.ENTER_BR&&
|
||||
(c=c.replace(/^<br *\/?>/i,""));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,a.data.context,f(a.data.enterMode,b.config.autoParagraph))},null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(e.htmlFilter,true)},null,null,10);b.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,false,true)},null,null,11);b.on("toDataFormat",function(a){var c=a.data.dataValue,d=e.writer;d.reset();c.writeChildrenHtml(d);c=d.getHtml(true);c=p(c);c=o(c,b);a.data.dataValue=
|
||||
c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,c,d){var e=this.editor,f,g,h;if(b&&typeof b=="object"){f=b.context;c=b.fixForBody;d=b.dontFilter;g=b.filter;h=b.enterMode}else f=b;!f&&f!==null&&(f=e.editable().getName());return e.fire("toHtml",{dataValue:a,context:f,fixForBody:c,dontFilter:d,filter:g||e.filter,enterMode:h||e.enterMode}).dataValue},toDataFormat:function(a,b){var c,d,e;if(b){c=b.context;d=b.filter;e=b.enterMode}!c&&c!==null&&(c=this.editor.editable().getName());
|
||||
return this.editor.fire("toDataFormat",{dataValue:a,filter:d||this.editor.filter,context:c,enterMode:e||this.editor.enterMode}).dataValue}};var l=/(?: |\xa0)$/,s="{cke_protected}",v=CKEDITOR.dtd,t=["caption","colgroup","col","thead","tfoot","tbody"],B=CKEDITOR.tools.extend({},v.$blockLimit,v.$block),u={elements:{input:d,textarea:d}},y={attributeNames:[[/^on/,"data-cke-pa-on"],[/^data-cke-expando$/,""]]},r={elements:{embed:function(a){var b=a.parent;if(b&&b.name=="object"){var c=b.attributes.width,
|
||||
b=b.attributes.height;if(c)a.attributes.width=c;if(b)a.attributes.height=b}},a:function(a){if(!a.children.length&&!a.attributes.name&&!a.attributes["data-cke-saved-name"])return false}}},x={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return false;for(var c=["name","href","src"],d,e=0;e<c.length;e++){d="data-cke-saved-"+c[e];d in b&&delete b[c[e]]}}return a},
|
||||
table:function(a){a.children.slice(0).sort(function(a,b){var c,d;if(a.type==CKEDITOR.NODE_ELEMENT&&b.type==a.type){c=CKEDITOR.tools.indexOf(t,a.name);d=CKEDITOR.tools.indexOf(t,b.name)}if(!(c>-1&&d>-1&&c!=d)){c=a.parent?a.getIndex():-1;d=b.parent?b.getIndex():-1}return c>d?1:-1})},param:function(a){a.children=[];a.isEmpty=true;return a},span:function(a){a.attributes["class"]=="Apple-style-span"&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;
|
||||
delete a.attributes.contenteditable},style:function(a){var b=a.children[0];if(b&&b.value)b.value=CKEDITOR.tools.trim(b.value);if(!a.attributes.type)a.attributes.type="text/css"},title:function(a){var b=a.children[0];!b&&j(a,b=new CKEDITOR.htmlParser.text);b.value=a.attributes["data-cke-title"]||""},input:g,textarea:g},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||false}}};if(CKEDITOR.env.ie)x.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,
|
||||
function(a){return a.toLowerCase()})};var w=/<(a|area|img|input|source)\b([^>]*)>/gi,z=/([\w-]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,A=/^(href|src|name)$/i,F=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,C=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,K=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,G=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,D=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,E=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi}(),
|
||||
"use strict",CKEDITOR.htmlParser.element=function(a,f){this.name=a;this.attributes=f||{};this.children=[];var c=a||"",e=c.match(/^cke:(.*)/);e&&(c=e[1]);c=!(!CKEDITOR.dtd.$nonBodyContent[c]&&!CKEDITOR.dtd.$block[c]&&!CKEDITOR.dtd.$listItem[c]&&!CKEDITOR.dtd.$tableContent[c]&&!(CKEDITOR.dtd.$nonEditable[c]||c=="br"));this.isEmpty=!!CKEDITOR.dtd.$empty[a];this.isUnknown=!CKEDITOR.dtd[a];this._={isBlockLike:c,hasInlineStarted:this.isEmpty||!c}},CKEDITOR.htmlParser.cssStyle=function(a){var f={};((a instanceof
|
||||
CKEDITOR.htmlParser.element?a.attributes.style:a)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,e,b){e=="font-family"&&(b=b.replace(/["']/g,""));f[e.toLowerCase()]=b});return{rules:f,populate:function(a){var e=this.toString();if(e)a instanceof CKEDITOR.dom.element?a.setAttribute("style",e):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=e:a.style=e},toString:function(){var a=[],e;for(e in f)f[e]&&a.push(e,":",f[e],";");return a.join("")}}},function(){function a(a){return function(b){return b.type==
|
||||
CKEDITOR.NODE_ELEMENT&&(typeof a=="string"?b.name==a:b.name in a)}}var f=function(a,b){a=a[0];b=b[0];return a<b?-1:a>b?1:0},c=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:c.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,b){var c=this,f,d,b=c.getFilterContext(b);if(b.off)return true;if(!c.parent)a.onRoot(b,c);for(;;){f=c.name;
|
||||
if(!(d=a.onElementName(b,f))){this.remove();return false}c.name=d;if(!(c=a.onElement(b,c))){this.remove();return false}if(c!==this){this.replaceWith(c);return false}if(c.name==f)break;if(c.type!=CKEDITOR.NODE_ELEMENT){this.replaceWith(c);return false}if(!c.name){this.replaceWithChildren();return false}}f=c.attributes;var g,h;for(g in f){h=g;for(d=f[g];;)if(h=a.onAttributeName(b,g))if(h!=g){delete f[g];g=h}else break;else{delete f[g];break}h&&((d=a.onAttribute(b,c,h,d))===false?delete f[h]:f[h]=d)}c.isEmpty||
|
||||
this.filterChildren(a,false,b);return true},filterChildren:c.filterChildren,writeHtml:function(a,b){b&&this.filter(b);var c=this.name,j=[],d=this.attributes,g,h;a.openTag(c,d);for(g in d)j.push([g,d[g]]);a.sortAttributes&&j.sort(f);g=0;for(h=j.length;g<h;g++){d=j[g];a.attribute(d[0],d[1])}a.openTagClose(c,this.isEmpty);this.writeChildrenHtml(a);this.isEmpty||a.closeTag(c)},writeChildrenHtml:c.writeChildrenHtml,replaceWithChildren:function(){for(var a=this.children,b=a.length;b;)a[--b].insertAfter(this);
|
||||
this.remove()},forEach:c.forEach,getFirst:function(c){if(!c)return this.children.length?this.children[0]:null;typeof c!="function"&&(c=a(c));for(var b=0,f=this.children.length;b<f;++b)if(c(this.children[b]))return this.children[b];return null},getHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeChildrenHtml(a);return a.getHtml()},setHtml:function(a){for(var a=this.children=CKEDITOR.htmlParser.fragment.fromHtml(a).children,b=0,c=a.length;b<c;++b)a[b].parent=this},getOuterHtml:function(){var a=
|
||||
new CKEDITOR.htmlParser.basicWriter;this.writeHtml(a);return a.getHtml()},split:function(a){for(var b=this.children.splice(a,this.children.length-a),c=this.clone(),f=0;f<b.length;++f)b[f].parent=c;c.children=b;if(b[0])b[0].previous=null;if(a>0)this.children[a-1].next=null;this.parent.add(c,this.getIndex()+1);return c},addClass:function(a){if(!this.hasClass(a)){var b=this.attributes["class"]||"";this.attributes["class"]=b+(b?" ":"")+a}},removeClass:function(a){var b=this.attributes["class"];if(b)(b=
|
||||
CKEDITOR.tools.trim(b.replace(RegExp("(?:\\s+|^)"+a+"(?:\\s+|$)")," ")))?this.attributes["class"]=b:delete this.attributes["class"]},hasClass:function(a){var b=this.attributes["class"];return!b?false:RegExp("(?:^|\\s)"+a+"(?=\\s|$)").test(b)},getFilterContext:function(a){var b=[];a||(a={off:false,nonEditable:false,nestedEditable:false});!a.off&&this.attributes["data-cke-processor"]=="off"&&b.push("off",true);!a.nonEditable&&this.attributes.contenteditable=="false"?b.push("nonEditable",true):a.nonEditable&&
|
||||
(!a.nestedEditable&&this.attributes.contenteditable=="true")&&b.push("nestedEditable",true);if(b.length)for(var a=CKEDITOR.tools.copy(a),c=0;c<b.length;c=c+2)a[b[c]]=b[c+1];return a}},true)}(),function(){var a={},f=/{([^}]+)}/g,c=/([\\'])/g,e=/\n/g,b=/\r/g;CKEDITOR.template=function(i){if(a[i])this.output=a[i];else{var j=i.replace(c,"\\$1").replace(e,"\\n").replace(b,"\\r").replace(f,function(a,b){return"',data['"+b+"']==undefined?'{"+b+"}':data['"+b+"'],'"});this.output=a[i]=Function("data","buffer",
|
||||
"return buffer?buffer.push('"+j+"'):['"+j+"'].join('');")}}}(),delete CKEDITOR.loadFullCore,CKEDITOR.instances={},CKEDITOR.document=new CKEDITOR.dom.document(document),CKEDITOR.add=function(a){CKEDITOR.instances[a.name]=a;a.on("focus",function(){if(CKEDITOR.currentInstance!=a){CKEDITOR.currentInstance=a;CKEDITOR.fire("currentInstance")}});a.on("blur",function(){if(CKEDITOR.currentInstance==a){CKEDITOR.currentInstance=null;CKEDITOR.fire("currentInstance")}});CKEDITOR.fire("instance",null,a)},CKEDITOR.remove=
|
||||
function(a){delete CKEDITOR.instances[a.name]},function(){var a={};CKEDITOR.addTemplate=function(f,c){var e=a[f];if(e)return e;e={name:f,source:c};CKEDITOR.fire("template",e);return a[f]=new CKEDITOR.template(e.source)};CKEDITOR.getTemplate=function(f){return a[f]}}(),function(){var a=[];CKEDITOR.addCss=function(f){a.push(f)};CKEDITOR.getCss=function(){return a.join("\n")}}(),CKEDITOR.on("instanceDestroyed",function(){CKEDITOR.tools.isEmpty(this.instances)&&CKEDITOR.fire("reset")}),CKEDITOR.TRISTATE_ON=
|
||||
1,CKEDITOR.TRISTATE_OFF=2,CKEDITOR.TRISTATE_DISABLED=0,function(){CKEDITOR.inline=function(a,f){if(!CKEDITOR.env.isCompatible)return null;a=CKEDITOR.dom.element.get(a);if(a.getEditor())throw'The editor instance "'+a.getEditor().name+'" is already attached to the provided element.';var c=new CKEDITOR.editor(f,a,CKEDITOR.ELEMENT_MODE_INLINE),e=a.is("textarea")?a:null;if(e){c.setData(e.getValue(),null,true);a=CKEDITOR.dom.element.createFromHtml('<div contenteditable="'+!!c.readOnly+'" class="cke_textarea_inline">'+
|
||||
e.getValue()+"</div>",CKEDITOR.document);a.insertAfter(e);e.hide();e.$.form&&c._attachToForm()}else c.setData(a.getHtml(),null,true);c.on("loaded",function(){c.fire("uiReady");c.editable(a);c.container=a;c.setData(c.getData(1));c.resetDirty();c.fire("contentDom");c.mode="wysiwyg";c.fire("mode");c.status="ready";c.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,c)},null,null,1E4);c.on("destroy",function(){if(e){c.container.clearCustomData();c.container.remove();e.show()}c.element.clearCustomData();
|
||||
delete c.element});return c};CKEDITOR.inlineAll=function(){var a,f,c;for(c in CKEDITOR.dtd.$editable)for(var e=CKEDITOR.document.getElementsByTag(c),b=0,i=e.count();b<i;b++){a=e.getItem(b);if(a.getAttribute("contenteditable")=="true"){f={element:a,config:{}};CKEDITOR.fire("inline",f)!==false&&CKEDITOR.inline(a,f.config)}}};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})}(),CKEDITOR.replaceClass="ckeditor",function(){function a(a,b,i,j){if(!CKEDITOR.env.isCompatible)return null;
|
||||
a=CKEDITOR.dom.element.get(a);if(a.getEditor())throw'The editor instance "'+a.getEditor().name+'" is already attached to the provided element.';var d=new CKEDITOR.editor(b,a,j);if(j==CKEDITOR.ELEMENT_MODE_REPLACE){a.setStyle("visibility","hidden");d._.required=a.hasAttribute("required");a.removeAttribute("required")}i&&d.setData(i,null,true);d.on("loaded",function(){c(d);j==CKEDITOR.ELEMENT_MODE_REPLACE&&(d.config.autoUpdateElement&&a.$.form)&&d._attachToForm();d.setMode(d.config.startupMode,function(){d.resetDirty();
|
||||
d.status="ready";d.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,d)})});d.on("destroy",f);return d}function f(){var a=this.container,b=this.element;if(a){a.clearCustomData();a.remove()}if(b){b.clearCustomData();if(this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE){b.show();this._.required&&b.setAttribute("required","required")}delete this.element}}function c(a){var b=a.name,c=a.element,f=a.elementMode,d=a.fire("uiSpace",{space:"top",html:""}).html,g=a.fire("uiSpace",{space:"bottom",html:""}).html,
|
||||
h=new CKEDITOR.template('<{outerEl} id="cke_{name}" class="{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} '+CKEDITOR.env.cssClass+'" dir="{langDir}" lang="{langCode}" role="application"'+(a.title?' aria-labelledby="cke_{name}_arialbl"':"")+">"+(a.title?'<span id="cke_{name}_arialbl" class="cke_voice_label">{voiceLabel}</span>':"")+'<{outerEl} class="cke_inner cke_reset" role="presentation">{topHtml}<{outerEl} id="{contentId}" class="cke_contents cke_reset" role="presentation"></{outerEl}>{bottomHtml}</{outerEl}></{outerEl}>'),
|
||||
b=CKEDITOR.dom.element.createFromHtml(h.output({id:a.id,name:b,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:a.title,topHtml:d?'<span id="'+a.ui.spaceId("top")+'" class="cke_top cke_reset_all" role="presentation" style="height:auto">'+d+"</span>":"",contentId:a.ui.spaceId("contents"),bottomHtml:g?'<span id="'+a.ui.spaceId("bottom")+'" class="cke_bottom cke_reset_all" role="presentation">'+g+"</span>":"",outerEl:CKEDITOR.env.ie?"span":"div"}));if(f==CKEDITOR.ELEMENT_MODE_REPLACE){c.hide();b.insertAfter(c)}else c.append(b);
|
||||
a.container=b;d&&a.ui.space("top").unselectable();g&&a.ui.space("bottom").unselectable();c=a.config.width;f=a.config.height;c&&b.setStyle("width",CKEDITOR.tools.cssLength(c));f&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(f));b.disableContextMenu();CKEDITOR.env.webkit&&b.on("focus",function(){a.focus()});a.fireOnce("uiReady")}CKEDITOR.replace=function(c,b){return a(c,b,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(c,b,f){return a(c,b,f,CKEDITOR.ELEMENT_MODE_APPENDTO)};
|
||||
CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),b=0;b<a.length;b++){var c=null,f=a[b];if(f.name||f.id){if(typeof arguments[0]=="string"){if(!RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)").test(f.className))continue}else if(typeof arguments[0]=="function"){c={};if(arguments[0](f,c)===false)continue}this.replace(f,c)}}};CKEDITOR.editor.prototype.addMode=function(a,b){(this._.modes||(this._.modes={}))[a]=b};CKEDITOR.editor.prototype.setMode=function(a,b){var c=this,f=
|
||||
this._.modes;if(!(a==c.mode||!f||!f[a])){c.fire("beforeSetMode",a);if(c.mode){var d=c.checkDirty(),f=c._.previousModeData,g,h=0;c.fire("beforeModeUnload");c.editable(0);c._.previousMode=c.mode;c._.previousModeData=g=c.getData(1);if(c.mode=="source"&&f==g){c.fire("lockSnapshot",{forceUpdate:true});h=1}c.ui.space("contents").setHtml("");c.mode=""}else c._.previousModeData=c.getData(1);this._.modes[a](function(){c.mode=a;d!==void 0&&!d&&c.resetDirty();h?c.fire("unlockSnapshot"):a=="wysiwyg"&&c.fire("saveSnapshot");
|
||||
setTimeout(function(){c.fire("mode");b&&b.call(c)},0)})}};CKEDITOR.editor.prototype.resize=function(a,b,c,f){var d=this.container,g=this.ui.space("contents"),h=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement,f=f?this.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}):d;f.setSize("width",a,true);h&&(h.style.width="1%");g.setStyle("height",Math.max(b-(c?0:(f.$.offsetHeight||0)-(g.$.clientHeight||0)),0)+"px");h&&(h.style.width=
|
||||
"100%");this.fire("resize")};CKEDITOR.editor.prototype.getResizable=function(a){return a?this.ui.space("contents"):this.container};CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})}(),CKEDITOR.config.startupMode="wysiwyg",function(){function a(a){var b=a.editor,c=a.data.path,d=c.blockLimit,g=a.data.selection,h=g.getRanges()[0],i;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(g=f(g,c)){g.appendBogus();i=CKEDITOR.env.ie}if(j(b,c.block,
|
||||
d)&&h.collapsed&&!h.getCommonAncestor().isReadOnly()){c=h.clone();c.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);d=new CKEDITOR.dom.walker(c);d.guard=function(a){return!e(a)||a.type==CKEDITOR.NODE_COMMENT||a.isReadOnly()};if(!d.checkForward()||c.checkStartOfBlock()&&c.checkEndOfBlock()){b=h.fixBlock(true,b.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p");if(!CKEDITOR.env.needsBrFiller)(b=b.getFirst(e))&&(b.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(b.getText()).match(/^(?: |\xa0)$/))&&b.remove();
|
||||
i=1;a.cancel()}}i&&h.select()}function f(a,b){if(a.isFake)return 0;var c=b.block||b.blockLimit,d=c&&c.getLast(e);if(c&&c.isBlockBoundary()&&(!d||!(d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()))&&!c.is("pre")&&!c.getBogus())return c}function c(a){var b=a.data.getTarget();if(b.is("input")){b=b.getAttribute("type");(b=="submit"||b=="reset")&&a.data.preventDefault()}}function e(a){return q(a)&&p(a)}function b(a,b){return function(c){var d=CKEDITOR.dom.element.get(c.data.$.toElement||c.data.$.fromElement||
|
||||
c.data.$.relatedTarget);(!d||!b.equals(d)&&!b.contains(d))&&a.call(this,c)}}function i(a){function b(a){return function(b,d){d&&(b.type==CKEDITOR.NODE_ELEMENT&&b.is(f))&&(c=b);if(!d&&e(b)&&(!a||!k(b)))return false}}var c,d=a.getRanges()[0],a=a.root,f={table:1,ul:1,ol:1,dl:1};if(d.startPath().contains(f)){var g=d.clone();g.collapse(1);g.setStartAt(a,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(g);a.guard=b();a.checkBackward();if(c){g=d.clone();g.collapse();g.setEndAt(c,CKEDITOR.POSITION_AFTER_END);
|
||||
a=new CKEDITOR.dom.walker(g);a.guard=b(true);c=false;a.checkForward();return c}}return null}function j(a,b,c){return a.config.autoParagraph!==false&&a.activeEnterMode!=CKEDITOR.ENTER_BR&&a.editable().equals(c)&&!b||b&&b.getAttribute("contenteditable")=="true"}function d(a){a.editor.focus();a.editor.fire("saveSnapshot")}function g(a){var b=a.editor;b.getSelection().scrollIntoView();setTimeout(function(){b.fire("saveSnapshot")},0)}function h(a,b,c){for(var d=a.getCommonAncestor(b),b=a=c?b:a;(a=a.getParent())&&
|
||||
!d.equals(a)&&a.getChildCount()==1;)b=a;b.remove()}CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(a,b){this.base(b.$||b);this.editor=a;this.status="unloaded";this.hasFocus=false;this.setup()},proto:{focus:function(){var a;if(CKEDITOR.env.webkit&&!this.hasFocus){a=this.editor._.previousActive||this.getDocument().getActive();if(this.contains(a)){a.focus();return}}try{this.$[CKEDITOR.env.ie&&this.getDocument().equals(CKEDITOR.document)?"setActive":"focus"]()}catch(b){if(!CKEDITOR.env.ie)throw b;
|
||||
}if(CKEDITOR.env.safari&&!this.isInline()){a=CKEDITOR.document.getActive();a.equals(this.getWindow().getFrame())||this.getWindow().focus()}},on:function(a,c){var d=Array.prototype.slice.call(arguments,0);if(CKEDITOR.env.ie&&/^focus|blur$/.exec(a)){a=a=="focus"?"focusin":"focusout";c=b(c,this);d[0]=a;d[1]=c}return CKEDITOR.dom.element.prototype.on.apply(this,d)},attachListener:function(a){!this._.listeners&&(this._.listeners=[]);var b=Array.prototype.slice.call(arguments,1),b=a.on.apply(a,b);this._.listeners.push(b);
|
||||
return b},clearListeners:function(){var a=this._.listeners;try{for(;a.length;)a.pop().removeListener()}catch(b){}},restoreAttrs:function(){var a=this._.attrChanges,b,c;for(c in a)if(a.hasOwnProperty(c)){b=a[c];b!==null?this.setAttribute(c,b):this.removeAttribute(c)}},attachClass:function(a){var b=this.getCustomData("classes");if(!this.hasClass(a)){!b&&(b=[]);b.push(a);this.setCustomData("classes",b);this.addClass(a)}},changeAttr:function(a,b){var c=this.getAttribute(a);if(b!==c){!this._.attrChanges&&
|
||||
(this._.attrChanges={});a in this._.attrChanges||(this._.attrChanges[a]=c);this.setAttribute(a,b)}},insertHtml:function(a,b){d(this);o(this,b||"html",a)},insertText:function(a){d(this);var b=this.editor,c=b.getSelection().getStartElement().hasAscendant("pre",true)?CKEDITOR.ENTER_BR:b.activeEnterMode,b=c==CKEDITOR.ENTER_BR,e=CKEDITOR.tools,a=e.htmlEncode(a.replace(/\r\n/g,"\n")),a=a.replace(/\t/g," "),c=c==CKEDITOR.ENTER_P?"p":"div";if(!b){var f=/\n{2}/g;if(f.test(a))var g="<"+c+
|
||||
">",h="</"+c+">",a=g+a.replace(f,function(){return h+g})+h}a=a.replace(/\n/g,"<br>");b||(a=a.replace(RegExp("<br>(?=</"+c+">)"),function(a){return e.repeat(a,2)}));a=a.replace(/^ | $/g," ");a=a.replace(/(>|\s) /g,function(a,b){return b+" "}).replace(/ (?=<)/g," ");o(this,"text",a)},insertElement:function(a,b){b?this.insertElementIntoRange(a,b):this.insertElementIntoSelection(a)},insertElementIntoRange:function(a,b){var c=this.editor,d=c.config.enterMode,e=a.getName(),f=CKEDITOR.dtd.$block[e];
|
||||
if(b.checkReadOnly())return false;b.deleteContents(1);b.startContainer.type==CKEDITOR.NODE_ELEMENT&&b.startContainer.is({tr:1,table:1,tbody:1,thead:1,tfoot:1})&&n(b);var g,h;if(f)for(;(g=b.getCommonAncestor(0,1))&&(h=CKEDITOR.dtd[g.getName()])&&(!h||!h[e]);)if(g.getName()in CKEDITOR.dtd.span)b.splitElement(g);else if(b.checkStartOfBlock()&&b.checkEndOfBlock()){b.setStartBefore(g);b.collapse(true);g.remove()}else b.splitBlock(d==CKEDITOR.ENTER_DIV?"div":"p",c.editable());b.insertNode(a);return true},
|
||||
insertElementIntoSelection:function(a){d(this);var b=this.editor,c=b.activeEnterMode,b=b.getSelection(),f=b.getRanges()[0],h=a.getName(),h=CKEDITOR.dtd.$block[h];if(this.insertElementIntoRange(a,f)){f.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);if(h)if((h=a.getNext(function(a){return e(a)&&!k(a)}))&&h.type==CKEDITOR.NODE_ELEMENT&&h.is(CKEDITOR.dtd.$block))h.getDtd()["#"]?f.moveToElementEditStart(h):f.moveToElementEditEnd(a);else if(!h&&c!=CKEDITOR.ENTER_BR){h=f.fixBlock(true,c==CKEDITOR.ENTER_DIV?
|
||||
"div":"p");f.moveToElementEditStart(h)}}b.selectRanges([f]);g(this)},setData:function(a,b){b||(a=this.editor.dataProcessor.toHtml(a));this.setHtml(a);this.fixInitialSelection();if(this.status=="unloaded")this.status="ready";this.editor.fire("dataReady")},getData:function(a){var b=this.getHtml();a||(b=this.editor.dataProcessor.toDataFormat(b));return b},setReadOnly:function(a){this.setAttribute("contenteditable",!a)},detach:function(){this.removeClass("cke_editable");this.status="detached";var a=this.editor;
|
||||
this._.detach();delete a.document;delete a.window},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},fixInitialSelection:function(){function a(){var b=c.getDocument().$,d=b.getSelection(),e;if(d.anchorNode&&d.anchorNode==c.$)e=true;else if(CKEDITOR.env.webkit){var f=c.getDocument().getActive();f&&(f.equals(c)&&!d.anchorNode)&&(e=true)}if(e){e=new CKEDITOR.dom.range(c);e.moveToElementEditStart(c);b=b.createRange();b.setStart(e.startContainer.$,e.startOffset);b.collapse(true);
|
||||
d.removeAllRanges();d.addRange(b)}}function b(){var a=c.getDocument().$,d=a.selection,e=c.getDocument().getActive();if(d.type=="None"&&e.equals(c)){d=new CKEDITOR.dom.range(c);a=a.body.createTextRange();d.moveToElementEditStart(c);d=d.startContainer;d.type!=CKEDITOR.NODE_ELEMENT&&(d=d.getParent());a.moveToElementText(d.$);a.collapse(true);a.select()}}var c=this;if(CKEDITOR.env.ie&&(CKEDITOR.env.version<9||CKEDITOR.env.quirks)){if(this.hasFocus){this.focus();b()}}else if(this.hasFocus){this.focus();
|
||||
a()}else this.once("focus",function(){a()},null,null,-999)},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var b=this.getData();this.is("textarea")||a.config.ignoreEmptyParagraph!==false&&(b=b.replace(m,function(a,b){return b}));a.setData(b,null,1)},this);this.attachListener(a,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,"loadSnapshot",function(a){this.setData(a.data,
|
||||
1)},this);this.attachListener(a,"beforeFocus",function(){var b=a.getSelection();(b=b&&b.getNative())&&b.type=="Control"||this.focus()},this);this.attachListener(a,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode)},this);this.attachListener(a,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(a,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(a.readOnly);this.attachClass("cke_editable");this.attachClass(a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?
|
||||
"cke_editable_inline":a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE||a.elementMode==CKEDITOR.ELEMENT_MODE_APPENDTO?"cke_editable_themed":"");this.attachClass("cke_contents_"+a.config.contentsLangDirection);a.keystrokeHandler.blockedKeystrokes[8]=+a.readOnly;a.keystrokeHandler.attach(this);this.on("blur",function(){this.hasFocus=false},null,null,-1);this.on("focus",function(){this.hasFocus=true},null,null,-1);a.focusManager.add(this);if(this.equals(CKEDITOR.document.getActive())){this.hasFocus=true;
|
||||
a.once("contentDom",function(){a.focusManager.focus(this)},this)}this.isInline()&&this.changeAttr("tabindex",a.tabIndex);if(!this.is("textarea")){a.document=this.getDocument();a.window=this.getWindow();var b=a.document;this.changeAttr("spellcheck",!a.config.disableNativeSpellChecker);var d=a.config.contentsLangDirection;this.getDirection(1)!=d&&this.changeAttr("dir",d);var f=CKEDITOR.getCss();if(f){d=b.getHead();if(!d.getCustomData("stylesheet")){f=b.appendStyleText(f);f=new CKEDITOR.dom.element(f.ownerNode||
|
||||
f.owningElement);d.setCustomData("stylesheet",f);f.data("cke-temp",1)}}d=b.getCustomData("stylesheet_ref")||0;b.setCustomData("stylesheet_ref",d+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){var a=a.data,b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&(a.$.button!=2&&b.isReadOnly())&&a.preventDefault()});var g={8:1,46:1};this.attachListener(a,"key",function(b){if(a.readOnly)return true;var c=b.data.domEvent.getKey(),
|
||||
d;if(c in g){var b=a.getSelection(),e,f=b.getRanges()[0],h=f.startPath(),j,k,m,c=c==8;if(CKEDITOR.env.ie&&CKEDITOR.env.version<11&&(e=b.getSelectedElement())||(e=i(b))){a.fire("saveSnapshot");f.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);e.remove();f.select();a.fire("saveSnapshot");d=1}else if(f.collapsed)if((j=h.block)&&(m=j[c?"getPrevious":"getNext"](q))&&m.type==CKEDITOR.NODE_ELEMENT&&m.is("table")&&f[c?"checkStartOfBlock":"checkEndOfBlock"]()){a.fire("saveSnapshot");f[c?"checkEndOfBlock":
|
||||
"checkStartOfBlock"]()&&j.remove();f["moveToElementEdit"+(c?"End":"Start")](m);f.select();a.fire("saveSnapshot");d=1}else if(h.blockLimit&&h.blockLimit.is("td")&&(k=h.blockLimit.getAscendant("table"))&&f.checkBoundaryOfElement(k,c?CKEDITOR.START:CKEDITOR.END)&&(m=k[c?"getPrevious":"getNext"](q))){a.fire("saveSnapshot");f["moveToElementEdit"+(c?"End":"Start")](m);f.checkStartOfBlock()&&f.checkEndOfBlock()?m.remove():f.select();a.fire("saveSnapshot");d=1}else if((k=h.contains(["td","th","caption"]))&&
|
||||
f.checkBoundaryOfElement(k,c?CKEDITOR.START:CKEDITOR.END))d=1}return!d});a.blockless&&(CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)&&this.attachListener(this,"keyup",function(b){if(b.data.getKeystroke()in g&&!this.getFirst(e)){this.appendBogus();b=a.createRange();b.moveToPosition(this,CKEDITOR.POSITION_AFTER_START);b.select()}});this.attachListener(this,"dblclick",function(b){if(a.readOnly)return false;b={element:b.data.getTarget()};a.fire("doubleclick",b)});CKEDITOR.env.ie&&this.attachListener(this,
|
||||
"click",c);CKEDITOR.env.ie||this.attachListener(this,"mousedown",function(b){var c=b.data.getTarget();if(c.is("img","hr","input","textarea","select")&&!c.isReadOnly()){a.getSelection().selectElement(c);c.is("input","textarea","select")&&b.data.preventDefault()}});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(b){if(b.data.$.button==2){b=b.data.getTarget();if(!b.getOuterHtml().replace(m,"")){var c=a.createRange();c.moveToElementEditStart(b);c.select(true)}}});if(CKEDITOR.env.webkit){this.attachListener(this,
|
||||
"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()});this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()})}CKEDITOR.env.webkit&&this.attachListener(a,"key",function(b){b=b.data.domEvent.getKey();if(b in g){var c=b==8,d=a.getSelection().getRanges()[0],b=d.startPath();if(d.collapsed){var e;a:{var f=b.block;if(f)if(d[c?"checkStartOfBlock":"checkEndOfBlock"]())if(!d.moveToClosestEditablePosition(f,!c)||!d.collapsed)e=
|
||||
false;else{if(d.startContainer.type==CKEDITOR.NODE_ELEMENT){var i=d.startContainer.getChild(d.startOffset-(c?1:0));if(i&&i.type==CKEDITOR.NODE_ELEMENT&&i.is("hr")){a.fire("saveSnapshot");i.remove();e=true;break a}}if((d=d.startPath().block)&&(!d||!d.contains(f))){a.fire("saveSnapshot");var j;(j=(c?d:f).getBogus())&&j.remove();e=a.getSelection();j=e.createBookmarks();(c?f:d).moveChildren(c?d:f,false);b.lastElement.mergeSiblings();h(f,d,!c);e.selectBookmarks(j);e=true}}else e=false;else e=false}if(!e)return}else{c=
|
||||
d;e=b.block;j=c.endPath().block;if(!e||!j||e.equals(j))b=false;else{a.fire("saveSnapshot");(f=e.getBogus())&&f.remove();c.deleteContents();if(j.getParent()){j.moveChildren(e,false);b.lastElement.mergeSiblings();h(e,j,true)}c=a.getSelection().getRanges()[0];c.collapse(1);c.select();b=true}if(!b)return}a.getSelection().scrollIntoView();a.fire("saveSnapshot");return false}},this,null,100)}}},_:{detach:function(){this.editor.setData(this.editor.getData(),0,1);this.clearListeners();this.restoreAttrs();
|
||||
var a;if(a=this.removeCustomData("classes"))for(;a.length;)this.removeClass(a.pop());if(!this.is("textarea")){a=this.getDocument();var b=a.getHead();if(b.getCustomData("stylesheet")){var c=a.getCustomData("stylesheet_ref");if(--c)a.setCustomData("stylesheet_ref",c);else{a.removeCustomData("stylesheet_ref");b.removeCustomData("stylesheet").remove()}}}this.editor.fire("contentDomUnload");delete this.editor}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;if(arguments.length)b=
|
||||
this._.editable=a?a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),null);return b};var k=CKEDITOR.dom.walker.bogus(),m=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,q=CKEDITOR.dom.walker.whitespaces(true),p=CKEDITOR.dom.walker.bookmark(false,true);CKEDITOR.on("instanceLoaded",function(b){var c=b.editor;c.on("insertElement",function(a){a=a.data;if(a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||
|
||||
a.is("textarea"))){a.getAttribute("contentEditable")!="false"&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1");a.setAttribute("contentEditable",false)}});c.on("selectionChange",function(b){if(!c.readOnly){var d=c.getSelection();if(d&&!d.isLocked){d=c.checkDirty();c.fire("lockSnapshot");a(b);c.fire("unlockSnapshot");!d&&c.resetDirty()}}})});CKEDITOR.on("instanceCreated",function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var c=b.title;a.changeAttr("role",
|
||||
"textbox");a.changeAttr("aria-label",c);c&&a.changeAttr("title",c);var d=b.fire("ariaEditorHelpLabel",{}).label;if(d)if(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents")){var e=CKEDITOR.tools.getNextId(),d=CKEDITOR.dom.element.createFromHtml('<span id="'+e+'" class="cke_voice_label">'+d+"</span>");c.append(d);a.changeAttr("aria-describedby",e)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");
|
||||
var o=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(c,d){var e,f,g,h,j=[],k=d.range.startContainer;e=d.range.startPath();for(var k=i[k.getName()],m=0,o=c.getChildren(),n=o.count(),u=-1,B=-1,r=0,p=e.contains(i.$list);m<n;++m){e=o.getItem(m);if(a(e)){g=e.getName();if(p&&g in CKEDITOR.dtd.$list)j=j.concat(b(e,d));else{h=!!k[g];if(g=="br"&&e.data("cke-eol")&&(!m||m==n-1)){r=(f=m?j[m-1].node:o.getItem(m+1))&&(!a(f)||!f.is("br"));f=f&&a(f)&&i.$block[f.getName()]}u==-1&&!h&&(u=
|
||||
m);h||(B=m);j.push({isElement:1,isLineBreak:r,isBlock:e.isBlockBoundary(),hasBlockSibling:f,node:e,name:g,allowed:h});f=r=0}}else j.push({isElement:0,node:e,allowed:1})}if(u>-1)j[u].firstNotAllowed=1;if(B>-1)j[B].lastNotAllowed=1;return j}function c(b,d){var e=[],f=b.getChildren(),g=f.count(),h,j=0,k=i[d],m=!b.is(i.$inline)||b.is("br");for(m&&e.push(" ");j<g;j++){h=f.getItem(j);a(h)&&!h.is(k)?e=e.concat(c(h,d)):e.push(h)}m&&e.push(" ");return e}function d(b){return b&&a(b)&&(b.is(i.$removeEmpty)||
|
||||
b.is("a")&&!b.isBlockBoundary())}function f(b,c,d,e){var g=b.clone(),h,j;g.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);if((h=(new CKEDITOR.dom.walker(g)).next())&&a(h)&&k[h.getName()]&&(j=h.getPrevious())&&a(j)&&!j.getParent().equals(b.startContainer)&&d.contains(j)&&e.contains(h)&&h.isIdentical(j)){h.moveChildren(j);h.remove();f(b,c,d,e)}}function h(b,c){function d(b,c){if(c.isBlock&&c.isElement&&!c.node.is("br")&&a(b)&&b.is("br")){b.remove();return 1}}var e=c.endContainer.getChild(c.endOffset),f=c.endContainer.getChild(c.endOffset-
|
||||
1);e&&d(e,b[b.length-1]);if(f&&d(f,b[0])){c.setEnd(c.endContainer,c.endOffset-1);c.collapse()}}var i=CKEDITOR.dtd,k={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,li:1,pre:1,dl:1,blockquote:1},m={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},o=CKEDITOR.tools.extend({},i.$inline);delete o.br;return function(k,n,r){var p=k.editor,q=p.getSelection().getRanges()[0],G=false;if(n=="unfiltered_html"){n="html";G=true}if(!q.checkReadOnly()){var D=(new CKEDITOR.dom.elementPath(q.startContainer,q.root)).blockLimit||
|
||||
q.root,n={type:n,dontFilter:G,editable:k,editor:p,range:q,blockLimit:D,mergeCandidates:[],zombies:[]},p=n.range,G=n.mergeCandidates,E,J,N,H;if(n.type=="text"&&p.shrink(CKEDITOR.SHRINK_ELEMENT,true,false)){E=CKEDITOR.dom.element.createFromHtml("<span> </span>",p.document);p.insertNode(E);p.setStartAfter(E)}J=new CKEDITOR.dom.elementPath(p.startContainer);n.endPath=N=new CKEDITOR.dom.elementPath(p.endContainer);if(!p.collapsed){var D=N.block||N.blockLimit,T=p.getCommonAncestor();D&&(!D.equals(T)&&
|
||||
!D.contains(T)&&p.checkEndOfBlock())&&n.zombies.push(D);p.deleteContents()}for(;(H=a(p.startContainer)&&p.startContainer.getChild(p.startOffset-1))&&a(H)&&H.isBlockBoundary()&&J.contains(H);)p.moveToPosition(H,CKEDITOR.POSITION_BEFORE_END);f(p,n.blockLimit,J,N);if(E){p.setEndBefore(E);p.collapse();E.remove()}E=p.startPath();if(D=E.contains(d,false,1)){p.splitElement(D);n.inlineStylesRoot=D;n.inlineStylesPeak=E.lastElement}E=p.createBookmark();(D=E.startNode.getPrevious(e))&&a(D)&&d(D)&&G.push(D);
|
||||
(D=E.startNode.getNext(e))&&a(D)&&d(D)&&G.push(D);for(D=E.startNode;(D=D.getParent())&&d(D);)G.push(D);p.moveToBookmark(E);if(E=r){E=n.range;if(n.type=="text"&&n.inlineStylesRoot){H=n.inlineStylesPeak;p=H.getDocument().createText("{cke-peak}");for(G=n.inlineStylesRoot.getParent();!H.equals(G);){p=p.appendTo(H.clone());H=H.getParent()}r=p.getOuterHtml().split("{cke-peak}").join(r)}H=n.blockLimit.getName();if(/^\s+|\s+$/.test(r)&&"span"in CKEDITOR.dtd[H])var O='<span data-cke-marker="1"> </span>',
|
||||
r=O+r+O;r=n.editor.dataProcessor.toHtml(r,{context:null,fixForBody:false,dontFilter:n.dontFilter,filter:n.editor.activeFilter,enterMode:n.editor.activeEnterMode});H=E.document.createElement("body");H.setHtml(r);if(O){H.getFirst().remove();H.getLast().remove()}if((O=E.startPath().block)&&!(O.getChildCount()==1&&O.getBogus()))a:{var M;if(H.getChildCount()==1&&a(M=H.getFirst())&&M.is(m)){O=M.getElementsByTag("*");E=0;for(G=O.count();E<G;E++){p=O.getItem(E);if(!p.is(o))break a}M.moveChildren(M.getParent(1));
|
||||
M.remove()}}n.dataWrapper=H;E=r}if(E){M=n.range;var O=M.document,I,r=n.blockLimit;E=0;var P;H=[];var L,Q,G=p=0,R,U;J=M.startContainer;var D=n.endPath.elements[0],X;N=D.getPosition(J);T=!!D.getCommonAncestor(J)&&N!=CKEDITOR.POSITION_IDENTICAL&&!(N&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED);J=b(n.dataWrapper,n);for(h(J,M);E<J.length;E++){N=J[E];if(I=N.isLineBreak){I=M;R=r;var V=void 0,S=void 0;if(N.hasBlockSibling)I=1;else{V=I.startContainer.getAscendant(i.$block,1);if(!V||!V.is({div:1,
|
||||
p:1}))I=0;else{S=V.getPosition(R);if(S==CKEDITOR.POSITION_IDENTICAL||S==CKEDITOR.POSITION_CONTAINS)I=0;else{R=I.splitElement(V);I.moveToPosition(R,CKEDITOR.POSITION_AFTER_START);I=1}}}}if(I)G=E>0;else{I=M.startPath();if(!N.isBlock&&j(n.editor,I.block,I.blockLimit)&&(Q=n.editor.activeEnterMode!=CKEDITOR.ENTER_BR&&n.editor.config.autoParagraph!==false?n.editor.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":false)){Q=O.createElement(Q);Q.appendBogus();M.insertNode(Q);CKEDITOR.env.needsBrFiller&&(P=Q.getBogus())&&
|
||||
P.remove();M.moveToPosition(Q,CKEDITOR.POSITION_BEFORE_END)}if((I=M.startPath().block)&&!I.equals(L)){if(P=I.getBogus()){P.remove();H.push(I)}L=I}N.firstNotAllowed&&(p=1);if(p&&N.isElement){I=M.startContainer;for(R=null;I&&!i[I.getName()][N.name];){if(I.equals(r)){I=null;break}R=I;I=I.getParent()}if(I){if(R){U=M.splitElement(R);n.zombies.push(U);n.zombies.push(R)}}else{R=r.getName();X=!E;I=E==J.length-1;R=c(N.node,R);for(var V=[],S=R.length,W=0,Z=void 0,Y=0,$=-1;W<S;W++){Z=R[W];if(Z==" "){if(!Y&&
|
||||
(!X||W)){V.push(new CKEDITOR.dom.text(" "));$=V.length}Y=1}else{V.push(Z);Y=0}}I&&$==V.length&&V.pop();X=V}}if(X){for(;I=X.pop();)M.insertNode(I);X=0}else M.insertNode(N.node);if(N.lastNotAllowed&&E<J.length-1){(U=T?D:U)&&M.setEndAt(U,CKEDITOR.POSITION_AFTER_START);p=0}M.collapse()}}n.dontMoveCaret=G;n.bogusNeededBlocks=H}P=n.range;var aa;U=n.bogusNeededBlocks;for(X=P.createBookmark();L=n.zombies.pop();)if(L.getParent()){Q=P.clone();Q.moveToElementEditStart(L);Q.removeEmptyBlocksAtEnd()}if(U)for(;L=
|
||||
U.pop();)CKEDITOR.env.needsBrFiller?L.appendBogus():L.append(P.document.createText(" "));for(;L=n.mergeCandidates.pop();)L.mergeSiblings();P.moveToBookmark(X);if(!n.dontMoveCaret){for(L=a(P.startContainer)&&P.startContainer.getChild(P.startOffset-1);L&&a(L)&&!L.is(i.$empty);){if(L.isBlockBoundary())P.moveToPosition(L,CKEDITOR.POSITION_BEFORE_END);else{if(d(L)&&L.getHtml().match(/(\s| )$/g)){aa=null;break}aa=P.clone();aa.moveToPosition(L,CKEDITOR.POSITION_BEFORE_END)}L=L.getLast(e)}aa&&P.moveToRange(aa)}q.select();
|
||||
g(k)}}}(),n=function(){function a(b){b=new CKEDITOR.dom.walker(b);b.guard=function(a,b){if(b)return false;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$tableContent)};b.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT};return b}function b(a,c,d){c=a.getDocument().createElement(c);a.append(c,d);return c}function c(a){var b=a.count(),d;for(b;b-- >0;){d=a.getItem(b);if(!CKEDITOR.tools.trim(d.getHtml())){d.appendBogus();CKEDITOR.env.ie&&(CKEDITOR.env.version<9&&d.getChildCount())&&
|
||||
d.getFirst().remove()}}}return function(d){var e=d.startContainer,f=e.getAscendant("table",1),g=false;c(f.getElementsByTag("td"));c(f.getElementsByTag("th"));f=d.clone();f.setStart(e,0);f=a(f).lastBackward();if(!f){f=d.clone();f.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);f=a(f).lastForward();g=true}f||(f=e);if(f.is("table")){d.setStartAt(f,CKEDITOR.POSITION_BEFORE_START);d.collapse(true);f.remove()}else{f.is({tbody:1,thead:1,tfoot:1})&&(f=b(f,"tr",g));f.is("tr")&&(f=b(f,f.getParent().is("thead")?"th":
|
||||
"td",g));(e=f.getBogus())&&e.remove();d.moveToPosition(f,g?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END)}}}()}(),function(){function a(){var a=this._.fakeSelection,b;if(a){b=this.getSelection(1);if(!b||!b.isHidden()){a.reset();a=0}}if(!a){a=b||this.getSelection(1);if(!a||a.getType()==CKEDITOR.SELECTION_NONE)return}this.fire("selectionCheck",a);b=this.elementPath();if(!b.compare(this._.selectionPreviousPath)){if(CKEDITOR.env.webkit)this._.previousActive=this.document.getActive();this._.selectionPreviousPath=
|
||||
b;this.fire("selectionChange",{selection:a,path:b})}}function f(){o=true;if(!p){c.call(this);p=CKEDITOR.tools.setTimeout(c,200,this)}}function c(){p=null;if(o){CKEDITOR.tools.setTimeout(a,0,this);o=false}}function e(a){return n(a)||a.type==CKEDITOR.NODE_ELEMENT&&!a.is(CKEDITOR.dtd.$empty)?true:false}function b(a){function b(c,d){return!c||c.type==CKEDITOR.NODE_TEXT?false:a.clone()["moveToElementEdit"+(d?"End":"Start")](c)}if(!(a.root instanceof CKEDITOR.editable))return false;var c=a.startContainer,
|
||||
d=a.getPreviousNode(e,null,c),f=a.getNextNode(e,null,c);return b(d)||b(f,1)||!d&&!f&&!(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()&&c.getBogus())?true:false}function i(a){return a.getCustomData("cke-fillingChar")}function j(a,b){var c=a&&a.removeCustomData("cke-fillingChar");if(c){if(b!==false){var e,f=a.getDocument().getSelection().getNative(),j=f&&f.type!="None"&&f.getRangeAt(0);if(c.getLength()>1&&j&&j.intersectsNode(c.$)){e=g(f);j=f.focusNode==c.$&&f.focusOffset>0;f.anchorNode==c.$&&f.anchorOffset>
|
||||
0&&e[0].offset--;j&&e[1].offset--}}c.setText(d(c.getText()));e&&h(a.getDocument().$,e)}}function d(a){return a.replace(/\u200B( )?/g,function(a){return a[1]?" ":""})}function g(a){return[{node:a.anchorNode,offset:a.anchorOffset},{node:a.focusNode,offset:a.focusOffset}]}function h(a,b){var c=a.getSelection(),d=a.createRange();d.setStart(b[0].node,b[0].offset);d.collapse(true);c.removeAllRanges();c.addRange(d);c.extend(b[1].node,b[1].offset)}function k(a){var b=CKEDITOR.dom.element.createFromHtml('<div data-cke-hidden-sel="1" data-cke-temp="1" style="'+
|
||||
(CKEDITOR.env.ie?"display:none":"position:fixed;top:0;left:-1000px")+'"> </div>',a.document);a.fire("lockSnapshot");a.editable().append(b);var c=a.getSelection(1),d=a.createRange(),e=c.root.on("selectionchange",function(a){a.cancel()},null,null,0);d.setStartAt(b,CKEDITOR.POSITION_AFTER_START);d.setEndAt(b,CKEDITOR.POSITION_BEFORE_END);c.selectRanges([d]);e.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=b}function m(a){var b={37:1,39:1,8:1,46:1};return function(c){var d=
|
||||
c.data.getKeystroke();if(b[d]){var e=a.getSelection().getRanges(),f=e[0];if(e.length==1&&f.collapsed)if((d=f[d<38?"getPreviousEditableNode":"getNextEditableNode"]())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getAttribute("contenteditable")=="false"){a.getSelection().fake(d);c.data.preventDefault();c.cancel()}}}}function q(a){for(var b=0;b<a.length;b++){var c=a[b];c.getCommonAncestor().isReadOnly()&&a.splice(b,1);if(!c.collapsed){if(c.startContainer.isReadOnly())for(var d=c.startContainer,e;d;){if((e=d.type==
|
||||
CKEDITOR.NODE_ELEMENT)&&d.is("body")||!d.isReadOnly())break;e&&d.getAttribute("contentEditable")=="false"&&c.setStartAfter(d);d=d.getParent()}d=c.startContainer;e=c.endContainer;var f=c.startOffset,g=c.endOffset,h=c.clone();d&&d.type==CKEDITOR.NODE_TEXT&&(f>=d.getLength()?h.setStartAfter(d):h.setStartBefore(d));e&&e.type==CKEDITOR.NODE_TEXT&&(g?h.setEndAfter(e):h.setEndBefore(e));d=new CKEDITOR.dom.walker(h);d.evaluator=function(d){if(d.type==CKEDITOR.NODE_ELEMENT&&d.isReadOnly()){var e=c.clone();
|
||||
c.setEndBefore(d);c.collapsed&&a.splice(b--,1);if(!(d.getPosition(h.endContainer)&CKEDITOR.POSITION_CONTAINS)){e.setStartAfter(d);e.collapsed||a.splice(b+1,0,e)}return true}return false};d.next()}}return a}var p,o,n=CKEDITOR.dom.walker.invisible(1),l=function(){function a(b){return function(a){var c=a.editor.createRange();c.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([c]);return false}}function b(a){return function(b){var c=b.editor,d=c.createRange(),e;if(!(e=
|
||||
d.moveToClosestEditablePosition(b.selected,a)))e=d.moveToClosestEditablePosition(b.selected,!a);e&&c.getSelection().selectRanges([d]);c.fire("saveSnapshot");b.selected.remove();if(!e){d.moveToElementEditablePosition(c.editable());c.getSelection().selectRanges([d])}c.fire("saveSnapshot");return false}}var c=a(),d=a(1);return{37:c,38:c,39:d,40:d,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(b){function c(){var a=d.getSelection();a&&a.removeAllRanges()}var d=b.editor;d.on("contentDom",function(){function b(){n=
|
||||
new CKEDITOR.dom.selection(d.getSelection());n.lock()}function c(){g.removeListener("mouseup",c);k.removeListener("mouseup",c);var a=CKEDITOR.document.$.selection,b=a.createRange();a.type!="None"&&b.parentElement().ownerDocument==e.$&&b.select()}var e=d.document,g=CKEDITOR.document,h=d.editable(),i=e.getBody(),k=e.getDocumentElement(),l=h.isInline(),o,n;CKEDITOR.env.gecko&&h.attachListener(h,"focus",function(a){a.removeListener();if(o!==0)if((a=d.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==
|
||||
h.$){a=d.createRange();a.moveToElementEditStart(h);a.select()}},null,null,-2);h.attachListener(h,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){o&&CKEDITOR.env.webkit&&(o=d._.previousActive&&d._.previousActive.equals(e.getActive()));d.unlockSelection(o);o=0},null,null,-1);h.attachListener(h,"mousedown",function(){o=0});if(CKEDITOR.env.ie||l){s?h.attachListener(h,"beforedeactivate",b,null,null,-1):h.attachListener(d,"selectionCheck",b,null,null,-1);h.attachListener(h,CKEDITOR.env.webkit?"DOMFocusOut":
|
||||
"blur",function(){d.lockSelection(n);o=1},null,null,-1);h.attachListener(h,"mousedown",function(){o=0})}if(CKEDITOR.env.ie&&!l){var p;h.attachListener(h,"mousedown",function(a){if(a.data.$.button==2){a=d.document.getSelection();if(!a||a.getType()==CKEDITOR.SELECTION_NONE)p=d.window.getScrollPosition()}});h.attachListener(h,"mouseup",function(a){if(a.data.$.button==2&&p){d.document.$.documentElement.scrollLeft=p.x;d.document.$.documentElement.scrollTop=p.y}p=null});if(e.$.compatMode!="BackCompat"){if(CKEDITOR.env.ie7Compat||
|
||||
CKEDITOR.env.ie6Compat)k.on("mousedown",function(a){function b(a){a=a.data.$;if(d){var c=i.$.createTextRange();try{c.moveToPoint(a.clientX,a.clientY)}catch(e){}d.setEndPoint(f.compareEndPoints("StartToStart",c)<0?"EndToEnd":"StartToStart",c);d.select()}}function c(){k.removeListener("mousemove",b);g.removeListener("mouseup",c);k.removeListener("mouseup",c);d.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<k.$.clientHeight&&a.$.x<k.$.clientWidth){var d=i.$.createTextRange();try{d.moveToPoint(a.$.clientX,
|
||||
a.$.clientY)}catch(e){}var f=d.duplicate();k.on("mousemove",b);g.on("mouseup",c);k.on("mouseup",c)}});if(CKEDITOR.env.version>7&&CKEDITOR.env.version<11)k.on("mousedown",function(a){if(a.data.getTarget().is("html")){g.on("mouseup",c);k.on("mouseup",c)}})}}h.attachListener(h,"selectionchange",a,d);h.attachListener(h,"keyup",f,d);h.attachListener(h,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){d.forceNextSelectionCheck();d.selectionChange(1)});if(l&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var q;
|
||||
h.attachListener(h,"mousedown",function(){q=1});h.attachListener(e.getDocumentElement(),"mouseup",function(){q&&f.call(d);q=0})}else h.attachListener(CKEDITOR.env.ie?h:e.getDocumentElement(),"mouseup",f,d);CKEDITOR.env.webkit&&h.attachListener(e,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:j(h)}},null,null,-1);h.attachListener(h,"keydown",m(d),null,null,-1)});d.on("setData",function(){d.unlockSelection();CKEDITOR.env.webkit&&
|
||||
c()});d.on("contentDomUnload",function(){d.unlockSelection()});if(CKEDITOR.env.ie9Compat)d.on("beforeDestroy",c,null,null,9);d.on("dataReady",function(){delete d._.fakeSelection;delete d._.hiddenSelectionContainer;d.selectionChange(1)});d.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),b=d.editable().getLast(a);if(b&&b.hasAttribute("data-cke-hidden-sel")){b.remove();if(CKEDITOR.env.gecko)(a=d.editable().getFirst(a))&&(a.is("br")&&a.getAttribute("_moz_editor_bogus_node"))&&
|
||||
a.remove()}},null,null,100);d.on("key",function(a){if(d.mode=="wysiwyg"){var b=d.getSelection();if(b.isFake){var c=l[a.data.keyCode];if(c)return c({editor:d,selected:b.getSelectedElement(),selection:b,keyEvent:a})}}})});CKEDITOR.on("instanceReady",function(a){function b(){var a=e.editable();if(a)if(a=i(a)){var c=e.document.$.getSelection();if(c.type!="None"&&(c.anchorNode==a.$||c.focusNode==a.$))k=g(c);f=a.getText();a.setText(d(f))}}function c(){var a=e.editable();if(a)if(a=i(a)){a.setText(f);if(k){h(e.document.$,
|
||||
k);k=null}}}var e=a.editor,f,k;if(CKEDITOR.env.webkit){e.on("selectionChange",function(){var a=e.editable(),b=i(a);b&&(b.getCustomData("ready")?j(a):b.setCustomData("ready",1))},null,null,-1);e.on("beforeSetMode",function(){j(e.editable())},null,null,-1);e.on("beforeUndoImage",b);e.on("afterUndoImage",c);e.on("beforeGetData",b,null,null,0);e.on("getData",c)}});CKEDITOR.editor.prototype.selectionChange=function(b){(b?a:f).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){if((this._.savedSelection||
|
||||
this._.fakeSelection)&&!a)return this._.savedSelection||this._.fakeSelection;return(a=this.editable())&&this.mode=="wysiwyg"?new CKEDITOR.dom.selection(a):null};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);if(a.getType()!=CKEDITOR.SELECTION_NONE){!a.isLocked&&a.lock();this._.savedSelection=a;return true}return false};CKEDITOR.editor.prototype.unlockSelection=function(a){var b=this._.savedSelection;if(b){b.unlock(a);delete this._.savedSelection;return true}return false};
|
||||
CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath};CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)};CKEDITOR.dom.range.prototype.select=function(){var a=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;var s=typeof window.getSelection!=
|
||||
"function",v=1;CKEDITOR.dom.selection=function(a){if(a instanceof CKEDITOR.dom.selection)var b=a,a=a.root;var c=a instanceof CKEDITOR.dom.element;this.rev=b?b.rev:v++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=c?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(b){CKEDITOR.tools.extend(this._.cache,b._.cache);this.isFake=b.isFake;this.isLocked=b.isLocked;return this}var a=this.getNative(),d,e;if(a)if(a.getRangeAt)d=(e=a.rangeCount&&a.getRangeAt(0))&&
|
||||
new CKEDITOR.dom.node(e.commonAncestorContainer);else{try{e=a.createRange()}catch(f){}d=e&&CKEDITOR.dom.element.get(e.item&&e.item(0)||e.parentElement())}if(!d||!(d.type==CKEDITOR.NODE_ELEMENT||d.type==CKEDITOR.NODE_TEXT)||!this.root.equals(d)&&!this.root.contains(d)){this._.cache.type=CKEDITOR.SELECTION_NONE;this._.cache.startElement=null;this._.cache.selectedElement=null;this._.cache.selectedText="";this._.cache.ranges=new CKEDITOR.dom.rangeList}return this};var t={img:1,hr:1,li:1,table:1,tr:1,
|
||||
td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};CKEDITOR.dom.selection.prototype={getNative:function(){return this._.cache.nativeSel!==void 0?this._.cache.nativeSel:this._.cache.nativeSel=s?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:s?function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;try{var c=this.getNative(),d=c.type;if(d=="Text")b=CKEDITOR.SELECTION_TEXT;if(d=="Control")b=
|
||||
CKEDITOR.SELECTION_ELEMENT;if(c.createRange().parentElement())b=CKEDITOR.SELECTION_TEXT}catch(e){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_TEXT,c=this.getNative();if(!c||!c.rangeCount)b=CKEDITOR.SELECTION_NONE;else if(c.rangeCount==1){var c=c.getRangeAt(0),d=c.startContainer;if(d==c.endContainer&&d.nodeType==1&&c.endOffset-c.startOffset==1&&t[d.childNodes[c.startOffset].nodeName.toLowerCase()])b=CKEDITOR.SELECTION_ELEMENT}return a.type=b},getRanges:function(){var a=
|
||||
s?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b,c){b=b.duplicate();b.collapse(c);var d=b.parentElement();if(!d.hasChildNodes())return{container:d,offset:0};for(var e=d.children,f,h,g=b.duplicate(),j=0,k=e.length-1,i=-1,l,m;j<=k;){i=Math.floor((j+k)/2);f=e[i];g.moveToElementText(f);l=g.compareEndPoints("StartToStart",b);if(l>0)k=i-1;else if(l<0)j=i+1;else return{container:d,offset:a(f)}}if(i==-1||i==e.length-1&&l<0){g.moveToElementText(d);g.setEndPoint("StartToStart",
|
||||
b);g=g.text.replace(/(\r\n|\r)/g,"\n").length;e=d.childNodes;if(!g){f=e[e.length-1];return f.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:e.length}:{container:f,offset:f.nodeValue.length}}for(d=e.length;g>0&&d>0;){h=e[--d];if(h.nodeType==CKEDITOR.NODE_TEXT){m=h;g=g-h.nodeValue.length}}return{container:m,offset:-g}}g.collapse(l>0?true:false);g.setEndPoint(l>0?"StartToStart":"EndToStart",b);g=g.text.replace(/(\r\n|\r)/g,"\n").length;if(!g)return{container:d,offset:a(f)+(l>0?0:1)};for(;g>0;)try{h=
|
||||
f[l>0?"previousSibling":"nextSibling"];if(h.nodeType==CKEDITOR.NODE_TEXT){g=g-h.nodeValue.length;m=h}f=h}catch(o){return{container:d,offset:a(f)}}return{container:m,offset:l>0?-g:m.nodeValue.length+g}};return function(){var a=this.getNative(),c=a&&a.createRange(),d=this.getType();if(!a)return[];if(d==CKEDITOR.SELECTION_TEXT){a=new CKEDITOR.dom.range(this.root);d=b(c,true);a.setStart(new CKEDITOR.dom.node(d.container),d.offset);d=b(c);a.setEnd(new CKEDITOR.dom.node(d.container),d.offset);a.endContainer.getPosition(a.startContainer)&
|
||||
CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse();return[a]}if(d==CKEDITOR.SELECTION_ELEMENT){for(var d=[],e=0;e<c.length;e++){for(var f=c.item(e),g=f.parentNode,h=0,a=new CKEDITOR.dom.range(this.root);h<g.childNodes.length&&g.childNodes[h]!=f;h++);a.setStart(new CKEDITOR.dom.node(g),h);a.setEnd(new CKEDITOR.dom.node(g),h+1);d.push(a)}return d}return[]}}():function(){var a=[],b,c=this.getNative();if(!c)return a;for(var d=0;d<c.rangeCount;d++){var e=c.getRangeAt(d);
|
||||
b=new CKEDITOR.dom.range(this.root);b.setStart(new CKEDITOR.dom.node(e.startContainer),e.startOffset);b.setEnd(new CKEDITOR.dom.node(e.endContainer),e.endOffset);a.push(b)}return a};return function(b){var c=this._.cache,d=c.ranges;if(!d)c.ranges=d=new CKEDITOR.dom.rangeList(a.call(this));return!b?d:q(new CKEDITOR.dom.rangeList(d.slice()))}}(),getStartElement:function(){var a=this._.cache;if(a.startElement!==void 0)return a.startElement;var b;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();
|
||||
case CKEDITOR.SELECTION_TEXT:var c=this.getRanges()[0];if(c){if(c.collapsed){b=c.startContainer;b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent())}else{for(c.optimize();;){b=c.startContainer;if(c.startOffset==(b.getChildCount?b.getChildCount():b.getLength())&&!b.isBlockBoundary())c.setStartAfter(b);else break}b=c.startContainer;if(b.type!=CKEDITOR.NODE_ELEMENT)return b.getParent();b=b.getChild(c.startOffset);if(!b||b.type!=CKEDITOR.NODE_ELEMENT)b=c.startContainer;else for(c=b.getFirst();c&&c.type==
|
||||
CKEDITOR.NODE_ELEMENT;){b=c;c=c.getFirst()}}b=b.$}}return a.startElement=b?new CKEDITOR.dom.element(b):null},getSelectedElement:function(){var a=this._.cache;if(a.selectedElement!==void 0)return a.selectedElement;var b=this,c=CKEDITOR.tools.tryThese(function(){return b.getNative().createRange().item(0)},function(){for(var a=b.getRanges()[0].clone(),c,d,e=2;e&&(!(c=a.getEnclosedNode())||!(c.type==CKEDITOR.NODE_ELEMENT&&t[c.getName()]&&(d=c)));e--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return d&&d.$});return a.selectedElement=
|
||||
c?new CKEDITOR.dom.element(c):null},getSelectedText:function(){var a=this._.cache;if(a.selectedText!==void 0)return a.selectedText;var b=this.getNative(),b=s?b.type=="Control"?"":b.createRange().text:b.toString();return a.selectedText=b},lock:function(){this.getRanges();this.getStartElement();this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel=null;this.isLocked=1},unlock:function(a){if(this.isLocked){if(a)var b=this.getSelectedElement(),c=!b&&this.getRanges(),d=this.isFake;this.isLocked=
|
||||
0;this.reset();if(a)(a=b||c[0]&&c[0].getCommonAncestor())&&a.getAscendant("body",1)&&(d?this.fake(b):b?this.selectElement(b):this.selectRanges(c))}},reset:function(){this._.cache={};this.isFake=0;var a=this.root.editor;if(a&&a._.fakeSelection&&this.rev==a._.fakeSelection.rev){delete a._.fakeSelection;var b=a._.hiddenSelectionContainer;if(b){var c=a.checkDirty();a.fire("lockSnapshot");b.remove();a.fire("unlockSnapshot");!c&&a.resetDirty()}delete a._.hiddenSelectionContainer}this.rev=v++},selectElement:function(a){var b=
|
||||
new CKEDITOR.dom.range(this.root);b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(a){var c=this.root.editor,c=c&&c._.hiddenSelectionContainer;this.reset();if(c)for(var c=this.root,d,e=0;e<a.length;++e){d=a[e];if(d.endContainer.equals(c))d.endOffset=Math.min(d.endOffset,c.getChildCount())}if(a.length)if(this.isLocked){var f=CKEDITOR.document.getActive();this.unlock();this.selectRanges(a);this.lock();f&&!f.equals(this.root)&&f.focus()}else{var g;a:{var h,i;if(a.length==
|
||||
1&&!(i=a[0]).collapsed&&(g=i.getEnclosedNode())&&g.type==CKEDITOR.NODE_ELEMENT){i=i.clone();i.shrink(CKEDITOR.SHRINK_ELEMENT,true);if((h=i.getEnclosedNode())&&h.type==CKEDITOR.NODE_ELEMENT)g=h;if(g.getAttribute("contenteditable")=="false")break a}g=void 0}if(g)this.fake(g);else{if(s){i=CKEDITOR.dom.walker.whitespaces(true);h=/\ufeff|\u00a0/;c={table:1,tbody:1,tr:1};if(a.length>1){g=a[a.length-1];a[0].setEnd(g.endContainer,g.endOffset)}g=a[0];var a=g.collapsed,k,l,m;if((d=g.getEnclosedNode())&&d.type==
|
||||
CKEDITOR.NODE_ELEMENT&&d.getName()in t&&(!d.is("a")||!d.getText()))try{m=d.$.createControlRange();m.addElement(d.$);m.select();return}catch(o){}if(g.startContainer.type==CKEDITOR.NODE_ELEMENT&&g.startContainer.getName()in c||g.endContainer.type==CKEDITOR.NODE_ELEMENT&&g.endContainer.getName()in c){g.shrink(CKEDITOR.NODE_ELEMENT,true);a=g.collapsed}m=g.createBookmark();c=m.startNode;if(!a)f=m.endNode;m=g.document.$.body.createTextRange();m.moveToElementText(c.$);m.moveStart("character",1);if(f){h=
|
||||
g.document.$.body.createTextRange();h.moveToElementText(f.$);m.setEndPoint("EndToEnd",h);m.moveEnd("character",-1)}else{k=c.getNext(i);l=c.hasAscendant("pre");k=!(k&&k.getText&&k.getText().match(h))&&(l||!c.hasPrevious()||c.getPrevious().is&&c.getPrevious().is("br"));l=g.document.createElement("span");l.setHtml("");l.insertBefore(c);k&&g.document.createText("").insertBefore(c)}g.setStartBefore(c);c.remove();if(a){if(k){m.moveStart("character",-1);m.select();g.document.$.selection.clear()}else m.select();
|
||||
g.moveToPosition(l,CKEDITOR.POSITION_BEFORE_START);l.remove()}else{g.setEndBefore(f);f.remove();m.select()}}else{f=this.getNative();if(!f)return;this.removeAllRanges();for(m=0;m<a.length;m++){if(m<a.length-1){k=a[m];l=a[m+1];h=k.clone();h.setStart(k.endContainer,k.endOffset);h.setEnd(l.startContainer,l.startOffset);if(!h.collapsed){h.shrink(CKEDITOR.NODE_ELEMENT,true);g=h.getCommonAncestor();h=h.getEnclosedNode();if(g.isReadOnly()||h&&h.isReadOnly()){l.setStart(k.startContainer,k.startOffset);a.splice(m--,
|
||||
1);continue}}}g=a[m];l=this.document.$.createRange();if(g.collapsed&&CKEDITOR.env.webkit&&b(g)){k=this.root;j(k,false);h=k.getDocument().createText("");k.setCustomData("cke-fillingChar",h);g.insertNode(h);if((k=h.getNext())&&!h.getPrevious()&&k.type==CKEDITOR.NODE_ELEMENT&&k.getName()=="br"){j(this.root);g.moveToPosition(k,CKEDITOR.POSITION_BEFORE_START)}else g.moveToPosition(h,CKEDITOR.POSITION_AFTER_END)}l.setStart(g.startContainer.$,g.startOffset);try{l.setEnd(g.endContainer.$,g.endOffset)}catch(n){if(n.toString().indexOf("NS_ERROR_ILLEGAL_VALUE")>=
|
||||
0){g.collapse(1);l.setEnd(g.endContainer.$,g.endOffset)}else throw n;}f.addRange(l)}}this.reset();this.root.fire("selectionchange")}}},fake:function(a){var b=this.root.editor;this.reset();k(b);var c=this._.cache,d=new CKEDITOR.dom.range(this.root);d.setStartBefore(a);d.setEndAfter(a);c.ranges=new CKEDITOR.dom.rangeList(d);c.selectedElement=c.startElement=a;c.type=CKEDITOR.SELECTION_ELEMENT;c.selectedText=c.nativeSel=null;this.isFake=1;this.rev=v++;b._.fakeSelection=this;this.root.fire("selectionchange")},
|
||||
isHidden:function(){var a=this.getCommonAncestor();a&&a.type==CKEDITOR.NODE_TEXT&&(a=a.getParent());return!(!a||!a.data("cke-hidden-sel"))},createBookmarks:function(a){a=this.getRanges().createBookmarks(a);this.isFake&&(a.isFake=1);return a},createBookmarks2:function(a){a=this.getRanges().createBookmarks2(a);this.isFake&&(a.isFake=1);return a},selectBookmarks:function(a){for(var b=[],c=0;c<a.length;c++){var d=new CKEDITOR.dom.range(this.root);d.moveToBookmark(a[c]);b.push(d)}a.isFake?this.fake(b[0].getEnclosedNode()):
|
||||
this.selectRanges(b);return this},getCommonAncestor:function(){var a=this.getRanges();return!a.length?null:a[0].startContainer.getCommonAncestor(a[a.length-1].endContainer)},scrollIntoView:function(){this.type!=CKEDITOR.SELECTION_NONE&&this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){if(this.getType()!=CKEDITOR.SELECTION_NONE){var a=this.getNative();try{a&&a[s?"empty":"removeAllRanges"]()}catch(b){}this.reset()}}}}(),"use strict",CKEDITOR.STYLE_BLOCK=1,CKEDITOR.STYLE_INLINE=2,CKEDITOR.STYLE_OBJECT=
|
||||
3,function(){function a(a,b){for(var c,d;a=a.getParent();){if(a.equals(b))break;if(a.getAttribute("data-nostyle"))c=a;else if(!d){var e=a.getAttribute("contentEditable");e=="false"?c=a:e=="true"&&(d=1)}}return c}function f(b){var c=b.document;if(b.collapsed){c=l(this,c);b.insertNode(c);b.moveToPosition(c,CKEDITOR.POSITION_BEFORE_END)}else{var d=this.element,g=this._.definition,h,k=g.ignoreReadonly,j=k||g.includeReadonly;j==null&&(j=b.root.getCustomData("cke_includeReadonly"));var i=CKEDITOR.dtd[d];
|
||||
if(!i){h=true;i=CKEDITOR.dtd.span}b.enlarge(CKEDITOR.ENLARGE_INLINE,1);b.trim();var m=b.createBookmark(),o=m.startNode,n=m.endNode,s=o,q;if(!k){var v=b.getCommonAncestor(),k=a(o,v),v=a(n,v);k&&(s=k.getNextSourceNode(true));v&&(n=v)}for(s.getPosition(n)==CKEDITOR.POSITION_FOLLOWING&&(s=0);s;){k=false;if(s.equals(n)){s=null;k=true}else{var t=s.type==CKEDITOR.NODE_ELEMENT?s.getName():null,v=t&&s.getAttribute("contentEditable")=="false",r=t&&s.getAttribute("data-nostyle");if(t&&s.data("cke-bookmark")){s=
|
||||
s.getNextSourceNode(true);continue}if(v&&j&&CKEDITOR.dtd.$block[t])for(var u=s,w=e(u),S=void 0,W=w.length,Z=0,u=W&&new CKEDITOR.dom.range(u.getDocument());Z<W;++Z){var S=w[Z],B=CKEDITOR.filter.instances[S.data("cke-filter")];if(B?B.check(this):1){u.selectNodeContents(S);f.call(this,u)}}w=t?!i[t]||r?0:v&&!j?0:(s.getPosition(n)|F)==F&&(!g.childRule||g.childRule(s)):1;if(w)if((w=s.getParent())&&((w.getDtd()||CKEDITOR.dtd.span)[d]||h)&&(!g.parentRule||g.parentRule(w))){if(!q&&(!t||!CKEDITOR.dtd.$removeEmpty[t]||
|
||||
(s.getPosition(n)|F)==F)){q=b.clone();q.setStartBefore(s)}t=s.type;if(t==CKEDITOR.NODE_TEXT||v||t==CKEDITOR.NODE_ELEMENT&&!s.getChildCount()){for(var t=s,$;(k=!t.getNext(z))&&($=t.getParent(),i[$.getName()])&&($.getPosition(o)|C)==C&&(!g.childRule||g.childRule($));)t=$;q.setEndAfter(t)}}else k=true;else k=true;s=s.getNextSourceNode(r||v)}if(k&&q&&!q.collapsed){for(var k=l(this,c),v=k.hasAttributes(),r=q.getCommonAncestor(),t={},w={},S={},W={},y,x,ba;k&&r;){if(r.getName()==d){for(y in g.attributes)if(!W[y]&&
|
||||
(ba=r.getAttribute(x)))k.getAttribute(y)==ba?w[y]=1:W[y]=1;for(x in g.styles)if(!S[x]&&(ba=r.getStyle(x)))k.getStyle(x)==ba?t[x]=1:S[x]=1}r=r.getParent()}for(y in w)k.removeAttribute(y);for(x in t)k.removeStyle(x);v&&!k.hasAttributes()&&(k=null);if(k){q.extractContents().appendTo(k);q.insertNode(k);p.call(this,k);k.mergeSiblings();CKEDITOR.env.ie||k.$.normalize()}else{k=new CKEDITOR.dom.element("span");q.extractContents().appendTo(k);q.insertNode(k);p.call(this,k);k.remove(true)}q=null}}b.moveToBookmark(m);
|
||||
b.shrink(CKEDITOR.SHRINK_TEXT);b.shrink(CKEDITOR.NODE_ELEMENT,true)}}function c(a){function b(){for(var a=new CKEDITOR.dom.elementPath(d.getParent()),c=new CKEDITOR.dom.elementPath(j.getParent()),e=null,f=null,g=0;g<a.elements.length;g++){var h=a.elements[g];if(h==a.block||h==a.blockLimit)break;i.checkElementRemovable(h,true)&&(e=h)}for(g=0;g<c.elements.length;g++){h=c.elements[g];if(h==c.block||h==c.blockLimit)break;i.checkElementRemovable(h,true)&&(f=h)}f&&j.breakParent(f);e&&d.breakParent(e)}a.enlarge(CKEDITOR.ENLARGE_INLINE,
|
||||
1);var c=a.createBookmark(),d=c.startNode;if(a.collapsed){for(var e=new CKEDITOR.dom.elementPath(d.getParent(),a.root),f,g=0,h;g<e.elements.length&&(h=e.elements[g]);g++){if(h==e.block||h==e.blockLimit)break;if(this.checkElementRemovable(h)){var k;if(a.collapsed&&(a.checkBoundaryOfElement(h,CKEDITOR.END)||(k=a.checkBoundaryOfElement(h,CKEDITOR.START)))){f=h;f.match=k?"start":"end"}else{h.mergeSiblings();h.is(this.element)?q.call(this,h):o(h,t(this)[h.getName()])}}}if(f){h=d;for(g=0;;g++){k=e.elements[g];
|
||||
if(k.equals(f))break;else if(k.match)continue;else k=k.clone();k.append(h);h=k}h[f.match=="start"?"insertBefore":"insertAfter"](f)}}else{var j=c.endNode,i=this;b();for(e=d;!e.equals(j);){f=e.getNextSourceNode();if(e.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(e)){e.getName()==this.element?q.call(this,e):o(e,t(this)[e.getName()]);if(f.type==CKEDITOR.NODE_ELEMENT&&f.contains(d)){b();f=d.getNext()}}e=f}}a.moveToBookmark(c);a.shrink(CKEDITOR.NODE_ELEMENT,true)}function e(a){var b=[];a.forEach(function(a){if(a.getAttribute("contenteditable")==
|
||||
"true"){b.push(a);return false}},CKEDITOR.NODE_ELEMENT,true);return b}function b(a){var b=a.getEnclosedNode()||a.getCommonAncestor(false,true);(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1))&&!a.isReadOnly()&&s(a,this)}function i(a){var b=a.getCommonAncestor(true,true);if(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1)){var b=this._.definition,c=b.attributes;if(c)for(var d in c)a.removeAttribute(d,c[d]);if(b.styles)for(var e in b.styles)b.styles.hasOwnProperty(e)&&
|
||||
a.removeStyle(e)}}function j(a){var b=a.createBookmark(true),c=a.createIterator();c.enforceRealBlocks=true;if(this._.enterMode)c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var d,e=a.document,f;d=c.getNextParagraph();)if(!d.isReadOnly()&&(c.activeFilter?c.activeFilter.check(this):1)){f=l(this,e,d);g(d,f)}a.moveToBookmark(b)}function d(a){var b=a.createBookmark(1),c=a.createIterator();c.enforceRealBlocks=true;c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var d,e;d=c.getNextParagraph();)if(this.checkElementRemovable(d))if(d.is("pre")){(e=
|
||||
this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&d.copyAttributes(e);g(d,e)}else q.call(this,d);a.moveToBookmark(b)}function g(a,b){var c=!b;if(c){b=a.getDocument().createElement("div");a.copyAttributes(b)}var d=b&&b.is("pre"),e=a.is("pre"),f=!d&&e;if(d&&!e){e=b;(f=a.getBogus())&&f.remove();f=a.getHtml();f=k(f,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"");f=f.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1");f=f.replace(/([ \t\n\r]+| )/g,
|
||||
" ");f=f.replace(/<br\b[^>]*>/gi,"\n");if(CKEDITOR.env.ie){var g=a.getDocument().createElement("div");g.append(e);e.$.outerHTML="<pre>"+f+"</pre>";e.copyAttributes(g.getFirst());e=g.getFirst().remove()}else e.setHtml(f);b=e}else f?b=m(c?[a.getHtml()]:h(a),b):a.moveChildren(b);b.replace(a);if(d){var c=b,j;if((j=c.getPrevious(A))&&j.type==CKEDITOR.NODE_ELEMENT&&j.is("pre")){d=k(j.getHtml(),/\n$/,"")+"\n\n"+k(c.getHtml(),/^\n/,"");CKEDITOR.env.ie?c.$.outerHTML="<pre>"+d+"</pre>":c.setHtml(d);j.remove()}}else c&&
|
||||
n(b)}function h(a){var b=[];k(a.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,c){return b+"</pre>"+c+"<pre>"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(a,c){b.push(c)});return b}function k(a,b,c){var d="",e="",a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,c){b&&(d=b);c&&(e=c);return""});return d+a.replace(b,c)+e}function m(a,b){var c;a.length>1&&(c=new CKEDITOR.dom.documentFragment(b.getDocument()));
|
||||
for(var d=0;d<a.length;d++){var e=a[d],e=e.replace(/(\r\n|\r)/g,"\n"),e=k(e,/^[ \t]*\n/,""),e=k(e,/\n$/,""),e=k(e,/^[ \t]+|[ \t]+$/g,function(a,b){return a.length==1?" ":b?" "+CKEDITOR.tools.repeat(" ",a.length-1):CKEDITOR.tools.repeat(" ",a.length-1)+" "}),e=e.replace(/\n/g,"<br>"),e=e.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat(" ",a.length-1)+" "});if(c){var f=b.clone();f.setHtml(e);c.append(f)}else b.setHtml(e)}return c||b}function q(a,b){var c=this._.definition,
|
||||
d=c.attributes,c=c.styles,e=t(this)[a.getName()],f=CKEDITOR.tools.isEmpty(d)&&CKEDITOR.tools.isEmpty(c),g;for(g in d)if(!((g=="class"||this._.definition.fullMatch)&&a.getAttribute(g)!=B(g,d[g]))&&!(b&&g.slice(0,5)=="data-")){f=a.hasAttribute(g);a.removeAttribute(g)}for(var h in c)if(!(this._.definition.fullMatch&&a.getStyle(h)!=B(h,c[h],true))){f=f||!!a.getStyle(h);a.removeStyle(h)}o(a,e,y[a.getName()]);f&&(this._.definition.alwaysRemoveElement?n(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==
|
||||
CKEDITOR.ENTER_BR&&!a.hasAttributes()?n(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function p(a){for(var b=t(this),c=a.getElementsByTag(this.element),d,e=c.count();--e>=0;){d=c.getItem(e);d.isReadOnly()||q.call(this,d,true)}for(var f in b)if(f!=this.element){c=a.getElementsByTag(f);for(e=c.count()-1;e>=0;e--){d=c.getItem(e);d.isReadOnly()||o(d,b[f])}}}function o(a,b,c){if(b=b&&b.attributes)for(var d=0;d<b.length;d++){var e=b[d][0],f;if(f=a.getAttribute(e)){var g=b[d][1];(g===null||
|
||||
g.test&&g.test(f)||typeof g=="string"&&f==g)&&a.removeAttribute(e)}}c||n(a)}function n(a,b){if(!a.hasAttributes()||b)if(CKEDITOR.dtd.$block[a.getName()]){var c=a.getPrevious(A),d=a.getNext(A);c&&(c.type==CKEDITOR.NODE_TEXT||!c.isBlockBoundary({br:1}))&&a.append("br",1);d&&(d.type==CKEDITOR.NODE_TEXT||!d.isBlockBoundary({br:1}))&&a.append("br");a.remove(true)}else{c=a.getFirst();d=a.getLast();a.remove(true);if(c){c.type==CKEDITOR.NODE_ELEMENT&&c.mergeSiblings();d&&(!c.equals(d)&&d.type==CKEDITOR.NODE_ELEMENT)&&
|
||||
d.mergeSiblings()}}}function l(a,b,c){var d;d=a.element;d=="*"&&(d="span");d=new CKEDITOR.dom.element(d,b);c&&c.copyAttributes(d);d=s(d,a);b.getCustomData("doc_processing_style")&&d.hasAttribute("id")?d.removeAttribute("id"):b.setCustomData("doc_processing_style",1);return d}function s(a,b){var c=b._.definition,d=c.attributes,c=CKEDITOR.style.getStyleText(c);if(d)for(var e in d)a.setAttribute(e,d[e]);c&&a.setAttribute("style",c);return a}function v(a,b){for(var c in a)a[c]=a[c].replace(w,function(a,
|
||||
c){return b[c]})}function t(a){if(a._.overrides)return a._.overrides;var b=a._.overrides={},c=a._.definition.overrides;if(c){CKEDITOR.tools.isArray(c)||(c=[c]);for(var d=0;d<c.length;d++){var e=c[d],f,g;if(typeof e=="string")f=e.toLowerCase();else{f=e.element?e.element.toLowerCase():a.element;g=e.attributes}e=b[f]||(b[f]={});if(g){var e=e.attributes=e.attributes||[],h;for(h in g)e.push([h.toLowerCase(),g[h]])}}}return b}function B(a,b,c){var d=new CKEDITOR.dom.element("span");d[c?"setStyle":"setAttribute"](a,
|
||||
b);return d[c?"getStyle":"getAttribute"](a)}function u(a,b,c){for(var d=a.document,e=a.getRanges(),b=b?this.removeFromRange:this.applyToRange,f,g=e.createIterator();f=g.getNextRange();)b.call(this,f,c);a.selectRanges(e);d.removeCustomData("doc_processing_style")}var y={address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,details:1,datagrid:1,datalist:1},r=
|
||||
{a:1,blockquote:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1,audio:1,video:1},x=/\s*(?:;\s*|$)/,w=/#\((.+?)\)/g,z=CKEDITOR.dom.walker.bookmark(0,1),A=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(a,b){if(typeof a.type=="string")return new CKEDITOR.style.customHandlers[a.type](a);var c=a.attributes;if(c&&c.style){a.styles=CKEDITOR.tools.extend({},a.styles,CKEDITOR.tools.parseCssText(c.style));delete c.style}if(b){a=CKEDITOR.tools.clone(a);v(a.attributes,
|
||||
b);v(a.styles,b)}c=this.element=a.element?typeof a.element=="string"?a.element.toLowerCase():a.element:"*";this.type=a.type||(y[c]?CKEDITOR.STYLE_BLOCK:r[c]?CKEDITOR.STYLE_OBJECT:CKEDITOR.STYLE_INLINE);if(typeof this.element=="object")this.type=CKEDITOR.STYLE_OBJECT;this._={definition:a}};CKEDITOR.style.prototype={apply:function(a){if(a instanceof CKEDITOR.dom.document)return u.call(this,a.getSelection());if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;if(!b)this._.enterMode=a.activeEnterMode;
|
||||
u.call(this,a.getSelection(),0,a);this._.enterMode=b}},remove:function(a){if(a instanceof CKEDITOR.dom.document)return u.call(this,a.getSelection(),1);if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;if(!b)this._.enterMode=a.activeEnterMode;u.call(this,a.getSelection(),1,a);this._.enterMode=b}},applyToRange:function(a){this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?f:this.type==CKEDITOR.STYLE_BLOCK?j:this.type==CKEDITOR.STYLE_OBJECT?b:null;return this.applyToRange(a)},removeFromRange:function(a){this.removeFromRange=
|
||||
this.type==CKEDITOR.STYLE_INLINE?c:this.type==CKEDITOR.STYLE_BLOCK?d:this.type==CKEDITOR.STYLE_OBJECT?i:null;return this.removeFromRange(a)},applyToObject:function(a){s(a,this)},checkActive:function(a,b){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(a.block||a.blockLimit,true,b);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var c=a.elements,d=0,e;d<c.length;d++){e=c[d];if(!(this.type==CKEDITOR.STYLE_INLINE&&(e==a.block||e==a.blockLimit))){if(this.type==
|
||||
CKEDITOR.STYLE_OBJECT){var f=e.getName();if(!(typeof this.element=="string"?f==this.element:f in this.element))continue}if(this.checkElementRemovable(e,true,b))return true}}}return false},checkApplicable:function(a,b,c){b&&b instanceof CKEDITOR.filter&&(c=b);if(c&&!c.check(this))return false;switch(this.type){case CKEDITOR.STYLE_OBJECT:return!!a.contains(this.element);case CKEDITOR.STYLE_BLOCK:return!!a.blockLimit.getDtd()[this.element]}return true},checkElementMatch:function(a,b){var c=this._.definition;
|
||||
if(!a||!c.ignoreReadonly&&a.isReadOnly())return false;var d=a.getName();if(typeof this.element=="string"?d==this.element:d in this.element){if(!b&&!a.hasAttributes())return true;if(d=c._AC)c=d;else{var d={},e=0,f=c.attributes;if(f)for(var g in f){e++;d[g]=f[g]}if(g=CKEDITOR.style.getStyleText(c)){d.style||e++;d.style=g}d._length=e;c=c._AC=d}if(c._length){for(var h in c)if(h!="_length"){e=a.getAttribute(h)||"";if(h=="style")a:{d=c[h];typeof d=="string"&&(d=CKEDITOR.tools.parseCssText(d));typeof e==
|
||||
"string"&&(e=CKEDITOR.tools.parseCssText(e,true));g=void 0;for(g in d)if(!(g in e&&(e[g]==d[g]||d[g]=="inherit"||e[g]=="inherit"))){d=false;break a}d=true}else d=c[h]==e;if(d){if(!b)return true}else if(b)return false}if(b)return true}else return true}return false},checkElementRemovable:function(a,b,c){if(this.checkElementMatch(a,b,c))return true;if(b=t(this)[a.getName()]){var d;if(!(b=b.attributes))return true;for(c=0;c<b.length;c++){d=b[c][0];if(d=a.getAttribute(d)){var e=b[c][1];if(e===null)return true;
|
||||
if(typeof e=="string"){if(d==e)return true}else if(e.test(d))return true}}}return false},buildPreview:function(a){var b=this._.definition,c=[],d=b.element;d=="bdo"&&(d="span");var c=["<",d],e=b.attributes;if(e)for(var f in e)c.push(" ",f,'="',e[f],'"');(e=CKEDITOR.style.getStyleText(b))&&c.push(' style="',e,'"');c.push(">",a||b.name,"</",d,">");return c.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var b=a._ST;if(b)return b;var b=a.styles,c=
|
||||
a.attributes&&a.attributes.style||"",d="";c.length&&(c=c.replace(x,";"));for(var e in b){var f=b[e],g=(e+":"+f).replace(x,";");f=="inherit"?d=d+g:c=c+g}c.length&&(c=CKEDITOR.tools.normalizeCssText(c,true));return a._ST=c+d};CKEDITOR.style.customHandlers={};CKEDITOR.style.addCustomHandler=function(a){var b=function(a){this._={definition:a};this.setup&&this.setup(a)};b.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),{assignedTo:CKEDITOR.STYLE_OBJECT},a,true);
|
||||
return this.customHandlers[a.type]=b};var F=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,C=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED}(),CKEDITOR.styleCommand=function(a,f){this.requiredContent=this.allowedContent=this.style=a;CKEDITOR.tools.extend(this,f,true)},CKEDITOR.styleCommand.prototype.exec=function(a){a.focus();this.state==CKEDITOR.TRISTATE_OFF?a.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&
|
||||
a.removeStyle(this.style)},CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet"),CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet),CKEDITOR.loadStylesSet=function(a,f,c){CKEDITOR.stylesSet.addExternal(a,f,"");CKEDITOR.stylesSet.load(a,c)},CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(a,f){var c=this._.styleStateChangeCallbacks;if(!c){c=this._.styleStateChangeCallbacks=[];this.on("selectionChange",function(a){for(var b=
|
||||
0;b<c.length;b++){var f=c[b],j=f.style.checkActive(a.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;f.fn.call(this,j)}})}c.push({style:a,fn:f})},applyStyle:function(a){a.apply(this)},removeStyle:function(a){a.remove(this)},getStylesSet:function(a){if(this._.stylesDefinitions)a(this._.stylesDefinitions);else{var f=this,c=f.config.stylesCombo_stylesSet||f.config.stylesSet;if(c===false)a(null);else if(c instanceof Array){f._.stylesDefinitions=c;a(c)}else{c||(c="default");var c=c.split(":"),
|
||||
e=c[0];CKEDITOR.stylesSet.addExternal(e,c[1]?c.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(e,function(b){f._.stylesDefinitions=b[e];a(f._.stylesDefinitions)})}}}}),CKEDITOR.dom.comment=function(a,f){typeof a=="string"&&(a=(f?f.$:document).createComment(a));CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.comment.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype,{type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return"<\!--"+this.$.nodeValue+
|
||||
"--\>"}}),"use strict",function(){var a={},f={},c;for(c in CKEDITOR.dtd.$blockLimit)c in CKEDITOR.dtd.$list||(a[c]=1);for(c in CKEDITOR.dtd.$block)c in CKEDITOR.dtd.$blockLimit||c in CKEDITOR.dtd.$empty||(f[c]=1);CKEDITOR.dom.elementPath=function(c,b){var i=null,j=null,d=[],g=c,h,b=b||c.getDocument().getBody();do if(g.type==CKEDITOR.NODE_ELEMENT){d.push(g);if(!this.lastElement){this.lastElement=g;if(g.is(CKEDITOR.dtd.$object)||g.getAttribute("contenteditable")=="false")continue}if(g.equals(b))break;
|
||||
if(!j){h=g.getName();g.getAttribute("contenteditable")=="true"?j=g:!i&&f[h]&&(i=g);if(a[h]){var k;if(k=!i){if(h=h=="div"){a:{h=g.getChildren();k=0;for(var m=h.count();k<m;k++){var q=h.getItem(k);if(q.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[q.getName()]){h=true;break a}}h=false}h=!h}k=h}k?i=g:j=g}}}while(g=g.getParent());j||(j=b);this.block=i;this.blockLimit=j;this.root=b;this.elements=d}}(),CKEDITOR.dom.elementPath.prototype={compare:function(a){var f=this.elements,a=a&&a.elements;if(!a||
|
||||
f.length!=a.length)return false;for(var c=0;c<f.length;c++)if(!f[c].equals(a[c]))return false;return true},contains:function(a,f,c){var e;typeof a=="string"&&(e=function(b){return b.getName()==a});a instanceof CKEDITOR.dom.element?e=function(b){return b.equals(a)}:CKEDITOR.tools.isArray(a)?e=function(b){return CKEDITOR.tools.indexOf(a,b.getName())>-1}:typeof a=="function"?e=a:typeof a=="object"&&(e=function(b){return b.getName()in a});var b=this.elements,i=b.length;f&&i--;if(c){b=Array.prototype.slice.call(b,
|
||||
0);b.reverse()}for(f=0;f<i;f++)if(e(b[f]))return b[f];return null},isContextFor:function(a){var f;if(a in CKEDITOR.dtd.$block){f=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit;return!!f.getDtd()[a]}return true},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}},CKEDITOR.dom.text=function(a,f){typeof a=="string"&&(a=(f?f.$:document).createTextNode(a));this.$=a},CKEDITOR.dom.text.prototype=new CKEDITOR.dom.node,
|
||||
CKEDITOR.tools.extend(CKEDITOR.dom.text.prototype,{type:CKEDITOR.NODE_TEXT,getLength:function(){return this.$.nodeValue.length},getText:function(){return this.$.nodeValue},setText:function(a){this.$.nodeValue=a},split:function(a){var f=this.$.parentNode,c=f.childNodes.length,e=this.getLength(),b=this.getDocument(),i=new CKEDITOR.dom.text(this.$.splitText(a),b);if(f.childNodes.length==c)if(a>=e){i=b.createText("");i.insertAfter(this)}else{a=b.createText("");a.insertAfter(i);a.remove()}return i},substring:function(a,
|
||||
f){return typeof f!="number"?this.$.nodeValue.substr(a):this.$.nodeValue.substring(a,f)}}),function(){function a(a,e,b){var f=a.serializable,j=e[b?"endContainer":"startContainer"],d=b?"endOffset":"startOffset",g=f?e.document.getById(a.startNode):a.startNode,a=f?e.document.getById(a.endNode):a.endNode;if(j.equals(g.getPrevious())){e.startOffset=e.startOffset-j.getLength()-a.getPrevious().getLength();j=a.getNext()}else if(j.equals(a.getPrevious())){e.startOffset=e.startOffset-j.getLength();j=a.getNext()}j.equals(g.getParent())&&
|
||||
e[d]++;j.equals(a.getParent())&&e[d]++;e[b?"endContainer":"startContainer"]=j;return e}CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,f)};var f={createIterator:function(){var a=this,e=CKEDITOR.dom.walker.bookmark(),b=[],f;return{getNextRange:function(j){f=f===void 0?0:f+1;var d=a[f];if(d&&a.length>1){if(!f)for(var g=a.length-1;g>=0;g--)b.unshift(a[g].createBookmark(true));if(j)for(var h=
|
||||
0;a[f+h+1];){for(var k=d.document,j=0,g=k.getById(b[h].endNode),k=k.getById(b[h+1].startNode);;){g=g.getNextSourceNode(false);if(k.equals(g))j=1;else if(e(g)||g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary())continue;break}if(!j)break;h++}for(d.moveToBookmark(b.shift());h--;){g=a[++f];g.moveToBookmark(b.shift());d.setEnd(g.endContainer,g.endOffset)}}return d}}},createBookmarks:function(c){for(var e=[],b,f=0;f<this.length;f++){e.push(b=this[f].createBookmark(c,true));for(var j=f+1;j<this.length;j++){this[j]=
|
||||
a(b,this[j]);this[j]=a(b,this[j],true)}}return e},createBookmarks2:function(a){for(var e=[],b=0;b<this.length;b++)e.push(this[b].createBookmark2(a));return e},moveToBookmarks:function(a){for(var e=0;e<this.length;e++)this[e].moveToBookmark(a[e])}}}(),function(){function a(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function f(b){var c=CKEDITOR.skin["ua_"+b],d=CKEDITOR.env;if(c)for(var c=c.split(",").sort(function(a,b){return a>b?-1:1}),e=
|
||||
0,f;e<c.length;e++){f=c[e];if(d.ie&&(f.replace(/^ie/,"")==d.version||d.quirks&&f=="iequirks"))f="ie";if(d[f]){b=b+("_"+c[e]);break}}return CKEDITOR.getUrl(a()+b+".css")}function c(a,b){if(!i[a]){CKEDITOR.document.appendStyleSheet(f(a));i[a]=1}b&&b()}function e(a){var b=a.getById(j);if(!b){b=a.getHead().append("style");b.setAttribute("id",j);b.setAttribute("type","text/css")}return b}function b(a,b,c){var d,e,f;if(CKEDITOR.env.webkit){b=b.split("}").slice(0,-1);for(e=0;e<b.length;e++)b[e]=b[e].split("{")}for(var g=
|
||||
0;g<a.length;g++)if(CKEDITOR.env.webkit)for(e=0;e<b.length;e++){f=b[e][1];for(d=0;d<c.length;d++)f=f.replace(c[d][0],c[d][1]);a[g].$.sheet.addRule(b[e][0],f)}else{f=b;for(d=0;d<c.length;d++)f=f.replace(c[d][0],c[d][1]);CKEDITOR.env.ie&&CKEDITOR.env.version<11?a[g].$.styleSheet.cssText=a[g].$.styleSheet.cssText+f:a[g].$.innerHTML=a[g].$.innerHTML+f}}var i={};CKEDITOR.skin={path:a,loadPart:function(b,d){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(a()+
|
||||
"skin.js"),function(){c(b,d)}):c(b,d)},getPath:function(a){return CKEDITOR.getUrl(f(a))},icons:{},addIcon:function(a,b,c,d){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:c||0,bgsize:d||"16px"})},getIconStyle:function(a,b,c,d,e){var f;if(a){a=a.toLowerCase();b&&(f=this.icons[a+"-rtl"]);f||(f=this.icons[a])}a=c||f&&f.path||"";d=d||f&&f.offset;e=e||f&&f.bgsize||"16px";return a&&"background-image:url("+CKEDITOR.getUrl(a)+");background-position:0 "+d+"px;background-size:"+e+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,
|
||||
{getUiColor:function(){return this.uiColor},setUiColor:function(a){var c=e(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var e=CKEDITOR.skin.chameleon,f="",h="";if(typeof e=="function"){f=e(this,"editor");h=e(this,"panel")}a=[[g,a]];b([c],f,a);b(d,h,a)}).call(this,a)}});var j="cke_ui_color",d=[],g=/\$color/g;CKEDITOR.on("instanceLoaded",function(a){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var c=a.editor,a=function(a){a=(a.data[0]||a.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();
|
||||
if(!a.getById("cke_ui_color")){a=e(a);d.push(a);var f=c.getUiColor();f&&b([a],CKEDITOR.skin.chameleon(c,"panel"),[[g,f]])}};c.on("panelShow",a);c.on("menuShow",a);c.config.uiColor&&c.setUiColor(c.config.uiColor)}})}(),function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=false;else{var a=CKEDITOR.dom.element.createFromHtml('<div style="width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue"></div>',CKEDITOR.document);a.appendTo(CKEDITOR.document.getHead());try{var f=a.getComputedStyle("border-top-color"),
|
||||
c=a.getComputedStyle("border-right-color");CKEDITOR.env.hc=!!(f&&f==c)}catch(e){CKEDITOR.env.hc=false}a.remove()}if(CKEDITOR.env.hc)CKEDITOR.env.cssClass=CKEDITOR.env.cssClass+" cke_hc";CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(a=CKEDITOR._.pending){delete CKEDITOR._.pending;for(f=0;f<a.length;f++){CKEDITOR.editor.prototype.constructor.apply(a[f][0],a[f][1]);CKEDITOR.add(a[f][0])}}}(),CKEDITOR.skin.name="moono",CKEDITOR.skin.ua_editor=
|
||||
"ie,iequirks,ie7,ie8,gecko",CKEDITOR.skin.ua_dialog="ie,iequirks,ie7,ie8",CKEDITOR.skin.chameleon=function(){var a=function(){return function(a,b){for(var c=a.match(/[^#]./g),f=0;f<3;f++){var d=c,g=f,h;h=parseInt(c[f],16);h=("0"+(b<0?0|h*(1+b):0|h+(255-h)*b).toString(16)).slice(-2);d[g]=h}return"#"+c.join("")}}(),f=function(){var a=new CKEDITOR.template("background:#{to};background-image:-webkit-gradient(linear,lefttop,leftbottom,from({from}),to({to}));background-image:-moz-linear-gradient(top,{from},{to});background-image:-webkit-linear-gradient(top,{from},{to});background-image:-o-linear-gradient(top,{from},{to});background-image:-ms-linear-gradient(top,{from},{to});background-image:linear-gradient(top,{from},{to});filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='{from}',endColorstr='{to}');");
|
||||
return function(b,c){return a.output({from:b,to:c})}}(),c={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ {defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_bottom [{defaultGradient}border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [{defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [{defaultGradient}outline-color:{defaultBorder};border-top-color:{defaultBorder};] {id} .cke_dialog_tab [{lightGradient}border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [{mediumGradient}] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} .cke_toolgroup [{lightGradient}border-color:{defaultBorder};] {id} a.cke_button_off:hover, {id} a.cke_button_off:focus, {id} a.cke_button_off:active [{mediumGradient}] {id} .cke_button_on [{ckeButtonOn}] {id} .cke_toolbar_separator [background-color: {ckeToolbarSeparator};] {id} .cke_combo_button [border-color:{defaultBorder};{lightGradient}] {id} a.cke_combo_button:hover, {id} a.cke_combo_button:focus, {id} .cke_combo_on a.cke_combo_button [border-color:{defaultBorder};{mediumGradient}] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover, {id} a.cke_path_item:focus, {id} a.cke_path_item:active [background-color:{elementsPathBg};] {id}.cke_panel [border-color:{defaultBorder};] "),
|
||||
panel:new CKEDITOR.template(".cke_panel_grouptitle [{lightGradient}border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:focus.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:focus.cke_colorauto, a:focus.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")};
|
||||
return function(e,b){var i=e.uiColor,i={id:"."+e.id,defaultBorder:a(i,-0.1),defaultGradient:f(a(i,0.9),i),lightGradient:f(a(i,1),a(i,0.7)),mediumGradient:f(a(i,0.8),a(i,0.5)),ckeButtonOn:f(a(i,0.6),a(i,0.7)),ckeResizer:a(i,-0.4),ckeToolbarSeparator:a(i,0.5),ckeColorauto:a(i,0.8),dialogBody:a(i,0.7),dialogTabSelected:f("#FFFFFF","#FFFFFF"),dialogTabSelectedBorder:"#FFF",elementsPathColor:a(i,-0.6),elementsPathBg:i,menubuttonIcon:a(i,0.5),menubuttonIconHover:a(i,0.3)};return c[b].output(i).replace(/\[/g,
|
||||
"{").replace(/\]/g,"}")}}(),CKEDITOR.plugins.add("dialogui",{onLoad:function(){var a=function(a){this._||(this._={});this._["default"]=this._.initValue=a["default"]||"";this._.required=a.required||false;for(var b=[this._],c=1;c<arguments.length;c++)b.push(arguments[c]);b.push(true);CKEDITOR.tools.extend.apply(CKEDITOR.tools,b);return this._},f={build:function(a,b,c){return new CKEDITOR.ui.dialog.textInput(a,b,c)}},c={build:function(a,b,c){return new CKEDITOR.ui.dialog[b.type](a,b,c)}},e={isChanged:function(){return this.getValue()!=
|
||||
this.getInitValue()},reset:function(a){this.setValue(this.getInitValue(),a)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._["default"]},getInitValue:function(){return this._.initValue}},b=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(a,b){if(!this._.domOnChangeRegistered){a.on("load",function(){this.getInputElement().on("change",function(){a.parts.dialog.isVisible()&&this.fire("change",
|
||||
{value:this.getValue()})},this)},this);this._.domOnChangeRegistered=true}this.on("change",b)}},true),i=/^on([A-Z]\w+)/,j=function(a){for(var b in a)(i.test(b)||b=="title"||b=="type")&&delete a[b];return a};CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(b,c,e,f){if(!(arguments.length<4)){var j=a.call(this,c);j.labelId=CKEDITOR.tools.getNextId()+"_label";this._.children=[];var i={role:c.role||"presentation"};if(c.includeLabel)i["aria-labelledby"]=j.labelId;CKEDITOR.ui.dialog.uiElement.call(this,
|
||||
b,c,e,"div",null,i,function(){var a=[],e=c.required?" cke_required":"";if(c.labelLayout!="horizontal")a.push('<label class="cke_dialog_ui_labeled_label'+e+'" ',' id="'+j.labelId+'"',j.inputId?' for="'+j.inputId+'"':"",(c.labelStyle?' style="'+c.labelStyle+'"':"")+">",c.label,"</label>",'<div class="cke_dialog_ui_labeled_content"',c.controlStyle?' style="'+c.controlStyle+'"':"",' role="presentation">',f.call(this,b,c),"</div>");else{e={type:"hbox",widths:c.widths,padding:0,children:[{type:"html",html:'<label class="cke_dialog_ui_labeled_label'+
|
||||
e+'" id="'+j.labelId+'" for="'+j.inputId+'"'+(c.labelStyle?' style="'+c.labelStyle+'"':"")+">"+CKEDITOR.tools.htmlEncode(c.label)+"</span>"},{type:"html",html:'<span class="cke_dialog_ui_labeled_content"'+(c.controlStyle?' style="'+c.controlStyle+'"':"")+">"+f.call(this,b,c)+"</span>"}]};CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,e,a)}return a.join("")})}},textInput:function(b,c,e){if(!(arguments.length<3)){a.call(this,c);var f=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",j={"class":"cke_dialog_ui_input_"+
|
||||
c.type,id:f,type:c.type};if(c.validate)this.validate=c.validate;if(c.maxLength)j.maxlength=c.maxLength;if(c.size)j.size=c.size;if(c.inputStyle)j.style=c.inputStyle;var i=this,p=false;b.on("load",function(){i.getInputElement().on("keydown",function(a){a.data.getKeystroke()==13&&(p=true)});i.getInputElement().on("keyup",function(a){if(a.data.getKeystroke()==13&&p){b.getButton("ok")&&setTimeout(function(){b.getButton("ok").click()},0);p=false}},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,
|
||||
b,c,e,function(){var a=['<div class="cke_dialog_ui_input_',c.type,'" role="presentation"'];c.width&&a.push('style="width:'+c.width+'" ');a.push("><input ");j["aria-labelledby"]=this._.labelId;this._.required&&(j["aria-required"]=this._.required);for(var b in j)a.push(b+'="'+j[b]+'" ');a.push(" /></div>");return a.join("")})}},textarea:function(b,c,e){if(!(arguments.length<3)){a.call(this,c);var f=this,j=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",i={};if(c.validate)this.validate=c.validate;
|
||||
i.rows=c.rows||5;i.cols=c.cols||20;i["class"]="cke_dialog_ui_input_textarea "+(c["class"]||"");if(typeof c.inputStyle!="undefined")i.style=c.inputStyle;if(c.dir)i.dir=c.dir;CKEDITOR.ui.dialog.labeledElement.call(this,b,c,e,function(){i["aria-labelledby"]=this._.labelId;this._.required&&(i["aria-required"]=this._.required);var a=['<div class="cke_dialog_ui_input_textarea" role="presentation"><textarea id="',j,'" '],b;for(b in i)a.push(b+'="'+CKEDITOR.tools.htmlEncode(i[b])+'" ');a.push(">",CKEDITOR.tools.htmlEncode(f._["default"]),
|
||||
"</textarea></div>");return a.join("")})}},checkbox:function(b,c,e){if(!(arguments.length<3)){var f=a.call(this,c,{"default":!!c["default"]});if(c.validate)this.validate=c.validate;CKEDITOR.ui.dialog.uiElement.call(this,b,c,e,"span",null,null,function(){var a=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},true),e=[],h=CKEDITOR.tools.getNextId()+"_label",i={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":h};j(a);if(c["default"])i.checked=
|
||||
"checked";if(typeof a.inputStyle!="undefined")a.style=a.inputStyle;f.checkbox=new CKEDITOR.ui.dialog.uiElement(b,a,e,"input",null,i);e.push(' <label id="',h,'" for="',i.id,'"'+(c.labelStyle?' style="'+c.labelStyle+'"':"")+">",CKEDITOR.tools.htmlEncode(c.label),"</label>");return e.join("")})}},radio:function(b,c,e){if(!(arguments.length<3)){a.call(this,c);if(!this._["default"])this._["default"]=this._.initValue=c.items[0][1];if(c.validate)this.validate=c.valdiate;var f=[],i=this;c.role="radiogroup";
|
||||
c.includeLabel=true;CKEDITOR.ui.dialog.labeledElement.call(this,b,c,e,function(){for(var a=[],e=[],h=(c.id?c.id:CKEDITOR.tools.getNextId())+"_radio",n=0;n<c.items.length;n++){var l=c.items[n],s=l[2]!==void 0?l[2]:l[0],v=l[1]!==void 0?l[1]:l[0],t=CKEDITOR.tools.getNextId()+"_radio_input",B=t+"_label",t=CKEDITOR.tools.extend({},c,{id:t,title:null,type:null},true),s=CKEDITOR.tools.extend({},t,{title:s},true),u={type:"radio","class":"cke_dialog_ui_radio_input",name:h,value:v,"aria-labelledby":B},y=[];
|
||||
if(i._["default"]==v)u.checked="checked";j(t);j(s);if(typeof t.inputStyle!="undefined")t.style=t.inputStyle;t.keyboardFocusable=true;f.push(new CKEDITOR.ui.dialog.uiElement(b,t,y,"input",null,u));y.push(" ");new CKEDITOR.ui.dialog.uiElement(b,s,y,"label",null,{id:B,"for":u.id},l[0]);a.push(y.join(""))}new CKEDITOR.ui.dialog.hbox(b,f,a,e);return e.join("")});this._.children=f}},button:function(b,c,e){if(arguments.length){typeof c=="function"&&(c=c(b.getParentEditor()));a.call(this,c,{disabled:c.disabled||
|
||||
false});CKEDITOR.event.implementOn(this);var f=this;b.on("load",function(){var a=this.getElement();(function(){a.on("click",function(a){f.click();a.data.preventDefault()});a.on("keydown",function(a){if(a.data.getKeystroke()in{32:1}){f.click();a.data.preventDefault()}})})();a.unselectable()},this);var j=CKEDITOR.tools.extend({},c);delete j.style;var i=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,b,j,e,"a",null,{style:c.style,href:"javascript:void(0)",title:c.label,hidefocus:"true",
|
||||
"class":c["class"],role:"button","aria-labelledby":i},'<span id="'+i+'" class="cke_dialog_ui_button">'+CKEDITOR.tools.htmlEncode(c.label)+"</span>")}},select:function(b,c,e){if(!(arguments.length<3)){var f=a.call(this,c);if(c.validate)this.validate=c.validate;f.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,b,c,e,function(){var a=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_select":CKEDITOR.tools.getNextId()+"_select"},true),e=[],h=[],i={id:f.inputId,"class":"cke_dialog_ui_input_select",
|
||||
"aria-labelledby":this._.labelId};e.push('<div class="cke_dialog_ui_input_',c.type,'" role="presentation"');c.width&&e.push('style="width:'+c.width+'" ');e.push(">");if(c.size!==void 0)i.size=c.size;if(c.multiple!==void 0)i.multiple=c.multiple;j(a);for(var n=0,l;n<c.items.length&&(l=c.items[n]);n++)h.push('<option value="',CKEDITOR.tools.htmlEncode(l[1]!==void 0?l[1]:l[0]).replace(/"/g,"""),'" /> ',CKEDITOR.tools.htmlEncode(l[0]));if(typeof a.inputStyle!="undefined")a.style=a.inputStyle;f.select=
|
||||
new CKEDITOR.ui.dialog.uiElement(b,a,e,"select",null,i,h.join(""));e.push("</div>");return e.join("")})}},file:function(b,c,e){if(!(arguments.length<3)){c["default"]===void 0&&(c["default"]="");var f=CKEDITOR.tools.extend(a.call(this,c),{definition:c,buttons:[]});if(c.validate)this.validate=c.validate;b.on("load",function(){CKEDITOR.document.getById(f.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,b,c,e,function(){f.frameId=CKEDITOR.tools.getNextId()+
|
||||
"_fileInput";var a=['<iframe frameborder="0" allowtransparency="0" class="cke_dialog_ui_input_file" role="presentation" id="',f.frameId,'" title="',c.label,'" src="javascript:void('];a.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");a.push(')"></iframe>');return a.join("")})}},fileButton:function(b,c,e){var f=this;if(!(arguments.length<3)){a.call(this,c);if(c.validate)this.validate=c.validate;var j=CKEDITOR.tools.extend({},
|
||||
c),i=j.onClick;j.className=(j.className?j.className+" ":"")+"cke_dialog_ui_button";j.onClick=function(a){var e=c["for"];if(!i||i.call(this,a)!==false){b.getContentElement(e[0],e[1]).submit();this.disable()}};b.on("load",function(){b.getContentElement(c["for"][0],c["for"][1])._.buttons.push(f)});CKEDITOR.ui.dialog.button.call(this,b,j,e)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,b=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,c=/\/$/;return function(e,f,j){if(!(arguments.length<3)){var i=[],
|
||||
o=f.html;o.charAt(0)!="<"&&(o="<span>"+o+"</span>");var n=f.focus;if(n){var l=this.focus;this.focus=function(){(typeof n=="function"?n:l).call(this);this.fire("focus")};if(f.isFocusable)this.isFocusable=this.isFocusable;this.keyboardFocusable=true}CKEDITOR.ui.dialog.uiElement.call(this,e,f,i,"span",null,null,"");i=i.join("").match(a);o=o.match(b)||["","",""];if(c.test(o[1])){o[1]=o[1].slice(0,-1);o[2]="/"+o[2]}j.push([o[1]," ",i[1]||"",o[2]].join(""))}}}(),fieldset:function(a,b,c,e,f){var j=f.label;
|
||||
this._={children:b};CKEDITOR.ui.dialog.uiElement.call(this,a,f,e,"fieldset",null,null,function(){var a=[];j&&a.push("<legend"+(f.labelStyle?' style="'+f.labelStyle+'"':"")+">"+j+"</legend>");for(var b=0;b<c.length;b++)a.push(c[b]);return a.join("")})}},true);CKEDITOR.ui.dialog.html.prototype=new CKEDITOR.ui.dialog.uiElement;CKEDITOR.ui.dialog.labeledElement.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setLabel:function(a){var b=CKEDITOR.document.getById(this._.labelId);b.getChildCount()<
|
||||
1?(new CKEDITOR.dom.text(a,CKEDITOR.document)).appendTo(b):b.getChild(0).$.nodeValue=a;return this},getLabel:function(){var a=CKEDITOR.document.getById(this._.labelId);return!a||a.getChildCount()<1?"":a.getChild(0).getText()},eventProcessors:b},true);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return!this._.disabled?this.fire("click",{dialog:this._.dialog}):false},enable:function(){this._.disabled=false;var a=this.getElement();a&&a.removeClass("cke_disabled")},
|
||||
disable:function(){this._.disabled=true;this.getElement().addClass("cke_disabled")},isVisible:function(){return this.getElement().getFirst().isVisible()},isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(a,b){this.on("click",function(){b.apply(this,arguments)})}},true),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:true},true);CKEDITOR.ui.dialog.textInput.prototype=
|
||||
CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)},focus:function(){var a=this.selectParentTab();setTimeout(function(){var b=a.getInputElement();b&&b.$.focus()},0)},select:function(){var a=this.selectParentTab();setTimeout(function(){var b=a.getInputElement();if(b){b.$.focus();b.$.select()}},0)},accessKeyUp:function(){this.select()},setValue:function(a){!a&&(a="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,
|
||||
arguments)},keyboardFocusable:true},e,true);CKEDITOR.ui.dialog.textarea.prototype=new CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(a,b,c){var e=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),f=this.getInputElement().$;e.$.text=a;e.$.value=b===void 0||b===null?a:b;c===void 0||c===null?CKEDITOR.env.ie?f.add(e.$):f.add(e.$,
|
||||
null):f.add(e.$,c);return this},remove:function(a){this.getInputElement().$.remove(a);return this},clear:function(){for(var a=this.getInputElement().$;a.length>0;)a.remove(0);return this},keyboardFocusable:true},e,true);CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},setValue:function(a,b){this.getInputElement().$.checked=a;!b&&this.fire("change",{value:a})},getValue:function(){return this.getInputElement().$.checked},
|
||||
accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(a,c){if(!CKEDITOR.env.ie||CKEDITOR.env.version>8)return b.onChange.apply(this,arguments);a.on("load",function(){var a=this._.checkbox.getElement();a.on("propertychange",function(b){b=b.data.$;b.propertyName=="checked"&&this.fire("change",{value:a.$.checked})},this)},this);this.on("change",c);return null}},keyboardFocusable:true},e,true);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,
|
||||
{setValue:function(a,b){for(var c=this._.children,e,f=0;f<c.length&&(e=c[f]);f++)e.getElement().$.checked=e.getValue()==a;!b&&this.fire("change",{value:a})},getValue:function(){for(var a=this._.children,b=0;b<a.length;b++)if(a[b].getElement().$.checked)return a[b].getValue();return null},accessKeyUp:function(){var a=this._.children,b;for(b=0;b<a.length;b++)if(a[b].getElement().$.checked){a[b].getElement().focus();return}a[0].getElement().focus()},eventProcessors:{onChange:function(a,c){if(CKEDITOR.env.ie){a.on("load",
|
||||
function(){for(var a=this._.children,b=this,c=0;c<a.length;c++)a[c].getElement().on("propertychange",function(a){a=a.data.$;a.propertyName=="checked"&&this.$.checked&&b.fire("change",{value:this.getAttribute("value")})})},this);this.on("change",c)}else return b.onChange.apply(this,arguments);return null}}},e,true);CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,e,{getInputElement:function(){var a=CKEDITOR.document.getById(this._.frameId).getFrameDocument();
|
||||
return a.$.forms.length>0?new CKEDITOR.dom.element(a.$.forms[0].elements[0]):this.getElement()},submit:function(){this.getInputElement().getParent().$.submit();return this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(a){var b=/^on([A-Z]\w+)/,c,e=function(a,b,c,d){a.on("formLoaded",function(){a.getInputElement().on(c,d,a)})},f;for(f in a)if(c=f.match(b))this.eventProcessors[f]?this.eventProcessors[f].call(this,this._.dialog,a[f]):e(this,this._.dialog,
|
||||
c[1].toLowerCase(),a[f]);return this},reset:function(){function a(){c.$.open();var d="";e.size&&(d=e.size-(CKEDITOR.env.ie?7:0));var s=b.frameId+"_input";c.$.write(['<html dir="'+o+'" lang="'+n+'"><head><title></title></head><body style="margin: 0; overflow: hidden; background: transparent;">','<form enctype="multipart/form-data" method="POST" dir="'+o+'" lang="'+n+'" action="',CKEDITOR.tools.htmlEncode(e.action),'"><label id="',b.labelId,'" for="',s,'" style="display:none">',CKEDITOR.tools.htmlEncode(e.label),
|
||||
'</label><input style="width:100%" id="',s,'" aria-labelledby="',b.labelId,'" type="file" name="',CKEDITOR.tools.htmlEncode(e.id||"cke_upload"),'" size="',CKEDITOR.tools.htmlEncode(d>0?d:""),'" /></form></body></html><script>',CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"","window.parent.CKEDITOR.tools.callFunction("+j+");","window.onbeforeunload = function() {window.parent.CKEDITOR.tools.callFunction("+i+")}","<\/script>"].join(""));c.$.close();for(d=0;d<f.length;d++)f[d].enable()}var b=
|
||||
this._,c=CKEDITOR.document.getById(b.frameId).getFrameDocument(),e=b.definition,f=b.buttons,j=this.formLoadedNumber,i=this.formUnloadNumber,o=b.dialog._.editor.lang.dir,n=b.dialog._.editor.langCode;if(!j){j=this.formLoadedNumber=CKEDITOR.tools.addFunction(function(){this.fire("formLoaded")},this);i=this.formUnloadNumber=CKEDITOR.tools.addFunction(function(){this.getInputElement().clearCustomData()},this);this.getDialog()._.editor.on("destroy",function(){CKEDITOR.tools.removeFunction(j);CKEDITOR.tools.removeFunction(i)})}CKEDITOR.env.gecko?
|
||||
setTimeout(a,500):a()},getValue:function(){return this.getInputElement().$.value||""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(a,b){if(!this._.domOnChangeRegistered){this.on("formLoaded",function(){this.getInputElement().on("change",function(){this.fire("change",{value:this.getValue()})},this)},this);this._.domOnChangeRegistered=true}this.on("change",b)}},keyboardFocusable:true},true);CKEDITOR.ui.dialog.fileButton.prototype=new CKEDITOR.ui.dialog.button;CKEDITOR.ui.dialog.fieldset.prototype=
|
||||
CKEDITOR.tools.clone(CKEDITOR.ui.dialog.hbox.prototype);CKEDITOR.dialog.addUIElement("text",f);CKEDITOR.dialog.addUIElement("password",f);CKEDITOR.dialog.addUIElement("textarea",c);CKEDITOR.dialog.addUIElement("checkbox",c);CKEDITOR.dialog.addUIElement("radio",c);CKEDITOR.dialog.addUIElement("button",c);CKEDITOR.dialog.addUIElement("select",c);CKEDITOR.dialog.addUIElement("file",c);CKEDITOR.dialog.addUIElement("fileButton",c);CKEDITOR.dialog.addUIElement("html",c);CKEDITOR.dialog.addUIElement("fieldset",
|
||||
{build:function(a,b,c){for(var e=b.children,f,j=[],i=[],o=0;o<e.length&&(f=e[o]);o++){var n=[];j.push(n);i.push(CKEDITOR.dialog._.uiElementBuilders[f.type].build(a,f,n))}return new CKEDITOR.ui.dialog[b.type](a,i,j,c,b)}})}}),CKEDITOR.DIALOG_RESIZE_NONE=0,CKEDITOR.DIALOG_RESIZE_WIDTH=1,CKEDITOR.DIALOG_RESIZE_HEIGHT=2,CKEDITOR.DIALOG_RESIZE_BOTH=3,function(){function a(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId)+a,c=b-1;c>b-a;c--)if(this._.tabs[this._.tabIdList[c%
|
||||
a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function f(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),c=b+1;c<b+a;c++)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function c(a,b){for(var c=a.$.getElementsByTagName("input"),d=0,e=c.length;d<e;d++){var f=new CKEDITOR.dom.element(c[d]);if(f.getAttribute("type").toLowerCase()=="text")if(b){f.setAttribute("value",f.getCustomData("fake_value")||
|
||||
"");f.removeCustomData("fake_value")}else{f.setCustomData("fake_value",f.getAttribute("value"));f.setAttribute("value","")}}}function e(a,b){var c=this.getInputElement();c&&(a?c.removeAttribute("aria-invalid"):c.setAttribute("aria-invalid",true));a||(this.select?this.select():this.focus());b&&alert(b);this.fire("validated",{valid:a,msg:b})}function b(){var a=this.getInputElement();a&&a.removeAttribute("aria-invalid")}function i(a){var a=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",
|
||||
n).output({id:CKEDITOR.tools.getNextNumber(),editorId:a.id,langDir:a.lang.dir,langCode:a.langCode,editorDialogClass:"cke_editor_"+a.name.replace(/\./g,"\\.")+"_dialog",closeTitle:a.lang.common.close,hidpi:CKEDITOR.env.hidpi?"cke_hidpi":""})),b=a.getChild([0,0,0,0,0]),c=b.getChild(0),d=b.getChild(1);if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var e="javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())";CKEDITOR.dom.element.createFromHtml('<iframe frameBorder="0" class="cke_iframe_shim" src="'+
|
||||
e+'" tabIndex="-1"></iframe>').appendTo(b.getParent())}c.unselectable();d.unselectable();return{element:a,parts:{dialog:a.getChild(0),title:c,close:d,tabs:b.getChild(2),contents:b.getChild([3,0,0,0]),footer:b.getChild([3,0,1,0])}}}function j(a,b,c){this.element=b;this.focusIndex=c;this.tabIndex=0;this.isFocusable=function(){return!b.getAttribute("disabled")&&b.isVisible()};this.focus=function(){a._.currentFocusIndex=this.focusIndex;this.element.focus()};b.on("keydown",function(a){a.data.getKeystroke()in
|
||||
{32:1,13:1}&&this.fire("click")});b.on("focus",function(){this.fire("mouseover")});b.on("blur",function(){this.fire("mouseout")})}function d(a){function b(){a.layout()}var c=CKEDITOR.document.getWindow();c.on("resize",b);a.on("hide",function(){c.removeListener("resize",b)})}function g(a,b){this._={dialog:a};CKEDITOR.tools.extend(this,b)}function h(a){function b(c){var j=a.getSize(),i=CKEDITOR.document.getWindow().getViewPaneSize(),k=c.data.$.screenX,l=c.data.$.screenY,m=k-d.x,s=l-d.y;d={x:k,y:l};
|
||||
e.x=e.x+m;e.y=e.y+s;a.move(e.x+g[3]<h?-g[3]:e.x-g[1]>i.width-j.width-h?i.width-j.width+(f.lang.dir=="rtl"?0:g[1]):e.x,e.y+g[0]<h?-g[0]:e.y-g[2]>i.height-j.height-h?i.height-j.height+g[2]:e.y,1);c.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mousemove",b);CKEDITOR.document.removeListener("mouseup",c);if(CKEDITOR.env.ie6Compat){var a=r.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",c)}}var d=null,e=null,f=a.getParentEditor(),h=f.config.dialog_magnetDistance,
|
||||
g=CKEDITOR.skin.margins||[0,0,0,0];typeof h=="undefined"&&(h=20);a.parts.title.on("mousedown",function(f){d={x:f.data.$.screenX,y:f.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);e=a.getPosition();if(CKEDITOR.env.ie6Compat){var h=r.getChild(0).getFrameDocument();h.on("mousemove",b);h.on("mouseup",c)}f.data.preventDefault()},a)}function k(a){var b,c;function d(e){var m=g.lang.dir=="rtl",s=l.width,o=l.height,n=s+(e.data.$.screenX-b)*(m?-1:1)*(a._.moved?1:2),v=
|
||||
o+(e.data.$.screenY-c)*(a._.moved?1:2),p=a._.element.getFirst(),p=m&&p.getComputedStyle("right"),t=a.getPosition();t.y+v>k.height&&(v=k.height-t.y);if((m?p:t.x)+n>k.width)n=k.width-(m?p:t.x);if(h==CKEDITOR.DIALOG_RESIZE_WIDTH||h==CKEDITOR.DIALOG_RESIZE_BOTH)s=Math.max(f.minWidth||0,n-j);if(h==CKEDITOR.DIALOG_RESIZE_HEIGHT||h==CKEDITOR.DIALOG_RESIZE_BOTH)o=Math.max(f.minHeight||0,v-i);a.resize(s,o);a._.moved||a.layout();e.data.preventDefault()}function e(){CKEDITOR.document.removeListener("mouseup",
|
||||
e);CKEDITOR.document.removeListener("mousemove",d);if(m){m.remove();m=null}if(CKEDITOR.env.ie6Compat){var a=r.getChild(0).getFrameDocument();a.removeListener("mouseup",e);a.removeListener("mousemove",d)}}var f=a.definition,h=f.resizable;if(h!=CKEDITOR.DIALOG_RESIZE_NONE){var g=a.getParentEditor(),j,i,k,l,m,s=CKEDITOR.tools.addFunction(function(f){l=a.getSize();var h=a.parts.contents;if(h.$.getElementsByTagName("iframe").length){m=CKEDITOR.dom.element.createFromHtml('<div class="cke_dialog_resize_cover" style="height: 100%; position: absolute; width: 100%;"></div>');
|
||||
h.append(m)}i=l.height-a.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks));j=l.width-a.parts.contents.getSize("width",1);b=f.screenX;c=f.screenY;k=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",d);CKEDITOR.document.on("mouseup",e);if(CKEDITOR.env.ie6Compat){h=r.getChild(0).getFrameDocument();h.on("mousemove",d);h.on("mouseup",e)}f.preventDefault&&f.preventDefault()});a.on("load",function(){var b="";h==CKEDITOR.DIALOG_RESIZE_WIDTH?
|
||||
b=" cke_resizer_horizontal":h==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(b=" cke_resizer_vertical");b=CKEDITOR.dom.element.createFromHtml('<div class="cke_resizer'+b+" cke_resizer_"+g.lang.dir+'" title="'+CKEDITOR.tools.htmlEncode(g.lang.common.resize)+'" onmousedown="CKEDITOR.tools.callFunction('+s+', event )">'+(g.lang.dir=="ltr"?"◢":"◣")+"</div>");a.parts.footer.append(b,1)});g.on("destroy",function(){CKEDITOR.tools.removeFunction(s)})}}function m(a){a.data.preventDefault(1)}function q(a){var b=CKEDITOR.document.getWindow(),
|
||||
c=a.config,d=c.dialog_backgroundCoverColor||"white",e=c.dialog_backgroundCoverOpacity,f=c.baseFloatZIndex,c=CKEDITOR.tools.genKey(d,e,f),h=y[c];if(h)h.show();else{f=['<div tabIndex="-1" style="position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",f,"; top: 0px; left: 0px; ",!CKEDITOR.env.ie6Compat?"background-color: "+d:"",'" class="cke_dialog_background_cover">'];if(CKEDITOR.env.ie6Compat){d="<html><body style=\\'background-color:"+d+";\\'></body></html>";f.push('<iframe hidefocus="true" frameborder="0" id="cke_dialog_background_iframe" src="javascript:');
|
||||
f.push("void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.write( '"+d+"' );document.close();")+"})())");f.push('" style="position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0)"></iframe>')}f.push("</div>");h=CKEDITOR.dom.element.createFromHtml(f.join(""));h.setOpacity(e!==void 0?e:0.5);h.on("keydown",m);h.on("keypress",m);h.on("keyup",m);h.appendTo(CKEDITOR.document.getBody());y[c]=h}a.focusManager.add(h);
|
||||
r=h;var a=function(){var a=b.getViewPaneSize();h.setStyles({width:a.width+"px",height:a.height+"px"})},g=function(){var a=b.getScrollPosition(),c=CKEDITOR.dialog._.currentTop;h.setStyles({left:a.x+"px",top:a.y+"px"});if(c){do{a=c.getPosition();c.move(a.x,a.y)}while(c=c._.parentDialog)}};u=a;b.on("resize",a);a();(!CKEDITOR.env.mac||!CKEDITOR.env.webkit)&&h.focus();if(CKEDITOR.env.ie6Compat){var j=function(){g();arguments.callee.prevScrollHandler.apply(this,arguments)};b.$.setTimeout(function(){j.prevScrollHandler=
|
||||
window.onscroll||function(){};window.onscroll=j},0);g()}}function p(a){if(r){a.focusManager.remove(r);a=CKEDITOR.document.getWindow();r.hide();a.removeListener("resize",u);CKEDITOR.env.ie6Compat&&a.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||null},0);u=null}}var o=CKEDITOR.tools.cssLength,n='<div class="cke_reset_all {editorId} {editorDialogClass} {hidpi}" dir="{langDir}" lang="{langCode}" role="dialog" aria-labelledby="cke_dialog_title_{id}"><table class="cke_dialog '+
|
||||
CKEDITOR.env.cssClass+' cke_{langDir}" style="position:absolute" role="presentation"><tr><td role="presentation"><div class="cke_dialog_body" role="presentation"><div id="cke_dialog_title_{id}" class="cke_dialog_title" role="presentation"></div><a id="cke_dialog_close_button_{id}" class="cke_dialog_close_button" href="javascript:void(0)" title="{closeTitle}" role="button"><span class="cke_label">X</span></a><div id="cke_dialog_tabs_{id}" class="cke_dialog_tabs" role="tablist"></div><table class="cke_dialog_contents" role="presentation"><tr><td id="cke_dialog_contents_{id}" class="cke_dialog_contents_body" role="presentation"></td></tr><tr><td id="cke_dialog_footer_{id}" class="cke_dialog_footer" role="presentation"></td></tr></table></div></td></tr></table></div>';
|
||||
CKEDITOR.dialog=function(c,d){function g(){var a=w._.focusList;a.sort(function(a,b){return a.tabIndex!=b.tabIndex?b.tabIndex-a.tabIndex:a.focusIndex-b.focusIndex});for(var b=a.length,c=0;c<b;c++)a[c].focusIndex=c}function j(a){var b=w._.focusList,a=a||0;if(!(b.length<1)){var c=w._.currentFocusIndex;try{b[c].getInputElement().$.blur()}catch(d){}for(var e=c=(c+a+b.length)%b.length;a&&!b[e].isFocusable();){e=(e+a+b.length)%b.length;if(e==c)break}b[e].focus();b[e].type=="text"&&b[e].select()}}function m(b){if(w==
|
||||
CKEDITOR.dialog._.currentTop){var d=b.data.getKeystroke(),e=c.lang.dir=="rtl";q=r=0;if(d==9||d==CKEDITOR.SHIFT+9){d=d==CKEDITOR.SHIFT+9;if(w._.tabBarMode){d=d?a.call(w):f.call(w);w.selectPage(d);w._.tabs[d][0].focus()}else j(d?-1:1);q=1}else if(d==CKEDITOR.ALT+121&&!w._.tabBarMode&&w.getPageCount()>1){w._.tabBarMode=true;w._.tabs[w._.currentTabId][0].focus();q=1}else if((d==37||d==39)&&w._.tabBarMode){d=d==(e?39:37)?a.call(w):f.call(w);w.selectPage(d);w._.tabs[d][0].focus();q=1}else if((d==13||d==
|
||||
32)&&w._.tabBarMode){this.selectPage(this._.currentTabId);this._.tabBarMode=false;this._.currentFocusIndex=-1;j(1);q=1}else if(d==13){d=b.data.getTarget();if(!d.is("a","button","select","textarea")&&(!d.is("input")||d.$.type!="button")){(d=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(d.click,0,d);q=1}r=1}else if(d==27){(d=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(d.click,0,d):this.fire("cancel",{hide:true}).hide!==false&&this.hide();r=1}else return;s(b)}}function s(a){q?a.data.preventDefault(1):
|
||||
r&&a.data.stopPropagation()}var o=CKEDITOR.dialog._.dialogDefinitions[d],n=CKEDITOR.tools.clone(l),v=c.config.dialog_buttonsOrder||"OS",p=c.lang.dir,t={},q,r;(v=="OS"&&CKEDITOR.env.mac||v=="rtl"&&p=="ltr"||v=="ltr"&&p=="rtl")&&n.buttons.reverse();o=CKEDITOR.tools.extend(o(c),n);o=CKEDITOR.tools.clone(o);o=new B(this,o);n=i(c);this._={editor:c,element:n.element,name:d,contentSize:{width:0,height:0},size:{width:0,height:0},contents:{},buttons:{},accessKeyMap:{},tabs:{},tabIdList:[],currentTabId:null,
|
||||
currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:false,focusList:[],currentFocusIndex:0,hasFocus:false};this.parts=n.parts;CKEDITOR.tools.setTimeout(function(){c.fire("ariaWidget",this.parts.contents)},0,this);n={position:CKEDITOR.env.ie6Compat?"absolute":"fixed",top:0,visibility:"hidden"};n[p=="rtl"?"right":"left"]=0;this.parts.dialog.setStyles(n);CKEDITOR.event.call(this);this.definition=o=CKEDITOR.fire("dialogDefinition",{name:d,definition:o},c).definition;if(!("removeDialogTabs"in c._)&&
|
||||
c.config.removeDialogTabs){n=c.config.removeDialogTabs.split(";");for(p=0;p<n.length;p++){v=n[p].split(":");if(v.length==2){var u=v[0];t[u]||(t[u]=[]);t[u].push(v[1])}}c._.removeDialogTabs=t}if(c._.removeDialogTabs&&(t=c._.removeDialogTabs[d]))for(p=0;p<t.length;p++)o.removeContents(t[p]);if(o.onLoad)this.on("load",o.onLoad);if(o.onShow)this.on("show",o.onShow);if(o.onHide)this.on("hide",o.onHide);if(o.onOk)this.on("ok",function(a){c.fire("saveSnapshot");setTimeout(function(){c.fire("saveSnapshot")},
|
||||
0);if(o.onOk.call(this,a)===false)a.data.hide=false});if(o.onCancel)this.on("cancel",function(a){if(o.onCancel.call(this,a)===false)a.data.hide=false});var w=this,y=function(a){var b=w._.contents,c=false,d;for(d in b)for(var e in b[d])if(c=a.call(this,b[d][e]))return};this.on("ok",function(a){y(function(b){if(b.validate){var c=b.validate(this),d=typeof c=="string"||c===false;if(d){a.data.hide=false;a.stop()}e.call(b,!d,typeof c=="string"?c:void 0);return d}})},this,null,0);this.on("cancel",function(a){y(function(b){if(b.isChanged()){if(!c.config.dialog_noConfirmCancel&&
|
||||
!confirm(c.lang.common.confirmCancel))a.data.hide=false;return true}})},this,null,0);this.parts.close.on("click",function(a){this.fire("cancel",{hide:true}).hide!==false&&this.hide();a.data.preventDefault()},this);this.changeFocus=j;var x=this._.element;c.focusManager.add(x,1);this.on("show",function(){x.on("keydown",m,this);if(CKEDITOR.env.gecko)x.on("keypress",s,this)});this.on("hide",function(){x.removeListener("keydown",m);CKEDITOR.env.gecko&&x.removeListener("keypress",s);y(function(a){b.apply(a)})});
|
||||
this.on("iframeAdded",function(a){(new CKEDITOR.dom.document(a.data.iframe.$.contentWindow.document)).on("keydown",m,this,null,0)});this.on("show",function(){g();if(c.config.dialog_startupFocusTab&&w._.pageCount>1){w._.tabBarMode=true;w._.tabs[w._.currentTabId][0].focus()}else if(!this._.hasFocus){this._.currentFocusIndex=-1;if(o.onFocus){var a=o.onFocus.call(this);a&&a.focus()}else j(1)}},this,null,4294967295);if(CKEDITOR.env.ie6Compat)this.on("load",function(){var a=this.getElement(),b=a.getFirst();
|
||||
b.remove();b.appendTo(a)},this);h(this);k(this);(new CKEDITOR.dom.text(o.title,CKEDITOR.document)).appendTo(this.parts.title);for(p=0;p<o.contents.length;p++)(t=o.contents[p])&&this.addPage(t);this.parts.tabs.on("click",function(a){var b=a.data.getTarget();if(b.hasClass("cke_dialog_tab")){b=b.$.id;this.selectPage(b.substring(4,b.lastIndexOf("_")));if(this._.tabBarMode){this._.tabBarMode=false;this._.currentFocusIndex=-1;j(1)}a.data.preventDefault()}},this);p=[];t=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,
|
||||
{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:o.buttons},p).getChild();this.parts.footer.setHtml(p.join(""));for(p=0;p<t.length;p++)this._.buttons[t[p].id]=t[p]};CKEDITOR.dialog.prototype={destroy:function(){this.hide();this._.element.remove()},resize:function(){return function(a,b){if(!this._.contentSize||!(this._.contentSize.width==a&&this._.contentSize.height==b)){CKEDITOR.dialog.fire("resize",{dialog:this,width:a,height:b},this._.editor);this.fire("resize",{width:a,height:b},
|
||||
this._.editor);this.parts.contents.setStyles({width:a+"px",height:b+"px"});if(this._.editor.lang.dir=="rtl"&&this._.position)this._.position.x=CKEDITOR.document.getWindow().getViewPaneSize().width-this._.contentSize.width-parseInt(this._.element.getFirst().getStyle("right"),10);this._.contentSize={width:a,height:b}}}}(),getSize:function(){var a=this._.element.getFirst();return{width:a.$.offsetWidth||0,height:a.$.offsetHeight||0}},move:function(a,b,c){var d=this._.element.getFirst(),e=this._.editor.lang.dir==
|
||||
"rtl",f=d.getComputedStyle("position")=="fixed";CKEDITOR.env.ie&&d.setStyle("zoom","100%");if(!f||!this._.position||!(this._.position.x==a&&this._.position.y==b)){this._.position={x:a,y:b};if(!f){f=CKEDITOR.document.getWindow().getScrollPosition();a=a+f.x;b=b+f.y}if(e){f=this.getSize();a=CKEDITOR.document.getWindow().getViewPaneSize().width-f.width-a}b={top:(b>0?b:0)+"px"};b[e?"right":"left"]=(a>0?a:0)+"px";d.setStyles(b);c&&(this._.moved=1)}},getPosition:function(){return CKEDITOR.tools.extend({},
|
||||
this._.position)},show:function(){var a=this._.element,b=this.definition;!a.getParent()||!a.getParent().equals(CKEDITOR.document.getBody())?a.appendTo(CKEDITOR.document.getBody()):a.setStyle("display","block");this.resize(this._.contentSize&&this._.contentSize.width||b.width||b.minWidth,this._.contentSize&&this._.contentSize.height||b.height||b.minHeight);this.reset();this.selectPage(this.definition.contents[0].id);if(CKEDITOR.dialog._.currentZIndex===null)CKEDITOR.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex;
|
||||
this._.element.getFirst().setStyle("z-index",CKEDITOR.dialog._.currentZIndex=CKEDITOR.dialog._.currentZIndex+10);if(CKEDITOR.dialog._.currentTop===null){CKEDITOR.dialog._.currentTop=this;this._.parentDialog=null;q(this._.editor)}else{this._.parentDialog=CKEDITOR.dialog._.currentTop;this._.parentDialog.getElement().getFirst().$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2);CKEDITOR.dialog._.currentTop=this}a.on("keydown",w);a.on("keyup",z);this._.hasFocus=false;for(var c in b.contents)if(b.contents[c]){var a=
|
||||
b.contents[c],e=this._.tabs[a.id],f=a.requiredContent,h=0;if(e){for(var g in this._.contents[a.id]){var j=this._.contents[a.id][g];if(!(j.type=="hbox"||j.type=="vbox"||!j.getInputElement()))if(j.requiredContent&&!this._.editor.activeFilter.check(j.requiredContent))j.disable();else{j.enable();h++}}!h||f&&!this._.editor.activeFilter.check(f)?e[0].addClass("cke_dialog_tab_disabled"):e[0].removeClass("cke_dialog_tab_disabled")}}CKEDITOR.tools.setTimeout(function(){this.layout();d(this);this.parts.dialog.setStyle("visibility",
|
||||
"");this.fireOnce("load",{});CKEDITOR.ui.fire("ready",this);this.fire("show",{});this._.editor.fire("dialogShow",this);this._.parentDialog||this._.editor.focusManager.lock();this.foreach(function(a){a.setInitValue&&a.setInitValue()})},100,this)},layout:function(){var a=this.parts.dialog,b=this.getSize(),c=CKEDITOR.document.getWindow().getViewPaneSize(),d=(c.width-b.width)/2,e=(c.height-b.height)/2;CKEDITOR.env.ie6Compat||(b.height+(e>0?e:0)>c.height||b.width+(d>0?d:0)>c.width?a.setStyle("position",
|
||||
"absolute"):a.setStyle("position","fixed"));this.move(this._.moved?this._.position.x:d,this._.moved?this._.position.y:e)},foreach:function(a){for(var b in this._.contents)for(var c in this._.contents[b])a.call(this,this._.contents[b][c]);return this},reset:function(){var a=function(a){a.reset&&a.reset(1)};return function(){this.foreach(a);return this}}(),setupContent:function(){var a=arguments;this.foreach(function(b){b.setup&&b.setup.apply(b,a)})},commitContent:function(){var a=arguments;this.foreach(function(b){CKEDITOR.env.ie&&
|
||||
this._.currentFocusIndex==b.focusIndex&&b.getInputElement().$.blur();b.commit&&b.commit.apply(b,a)})},hide:function(){if(this.parts.dialog.isVisible()){this.fire("hide",{});this._.editor.fire("dialogHide",this);this.selectPage(this._.tabIdList[0]);var a=this._.element;a.setStyle("display","none");this.parts.dialog.setStyle("visibility","hidden");for(F(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();if(this._.parentDialog){var b=this._.parentDialog.getElement().getFirst();
|
||||
b.setStyle("z-index",parseInt(b.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else p(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex=CKEDITOR.dialog._.currentZIndex-10;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener("keydown",w);a.removeListener("keyup",z);var c=this._.editor;c.focus();setTimeout(function(){c.focusManager.unlock();CKEDITOR.env.iOS&&c.window.focus()},0)}delete this._.parentDialog;this.foreach(function(a){a.resetInitValue&&
|
||||
a.resetInitValue()})}},addPage:function(a){if(!a.requiredContent||this._.editor.filter.check(a.requiredContent)){for(var b=[],c=a.label?' title="'+CKEDITOR.tools.htmlEncode(a.label)+'"':"",d=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents",children:a.elements,expand:!!a.expand,padding:a.padding,style:a.style||"width: 100%;"},b),e=this._.contents[a.id]={},f=d.getChild(),h=0;d=f.shift();){!d.notAllowed&&(d.type!="hbox"&&d.type!="vbox")&&h++;e[d.id]=
|
||||
d;typeof d.getChild=="function"&&f.push.apply(f,d.getChild())}if(!h)a.hidden=true;b=CKEDITOR.dom.element.createFromHtml(b.join(""));b.setAttribute("role","tabpanel");d=CKEDITOR.env;e="cke_"+a.id+"_"+CKEDITOR.tools.getNextNumber();c=CKEDITOR.dom.element.createFromHtml(['<a class="cke_dialog_tab"',this._.pageCount>0?" cke_last":"cke_first",c,a.hidden?' style="display:none"':"",' id="',e,'"',d.gecko&&!d.hc?"":' href="javascript:void(0)"',' tabIndex="-1" hidefocus="true" role="tab">',a.label,"</a>"].join(""));
|
||||
b.setAttribute("aria-labelledby",e);this._.tabs[a.id]=[c,b];this._.tabIdList.push(a.id);!a.hidden&&this._.pageCount++;this._.lastTab=c;this.updateStyle();b.setAttribute("name",a.id);b.appendTo(this.parts.contents);c.unselectable();this.parts.tabs.append(c);if(a.accessKey){A(this,this,"CTRL+"+a.accessKey,K,C);this._.accessKeyMap["CTRL+"+a.accessKey]=a.id}}},selectPage:function(a){if(this._.currentTabId!=a&&!this._.tabs[a][0].hasClass("cke_dialog_tab_disabled")&&this.fire("selectPage",{page:a,currentPage:this._.currentTabId})!==
|
||||
false){for(var b in this._.tabs){var d=this._.tabs[b][0],e=this._.tabs[b][1];if(b!=a){d.removeClass("cke_dialog_tab_selected");e.hide()}e.setAttribute("aria-hidden",b!=a)}var f=this._.tabs[a];f[0].addClass("cke_dialog_tab_selected");if(CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat){c(f[1]);f[1].show();setTimeout(function(){c(f[1],1)},0)}else f[1].show();this._.currentTabId=a;this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,a)}},updateStyle:function(){this.parts.dialog[(this._.pageCount===
|
||||
1?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(b){var c=this._.tabs[b]&&this._.tabs[b][0];if(c&&this._.pageCount!=1&&c.isVisible()){b==this._.currentTabId&&this.selectPage(a.call(this));c.hide();this._.pageCount--;this.updateStyle()}},showPage:function(a){if(a=this._.tabs[a]&&this._.tabs[a][0]){a.show();this._.pageCount++;this.updateStyle()}},getElement:function(){return this._.element},getName:function(){return this._.name},getContentElement:function(a,b){var c=this._.contents[a];
|
||||
return c&&c[b]},getValueOf:function(a,b){return this.getContentElement(a,b).getValue()},setValueOf:function(a,b,c){return this.getContentElement(a,b).setValue(c)},getButton:function(a){return this._.buttons[a]},click:function(a){return this._.buttons[a].click()},disableButton:function(a){return this._.buttons[a].disable()},enableButton:function(a){return this._.buttons[a].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},
|
||||
addFocusable:function(a,b){if(typeof b=="undefined"){b=this._.focusList.length;this._.focusList.push(new j(this,a,b))}else{this._.focusList.splice(b,0,new j(this,a,b));for(var c=b+1;c<this._.focusList.length;c++)this._.focusList[c].focusIndex++}}};CKEDITOR.tools.extend(CKEDITOR.dialog,{add:function(a,b){if(!this._.dialogDefinitions[a]||typeof b=="function")this._.dialogDefinitions[a]=b},exists:function(a){return!!this._.dialogDefinitions[a]},getCurrent:function(){return CKEDITOR.dialog._.currentTop},
|
||||
isTabEnabled:function(a,b,c){a=a.config.removeDialogTabs;return!(a&&a.match(RegExp("(?:^|;)"+b+":"+c+"(?:$|;)","i")))},okButton:function(){var a=function(a,b){b=b||{};return CKEDITOR.tools.extend({id:"ok",type:"button",label:a.lang.common.ok,"class":"cke_dialog_ui_button_ok",onClick:function(a){a=a.data.dialog;a.fire("ok",{hide:true}).hide!==false&&a.hide()}},b,true)};a.type="button";a.override=function(b){return CKEDITOR.tools.extend(function(c){return a(c,b)},{type:"button"},true)};return a}(),
|
||||
cancelButton:function(){var a=function(a,b){b=b||{};return CKEDITOR.tools.extend({id:"cancel",type:"button",label:a.lang.common.cancel,"class":"cke_dialog_ui_button_cancel",onClick:function(a){a=a.data.dialog;a.fire("cancel",{hide:true}).hide!==false&&a.hide()}},b,true)};a.type="button";a.override=function(b){return CKEDITOR.tools.extend(function(c){return a(c,b)},{type:"button"},true)};return a}(),addUIElement:function(a,b){this._.uiElementBuilders[a]=b}});CKEDITOR.dialog._={uiElementBuilders:{},
|
||||
dialogDefinitions:{},currentTop:null,currentZIndex:null};CKEDITOR.event.implementOn(CKEDITOR.dialog);CKEDITOR.event.implementOn(CKEDITOR.dialog.prototype);var l={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]},s=function(a,b,c){for(var d=0,e;e=a[d];d++){if(e.id==b)return e;if(c&&e[c])if(e=s(e[c],b,c))return e}return null},v=function(a,b,c,d,e){if(c){for(var f=0,h;h=a[f];f++){if(h.id==c){a.splice(f,0,b);return b}if(d&&
|
||||
h[d])if(h=v(h[d],b,c,d,true))return h}if(e)return null}a.push(b);return b},t=function(a,b,c){for(var d=0,e;e=a[d];d++){if(e.id==b)return a.splice(d,1);if(c&&e[c])if(e=t(e[c],b,c))return e}return null},B=function(a,b){this.dialog=a;for(var c=b.contents,d=0,e;e=c[d];d++)c[d]=e&&new g(a,e);CKEDITOR.tools.extend(this,b)};B.prototype={getContents:function(a){return s(this.contents,a)},getButton:function(a){return s(this.buttons,a)},addContents:function(a,b){return v(this.contents,a,b)},addButton:function(a,
|
||||
b){return v(this.buttons,a,b)},removeContents:function(a){t(this.contents,a)},removeButton:function(a){t(this.buttons,a)}};g.prototype={get:function(a){return s(this.elements,a,"children")},add:function(a,b){return v(this.elements,a,b,"children")},remove:function(a){t(this.elements,a,"children")}};var u,y={},r,x={},w=function(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,d=a.data.$.shiftKey,e=String.fromCharCode(a.data.$.keyCode);if((b=x[(b?"CTRL+":"")+(c?"ALT+":"")+(d?"SHIFT+":"")+
|
||||
e])&&b.length){b=b[b.length-1];b.keydown&&b.keydown.call(b.uiElement,b.dialog,b.key);a.data.preventDefault()}},z=function(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,d=a.data.$.shiftKey,e=String.fromCharCode(a.data.$.keyCode);if((b=x[(b?"CTRL+":"")+(c?"ALT+":"")+(d?"SHIFT+":"")+e])&&b.length){b=b[b.length-1];if(b.keyup){b.keyup.call(b.uiElement,b.dialog,b.key);a.data.preventDefault()}}},A=function(a,b,c,d,e){(x[c]||(x[c]=[])).push({uiElement:a,dialog:b,key:c,keyup:e||a.accessKeyUp,
|
||||
keydown:d||a.accessKeyDown})},F=function(a){for(var b in x){for(var c=x[b],d=c.length-1;d>=0;d--)(c[d].dialog==a||c[d].uiElement==a)&&c.splice(d,1);c.length===0&&delete x[b]}},C=function(a,b){a._.accessKeyMap[b]&&a.selectPage(a._.accessKeyMap[b])},K=function(){};(function(){CKEDITOR.ui.dialog={uiElement:function(a,b,c,d,e,f,h){if(!(arguments.length<4)){var g=(d.call?d(b):d)||"div",j=["<",g," "],i=(e&&e.call?e(b):e)||{},k=(f&&f.call?f(b):f)||{},l=(h&&h.call?h.call(this,a,b):h)||"",m=this.domId=k.id||
|
||||
CKEDITOR.tools.getNextId()+"_uiElement";if(b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)){i.display="none";this.notAllowed=true}k.id=m;var o={};b.type&&(o["cke_dialog_ui_"+b.type]=1);b.className&&(o[b.className]=1);if(b.disabled)o.cke_disabled=1;for(var s=k["class"]&&k["class"].split?k["class"].split(" "):[],m=0;m<s.length;m++)s[m]&&(o[s[m]]=1);s=[];for(m in o)s.push(m);k["class"]=s.join(" ");if(b.title)k.title=b.title;o=(b.style||"").split(";");if(b.align){s=b.align;i["margin-left"]=
|
||||
s=="left"?0:"auto";i["margin-right"]=s=="right"?0:"auto"}for(m in i)o.push(m+":"+i[m]);b.hidden&&o.push("display:none");for(m=o.length-1;m>=0;m--)o[m]===""&&o.splice(m,1);if(o.length>0)k.style=(k.style?k.style+"; ":"")+o.join("; ");for(m in k)j.push(m+'="'+CKEDITOR.tools.htmlEncode(k[m])+'" ');j.push(">",l,"</",g,">");c.push(j.join(""));(this._||(this._={})).dialog=a;if(typeof b.isChanged=="boolean")this.isChanged=function(){return b.isChanged};if(typeof b.isChanged=="function")this.isChanged=b.isChanged;
|
||||
if(typeof b.setValue=="function")this.setValue=CKEDITOR.tools.override(this.setValue,function(a){return function(c){a.call(this,b.setValue.call(this,c))}});if(typeof b.getValue=="function")this.getValue=CKEDITOR.tools.override(this.getValue,function(a){return function(){return b.getValue.call(this,a.call(this))}});CKEDITOR.event.implementOn(this);this.registerEvents(b);this.accessKeyUp&&(this.accessKeyDown&&b.accessKey)&&A(this,a,"CTRL+"+b.accessKey);var n=this;a.on("load",function(){var b=n.getInputElement();
|
||||
if(b){var c=n.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&CKEDITOR.env.version<8?"cke_dialog_ui_focused":"";b.on("focus",function(){a._.tabBarMode=false;a._.hasFocus=true;n.fire("focus");c&&this.addClass(c)});b.on("blur",function(){n.fire("blur");c&&this.removeClass(c)})}});CKEDITOR.tools.extend(this,b);if(this.keyboardFocusable){this.tabIndex=b.tabIndex||0;this.focusIndex=a._.focusList.push(this)-1;this.on("focus",function(){a._.currentFocusIndex=n.focusIndex})}}},hbox:function(a,b,c,d,e){if(!(arguments.length<
|
||||
4)){this._||(this._={});var f=this._.children=b,h=e&&e.widths||null,g=e&&e.height||null,j,i={role:"presentation"};e&&e.align&&(i.align=e.align);CKEDITOR.ui.dialog.uiElement.call(this,a,e||{type:"hbox"},d,"table",{},i,function(){var a=['<tbody><tr class="cke_dialog_ui_hbox">'];for(j=0;j<c.length;j++){var b="cke_dialog_ui_hbox_child",d=[];j===0&&(b="cke_dialog_ui_hbox_first");j==c.length-1&&(b="cke_dialog_ui_hbox_last");a.push('<td class="',b,'" role="presentation" ');h?h[j]&&d.push("width:"+o(h[j])):
|
||||
d.push("width:"+Math.floor(100/c.length)+"%");g&&d.push("height:"+o(g));e&&e.padding!==void 0&&d.push("padding:"+o(e.padding));CKEDITOR.env.ie&&(CKEDITOR.env.quirks&&f[j].align)&&d.push("text-align:"+f[j].align);d.length>0&&a.push('style="'+d.join("; ")+'" ');a.push(">",c[j],"</td>")}a.push("</tr></tbody>");return a.join("")})}},vbox:function(a,b,c,d,e){if(!(arguments.length<3)){this._||(this._={});var f=this._.children=b,h=e&&e.width||null,g=e&&e.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,
|
||||
a,e||{type:"vbox"},d,"div",null,{role:"presentation"},function(){var b=['<table role="presentation" cellspacing="0" border="0" '];b.push('style="');e&&e.expand&&b.push("height:100%;");b.push("width:"+o(h||"100%"),";");CKEDITOR.env.webkit&&b.push("float:none;");b.push('"');b.push('align="',CKEDITOR.tools.htmlEncode(e&&e.align||(a.getParentEditor().lang.dir=="ltr"?"left":"right")),'" ');b.push("><tbody>");for(var d=0;d<c.length;d++){var j=[];b.push('<tr><td role="presentation" ');h&&j.push("width:"+
|
||||
o(h||"100%"));g?j.push("height:"+o(g[d])):e&&e.expand&&j.push("height:"+Math.floor(100/c.length)+"%");e&&e.padding!==void 0&&j.push("padding:"+o(e.padding));CKEDITOR.env.ie&&(CKEDITOR.env.quirks&&f[d].align)&&j.push("text-align:"+f[d].align);j.length>0&&b.push('style="',j.join("; "),'" ');b.push(' class="cke_dialog_ui_vbox_child">',c[d],"</td></tr>")}b.push("</tbody></table>");return b.join("")})}}}})();CKEDITOR.ui.dialog.uiElement.prototype={getElement:function(){return CKEDITOR.document.getById(this.domId)},
|
||||
getInputElement:function(){return this.getElement()},getDialog:function(){return this._.dialog},setValue:function(a,b){this.getInputElement().setValue(a);!b&&this.fire("change",{value:a});return this},getValue:function(){return this.getInputElement().getValue()},isChanged:function(){return false},selectParentTab:function(){for(var a=this.getInputElement();(a=a.getParent())&&a.$.className.search("cke_dialog_page_contents")==-1;);if(!a)return this;a=a.getAttribute("name");this._.dialog._.currentTabId!=
|
||||
a&&this._.dialog.selectPage(a);return this},focus:function(){this.selectParentTab().getInputElement().focus();return this},registerEvents:function(a){var b=/^on([A-Z]\w+)/,c,d=function(a,b,c,d){b.on("load",function(){a.getInputElement().on(c,d,a)})},e;for(e in a)if(c=e.match(b))this.eventProcessors[e]?this.eventProcessors[e].call(this,this._.dialog,a[e]):d(this,this._.dialog,c[1].toLowerCase(),a[e]);return this},eventProcessors:{onLoad:function(a,b){a.on("load",b,this)},onShow:function(a,b){a.on("show",
|
||||
b,this)},onHide:function(a,b){a.on("hide",b,this)}},accessKeyDown:function(){this.focus()},accessKeyUp:function(){},disable:function(){var a=this.getElement();this.getInputElement().setAttribute("disabled","true");a.addClass("cke_disabled")},enable:function(){var a=this.getElement();this.getInputElement().removeAttribute("disabled");a.removeClass("cke_disabled")},isEnabled:function(){return!this.getElement().hasClass("cke_disabled")},isVisible:function(){return this.getInputElement().isVisible()},
|
||||
isFocusable:function(){return!this.isEnabled()||!this.isVisible()?false:true}};CKEDITOR.ui.dialog.hbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getChild:function(a){if(arguments.length<1)return this._.children.concat();a.splice||(a=[a]);return a.length<2?this._.children[a[0]]:this._.children[a[0]]&&this._.children[a[0]].getChild?this._.children[a[0]].getChild(a.slice(1,a.length)):null}},true);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox;(function(){var a=
|
||||
{build:function(a,b,c){for(var d=b.children,e,f=[],h=[],g=0;g<d.length&&(e=d[g]);g++){var j=[];f.push(j);h.push(CKEDITOR.dialog._.uiElementBuilders[e.type].build(a,e,j))}return new CKEDITOR.ui.dialog[b.type](a,h,f,c,b)}};CKEDITOR.dialog.addUIElement("hbox",a);CKEDITOR.dialog.addUIElement("vbox",a)})();CKEDITOR.dialogCommand=function(a,b){this.dialogName=a;CKEDITOR.tools.extend(this,b,true)};CKEDITOR.dialogCommand.prototype={exec:function(a){a.openDialog(this.dialogName)},canUndo:false,editorFocus:1};
|
||||
(function(){var a=/^([a]|[^a])+$/,b=/^\d*$/,c=/^\d*(?:\.\d+)?$/,d=/^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,e=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i,f=/^(\s*[\w-]+\s*:\s*[^:;]+(?:;|$))*$/;CKEDITOR.VALIDATE_OR=1;CKEDITOR.VALIDATE_AND=2;CKEDITOR.dialog.validate={functions:function(){var a=arguments;return function(){var b=this&&this.getValue?this.getValue():a[0],c,d=CKEDITOR.VALIDATE_AND,e=[],f;for(f=0;f<a.length;f++)if(typeof a[f]=="function")e.push(a[f]);else break;if(f<a.length&&typeof a[f]==
|
||||
"string"){c=a[f];f++}f<a.length&&typeof a[f]=="number"&&(d=a[f]);var h=d==CKEDITOR.VALIDATE_AND?true:false;for(f=0;f<e.length;f++)h=d==CKEDITOR.VALIDATE_AND?h&&e[f](b):h||e[f](b);return!h?c:true}},regex:function(a,b){return function(c){c=this&&this.getValue?this.getValue():c;return!a.test(c)?b:true}},notEmpty:function(b){return this.regex(a,b)},integer:function(a){return this.regex(b,a)},number:function(a){return this.regex(c,a)},cssLength:function(a){return this.functions(function(a){return e.test(CKEDITOR.tools.trim(a))},
|
||||
a)},htmlLength:function(a){return this.functions(function(a){return d.test(CKEDITOR.tools.trim(a))},a)},inlineStyle:function(a){return this.functions(function(a){return f.test(CKEDITOR.tools.trim(a))},a)},equals:function(a,b){return this.functions(function(b){return b==a},b)},notEqual:function(a,b){return this.functions(function(b){return b!=a},b)}};CKEDITOR.on("instanceDestroyed",function(a){if(CKEDITOR.tools.isEmpty(CKEDITOR.instances)){for(var b;b=CKEDITOR.dialog._.currentTop;)b.hide();for(var c in y)y[c].remove();
|
||||
y={}}var a=a.editor._.storedDialogs,d;for(d in a)a[d].destroy()})})();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(a,b){var c=null,d=CKEDITOR.dialog._.dialogDefinitions[a];CKEDITOR.dialog._.currentTop===null&&q(this);if(typeof d=="function"){c=this._.storedDialogs||(this._.storedDialogs={});c=c[a]||(c[a]=new CKEDITOR.dialog(this,a));b&&b.call(c,c);c.show()}else{if(d=="failed"){p(this);throw Error('[CKEDITOR.dialog.openDialog] Dialog "'+a+'" failed when loading definition.');
|
||||
}typeof d=="string"&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(d),function(){typeof CKEDITOR.dialog._.dialogDefinitions[a]!="function"&&(CKEDITOR.dialog._.dialogDefinitions[a]="failed");this.openDialog(a,b)},this,0,1)}CKEDITOR.skin.loadPart("dialog");return c}})}(),CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(a){a.on("doubleclick",function(f){f.data.dialog&&a.openDialog(f.data.dialog)},null,null,999)}}),CKEDITOR.plugins.add("about",{requires:"dialog",init:function(a){var f=a.addCommand("about",
|
||||
new CKEDITOR.dialogCommand("about"));f.modes={wysiwyg:1,source:1};f.canUndo=false;f.readOnly=1;a.ui.addButton&&a.ui.addButton("About",{label:a.lang.about.title,command:"about",toolbar:"about"});CKEDITOR.dialog.add("about",this.path+"dialogs/about.js")}}),function(){CKEDITOR.plugins.add("a11yhelp",{requires:"dialog",availableLangs:{af:1,ar:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,en:1,"en-gb":1,eo:1,es:1,et:1,fa:1,fi:1,fr:1,"fr-ca":1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lt:1,lv:1,
|
||||
mk:1,mn:1,nb:1,nl:1,no:1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,sr:1,"sr-latn":1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},init:function(a){var f=this;a.addCommand("a11yHelp",{exec:function(){var c=a.langCode,c=f.availableLangs[c]?c:f.availableLangs[c.replace(/-.*/,"")]?c.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(f.path+"dialogs/lang/"+c+".js"),function(){a.lang.a11yhelp=f.langEntries[c];a.openDialog("a11yHelp")})},modes:{wysiwyg:1,source:1},readOnly:1,
|
||||
canUndo:false});a.setKeystroke(CKEDITOR.ALT+48,"a11yHelp");CKEDITOR.dialog.add("a11yHelp",this.path+"dialogs/a11yhelp.js");a.on("ariaEditorHelpLabel",function(c){c.data.label=a.lang.common.editorHelp})}})}(),CKEDITOR.plugins.add("basicstyles",{init:function(a){var f=0,c=function(b,c,g,h){if(h){var h=new CKEDITOR.style(h),i=e[g];i.unshift(h);a.attachStyleStateChange(h,function(b){!a.readOnly&&a.getCommand(g).setState(b)});a.addCommand(g,new CKEDITOR.styleCommand(h,{contentForms:i}));a.ui.addButton&&
|
||||
a.ui.addButton(b,{label:c,command:g,toolbar:"basicstyles,"+(f=f+10)})}},e={bold:["strong","b",["span",function(a){a=a.styles["font-weight"];return a=="bold"||+a>=700}]],italic:["em","i",["span",function(a){return a.styles["font-style"]=="italic"}]],underline:["u",["span",function(a){return a.styles["text-decoration"]=="underline"}]],strike:["s","strike",["span",function(a){return a.styles["text-decoration"]=="line-through"}]],subscript:["sub"],superscript:["sup"]},b=a.config,i=a.lang.basicstyles;
|
||||
c("Bold",i.bold,"bold",b.coreStyles_bold);c("Italic",i.italic,"italic",b.coreStyles_italic);c("Underline",i.underline,"underline",b.coreStyles_underline);c("Strike",i.strike,"strike",b.coreStyles_strike);c("Subscript",i.subscript,"subscript",b.coreStyles_subscript);c("Superscript",i.superscript,"superscript",b.coreStyles_superscript);a.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"]])}}),CKEDITOR.config.coreStyles_bold={element:"strong",overrides:"b"},
|
||||
CKEDITOR.config.coreStyles_italic={element:"em",overrides:"i"},CKEDITOR.config.coreStyles_underline={element:"u"},CKEDITOR.config.coreStyles_strike={element:"s",overrides:"strike"},CKEDITOR.config.coreStyles_subscript={element:"sub"},CKEDITOR.config.coreStyles_superscript={element:"sup"},function(){var a={exec:function(a){var c=a.getCommand("blockquote").state,e=a.getSelection(),b=e&&e.getRanges()[0];if(b){var i=e.createBookmarks();if(CKEDITOR.env.ie){var j=i[0].startNode,d=i[0].endNode,g;if(j&&j.getParent().getName()==
|
||||
"blockquote")for(g=j;g=g.getNext();)if(g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary()){j.move(g,true);break}if(d&&d.getParent().getName()=="blockquote")for(g=d;g=g.getPrevious();)if(g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary()){d.move(g);break}}var h=b.createIterator();h.enlargeBr=a.config.enterMode!=CKEDITOR.ENTER_BR;if(c==CKEDITOR.TRISTATE_OFF){for(j=[];c=h.getNextParagraph();)j.push(c);if(j.length<1){c=a.document.createElement(a.config.enterMode==CKEDITOR.ENTER_P?"p":"div");d=i.shift();
|
||||
b.insertNode(c);c.append(new CKEDITOR.dom.text("",a.document));b.moveToBookmark(d);b.selectNodeContents(c);b.collapse(true);d=b.createBookmark();j.push(c);i.unshift(d)}g=j[0].getParent();b=[];for(d=0;d<j.length;d++){c=j[d];g=g.getCommonAncestor(c.getParent())}for(c={table:1,tbody:1,tr:1,ol:1,ul:1};c[g.getName()];)g=g.getParent();for(d=null;j.length>0;){for(c=j.shift();!c.getParent().equals(g);)c=c.getParent();c.equals(d)||b.push(c);d=c}for(;b.length>0;){c=b.shift();if(c.getName()=="blockquote"){for(d=
|
||||
new CKEDITOR.dom.documentFragment(a.document);c.getFirst();){d.append(c.getFirst().remove());j.push(d.getLast())}d.replace(c)}else j.push(c)}b=a.document.createElement("blockquote");for(b.insertBefore(j[0]);j.length>0;){c=j.shift();b.append(c)}}else if(c==CKEDITOR.TRISTATE_ON){d=[];for(g={};c=h.getNextParagraph();){for(j=b=null;c.getParent();){if(c.getParent().getName()=="blockquote"){b=c.getParent();j=c;break}c=c.getParent()}if(b&&j&&!j.getCustomData("blockquote_moveout")){d.push(j);CKEDITOR.dom.element.setMarker(g,
|
||||
j,"blockquote_moveout",true)}}CKEDITOR.dom.element.clearAllMarkers(g);c=[];j=[];for(g={};d.length>0;){h=d.shift();b=h.getParent();if(h.getPrevious())if(h.getNext()){h.breakParent(h.getParent());j.push(h.getNext())}else h.remove().insertAfter(b);else h.remove().insertBefore(b);if(!b.getCustomData("blockquote_processed")){j.push(b);CKEDITOR.dom.element.setMarker(g,b,"blockquote_processed",true)}c.push(h)}CKEDITOR.dom.element.clearAllMarkers(g);for(d=j.length-1;d>=0;d--){b=j[d];a:{g=b;for(var h=0,k=
|
||||
g.getChildCount(),m=void 0;h<k&&(m=g.getChild(h));h++)if(m.type==CKEDITOR.NODE_ELEMENT&&m.isBlockBoundary()){g=false;break a}g=true}g&&b.remove()}if(a.config.enterMode==CKEDITOR.ENTER_BR)for(b=true;c.length;){h=c.shift();if(h.getName()=="div"){d=new CKEDITOR.dom.documentFragment(a.document);b&&(h.getPrevious()&&!(h.getPrevious().type==CKEDITOR.NODE_ELEMENT&&h.getPrevious().isBlockBoundary()))&&d.append(a.document.createElement("br"));for(b=h.getNext()&&!(h.getNext().type==CKEDITOR.NODE_ELEMENT&&h.getNext().isBlockBoundary());h.getFirst();)h.getFirst().remove().appendTo(d);
|
||||
b&&d.append(a.document.createElement("br"));d.replace(h);b=false}}}e.selectBookmarks(i);a.focus()}},refresh:function(a,c){this.setState(a.elementPath(c.block||c.blockLimit).contains("blockquote",1)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},context:"blockquote",allowedContent:"blockquote",requiredContent:"blockquote"};CKEDITOR.plugins.add("blockquote",{init:function(f){if(!f.blockless){f.addCommand("blockquote",a);f.ui.addButton&&f.ui.addButton("Blockquote",{label:f.lang.blockquote.toolbar,command:"blockquote",
|
||||
toolbar:"blocks,10"})}}})}(),"use strict",function(){function a(a){function b(){var c=a.editable();c.on(x,function(a){(!CKEDITOR.env.ie||!u)&&v(a)});CKEDITOR.env.ie&&c.on("paste",function(b){if(!y){f();b.data.preventDefault();v(b);q("paste")||a.openDialog("paste")}});if(CKEDITOR.env.ie){c.on("contextmenu",i,null,null,0);c.on("beforepaste",function(a){a.data&&(!a.data.$.ctrlKey&&!a.data.$.shiftKey)&&i()},null,null,0)}c.on("beforecut",function(){!u&&o(a)});var d;c.attachListener(CKEDITOR.env.ie?c:a.document.getDocumentElement(),
|
||||
"mouseup",function(){d=setTimeout(function(){t()},0)});a.on("destroy",function(){clearTimeout(d)});c.on("keyup",t)}function c(b){return{type:b,canUndo:b=="cut",startDisabled:true,exec:function(){this.type=="cut"&&o();var b;var c=this.type;if(CKEDITOR.env.ie)b=q(c);else try{b=a.document.$.execCommand(c,false,null)}catch(d){b=false}b||alert(a.lang.clipboard[this.type+"Error"]);return b}}}function e(){return{canUndo:false,async:true,exec:function(a,b){var c=function(b,c){b&&p(b.type,b.dataValue,!!c);
|
||||
a.fire("afterCommandExec",{name:"paste",command:d,returnValue:!!b})},d=this;typeof b=="string"?c({type:"auto",dataValue:b},1):a.getClipboardData(c)}}}function f(){y=1;setTimeout(function(){y=0},100)}function i(){u=1;setTimeout(function(){u=0},10)}function q(b){var c=a.document,d=c.getBody(),e=false,f=function(){e=true};d.on(b,f);(CKEDITOR.env.version>7?c.$:c.$.selection.createRange()).execCommand(b);d.removeListener(b,f);return e}function p(b,c,d){b={type:b};if(d&&a.fire("beforePaste",b)===false||
|
||||
!c)return false;b.dataValue=c;return a.fire("paste",b)}function o(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var b=a.getSelection(),c,d,e;if(b.getType()==CKEDITOR.SELECTION_ELEMENT&&(c=b.getSelectedElement())){d=b.getRanges()[0];e=a.document.createText("");e.insertBefore(c);d.setStartBefore(e);d.setEndAfter(c);b.selectRanges([d]);setTimeout(function(){if(c.getParent()){e.remove();b.selectElement(c)}},0)}}}function n(b,c){var d=a.document,e=a.editable(),f=function(a){a.cancel()},h;if(!d.getById("cke_pastebin")){var g=
|
||||
a.getSelection(),i=g.createBookmarks();CKEDITOR.env.ie&&g.root.fire("selectionchange");var k=new CKEDITOR.dom.element((CKEDITOR.env.webkit||e.is("body"))&&!CKEDITOR.env.ie?"body":"div",d);k.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});var l=0,d=d.getWindow();if(CKEDITOR.env.webkit){e.append(k);k.addClass("cke_editable");if(!e.is("body")){l=e.getComputedStyle("position")!="static"?e:CKEDITOR.dom.element.get(e.$.offsetParent);l=l.getDocumentPosition().y}}else e.getAscendant(CKEDITOR.env.ie?
|
||||
"body":"html",1).append(k);k.setStyles({position:"absolute",top:d.getScrollPosition().y-l+10+"px",width:"1px",height:Math.max(1,d.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0});CKEDITOR.env.safari&&k.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","text"));if(l=k.getParent().isReadOnly()){k.setOpacity(0);k.setAttribute("contenteditable",true)}else k.setStyle(a.config.contentsLangDirection=="ltr"?"left":"right","-1000px");a.on("selectionChange",f,null,null,0);if(CKEDITOR.env.webkit||
|
||||
CKEDITOR.env.gecko)h=e.once("blur",f,null,null,-100);l&&k.focus();l=new CKEDITOR.dom.range(k);l.selectNodeContents(k);var m=l.select();CKEDITOR.env.ie&&(h=e.once("blur",function(){a.lockSelection(m)}));var o=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){if(CKEDITOR.env.webkit)CKEDITOR.document.getBody().$.scrollTop=o;h&&h.removeListener();CKEDITOR.env.ie&&e.focus();g.selectBookmarks(i);k.remove();var b;if(CKEDITOR.env.webkit&&(b=k.getFirst())&&b.is&&b.hasClass("Apple-style-span"))k=
|
||||
b;a.removeListener("selectionChange",f);c(k.getHtml())},0)}}function l(){if(CKEDITOR.env.ie){a.focus();f();var b=a.focusManager;b.lock();if(a.editable().fire(x)&&!q("paste")){b.unlock();return false}b.unlock()}else try{if(a.editable().fire(x)&&!a.document.$.execCommand("Paste",false,null))throw 0;}catch(c){return false}return true}function s(b){if(a.mode=="wysiwyg")switch(b.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:b=a.editable();f();!CKEDITOR.env.ie&&b.fire("beforepaste");break;
|
||||
case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+46:a.fire("saveSnapshot");setTimeout(function(){a.fire("saveSnapshot")},50)}}function v(b){var c={type:"auto"},d=a.fire("beforePaste",c);n(b,function(a){a=a.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,"");d&&p(c.type,a,0,1)})}function t(){if(a.mode=="wysiwyg"){var b=B("paste");a.getCommand("cut").setState(B("cut"));a.getCommand("copy").setState(B("copy"));a.getCommand("paste").setState(b);a.fire("pasteState",b)}}function B(b){if(r&&b in{paste:1,
|
||||
cut:1})return CKEDITOR.TRISTATE_DISABLED;if(b=="paste")return CKEDITOR.TRISTATE_OFF;var b=a.getSelection(),c=b.getRanges();return b.getType()==CKEDITOR.SELECTION_NONE||c.length==1&&c[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var u=0,y=0,r=0,x=CKEDITOR.env.ie?"beforepaste":"paste";(function(){a.on("key",s);a.on("contentDom",b);a.on("selectionChange",function(a){r=a.data.selection.getRanges()[0].checkReadOnly();t()});a.contextMenu&&a.contextMenu.addListener(function(a,b){r=b.getRanges()[0].checkReadOnly();
|
||||
return{cut:B("cut"),copy:B("copy"),paste:B("paste")}})})();(function(){function b(c,d,e,f,h){var g=a.lang.clipboard[d];a.addCommand(d,e);a.ui.addButton&&a.ui.addButton(c,{label:g,command:d,toolbar:"clipboard,"+f});a.addMenuItems&&a.addMenuItem(d,{label:g,command:d,group:"clipboard",order:h})}b("Cut","cut",c("cut"),10,1);b("Copy","copy",c("copy"),20,4);b("Paste","paste",e(),30,8)})();a.getClipboardData=function(b,c){function d(a){a.removeListener();a.cancel();c(a.data)}function e(a){a.removeListener();
|
||||
a.cancel();i=true;c({type:g,dataValue:a.data})}function f(){this.customTitle=b&&b.title}var h=false,g="auto",i=false;if(!c){c=b;b=null}a.on("paste",d,null,null,0);a.on("beforePaste",function(a){a.removeListener();h=true;g=a.data.type},null,null,1E3);if(l()===false){a.removeListener("paste",d);if(h&&a.fire("pasteDialog",f)){a.on("pasteDialogCommit",e);a.on("dialogHide",function(a){a.removeListener();a.data.removeListener("pasteDialogCommit",e);setTimeout(function(){i||c(null)},10)})}else c(null)}}}
|
||||
function f(a){if(CKEDITOR.env.webkit){if(!a.match(/^[^<]*$/g)&&!a.match(/^(<div><br( ?\/)?><\/div>|<div>[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!a.match(/^([^<]|<br( ?\/)?>)*$/gi)&&!a.match(/^(<p>([^<]|<br( ?\/)?>)*<\/p>|(\r\n))*$/gi))return"html"}else if(CKEDITOR.env.gecko){if(!a.match(/^([^<]|<br( ?\/)?>)*$/gi))return"html"}else return"html";return"htmlifiedtext"}function c(a,b){function c(a){return CKEDITOR.tools.repeat("</p><p>",~~(a/2))+(a%2==1?"<br>":"")}b=b.replace(/\s+/g,
|
||||
" ").replace(/> +</g,"><").replace(/<br ?\/>/gi,"<br>");b=b.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(b.match(/^[^<]$/))return b;if(CKEDITOR.env.webkit&&b.indexOf("<div>")>-1){b=b.replace(/^(<div>(<br>|)<\/div>)(?!$|(<div>(<br>|)<\/div>))/g,"<br>").replace(/^(<div>(<br>|)<\/div>){2}(?!$)/g,"<div></div>");b.match(/<div>(<br>|)<\/div>/)&&(b="<p>"+b.replace(/(<div>(<br>|)<\/div>)+/g,function(a){return c(a.split("</div><div>").length+1)})+"</p>");b=b.replace(/<\/div><div>/g,"<br>");
|
||||
b=b.replace(/<\/?div>/g,"")}if(CKEDITOR.env.gecko&&a.enterMode!=CKEDITOR.ENTER_BR){CKEDITOR.env.gecko&&(b=b.replace(/^<br><br>$/,"<br>"));b.indexOf("<br><br>")>-1&&(b="<p>"+b.replace(/(<br>){2,}/g,function(a){return c(a.length/4)})+"</p>")}return i(a,b)}function e(){var a=new CKEDITOR.htmlParser.filter,b={blockquote:1,dl:1,fieldset:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ol:1,p:1,table:1,ul:1},c=CKEDITOR.tools.extend({br:0},CKEDITOR.dtd.$inline),e={p:1,br:1,"cke:br":1},f=CKEDITOR.dtd,i=CKEDITOR.tools.extend({area:1,
|
||||
basefont:1,embed:1,iframe:1,map:1,object:1,param:1},CKEDITOR.dtd.$nonBodyContent,CKEDITOR.dtd.$cdata),q=function(a){delete a.name;a.add(new CKEDITOR.htmlParser.text(" "))},p=function(a){for(var b=a,c;(b=b.next)&&b.name&&b.name.match(/^h\d$/);){c=new CKEDITOR.htmlParser.element("cke:br");c.isEmpty=true;for(a.add(c);c=b.children.shift();)a.add(c)}};a.addRules({elements:{h1:p,h2:p,h3:p,h4:p,h5:p,h6:p,img:function(a){var a=CKEDITOR.tools.trim(a.attributes.alt||""),b=" ";a&&!a.match(/(^http|\.(jpe?g|gif|png))/i)&&
|
||||
(b=" ["+a+"] ");return new CKEDITOR.htmlParser.text(b)},td:q,th:q,$:function(a){var j=a.name,l;if(i[j])return false;a.attributes={};if(j=="br")return a;if(b[j])a.name="p";else if(c[j])delete a.name;else if(f[j]){l=new CKEDITOR.htmlParser.element("cke:br");l.isEmpty=true;if(CKEDITOR.dtd.$empty[j])return l;a.add(l,0);l=l.clone();l.isEmpty=true;a.add(l);delete a.name}e[a.name]||delete a.name;return a}}},{applyToAll:true});return a}function b(a,b,c){var b=new CKEDITOR.htmlParser.fragment.fromHtml(b),
|
||||
e=new CKEDITOR.htmlParser.basicWriter;b.writeHtml(e,c);var b=e.getHtml(),b=b.replace(/\s*(<\/?[a-z:]+ ?\/?>)\s*/g,"$1").replace(/(<cke:br \/>){2,}/g,"<cke:br />").replace(/(<cke:br \/>)(<\/?p>|<br \/>)/g,"$2").replace(/(<\/?p>|<br \/>)(<cke:br \/>)/g,"$1").replace(/<(cke:)?br( \/)?>/g,"<br>").replace(/<p><\/p>/g,""),f=0,b=b.replace(/<\/?p>/g,function(a){if(a=="<p>"){if(++f>1)return"</p><p>"}else if(--f>0)return"</p><p>";return a}).replace(/<p><\/p>/g,"");return i(a,b)}function i(a,b){a.enterMode==
|
||||
CKEDITOR.ENTER_BR?b=b.replace(/(<\/p><p>)+/g,function(a){return CKEDITOR.tools.repeat("<br>",a.length/7*2)}).replace(/<\/?p>/g,""):a.enterMode==CKEDITOR.ENTER_DIV&&(b=b.replace(/<(\/)?p>/g,"<$1div>"));return b}CKEDITOR.plugins.add("clipboard",{requires:"dialog",init:function(i){var d;a(i);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));i.on("paste",function(a){var b=a.data.dataValue,c=CKEDITOR.dtd.$block;if(b.indexOf("Apple-")>-1){b=b.replace(/<span class="Apple-converted-space"> <\/span>/gi,
|
||||
" ");a.data.type!="html"&&(b=b.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)<\/span>/gi,function(a,b){return b.replace(/\t/g," ")}));if(b.indexOf('<br class="Apple-interchange-newline">')>-1){a.data.startsWithEOL=1;a.data.preSniffing="html";b=b.replace(/<br class="Apple-interchange-newline">/,"")}b=b.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1")}if(b.match(/^<[^<]+cke_(editable|contents)/i)){var d,e,f=new CKEDITOR.dom.element("div");for(f.setHtml(b);f.getChildCount()==1&&(d=
|
||||
f.getFirst())&&d.type==CKEDITOR.NODE_ELEMENT&&(d.hasClass("cke_editable")||d.hasClass("cke_contents"));)f=e=d;e&&(b=e.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?b=b.replace(/^ (?: |\r\n)?<(\w+)/g,function(b,d){if(d.toLowerCase()in c){a.data.preSniffing="html";return"<"+d}return b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)><div><br><\/div>$/,function(b,d){if(d in c){a.data.endsWithEOL=1;return"</"+d+">"}return b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)<br>$/,"$1"));a.data.dataValue=b},null,
|
||||
null,3);i.on("paste",function(a){var a=a.data,h=a.type,k=a.dataValue,m,q=i.config.clipboard_defaultContentType||"html";m=h=="html"||a.preSniffing=="html"?"html":f(k);m=="htmlifiedtext"?k=c(i.config,k):h=="text"&&m=="html"&&(k=b(i.config,k,d||(d=e(i))));a.startsWithEOL&&(k='<br data-cke-eol="1">'+k);a.endsWithEOL&&(k=k+'<br data-cke-eol="1">');h=="auto"&&(h=m=="html"||q=="html"?"html":"text");a.type=h;a.dataValue=k;delete a.preSniffing;delete a.startsWithEOL;delete a.endsWithEOL},null,null,6);i.on("paste",
|
||||
function(a){a=a.data;i.insertHtml(a.dataValue,a.type);setTimeout(function(){i.fire("afterPaste")},0)},null,null,1E3);i.on("pasteDialog",function(a){setTimeout(function(){i.openDialog("paste",a.data)},0)})}})}(),function(){CKEDITOR.plugins.add("panel",{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_PANEL,CKEDITOR.ui.panel.handler)}});CKEDITOR.UI_PANEL="panel";CKEDITOR.ui.panel=function(a,b){b&&CKEDITOR.tools.extend(this,b);CKEDITOR.tools.extend(this,{className:"",css:[]});this.id=CKEDITOR.tools.getNextId();
|
||||
this.document=a;this.isFramed=this.forceIFrame||this.css.length;this._={blocks:{}}};CKEDITOR.ui.panel.handler={create:function(a){return new CKEDITOR.ui.panel(a)}};var a=CKEDITOR.addTemplate("panel",'<div lang="{langCode}" id="{id}" dir={dir} class="cke cke_reset_all {editorId} cke_panel cke_panel {cls} cke_{dir}" style="z-index:{z-index}" role="presentation">{frame}</div>'),f=CKEDITOR.addTemplate("panel-frame",'<iframe id="{id}" class="cke_panel_frame" role="presentation" frameborder="0" src="{src}"></iframe>'),
|
||||
c=CKEDITOR.addTemplate("panel-frame-inner",'<!DOCTYPE html><html class="cke_panel_container {env}" dir="{dir}" lang="{langCode}"><head>{css}</head><body class="cke_{dir}" style="margin:0;padding:0" onload="{onload}"></body></html>');CKEDITOR.ui.panel.prototype={render:function(e,b){this.getHolderElement=function(){var a=this._.holder;if(!a){if(this.isFramed){var a=this.document.getById(this.id+"_frame"),b=a.getParent(),a=a.getFrameDocument();CKEDITOR.env.iOS&&b.setStyles({overflow:"scroll","-webkit-overflow-scrolling":"touch"});
|
||||
b=CKEDITOR.tools.addFunction(CKEDITOR.tools.bind(function(){this.isLoaded=true;if(this.onLoad)this.onLoad()},this));a.write(c.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),onload:"window.parent.CKEDITOR.tools.callFunction("+b+");"},i)));a.getWindow().$.CKEDITOR=CKEDITOR;a.on("keydown",function(a){var b=a.data.getKeystroke(),c=this.document.getById(this.id).getAttribute("dir");this._.onKeyDown&&this._.onKeyDown(b)===false?a.data.preventDefault():(b==27||b==(c=="rtl"?39:
|
||||
37))&&this.onEscape&&this.onEscape(b)===false&&a.data.preventDefault()},this);a=a.getBody();a.unselectable();CKEDITOR.env.air&&CKEDITOR.tools.callFunction(b)}else a=this.document.getById(this.id);this._.holder=a}return a};var i={editorId:e.id,id:this.id,langCode:e.langCode,dir:e.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":e.config.baseFloatZIndex+1};if(this.isFramed){var j=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent("document.open();("+
|
||||
CKEDITOR.tools.fixDomain+")();document.close();")+"}())":"";i.frame=f.output({id:this.id+"_frame",src:j})}j=a.output(i);b&&b.push(j);return j},addBlock:function(a,b){b=this._.blocks[a]=b instanceof CKEDITOR.ui.panel.block?b:new CKEDITOR.ui.panel.block(this.getHolderElement(),b);this._.currentBlock||this.showBlock(a);return b},getBlock:function(a){return this._.blocks[a]},showBlock:function(a){var a=this._.blocks[a],b=this._.currentBlock,c=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+
|
||||
"_frame");b&&b.hide();this._.currentBlock=a;CKEDITOR.fire("ariaWidget",c);a._.focusIndex=-1;this._.onKeyDown=a.onKeyDown&&CKEDITOR.tools.bind(a.onKeyDown,a);a.show();return a},destroy:function(){this.element&&this.element.remove()}};CKEDITOR.ui.panel.block=CKEDITOR.tools.createClass({$:function(a,b){this.element=a.append(a.getDocument().createElement("div",{attributes:{tabindex:-1,"class":"cke_panel_block"},styles:{display:"none"}}));b&&CKEDITOR.tools.extend(this,b);this.element.setAttributes({role:this.attributes.role||
|
||||
"presentation","aria-label":this.attributes["aria-label"],title:this.attributes.title||this.attributes["aria-label"]});this.keys={};this._.focusIndex=-1;this.element.disableContextMenu()},_:{markItem:function(a){if(a!=-1){a=this.element.getElementsByTag("a").getItem(this._.focusIndex=a);CKEDITOR.env.webkit&&a.getDocument().getWindow().focus();a.focus();this.onMark&&this.onMark(a)}}},proto:{show:function(){this.element.setStyle("display","")},hide:function(){(!this.onHide||this.onHide.call(this)!==
|
||||
true)&&this.element.setStyle("display","none")},onKeyDown:function(a,b){var c=this.keys[a];switch(c){case "next":for(var f=this._.focusIndex,c=this.element.getElementsByTag("a"),d;d=c.getItem(++f);)if(d.getAttribute("_cke_focus")&&d.$.offsetWidth){this._.focusIndex=f;d.focus();break}if(!d&&!b){this._.focusIndex=-1;return this.onKeyDown(a,1)}return false;case "prev":f=this._.focusIndex;for(c=this.element.getElementsByTag("a");f>0&&(d=c.getItem(--f));){if(d.getAttribute("_cke_focus")&&d.$.offsetWidth){this._.focusIndex=
|
||||
f;d.focus();break}d=null}if(!d&&!b){this._.focusIndex=c.count();return this.onKeyDown(a,1)}return false;case "click":case "mouseup":f=this._.focusIndex;(d=f>=0&&this.element.getElementsByTag("a").getItem(f))&&(d.$[c]?d.$[c]():d.$["on"+c]());return false}return true}}})}(),CKEDITOR.plugins.add("floatpanel",{requires:"panel"}),function(){function a(a,e,b,i,j){var j=CKEDITOR.tools.genKey(e.getUniqueId(),b.getUniqueId(),a.lang.dir,a.uiColor||"",i.css||"",j||""),d=f[j];if(!d){d=f[j]=new CKEDITOR.ui.panel(e,
|
||||
i);d.element=b.append(CKEDITOR.dom.element.createFromHtml(d.render(a),e));d.element.setStyles({display:"none",position:"absolute"})}return d}var f={};CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(c,e,b,f){function j(){k.hide()}b.forceIFrame=1;b.toolbarRelated&&c.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(e=CKEDITOR.document.getById("cke_"+c.name));var d=e.getDocument(),f=a(c,d,e,b,f||0),g=f.element,h=g.getFirst(),k=this;g.disableContextMenu();this.element=g;this._={editor:c,panel:f,
|
||||
parentElement:e,definition:b,document:d,iframe:h,children:[],dir:c.lang.dir};c.on("mode",j);c.on("resize",j);if(!CKEDITOR.env.iOS)d.getWindow().on("resize",j)},proto:{addBlock:function(a,e){return this._.panel.addBlock(a,e)},addListBlock:function(a,e){return this._.panel.addListBlock(a,e)},getBlock:function(a){return this._.panel.getBlock(a)},showBlock:function(a,e,b,f,j,d){var g=this._.panel,h=g.showBlock(a);this.allowBlur(false);a=this._.editor.editable();this._.returnFocus=a.hasFocus?a:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);
|
||||
this._.hideTimeout=0;var k=this.element,a=this._.iframe,a=CKEDITOR.env.ie?a:new CKEDITOR.dom.window(a.$.contentWindow),m=k.getDocument(),q=this._.parentElement.getPositionedAncestor(),p=e.getDocumentPosition(m),m=q?q.getDocumentPosition(m):{x:0,y:0},o=this._.dir=="rtl",n=p.x+(f||0)-m.x,l=p.y+(j||0)-m.y;if(o&&(b==1||b==4))n=n+e.$.offsetWidth;else if(!o&&(b==2||b==3))n=n+(e.$.offsetWidth-1);if(b==3||b==4)l=l+(e.$.offsetHeight-1);this._.panel._.offsetParentId=e.getId();k.setStyles({top:l+"px",left:0,
|
||||
display:""});k.setOpacity(0);k.getFirst().removeStyle("width");this._.editor.focusManager.add(a);if(!this._.blurSet){CKEDITOR.event.useCapture=true;a.on("blur",function(a){function b(){delete this._.returnFocus;this.hide()}if(this.allowBlur()&&a.data.getPhase()==CKEDITOR.EVENT_PHASE_AT_TARGET&&this.visible&&!this._.activeChild)if(CKEDITOR.env.iOS){if(!this._.hideTimeout)this._.hideTimeout=CKEDITOR.tools.setTimeout(b,0,this)}else b.call(this)},this);a.on("focus",function(){this._.focused=true;this.hideChild();
|
||||
this.allowBlur(true)},this);if(CKEDITOR.env.iOS){a.on("touchstart",function(){clearTimeout(this._.hideTimeout)},this);a.on("touchend",function(){this._.hideTimeout=0;this.focus()},this)}CKEDITOR.event.useCapture=false;this._.blurSet=1}g.onEscape=CKEDITOR.tools.bind(function(a){if(this.onEscape&&this.onEscape(a)===false)return false},this);CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.tools.bind(function(){k.removeStyle("width");if(h.autoSize){var a=h.element.getDocument(),a=(CKEDITOR.env.webkit?
|
||||
h.element:a.getBody()).$.scrollWidth;CKEDITOR.env.ie&&(CKEDITOR.env.quirks&&a>0)&&(a=a+((k.$.offsetWidth||0)-(k.$.clientWidth||0)+3));k.setStyle("width",a+10+"px");a=h.element.$.scrollHeight;CKEDITOR.env.ie&&(CKEDITOR.env.quirks&&a>0)&&(a=a+((k.$.offsetHeight||0)-(k.$.clientHeight||0)+3));k.setStyle("height",a+"px");g._.currentBlock.element.setStyle("display","none").removeStyle("display")}else k.removeStyle("height");o&&(n=n-k.$.offsetWidth);k.setStyle("left",n+"px");var b=g.element.getWindow(),
|
||||
a=k.$.getBoundingClientRect(),b=b.getViewPaneSize(),c=a.width||a.right-a.left,e=a.height||a.bottom-a.top,f=o?a.right:b.width-a.left,i=o?b.width-a.right:a.left;o?f<c&&(n=i>c?n+c:b.width>c?n-a.left:n-a.right+b.width):f<c&&(n=i>c?n-c:b.width>c?n-a.right+b.width:n-a.left);c=a.top;b.height-a.top<e&&(l=c>e?l-e:b.height>e?l-a.bottom+b.height:l-a.top);if(CKEDITOR.env.ie){b=a=new CKEDITOR.dom.element(k.$.offsetParent);b.getName()=="html"&&(b=b.getDocument().getBody());b.getComputedStyle("direction")=="rtl"&&
|
||||
(n=CKEDITOR.env.ie8Compat?n-k.getDocument().getDocumentElement().$.scrollLeft*2:n-(a.$.scrollWidth-a.$.clientWidth))}var a=k.getFirst(),j;(j=a.getCustomData("activePanel"))&&j.onHide&&j.onHide.call(this,1);a.setCustomData("activePanel",this);k.setStyles({top:l+"px",left:n+"px"});k.setOpacity(1);d&&d()},this);g.isLoaded?a():g.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();h.element.focus();if(CKEDITOR.env.webkit)CKEDITOR.document.getBody().$.scrollTop=
|
||||
a;this.allowBlur(true);this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this);this.visible=1;this.onShow&&this.onShow.call(this)},focus:function(){if(CKEDITOR.env.webkit){var a=CKEDITOR.document.getActive();a&&!a.equals(this._.iframe)&&a.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var a=this._.iframe.getFrameDocument().getActive();a&&a.is("a")&&(this._.lastFocused=a)},hide:function(a){if(this.visible&&(!this.onHide||this.onHide.call(this)!==
|
||||
true)){this.hideChild();CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur();this.element.setStyle("display","none");this.visible=0;this.element.getFirst().removeCustomData("activePanel");if(a=a&&this._.returnFocus){CKEDITOR.env.webkit&&a.type&&a.getWindow().$.focus();a.focus()}delete this._.lastFocused;this._.editor.fire("panelHide",this)}},allowBlur:function(a){var e=this._.panel;if(a!==void 0)e.allowBlur=a;return e.allowBlur},showAsChild:function(a,e,b,f,j,d){if(!(this._.activeChild==
|
||||
a&&a._.panel._.offsetParentId==b.getId())){this.hideChild();a.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this);this._.activeChild=a;this._.focused=false;a.showBlock(e,b,f,j,d);this.blur();(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){a.element.getChild(0).$.style.cssText+=""},100)}},hideChild:function(a){var e=this._.activeChild;if(e){delete e.onHide;delete this._.activeChild;e.hide();a&&this.focus()}}}});
|
||||
CKEDITOR.on("instanceDestroyed",function(){var a=CKEDITOR.tools.isEmpty(CKEDITOR.instances),e;for(e in f){var b=f[e];a?b.destroy():b.element.hide()}a&&(f={})})}(),CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(a){for(var f=a.config.menu_groups.split(","),c=a._.menuGroups={},e=a._.menuItems={},b=0;b<f.length;b++)c[f[b]]=b+1;a.addMenuGroup=function(a,b){c[a]=b||100};a.addMenuItem=function(a,b){c[b.group]&&(e[a]=new CKEDITOR.menuItem(this,a,b))};a.addMenuItems=function(a){for(var b in a)this.addMenuItem(b,
|
||||
a[b])};a.getMenuItem=function(a){return e[a]};a.removeMenuItem=function(a){delete e[a]}}}),function(){function a(a){a.sort(function(a,b){return a.group<b.group?-1:a.group>b.group?1:a.order<b.order?-1:a.order>b.order?1:0})}var f='<span class="cke_menuitem"><a id="{id}" class="cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href="{href}" title="{title}" tabindex="-1"_cke_focus=1 hidefocus="true" role="{role}" aria-haspopup="{hasPopup}" aria-disabled="{disabled}" {ariaChecked}';CKEDITOR.env.gecko&&
|
||||
CKEDITOR.env.mac&&(f=f+' onkeypress="return false;"');CKEDITOR.env.gecko&&(f=f+' onblur="this.style.cssText = this.style.cssText;"');var f=f+(' onmouseover="CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout="CKEDITOR.tools.callFunction({moveOutFn},{index});" '+(CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick")+'="CKEDITOR.tools.callFunction({clickFn},{index}); return false;">'),c=CKEDITOR.addTemplate("menuItem",f+'<span class="cke_menubutton_inner"><span class="cke_menubutton_icon"><span class="cke_button_icon cke_button__{iconName}_icon" style="{iconStyle}"></span></span><span class="cke_menubutton_label">{label}</span>{arrowHtml}</span></a></span>'),
|
||||
e=CKEDITOR.addTemplate("menuArrow",'<span class="cke_menuarrow"><span>{label}</span></span>');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,c){c=this._.definition=c||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=c.level||1;var e=CKEDITOR.tools.extend({},c.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),d=e.block.attributes=e.attributes||{};!d.role&&(d.role="menu");this._.panelDefinition=e},_:{onShow:function(){var a=
|
||||
this.editor.getSelection(),c=a&&a.getStartElement(),e=this.editor.elementPath(),d=this._.listeners;this.removeAll();for(var f=0;f<d.length;f++){var h=d[f](c,a,e);if(h)for(var k in h){var m=this.editor.getMenuItem(k);if(m&&(!m.command||this.editor.getCommand(m.command).state)){m.state=h[k];this.add(m)}}}},onClick:function(a){this.hide();if(a.onClick)a.onClick();else a.command&&this.editor.execCommand(a.command)},onEscape:function(a){var c=this.parent;c?c._.panel.hideChild(1):a==27&&this.hide(1);return false},
|
||||
onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(a){var c=this._.subMenu,e=this.items[a];if(e=e.getItems&&e.getItems()){if(c)c.removeAll();else{c=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({},this._.definition,{level:this._.level+1},true));c.parent=this;c._.onClick=CKEDITOR.tools.bind(this._.onClick,this)}for(var d in e){var f=this.editor.getMenuItem(d);if(f){f.state=e[d];c.add(f)}}var h=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+
|
||||
(""+a));setTimeout(function(){c.show(h,2)},0)}else this._.panel.hideChild(1)}},proto:{add:function(a){if(!a.order)a.order=this.items.length;this.items.push(a)},removeAll:function(){this.items=[]},show:function(b,c,e,d){if(!this.parent){this._.onShow();if(!this.items.length)return}var c=c||(this.editor.lang.dir=="rtl"?2:1),f=this.items,h=this.editor,k=this._.panel,m=this._.element;if(!k){k=this._.panel=new CKEDITOR.ui.floatPanel(this.editor,CKEDITOR.document.getBody(),this._.panelDefinition,this._.level);
|
||||
k.onEscape=CKEDITOR.tools.bind(function(a){if(this._.onEscape(a)===false)return false},this);k.onShow=function(){k._.panel.getHolderElement().getParent().addClass("cke cke_reset_all")};k.onHide=CKEDITOR.tools.bind(function(){this._.onHide&&this._.onHide()},this);m=k.addBlock(this.id,this._.panelDefinition.block);m.autoSize=true;var q=m.keys;q[40]="next";q[9]="next";q[38]="prev";q[CKEDITOR.SHIFT+9]="prev";q[h.lang.dir=="rtl"?37:39]=CKEDITOR.env.ie?"mouseup":"click";q[32]=CKEDITOR.env.ie?"mouseup":
|
||||
"click";CKEDITOR.env.ie&&(q[13]="mouseup");m=this._.element=m.element;q=m.getDocument();q.getBody().setStyle("overflow","hidden");q.getElementsByTag("html").getItem(0).setStyle("overflow","hidden");this._.itemOverFn=CKEDITOR.tools.addFunction(function(a){clearTimeout(this._.showSubTimeout);this._.showSubTimeout=CKEDITOR.tools.setTimeout(this._.showSubMenu,h.config.menu_subMenuDelay||400,this,[a])},this);this._.itemOutFn=CKEDITOR.tools.addFunction(function(){clearTimeout(this._.showSubTimeout)},this);
|
||||
this._.itemClickFn=CKEDITOR.tools.addFunction(function(a){var b=this.items[a];if(b.state==CKEDITOR.TRISTATE_DISABLED)this.hide(1);else if(b.getItems)this._.showSubMenu(a);else this._.onClick(b)},this)}a(f);for(var q=h.elementPath(),q=['<div class="cke_menu'+(q&&q.direction()!=h.lang.dir?" cke_mixed_dir_content":"")+'" role="presentation">'],p=f.length,o=p&&f[0].group,n=0;n<p;n++){var l=f[n];if(o!=l.group){q.push('<div class="cke_menuseparator" role="separator"></div>');o=l.group}l.render(this,n,q)}q.push("</div>");
|
||||
m.setHtml(q.join(""));CKEDITOR.ui.fire("ready",this);this.parent?this.parent._.panel.showAsChild(k,this.id,b,c,e,d):k.showBlock(this.id,b,c,e,d);h.fire("menuShow",[k])},addListener:function(a){this._.listeners.push(a)},hide:function(a){this._.onHide&&this._.onHide();this._.panel&&this._.panel.hide(a)}}});CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(a,c,e){CKEDITOR.tools.extend(this,e,{order:0,className:"cke_menubutton__"+c});this.group=a._.menuGroups[this.group];this.editor=a;this.name=
|
||||
c},proto:{render:function(a,f,j){var d=a.id+(""+f),g=typeof this.state=="undefined"?CKEDITOR.TRISTATE_OFF:this.state,h="",k=g==CKEDITOR.TRISTATE_ON?"on":g==CKEDITOR.TRISTATE_DISABLED?"disabled":"off";this.role in{menuitemcheckbox:1,menuitemradio:1}&&(h=' aria-checked="'+(g==CKEDITOR.TRISTATE_ON?"true":"false")+'"');var m=this.getItems,q="&#"+(this.editor.lang.dir=="rtl"?"9668":"9658")+";",p=this.name;if(this.icon&&!/\./.test(this.icon))p=this.icon;a={id:d,name:this.name,iconName:p,label:this.label,
|
||||
cls:this.className||"",state:k,hasPopup:m?"true":"false",disabled:g==CKEDITOR.TRISTATE_DISABLED,title:this.label,href:"javascript:void('"+(this.label||"").replace("'")+"')",hoverFn:a._.itemOverFn,moveOutFn:a._.itemOutFn,clickFn:a._.itemClickFn,index:f,iconStyle:CKEDITOR.skin.getIconStyle(p,this.editor.lang.dir=="rtl",p==this.icon?null:this.icon,this.iconOffset),arrowHtml:m?e.output({label:q}):"",role:this.role?this.role:"menuitem",ariaChecked:h};c.output(a,j)}}})}(),CKEDITOR.config.menu_groups="clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div",
|
||||
CKEDITOR.plugins.add("contextmenu",{requires:"menu",onLoad:function(){CKEDITOR.plugins.contextMenu=CKEDITOR.tools.createClass({base:CKEDITOR.menu,$:function(a){this.base.call(this,a,{panel:{className:"cke_menu_panel",attributes:{"aria-label":a.lang.contextmenu.options}}})},proto:{addTarget:function(a,f){a.on("contextmenu",function(a){var a=a.data,e=CKEDITOR.env.webkit?c:CKEDITOR.env.mac?a.$.metaKey:a.$.ctrlKey;if(!f||!e){a.preventDefault();if(CKEDITOR.env.mac&&CKEDITOR.env.webkit){var e=this.editor,
|
||||
j=(new CKEDITOR.dom.elementPath(a.getTarget(),e.editable())).contains(function(a){return a.hasAttribute("contenteditable")},true);j&&j.getAttribute("contenteditable")=="false"&&e.getSelection().fake(j)}var j=a.getTarget().getDocument(),d=a.getTarget().getDocument().getDocumentElement(),e=!j.equals(CKEDITOR.document),j=j.getWindow().getScrollPosition(),g=e?a.$.clientX:a.$.pageX||j.x+a.$.clientX,h=e?a.$.clientY:a.$.pageY||j.y+a.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(d,null,g,h)},CKEDITOR.env.ie?
|
||||
200:0,this)}},this);if(CKEDITOR.env.webkit){var c,e=function(){c=0};a.on("keydown",function(a){c=CKEDITOR.env.mac?a.data.$.metaKey:a.data.$.ctrlKey});a.on("keyup",e);a.on("contextmenu",e)}},open:function(a,f,c,e){this.editor.focus();a=a||CKEDITOR.document.getDocumentElement();this.editor.selectionChange(1);this.show(a,f,c,e)}}})},beforeInit:function(a){var f=a.contextMenu=new CKEDITOR.plugins.contextMenu(a);a.on("contentDom",function(){f.addTarget(a.editable(),a.config.browserContextMenuOnCtrl!==
|
||||
false)});a.addCommand("contextMenu",{exec:function(){a.contextMenu.open(a.document.getBody())}});a.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu");a.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}}),CKEDITOR.plugins.add("resize",{init:function(a){var f,c,e,b;function i(g){var i=f,j=c,k=i+(g.data.$.screenX-e)*(h=="rtl"?-1:1),g=j+(g.data.$.screenY-b);m&&(i=Math.max(d.resize_minWidth,Math.min(k,d.resize_maxWidth)));q&&(j=Math.max(d.resize_minHeight,Math.min(g,d.resize_maxHeight)));a.resize(m?
|
||||
i:null,j)}function j(){CKEDITOR.document.removeListener("mousemove",i);CKEDITOR.document.removeListener("mouseup",j);if(a.document){a.document.removeListener("mousemove",i);a.document.removeListener("mouseup",j)}}var d=a.config,g=a.ui.spaceId("resizer"),h=a.element?a.element.getDirection(1):"ltr";!d.resize_dir&&(d.resize_dir="vertical");d.resize_maxWidth===void 0&&(d.resize_maxWidth=3E3);d.resize_maxHeight===void 0&&(d.resize_maxHeight=3E3);d.resize_minWidth===void 0&&(d.resize_minWidth=750);d.resize_minHeight===
|
||||
void 0&&(d.resize_minHeight=250);if(d.resize_enabled!==false){var k=null,m=(d.resize_dir=="both"||d.resize_dir=="horizontal")&&d.resize_minWidth!=d.resize_maxWidth,q=(d.resize_dir=="both"||d.resize_dir=="vertical")&&d.resize_minHeight!=d.resize_maxHeight,p=CKEDITOR.tools.addFunction(function(h){k||(k=a.getResizable());f=k.$.offsetWidth||0;c=k.$.offsetHeight||0;e=h.screenX;b=h.screenY;d.resize_minWidth>f&&(d.resize_minWidth=f);d.resize_minHeight>c&&(d.resize_minHeight=c);CKEDITOR.document.on("mousemove",
|
||||
i);CKEDITOR.document.on("mouseup",j);if(a.document){a.document.on("mousemove",i);a.document.on("mouseup",j)}h.preventDefault&&h.preventDefault()});a.on("destroy",function(){CKEDITOR.tools.removeFunction(p)});a.on("uiSpace",function(b){if(b.data.space=="bottom"){var c="";m&&!q&&(c=" cke_resizer_horizontal");!m&&q&&(c=" cke_resizer_vertical");var d='<span id="'+g+'" class="cke_resizer'+c+" cke_resizer_"+h+'" title="'+CKEDITOR.tools.htmlEncode(a.lang.common.resize)+'" onmousedown="CKEDITOR.tools.callFunction('+
|
||||
p+', event)">'+(h=="ltr"?"◢":"◣")+"</span>";h=="ltr"&&c=="ltr"?b.data.html=b.data.html+d:b.data.html=d+b.data.html}},a,null,100);a.on("maximize",function(b){a.ui.space("resizer")[b.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}}),function(){var a='<a id="{id}" class="cke_button cke_button__{name} cke_button_{state} {cls}"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href=\"javascript:void('{titleJs}')\"")+' title="{title}" tabindex="-1" hidefocus="true" role="button" aria-labelledby="{id}_label" aria-haspopup="{hasArrow}" aria-disabled="{ariaDisabled}"';
|
||||
CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(a=a+' onkeypress="return false;"');CKEDITOR.env.gecko&&(a=a+' onblur="this.style.cssText = this.style.cssText;"');var a=a+(' onkeydown="return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus="return CKEDITOR.tools.callFunction({focusFn},event);" '+(CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick")+'="CKEDITOR.tools.callFunction({clickFn},this);return false;"><span class="cke_button_icon cke_button__{iconName}_icon" style="{style}"'),a=a+
|
||||
'> </span><span id="{id}_label" class="cke_button_label cke_button__{name}_label" aria-hidden="false">{label}</span>{arrowHtml}</a>',f=CKEDITOR.addTemplate("buttonArrow",'<span class="cke_button_arrow">'+(CKEDITOR.env.hc?"▼":"")+"</span>"),c=CKEDITOR.addTemplate("button",a);CKEDITOR.plugins.add("button",{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(a){CKEDITOR.tools.extend(this,a,{title:a.label,
|
||||
click:a.click||function(b){b.execCommand(a.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(a){return new CKEDITOR.ui.button(a)}};CKEDITOR.ui.button.prototype={render:function(a,b){function i(){var b=a.mode;if(b){b=this.modes[b]?n[b]!==void 0?n[b]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;b=a.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:b;this.setState(b);this.refresh&&this.refresh()}}var j=CKEDITOR.env,d=this._.id=CKEDITOR.tools.getNextId(),g="",h=this.command,k;this._.editor=
|
||||
a;var m={id:d,button:this,editor:a,focus:function(){CKEDITOR.document.getById(d).focus()},execute:function(){this.button.click(a)},attach:function(a){this.button.attach(a)}},q=CKEDITOR.tools.addFunction(function(a){if(m.onkey){a=new CKEDITOR.dom.event(a);return m.onkey(m,a.getKeystroke())!==false}}),p=CKEDITOR.tools.addFunction(function(a){var b;m.onfocus&&(b=m.onfocus(m,new CKEDITOR.dom.event(a))!==false);return b}),o=0;m.clickFn=k=CKEDITOR.tools.addFunction(function(){if(o){a.unlockSelection(1);
|
||||
o=0}m.execute();j.iOS&&a.focus()});if(this.modes){var n={};a.on("beforeModeUnload",function(){if(a.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED)n[a.mode]=this._.state},this);a.on("activeFilterChange",i,this);a.on("mode",i,this);!this.readOnly&&a.on("readOnly",i,this)}else if(h)if(h=a.getCommand(h)){h.on("state",function(){this.setState(h.state)},this);g=g+(h.state==CKEDITOR.TRISTATE_ON?"on":h.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off")}if(this.directional)a.on("contentDirChanged",function(b){var c=
|
||||
CKEDITOR.document.getById(this._.id),d=c.getFirst(),b=b.data;b!=a.lang.dir?c.addClass("cke_"+b):c.removeClass("cke_ltr").removeClass("cke_rtl");d.setAttribute("style",CKEDITOR.skin.getIconStyle(s,b=="rtl",this.icon,this.iconOffset))},this);h||(g=g+"off");var l=this.name||this.command,s=l;if(this.icon&&!/\./.test(this.icon)){s=this.icon;this.icon=null}g={id:d,name:l,iconName:s,label:this.label,cls:this.className||"",state:g,ariaDisabled:g=="disabled"?"true":"false",title:this.title,titleJs:j.gecko&&
|
||||
!j.hc?"":(this.title||"").replace("'",""),hasArrow:this.hasArrow?"true":"false",keydownFn:q,focusFn:p,clickFn:k,style:CKEDITOR.skin.getIconStyle(s,a.lang.dir=="rtl",this.icon,this.iconOffset),arrowHtml:this.hasArrow?f.output():""};c.output(g,b);if(this.onRender)this.onRender();return m},setState:function(a){if(this._.state==a)return false;this._.state=a;var b=CKEDITOR.document.getById(this._.id);if(b){b.setState(a,"cke_button");a==CKEDITOR.TRISTATE_DISABLED?b.setAttribute("aria-disabled",true):b.removeAttribute("aria-disabled");
|
||||
if(this.hasArrow){a=a==CKEDITOR.TRISTATE_ON?this._.editor.lang.button.selectedLabel.replace(/%1/g,this.label):this.label;CKEDITOR.document.getById(this._.id+"_label").setText(a)}else a==CKEDITOR.TRISTATE_ON?b.setAttribute("aria-pressed",true):b.removeAttribute("aria-pressed");return true}return false},getState:function(){return this._.state},toFeature:function(a){if(this._.feature)return this._.feature;var b=this;!this.allowedContent&&(!this.requiredContent&&this.command)&&(b=a.getCommand(this.command)||
|
||||
b);return this._.feature=b}};CKEDITOR.ui.prototype.addButton=function(a,b){this.add(a,CKEDITOR.UI_BUTTON,b)}}(),function(){function a(a){function c(){for(var h=e(),g=CKEDITOR.tools.clone(a.config.toolbarGroups)||f(a),i=0;i<g.length;i++){var k=g[i];if(k!="/"){typeof k=="string"&&(k=g[i]={name:k});var n,l=k.groups;if(l)for(var s=0;s<l.length;s++){n=l[s];(n=h[n])&&d(k,n)}(n=h[k.name])&&d(k,n)}}return g}function e(){var c={},d,f,h;for(d in a.ui.items){f=a.ui.items[d];h=f.toolbar||"others";h=h.split(",");
|
||||
f=h[0];h=parseInt(h[1]||-1,10);c[f]||(c[f]=[]);c[f].push({name:d,order:h})}for(f in c)c[f]=c[f].sort(function(a,b){return a.order==b.order?0:b.order<0?-1:a.order<0?1:a.order<b.order?-1:1});return c}function d(c,d){if(d.length){c.items?c.items.push(a.ui.create("-")):c.items=[];for(var e;e=d.shift();){e=typeof e=="string"?e:e.name;if(!h||CKEDITOR.tools.indexOf(h,e)==-1)(e=a.ui.create(e))&&a.addFeature(e)&&c.items.push(e)}}}function g(a){var b=[],c,e,f;for(c=0;c<a.length;++c){e=a[c];f={};if(e=="/")b.push(e);
|
||||
else if(CKEDITOR.tools.isArray(e)){d(f,CKEDITOR.tools.clone(e));b.push(f)}else if(e.items){d(f,CKEDITOR.tools.clone(e.items));f.name=e.name;b.push(f)}}return b}var h=a.config.removeButtons,h=h&&h.split(","),k=a.config.toolbar;typeof k=="string"&&(k=a.config["toolbar_"+k]);return a.toolbar=k?g(k):c()}function f(a){return a._.toolbarGroups||(a._.toolbarGroups=[{name:"document",groups:["mode","document","doctools"]},{name:"clipboard",groups:["clipboard","undo"]},{name:"editing",groups:["find","selection",
|
||||
"spellchecker"]},{name:"forms"},"/",{name:"basicstyles",groups:["basicstyles","cleanup"]},{name:"paragraph",groups:["list","indent","blocks","align","bidi"]},{name:"links"},{name:"insert"},"/",{name:"styles"},{name:"colors"},{name:"tools"},{name:"others"},{name:"about"}])}var c=function(){this.toolbars=[];this.focusCommandExecuted=false};c.prototype.focus=function(){for(var a=0,c;c=this.toolbars[a++];)for(var e=0,d;d=c.items[e++];)if(d.focus){d.focus();return}};var e={modes:{wysiwyg:1,source:1},readOnly:1,
|
||||
exec:function(a){if(a.toolbox){a.toolbox.focusCommandExecuted=true;CKEDITOR.env.ie||CKEDITOR.env.air?setTimeout(function(){a.toolbox.focus()},100):a.toolbox.focus()}}};CKEDITOR.plugins.add("toolbar",{requires:"button",init:function(b){var f,j=function(a,c){var e,k=b.lang.dir=="rtl",m=b.config.toolbarGroupCycling,q=k?37:39,k=k?39:37,m=m===void 0||m;switch(c){case 9:case CKEDITOR.SHIFT+9:for(;!e||!e.items.length;){e=c==9?(e?e.next:a.toolbar.next)||b.toolbox.toolbars[0]:(e?e.previous:a.toolbar.previous)||
|
||||
b.toolbox.toolbars[b.toolbox.toolbars.length-1];if(e.items.length)for(a=e.items[f?e.items.length-1:0];a&&!a.focus;)(a=f?a.previous:a.next)||(e=0)}a&&a.focus();return false;case q:e=a;do{e=e.next;!e&&m&&(e=a.toolbar.items[0])}while(e&&!e.focus);e?e.focus():j(a,9);return false;case 40:if(a.button&&a.button.hasArrow){b.once("panelShow",function(a){a.data._.panel._.currentBlock.onKeyDown(40)});a.execute()}else j(a,c==40?q:k);return false;case k:case 38:e=a;do{e=e.previous;!e&&m&&(e=a.toolbar.items[a.toolbar.items.length-
|
||||
1])}while(e&&!e.focus);if(e)e.focus();else{f=1;j(a,CKEDITOR.SHIFT+9);f=0}return false;case 27:b.focus();return false;case 13:case 32:a.execute();return false}return true};b.on("uiSpace",function(d){if(d.data.space==b.config.toolbarLocation){d.removeListener();b.toolbox=new c;var e=CKEDITOR.tools.getNextId(),f=['<span id="',e,'" class="cke_voice_label">',b.lang.toolbar.toolbars,"</span>",'<span id="'+b.ui.spaceId("toolbox")+'" class="cke_toolbox" role="group" aria-labelledby="',e,'" onmousedown="return false;">'],
|
||||
e=b.config.toolbarStartupExpanded!==false,i,m;b.config.toolbarCanCollapse&&b.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&f.push('<span class="cke_toolbox_main"'+(e?">":' style="display:none">'));for(var q=b.toolbox.toolbars,p=a(b),o=0;o<p.length;o++){var n,l=0,s,v=p[o],t;if(v){if(i){f.push("</span>");m=i=0}if(v==="/")f.push('<span class="cke_toolbar_break"></span>');else{t=v.items||v;for(var B=0;B<t.length;B++){var u=t[B],y;if(u)if(u.type==CKEDITOR.UI_SEPARATOR)m=i&&u;else{y=u.canGroup!==false;if(!l){n=
|
||||
CKEDITOR.tools.getNextId();l={id:n,items:[]};s=v.name&&(b.lang.toolbar.toolbarGroups[v.name]||v.name);f.push('<span id="',n,'" class="cke_toolbar"',s?' aria-labelledby="'+n+'_label"':"",' role="toolbar">');s&&f.push('<span id="',n,'_label" class="cke_voice_label">',s,"</span>");f.push('<span class="cke_toolbar_start"></span>');var r=q.push(l)-1;if(r>0){l.previous=q[r-1];l.previous.next=l}}if(y){if(!i){f.push('<span class="cke_toolgroup" role="presentation">');i=1}}else if(i){f.push("</span>");i=0}n=
|
||||
function(a){a=a.render(b,f);r=l.items.push(a)-1;if(r>0){a.previous=l.items[r-1];a.previous.next=a}a.toolbar=l;a.onkey=j;a.onfocus=function(){b.toolbox.focusCommandExecuted||b.focus()}};if(m){n(m);m=0}n(u)}}if(i){f.push("</span>");m=i=0}l&&f.push('<span class="cke_toolbar_end"></span></span>')}}}b.config.toolbarCanCollapse&&f.push("</span>");if(b.config.toolbarCanCollapse&&b.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var x=CKEDITOR.tools.addFunction(function(){b.execCommand("toolbarCollapse")});b.on("destroy",
|
||||
function(){CKEDITOR.tools.removeFunction(x)});b.addCommand("toolbarCollapse",{readOnly:1,exec:function(a){var b=a.ui.space("toolbar_collapser"),c=b.getPrevious(),d=a.ui.space("contents"),e=c.getParent(),f=parseInt(d.$.style.height,10),h=e.$.offsetHeight,g=b.hasClass("cke_toolbox_collapser_min");if(g){c.show();b.removeClass("cke_toolbox_collapser_min");b.setAttribute("title",a.lang.toolbar.toolbarCollapse)}else{c.hide();b.addClass("cke_toolbox_collapser_min");b.setAttribute("title",a.lang.toolbar.toolbarExpand)}b.getFirst().setText(g?
|
||||
"▲":"◀");d.setStyle("height",f-(e.$.offsetHeight-h)+"px");a.fire("resize")},modes:{wysiwyg:1,source:1}});b.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse");f.push('<a title="'+(e?b.lang.toolbar.toolbarCollapse:b.lang.toolbar.toolbarExpand)+'" id="'+b.ui.spaceId("toolbar_collapser")+'" tabIndex="-1" class="cke_toolbox_collapser');e||f.push(" cke_toolbox_collapser_min");f.push('" onclick="CKEDITOR.tools.callFunction('+x+')">','<span class="cke_arrow">▲</span>',
|
||||
"</a>")}f.push("</span>");d.data.html=d.data.html+f.join("")}});b.on("destroy",function(){if(this.toolbox){var a,b=0,c,e,f;for(a=this.toolbox.toolbars;b<a.length;b++){e=a[b].items;for(c=0;c<e.length;c++){f=e[c];f.clickFn&&CKEDITOR.tools.removeFunction(f.clickFn);f.keyDownFn&&CKEDITOR.tools.removeFunction(f.keyDownFn)}}}});b.on("uiReady",function(){var a=b.ui.space("toolbox");a&&b.focusManager.add(a,1)});b.addCommand("toolbarFocus",e);b.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");b.ui.add("-",CKEDITOR.UI_SEPARATOR,
|
||||
{});b.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(a,b){b.push('<span class="cke_toolbar_separator" role="separator"></span>');return{}}}}})}});CKEDITOR.ui.prototype.addToolbarGroup=function(a,c,e){var d=f(this.editor),g=c===0,h={name:a};if(e){if(e=CKEDITOR.tools.search(d,function(a){return a.name==e})){!e.groups&&(e.groups=[]);if(c){c=CKEDITOR.tools.indexOf(e.groups,c);if(c>=0){e.groups.splice(c+1,0,a);return}}g?e.groups.splice(0,0,a):e.groups.push(a);return}c=null}c&&
|
||||
(c=CKEDITOR.tools.indexOf(d,function(a){return a.name==c}));g?d.splice(0,0,a):typeof c=="number"?d.splice(c+1,0,h):d.push(a)}}(),CKEDITOR.UI_SEPARATOR="separator",CKEDITOR.config.toolbarLocation="top",function(){var a;function f(e,f){function d(a){a=m.list[a];if(a.equals(e.editable())||a.getAttribute("contenteditable")=="true"){var b=e.createRange();b.selectNodeContents(a);b.select()}else e.getSelection().selectElement(a);e.focus()}function g(){k&&k.setHtml(c);delete m.list}var h=e.ui.spaceId("path"),
|
||||
k,m=e._.elementsPath,q=m.idBase;f.html=f.html+('<span id="'+h+'_label" class="cke_voice_label">'+e.lang.elementspath.eleLabel+'</span><span id="'+h+'" class="cke_path" role="group" aria-labelledby="'+h+'_label">'+c+"</span>");e.on("uiReady",function(){var a=e.ui.space("path");a&&e.focusManager.add(a,1)});m.onClick=d;var p=CKEDITOR.tools.addFunction(d),o=CKEDITOR.tools.addFunction(function(a,b){var c=m.idBase,f,b=new CKEDITOR.dom.event(b);f=e.lang.dir=="rtl";switch(b.getKeystroke()){case f?39:37:case 9:(f=
|
||||
CKEDITOR.document.getById(c+(a+1)))||(f=CKEDITOR.document.getById(c+"0"));f.focus();return false;case f?37:39:case CKEDITOR.SHIFT+9:(f=CKEDITOR.document.getById(c+(a-1)))||(f=CKEDITOR.document.getById(c+(m.list.length-1)));f.focus();return false;case 27:e.focus();return false;case 13:case 32:d(a);return false}return true});e.on("selectionChange",function(){for(var a=[],d=m.list=[],f=[],g=m.filters,j=true,B=e.elementPath().elements,u,y=B.length;y--;){var r=B[y],x=0;u=r.data("cke-display-name")?r.data("cke-display-name"):
|
||||
r.data("cke-real-element-type")?r.data("cke-real-element-type"):r.getName();j=r.hasAttribute("contenteditable")?r.getAttribute("contenteditable")=="true":j;!j&&!r.hasAttribute("contenteditable")&&(x=1);for(var w=0;w<g.length;w++){var z=g[w](r,u);if(z===false){x=1;break}u=z||u}if(!x){d.unshift(r);f.unshift(u)}}d=d.length;for(g=0;g<d;g++){u=f[g];j=e.lang.elementspath.eleTitle.replace(/%1/,u);u=b.output({id:q+g,label:j,text:u,jsTitle:"javascript:void('"+u+"')",index:g,keyDownFn:o,clickFn:p});a.unshift(u)}k||
|
||||
(k=CKEDITOR.document.getById(h));f=k;f.setHtml(a.join("")+c);e.fire("elementsPathUpdate",{space:f})});e.on("readOnly",g);e.on("contentDomUnload",g);e.addCommand("elementsPathFocus",a);e.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")}a={editorFocus:false,readOnly:1,exec:function(a){(a=CKEDITOR.document.getById(a._.elementsPath.idBase+"0"))&&a.focus(CKEDITOR.env.ie||CKEDITOR.env.air)}};var c='<span class="cke_path_empty"> </span>',e="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(e=e+' onkeypress="return false;"');
|
||||
CKEDITOR.env.gecko&&(e=e+' onblur="this.style.cssText = this.style.cssText;"');var b=CKEDITOR.addTemplate("pathItem",'<a id="{id}" href="{jsTitle}" tabindex="-1" class="cke_path_item" title="{label}"'+e+' hidefocus="true" onkeydown="return CKEDITOR.tools.callFunction({keyDownFn},{index}, event );" onclick="CKEDITOR.tools.callFunction({clickFn},{index}); return false;" role="button" aria-label="{label}">{text}</a>');CKEDITOR.plugins.add("elementspath",{init:function(a){a._.elementsPath={idBase:"cke_elementspath_"+
|
||||
CKEDITOR.tools.getNextNumber()+"_",filters:[]};a.on("uiSpace",function(b){b.data.space=="bottom"&&f(a,b.data)})}})}(),function(){function a(a,b,c){c=a.config.forceEnterMode||c;if(a.mode=="wysiwyg"){if(!b)b=a.activeEnterMode;if(!a.elementPath().isContextFor("p")){b=CKEDITOR.ENTER_BR;c=1}a.fire("saveSnapshot");b==CKEDITOR.ENTER_BR?j(a,b,null,c):d(a,b,null,c);a.fire("saveSnapshot")}}function f(a){for(var a=a.getSelection().getRanges(true),b=a.length-1;b>0;b--)a[b].deleteContents();return a[0]}function c(a){var b=
|
||||
a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.getAttribute("contenteditable")=="true"},true);if(a.root.equals(b))return a;b=new CKEDITOR.dom.range(b);b.moveToRange(a);return b}CKEDITOR.plugins.add("enterkey",{init:function(b){b.addCommand("enter",{modes:{wysiwyg:1},editorFocus:false,exec:function(b){a(b)}});b.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:false,exec:function(b){a(b,b.activeShiftEnterMode,1)}});b.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+
|
||||
13,"shiftEnter"]])}});var e=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.dom.walker.bookmark();CKEDITOR.plugins.enterkey={enterBlock:function(a,d,i,q){if(i=i||f(a)){var i=c(i),p=i.document,o=i.checkStartOfBlock(),n=i.checkEndOfBlock(),l=a.elementPath(i.startContainer),s=l.block,v=d==CKEDITOR.ENTER_DIV?"div":"p",t;if(o&&n){if(s&&(s.is("li")||s.getParent().is("li"))){s.is("li")||(s=s.getParent());i=s.getParent();t=i.getParent();var q=!s.hasPrevious(),B=!s.hasNext(),v=a.getSelection(),u=v.createBookmarks(),
|
||||
o=s.getDirection(1),n=s.getAttribute("class"),y=s.getAttribute("style"),r=t.getDirection(1)!=o,a=a.enterMode!=CKEDITOR.ENTER_BR||r||y||n;if(t.is("li"))if(q||B)s[q?"insertBefore":"insertAfter"](t);else s.breakParent(t);else{if(a){if(l.block.is("li")){t=p.createElement(d==CKEDITOR.ENTER_P?"p":"div");r&&t.setAttribute("dir",o);y&&t.setAttribute("style",y);n&&t.setAttribute("class",n);s.moveChildren(t)}else t=l.block;if(q||B)t[q?"insertBefore":"insertAfter"](i);else{s.breakParent(i);t.insertAfter(i)}}else{s.appendBogus(true);
|
||||
if(q||B)for(;p=s[q?"getFirst":"getLast"]();)p[q?"insertBefore":"insertAfter"](i);else for(s.breakParent(i);p=s.getLast();)p.insertAfter(i)}s.remove()}v.selectBookmarks(u);return}if(s&&s.getParent().is("blockquote")){s.breakParent(s.getParent());s.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||s.getPrevious().remove();s.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||s.getNext().remove();i.moveToElementEditStart(s);i.select();return}}else if(s&&s.is("pre")&&!n){j(a,d,i,q);return}if(o=
|
||||
i.splitBlock(v)){d=o.previousBlock;s=o.nextBlock;l=o.wasStartOfBlock;a=o.wasEndOfBlock;if(s){u=s.getParent();if(u.is("li")){s.breakParent(u);s.move(s.getNext(),1)}}else if(d&&(u=d.getParent())&&u.is("li")){d.breakParent(u);u=d.getNext();i.moveToElementEditStart(u);d.move(d.getPrevious())}if(!l&&!a){if(s.is("li")){t=i.clone();t.selectNodeContents(s);t=new CKEDITOR.dom.walker(t);t.evaluator=function(a){return!(b(a)||e(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in CKEDITOR.dtd.$inline&&!(a.getName()in
|
||||
CKEDITOR.dtd.$empty))};(u=t.next())&&(u.type==CKEDITOR.NODE_ELEMENT&&u.is("ul","ol"))&&(CKEDITOR.env.needsBrFiller?p.createElement("br"):p.createText(" ")).insertBefore(u)}s&&i.moveToElementEditStart(s)}else{if(d){if(d.is("li")||!g.test(d.getName())&&!d.is("pre"))t=d.clone()}else s&&(t=s.clone());if(t)q&&!t.is("li")&&t.renameNode(v);else if(u&&u.is("li"))t=u;else{t=p.createElement(v);d&&(B=d.getDirection())&&t.setAttribute("dir",B)}if(p=o.elementPath){q=0;for(v=p.elements.length;q<v;q++){u=p.elements[q];
|
||||
if(u.equals(p.block)||u.equals(p.blockLimit))break;if(CKEDITOR.dtd.$removeEmpty[u.getName()]){u=u.clone();t.moveChildren(u);t.append(u)}}}t.appendBogus();t.getParent()||i.insertNode(t);t.is("li")&&t.removeAttribute("value");if(CKEDITOR.env.ie&&l&&(!a||!d.getChildCount())){i.moveToElementEditStart(a?d:t);i.select()}i.moveToElementEditStart(l&&!a?s:t)}i.select();i.scrollIntoView()}}},enterBr:function(a,b,c,e){if(c=c||f(a)){var i=c.document,j=c.checkEndOfBlock(),n=new CKEDITOR.dom.elementPath(a.getSelection().getStartElement()),
|
||||
l=n.block,s=l&&n.block.getName();if(!e&&s=="li")d(a,b,c,e);else{if(!e&&j&&g.test(s))if(j=l.getDirection()){i=i.createElement("div");i.setAttribute("dir",j);i.insertAfter(l);c.setStart(i,0)}else{i.createElement("br").insertAfter(l);CKEDITOR.env.gecko&&i.createText("").insertAfter(l);c.setStartAt(l.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)}else{a=s=="pre"&&CKEDITOR.env.ie&&CKEDITOR.env.version<8?i.createText("\r"):i.createElement("br");c.deleteContents();
|
||||
c.insertNode(a);if(CKEDITOR.env.needsBrFiller){i.createText("").insertAfter(a);j&&(l||n.blockLimit).appendBogus();a.getNext().$.nodeValue="";c.setStartAt(a.getNext(),CKEDITOR.POSITION_AFTER_START)}else c.setStartAt(a,CKEDITOR.POSITION_AFTER_END)}c.collapse(true);c.select();c.scrollIntoView()}}}};var i=CKEDITOR.plugins.enterkey,j=i.enterBr,d=i.enterBlock,g=/^h[1-6]$/}(),function(){function a(a,c){var e={},b=[],i={nbsp:" ",shy:"",gt:">",lt:"<",amp:"&",apos:"'",quot:'"'},a=a.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,
|
||||
function(a,d){var f=c?"&"+d+";":i[d];e[f]=c?i[d]:"&"+d+";";b.push(f);return""});if(!c&&a){var a=a.split(","),j=document.createElement("div"),d;j.innerHTML="&"+a.join(";&")+";";d=j.innerHTML;j=null;for(j=0;j<d.length;j++){var g=d.charAt(j);e[g]="&"+a[j]+";";b.push(g)}}e.regex=b.join(c?"|":"");return e}CKEDITOR.plugins.add("entities",{afterInit:function(f){function c(a){return g[a]}function e(a){return b.entities_processNumerical=="force"||!j[a]?"&#"+a.charCodeAt(0)+";":j[a]}var b=f.config;if(f=(f=
|
||||
f.dataProcessor)&&f.htmlFilter){var i=[];b.basicEntities!==false&&i.push("nbsp,gt,lt,amp");if(b.entities){i.length&&i.push("quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro");
|
||||
b.entities_latin&&i.push("Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml");b.entities_greek&&i.push("Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv");
|
||||
b.entities_additional&&i.push(b.entities_additional)}var j=a(i.join(",")),d=j.regex?"["+j.regex+"]":"a^";delete j.regex;b.entities&&b.entities_processNumerical&&(d="[^ -~]|"+d);var d=RegExp(d,"g"),g=a("nbsp,gt,lt,amp,shy",true),h=RegExp(g.regex,"g");f.addRules({text:function(a){return a.replace(h,c).replace(d,e)}},{applyToAll:true,excludeNestedEditable:true})}}})}(),CKEDITOR.config.basicEntities=!0,CKEDITOR.config.entities=!0,CKEDITOR.config.entities_latin=!0,CKEDITOR.config.entities_greek=!0,CKEDITOR.config.entities_additional=
|
||||
"#39",CKEDITOR.plugins.add("popup"),CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{popup:function(a,f,c,e){f=f||"80%";c=c||"70%";typeof f=="string"&&(f.length>1&&f.substr(f.length-1,1)=="%")&&(f=parseInt(window.screen.width*parseInt(f,10)/100,10));typeof c=="string"&&(c.length>1&&c.substr(c.length-1,1)=="%")&&(c=parseInt(window.screen.height*parseInt(c,10)/100,10));f<640&&(f=640);c<420&&(c=420);var b=parseInt((window.screen.height-c)/2,10),i=parseInt((window.screen.width-f)/2,10),e=(e||"location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes")+
|
||||
",width="+f+",height="+c+",top="+b+",left="+i,j=window.open("",null,e,true);if(!j)return false;try{if(navigator.userAgent.toLowerCase().indexOf(" chrome/")==-1){j.moveTo(i,b);j.resizeTo(f,c)}j.focus();j.location.href=a}catch(d){window.open(a,null,e,true)}return true}}),function(){function a(a,b){var c=[];if(b)for(var d in b)c.push(d+"="+encodeURIComponent(b[d]));else return a;return a+(a.indexOf("?")!=-1?"&":"?")+c.join("&")}function f(a){a=a+"";return a.charAt(0).toUpperCase()+a.substr(1)}function c(){var b=
|
||||
this.getDialog(),c=b.getParentEditor();c._.filebrowserSe=this;var d=c.config["filebrowser"+f(b.getName())+"WindowWidth"]||c.config.filebrowserWindowWidth||"80%",b=c.config["filebrowser"+f(b.getName())+"WindowHeight"]||c.config.filebrowserWindowHeight||"70%",e=this.filebrowser.params||{};e.CKEditor=c.name;e.CKEditorFuncNum=c._.filebrowserFn;if(!e.langCode)e.langCode=c.langCode;e=a(this.filebrowser.url,e);c.popup(e,d,b,c.config.filebrowserWindowFeatures||c.config.fileBrowserWindowFeatures)}function e(){var a=
|
||||
this.getDialog();a.getParentEditor()._.filebrowserSe=this;return!a.getContentElement(this["for"][0],this["for"][1]).getInputElement().$.value||!a.getContentElement(this["for"][0],this["for"][1]).getAction()?false:true}function b(b,c,d){var e=d.params||{};e.CKEditor=b.name;e.CKEditorFuncNum=b._.filebrowserFn;if(!e.langCode)e.langCode=b.langCode;c.action=a(d.url,e);c.filebrowser=d}function i(a,d,j,m){if(m&&m.length)for(var q,p=m.length;p--;){q=m[p];(q.type=="hbox"||q.type=="vbox"||q.type=="fieldset")&&
|
||||
i(a,d,j,q.children);if(q.filebrowser){if(typeof q.filebrowser=="string")q.filebrowser={action:q.type=="fileButton"?"QuickUpload":"Browse",target:q.filebrowser};if(q.filebrowser.action=="Browse"){var o=q.filebrowser.url;if(o===void 0){o=a.config["filebrowser"+f(d)+"BrowseUrl"];if(o===void 0)o=a.config.filebrowserBrowseUrl}if(o){q.onClick=c;q.filebrowser.url=o;q.hidden=false}}else if(q.filebrowser.action=="QuickUpload"&&q["for"]){o=q.filebrowser.url;if(o===void 0){o=a.config["filebrowser"+f(d)+"UploadUrl"];
|
||||
if(o===void 0)o=a.config.filebrowserUploadUrl}if(o){var n=q.onClick;q.onClick=function(a){var b=a.sender;return n&&n.call(b,a)===false?false:e.call(b,a)};q.filebrowser.url=o;q.hidden=false;b(a,j.getContents(q["for"][0]).get(q["for"][1]),q.filebrowser)}}}}}function j(a,b,c){if(c.indexOf(";")!==-1){for(var c=c.split(";"),d=0;d<c.length;d++)if(j(a,b,c[d]))return true;return false}return(a=a.getContents(b).get(c).filebrowser)&&a.url}function d(a,b){var c=this._.filebrowserSe.getDialog(),d=this._.filebrowserSe["for"],
|
||||
e=this._.filebrowserSe.filebrowser.onSelect;d&&c.getContentElement(d[0],d[1]).reset();if(!(typeof b=="function"&&b.call(this._.filebrowserSe)===false)&&!(e&&e.call(this._.filebrowserSe,a,b)===false)){typeof b=="string"&&b&&alert(b);if(a){d=this._.filebrowserSe;c=d.getDialog();if(d=d.filebrowser.target||null){d=d.split(":");if(e=c.getContentElement(d[0],d[1])){e.setValue(a);c.selectPage(d[0])}}}}}CKEDITOR.plugins.add("filebrowser",{requires:"popup",init:function(a){a._.filebrowserFn=CKEDITOR.tools.addFunction(d,
|
||||
a);a.on("destroy",function(){CKEDITOR.tools.removeFunction(this._.filebrowserFn)})}});CKEDITOR.on("dialogDefinition",function(a){if(a.editor.plugins.filebrowser)for(var b=a.data.definition,c,d=0;d<b.contents.length;++d)if(c=b.contents[d]){i(a.editor,a.data.name,b,c.elements);if(c.hidden&&c.filebrowser)c.hidden=!j(b,c.id,c.filebrowser)}})}(),function(){function a(a){var b=a.config,i=a.fire("uiSpace",{space:"top",html:""}).html,j=function(){function d(a,b,e){g.setStyle(b,c(e));g.setStyle("position",
|
||||
a)}function h(a){var b=k.getDocumentPosition();switch(a){case "top":d("absolute","top",b.y-v-u);break;case "pin":d("fixed","top",r);break;case "bottom":d("absolute","top",b.y+(l.height||l.bottom-l.top)+u)}i=a}var i,k,n,l,s,v,t,B=b.floatSpaceDockedOffsetX||0,u=b.floatSpaceDockedOffsetY||0,y=b.floatSpacePinnedOffsetX||0,r=b.floatSpacePinnedOffsetY||0;return function(b){if(k=a.editable()){b&&b.name=="focus"&&g.show();g.removeStyle("left");g.removeStyle("right");n=g.getClientRect();l=k.getClientRect();
|
||||
s=f.getViewPaneSize();v=n.height;t="pageXOffset"in f.$?f.$.pageXOffset:CKEDITOR.document.$.documentElement.scrollLeft;if(i){v+u<=l.top?h("top"):v+u>s.height-l.bottom?h("pin"):h("bottom");var b=s.width/2,b=l.left>0&&l.right<s.width&&l.width>n.width?a.config.contentsLangDirection=="rtl"?"right":"left":b-l.left>l.right-b?"left":"right",d;if(n.width>s.width){b="left";d=0}else{d=b=="left"?l.left>0?l.left:0:l.right<s.width?s.width-l.right:0;if(d+n.width>s.width){b=b=="left"?"right":"left";d=0}}g.setStyle(b,
|
||||
c((i=="pin"?y:B)+d+(i=="pin"?0:b=="left"?t:-t)))}else{i="pin";h("pin");j(b)}}}}();if(i){var d=new CKEDITOR.template('<div id="cke_{name}" class="cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+CKEDITOR.env.cssClass+'" dir="{langDir}" title="'+(CKEDITOR.env.gecko?" ":"")+'" lang="{langCode}" role="application" style="{style}"'+(a.title?' aria-labelledby="cke_{name}_arialbl"':" ")+">"+(a.title?'<span id="cke_{name}_arialbl" class="cke_voice_label">{voiceLabel}</span>':
|
||||
" ")+'<div class="cke_inner"><div id="{topId}" class="cke_top" role="presentation">{content}</div></div></div>'),g=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(d.output({content:i,id:a.id,langDir:a.lang.dir,langCode:a.langCode,name:a.name,style:"display:none;z-index:"+(b.baseFloatZIndex-1),topId:a.ui.spaceId("top"),voiceLabel:a.title}))),h=CKEDITOR.tools.eventsBuffer(500,j),k=CKEDITOR.tools.eventsBuffer(100,j);g.unselectable();g.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",
|
||||
1)||a.preventDefault()});a.on("focus",function(b){j(b);a.on("change",h.input);f.on("scroll",k.input);f.on("resize",k.input)});a.on("blur",function(){g.hide();a.removeListener("change",h.input);f.removeListener("scroll",k.input);f.removeListener("resize",k.input)});a.on("destroy",function(){f.removeListener("scroll",k.input);f.removeListener("resize",k.input);g.clearCustomData();g.remove()});a.focusManager.hasFocus&&g.show();a.focusManager.add(g,1)}}var f=CKEDITOR.document.getWindow(),c=CKEDITOR.tools.cssLength;
|
||||
CKEDITOR.plugins.add("floatingspace",{init:function(c){c.on("loaded",function(){a(this)},null,null,20)}})}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var a=CKEDITOR.addTemplate("panel-list",'<ul role="presentation" class="cke_panel_list">{items}</ul>'),f=CKEDITOR.addTemplate("panel-list-item",'<li id="{id}" class="cke_panel_listItem" role=presentation><a id="{id}_option" _cke_focus=1 hidefocus=true title="{title}" href="javascript:void(\'{val}\')" {onclick}="CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role="option">{text}</a></li>'),
|
||||
c=CKEDITOR.addTemplate("panel-list-group",'<h1 id="{id}" class="cke_panel_grouptitle" role="presentation" >{label}</h1>'),e=/\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(a,c){return this.addBlock(a,new CKEDITOR.ui.listBlock(this.getHolderElement(),c))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(a,c){var c=c||{},e=c.attributes||(c.attributes={});(this.multiSelect=!!c.multiSelect)&&(e["aria-multiselectable"]=true);!e.role&&(e.role="listbox");
|
||||
this.base.apply(this,arguments);this.element.setAttribute("role",e.role);e=this.keys;e[40]="next";e[9]="next";e[38]="prev";e[CKEDITOR.SHIFT+9]="prev";e[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(e[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var b=a.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(b);delete this._.started}},getClick:function(){if(!this._.click)this._.click=
|
||||
CKEDITOR.tools.addFunction(function(a){var c=this.toggle(a);if(this.onClick)this.onClick(a,c)},this);return this._.click}},proto:{add:function(a,c,j){var d=CKEDITOR.tools.getNextId();if(!this._.started){this._.started=1;this._.size=this._.size||0}this._.items[a]=d;var g;g=CKEDITOR.tools.htmlEncodeAttr(a).replace(e,"\\'");a={id:d,val:g,onclick:CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(j||a),text:c||a};this._.pendingList.push(f.output(a))},
|
||||
startGroup:function(a){this._.close();var e=CKEDITOR.tools.getNextId();this._.groups[a]=e;this._.pendingHtml.push(c.output({id:e,label:a}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(a){var c=this.isMarked(a);c?this.unmark(a):this.mark(a);return!c},hideGroup:function(a){var c=(a=this.element.getDocument().getById(this._.groups[a]))&&a.getNext();if(a){a.setStyle("display","none");c&&c.getName()=="ul"&&
|
||||
c.setStyle("display","none")}},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display","none")},showAll:function(){var a=this._.items,c=this._.groups,e=this.element.getDocument(),d;for(d in a)e.getById(a[d]).setStyle("display","");for(var f in c){a=e.getById(c[f]);d=a.getNext();a.setStyle("display","");d&&d.getName()=="ul"&&d.setStyle("display","")}},mark:function(a){this.multiSelect||this.unmarkAll();var a=this._.items[a],c=this.element.getDocument().getById(a);
|
||||
c.addClass("cke_selected");this.element.getDocument().getById(a+"_option").setAttribute("aria-selected",true);this.onMark&&this.onMark(c)},unmark:function(a){var c=this.element.getDocument(),a=this._.items[a],e=c.getById(a);e.removeClass("cke_selected");c.getById(a+"_option").removeAttribute("aria-selected");this.onUnmark&&this.onUnmark(e)},unmarkAll:function(){var a=this._.items,c=this.element.getDocument(),e;for(e in a){var d=a[e];c.getById(d).removeClass("cke_selected");c.getById(d+"_option").removeAttribute("aria-selected")}this.onUnmark&&
|
||||
this.onUnmark()},isMarked:function(a){return this.element.getDocument().getById(this._.items[a]).hasClass("cke_selected")},focus:function(a){this._.focusIndex=-1;var c=this.element.getElementsByTag("a"),e,d=-1;if(a)for(e=this.element.getDocument().getById(this._.items[a]).getFirst();a=c.getItem(++d);){if(a.equals(e)){this._.focusIndex=d;break}}else this.element.focus();e&&setTimeout(function(){e.focus()},0)}}})}}),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_RICHCOMBO,
|
||||
CKEDITOR.ui.richCombo.handler)}}),function(){var a='<span id="{id}" class="cke_combo cke_combo__{name} {cls}" role="presentation"><span id="{id}_label" class="cke_combo_label">{label}</span><a class="cke_combo_button" title="{title}" tabindex="-1"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href=\"javascript:void('{titleJs}')\"")+' hidefocus="true" role="button" aria-labelledby="{id}_label" aria-haspopup="true"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(a=a+' onkeypress="return false;"');CKEDITOR.env.gecko&&
|
||||
(a=a+' onblur="this.style.cssText = this.style.cssText;"');var a=a+(' onkeydown="return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus="return CKEDITOR.tools.callFunction({focusFn},event);" '+(CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick")+'="CKEDITOR.tools.callFunction({clickFn},this);return false;"><span id="{id}_text" class="cke_combo_text cke_combo_inlinelabel">{label}</span><span class="cke_combo_open"><span class="cke_combo_arrow">'+(CKEDITOR.env.hc?"▼":
|
||||
CKEDITOR.env.air?" ":"")+"</span></span></a></span>"),f=CKEDITOR.addTemplate("combo",a);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(a){CKEDITOR.tools.extend(this,a,{canGroup:false,title:a.label,modes:{wysiwyg:1},editorFocus:1});a=this.panel||{};delete this.panel;this.id=CKEDITOR.tools.getNextNumber();this.document=a.parent&&a.parent.getDocument()||CKEDITOR.document;a.className="cke_combopanel";a.block={multiSelect:a.multiSelect,attributes:a.attributes};
|
||||
a.toolbarRelated=true;this._={panelDefinition:a,items:{}}},proto:{renderHtml:function(a){var e=[];this.render(a,e);return e.join("")},render:function(a,e){function b(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var b=this.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;if(a.readOnly&&!this.readOnly)b=CKEDITOR.TRISTATE_DISABLED;this.setState(b);this.setValue("");b!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var i=CKEDITOR.env,j="cke_"+this.id,d=CKEDITOR.tools.addFunction(function(b){if(q){a.unlockSelection(1);
|
||||
q=0}h.execute(b)},this),g=this,h={id:j,combo:this,focus:function(){CKEDITOR.document.getById(j).getChild(1).focus()},execute:function(b){var d=g._;if(d.state!=CKEDITOR.TRISTATE_DISABLED){g.createPanel(a);if(d.on)d.panel.hide();else{g.commit();var e=g.getValue();e?d.list.mark(e):d.list.unmarkAll();d.panel.showBlock(g.id,new CKEDITOR.dom.element(b),4)}}},clickFn:d};a.on("activeFilterChange",b,this);a.on("mode",b,this);a.on("selectionChange",b,this);!this.readOnly&&a.on("readOnly",b,this);var k=CKEDITOR.tools.addFunction(function(b,
|
||||
e){var b=new CKEDITOR.dom.event(b),f=b.getKeystroke();if(f==40)a.once("panelShow",function(a){a.data._.panel._.currentBlock.onKeyDown(40)});switch(f){case 13:case 32:case 40:CKEDITOR.tools.callFunction(d,e);break;default:h.onkey(h,f)}b.preventDefault()}),m=CKEDITOR.tools.addFunction(function(){h.onfocus&&h.onfocus()}),q=0;h.keyDownFn=k;i={id:j,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:i.gecko&&!i.hc?"":(this.title||"").replace("'",""),keydownFn:k,
|
||||
focusFn:m,clickFn:d};f.output(i,e);if(this.onRender)this.onRender();return h},createPanel:function(a){if(!this._.panel){var e=this._.panelDefinition,b=this._.panelDefinition.block,f=e.parent||CKEDITOR.document.getBody(),j="cke_combopanel__"+this.name,d=new CKEDITOR.ui.floatPanel(a,f,e),g=d.addListBlock(this.id,b),h=this;d.onShow=function(){this.element.addClass(j);h.setState(CKEDITOR.TRISTATE_ON);h._.on=1;h.editorFocus&&!a.focusManager.hasFocus&&a.focus();if(h.onOpen)h.onOpen();a.once("panelShow",
|
||||
function(){g.focus(!g.multiSelect&&h.getValue())})};d.onHide=function(b){this.element.removeClass(j);h.setState(h.modes&&h.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);h._.on=0;if(!b&&h.onClose)h.onClose()};d.onEscape=function(){d.hide(1)};g.onClick=function(a,b){h.onClick&&h.onClick.call(h,a,b);d.hide()};this._.panel=d;this._.list=g;d.getBlock(this.id).onHide=function(){h._.on=0;h.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a,e){this._.value=a;var b=
|
||||
this.document.getById("cke_"+this.id+"_text");if(b){if(!a&&!e){e=this.label;b.addClass("cke_combo_inlinelabel")}else b.removeClass("cke_combo_inlinelabel");b.setText(typeof e!="undefined"?e:a)}},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(a){this._.list.mark(a)},hideItem:function(a){this._.list.hideItem(a)},hideGroup:function(a){this._.list.hideGroup(a)},showAll:function(){this._.list.showAll()},add:function(a,e,b){this._.items[a]=b||a;
|
||||
this._.list.add(a,e,b)},startGroup:function(a){this._.list.startGroup(a)},commit:function(){if(!this._.committed){this._.list.commit();this._.committed=1;CKEDITOR.ui.fire("ready",this)}this._.committed=1},setState:function(a){if(this._.state!=a){var e=this.document.getById("cke_"+this.id);e.setState(a,"cke_combo");a==CKEDITOR.TRISTATE_DISABLED?e.setAttribute("aria-disabled",true):e.removeAttribute("aria-disabled");this._.state=a}},getState:function(){return this._.state},enable:function(){this._.state==
|
||||
CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){if(this._.state!=CKEDITOR.TRISTATE_DISABLED){this._.lastState=this._.state;this.setState(CKEDITOR.TRISTATE_DISABLED)}}},statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}}});CKEDITOR.ui.prototype.addRichCombo=function(a,e){this.add(a,CKEDITOR.UI_RICHCOMBO,e)}}(),CKEDITOR.plugins.add("format",{requires:"richcombo",init:function(a){if(!a.blockless){for(var f=a.config,c=a.lang.format,e=f.format_tags.split(";"),
|
||||
b={},i=0,j=[],d=0;d<e.length;d++){var g=e[d],h=new CKEDITOR.style(f["format_"+g]);if(!a.filter.customConfig||a.filter.check(h)){i++;b[g]=h;b[g]._.enterMode=a.config.enterMode;j.push(h)}}i!==0&&a.ui.addRichCombo("Format",{label:c.label,title:c.panelTitle,toolbar:"styles,20",allowedContent:j,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(f.contentsCss),multiSelect:false,attributes:{"aria-label":c.panelTitle}},init:function(){this.startGroup(c.panelTitle);for(var a in b){var d=c["tag_"+a];this.add(a,
|
||||
b[a].buildPreview(d),d)}},onClick:function(c){a.focus();a.fire("saveSnapshot");var c=b[c],d=a.elementPath();a[c.checkActive(d,a)?"removeStyle":"applyStyle"](c);setTimeout(function(){a.fire("saveSnapshot")},0)},onRender:function(){a.on("selectionChange",function(c){var d=this.getValue(),c=c.data.path;this.refresh();for(var e in b)if(b[e].checkActive(c,a)){e!=d&&this.setValue(e,a.lang.format["tag_"+e]);return}this.setValue("")},this)},onOpen:function(){this.showAll();for(var c in b)a.activeFilter.check(b[c])||
|
||||
this.hideItem(c)},refresh:function(){var c=a.elementPath();if(c){if(c.isContextFor("p"))for(var d in b)if(a.activeFilter.check(b[d]))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}}})}}}),CKEDITOR.config.format_tags="p;h1;h2;h3;h4;h5;h6;pre;address;div",CKEDITOR.config.format_p={element:"p"},CKEDITOR.config.format_div={element:"div"},CKEDITOR.config.format_pre={element:"pre"},CKEDITOR.config.format_address={element:"address"},CKEDITOR.config.format_h1={element:"h1"},CKEDITOR.config.format_h2={element:"h2"},
|
||||
CKEDITOR.config.format_h3={element:"h3"},CKEDITOR.config.format_h4={element:"h4"},CKEDITOR.config.format_h5={element:"h5"},CKEDITOR.config.format_h6={element:"h6"},CKEDITOR.plugins.add("htmlwriter",{init:function(a){var f=new CKEDITOR.htmlWriter;f.forceSimpleAmpersand=a.config.forceSimpleAmpersand;f.indentationChars=a.config.dataIndentationChars||"\t";a.dataProcessor.writer=f}}),CKEDITOR.htmlWriter=CKEDITOR.tools.createClass({base:CKEDITOR.htmlParser.basicWriter,$:function(){this.base();this.indentationChars=
|
||||
"\t";this.selfClosingEnd=" />";this.lineBreakChars="\n";this.sortAttributes=1;this._.indent=0;this._.indentation="";this._.inPre=0;this._.rules={};var a=CKEDITOR.dtd,f;for(f in CKEDITOR.tools.extend({},a.$nonBodyContent,a.$block,a.$listItem,a.$tableContent))this.setRules(f,{indent:!a[f]["#"],breakBeforeOpen:1,breakBeforeClose:!a[f]["#"],breakAfterClose:1,needsSpace:f in a.$block&&!(f in{li:1,dt:1,dd:1})});this.setRules("br",{breakAfterOpen:1});this.setRules("title",{indent:0,breakAfterOpen:0});this.setRules("style",
|
||||
{indent:0,breakBeforeClose:1});this.setRules("pre",{breakAfterOpen:1,indent:0})},proto:{openTag:function(a){var f=this._.rules[a];this._.afterCloser&&(f&&f.needsSpace&&this._.needsSpace)&&this._.output.push("\n");if(this._.indent)this.indentation();else if(f&&f.breakBeforeOpen){this.lineBreak();this.indentation()}this._.output.push("<",a);this._.afterCloser=0},openTagClose:function(a,f){var c=this._.rules[a];if(f){this._.output.push(this.selfClosingEnd);if(c&&c.breakAfterClose)this._.needsSpace=c.needsSpace}else{this._.output.push(">");
|
||||
if(c&&c.indent)this._.indentation=this._.indentation+this.indentationChars}c&&c.breakAfterOpen&&this.lineBreak();a=="pre"&&(this._.inPre=1)},attribute:function(a,f){if(typeof f=="string"){this.forceSimpleAmpersand&&(f=f.replace(/&/g,"&"));f=CKEDITOR.tools.htmlEncodeAttr(f)}this._.output.push(" ",a,'="',f,'"')},closeTag:function(a){var f=this._.rules[a];if(f&&f.indent)this._.indentation=this._.indentation.substr(this.indentationChars.length);if(this._.indent)this.indentation();else if(f&&f.breakBeforeClose){this.lineBreak();
|
||||
this.indentation()}this._.output.push("</",a,">");a=="pre"&&(this._.inPre=0);if(f&&f.breakAfterClose){this.lineBreak();this._.needsSpace=f.needsSpace}this._.afterCloser=1},text:function(a){if(this._.indent){this.indentation();!this._.inPre&&(a=CKEDITOR.tools.ltrim(a))}this._.output.push(a)},comment:function(a){this._.indent&&this.indentation();this._.output.push("<\!--",a,"--\>")},lineBreak:function(){!this._.inPre&&this._.output.length>0&&this._.output.push(this.lineBreakChars);this._.indent=1},
|
||||
indentation:function(){!this._.inPre&&this._.indentation&&this._.output.push(this._.indentation);this._.indent=0},reset:function(){this._.output=[];this._.indent=0;this._.indentation="";this._.afterCloser=0;this._.inPre=0},setRules:function(a,f){var c=this._.rules[a];c?CKEDITOR.tools.extend(c,f,true):this._.rules[a]=f}}}),function(){var a={canUndo:false,exec:function(a){var c=a.document.createElement("hr");a.insertElement(c)},allowedContent:"hr",requiredContent:"hr"};CKEDITOR.plugins.add("horizontalrule",
|
||||
{init:function(f){if(!f.blockless){f.addCommand("horizontalrule",a);f.ui.addButton&&f.ui.addButton("HorizontalRule",{label:f.lang.horizontalrule.toolbar,command:"horizontalrule",toolbar:"insert,40"})}}})}(),function(){function a(a){var c=this.editor,e=a.document,d=e.body,g=e.getElementById("cke_actscrpt");g&&g.parentNode.removeChild(g);(g=e.getElementById("cke_shimscrpt"))&&g.parentNode.removeChild(g);(g=e.getElementById("cke_basetagscrpt"))&&g.parentNode.removeChild(g);d.contentEditable=true;if(CKEDITOR.env.ie){d.hideFocus=
|
||||
true;d.disabled=true;d.removeAttribute("disabled")}delete this._.isLoadingData;this.$=d;e=new CKEDITOR.dom.document(e);this.setup();this.fixInitialSelection();if(CKEDITOR.env.ie){e.getDocumentElement().addClass(e.$.compatMode);c.config.enterMode!=CKEDITOR.ENTER_P&&this.attachListener(e,"selectionchange",function(){var a=e.getBody(),b=c.getSelection(),d=b&&b.getRanges()[0];d&&(a.getHtml().match(/^<p>(?: |<br>)<\/p>$/i)&&d.startContainer.equals(a))&&setTimeout(function(){d=c.getSelection().getRanges()[0];
|
||||
if(!d.startContainer.equals("body")){a.getFirst().remove(1);d.moveToElementEditEnd(a);d.select()}},0)})}if(CKEDITOR.env.webkit||CKEDITOR.env.ie&&CKEDITOR.env.version>10)e.getDocumentElement().on("mousedown",function(a){a.data.getTarget().is("html")&&setTimeout(function(){c.editable().focus()})});f(c);try{c.document.$.execCommand("2D-position",false,true)}catch(h){}(CKEDITOR.env.gecko||CKEDITOR.env.ie&&c.document.$.compatMode=="CSS1Compat")&&this.attachListener(this,"keydown",function(a){var b=a.data.getKeystroke();
|
||||
if(b==33||b==34)if(CKEDITOR.env.ie)setTimeout(function(){c.getSelection().scrollIntoView()},0);else if(c.window.$.innerHeight>this.$.offsetHeight){var d=c.createRange();d[b==33?"moveToElementEditStart":"moveToElementEditEnd"](this);d.select();a.data.preventDefault()}});CKEDITOR.env.ie&&this.attachListener(e,"blur",function(){try{e.$.selection.empty()}catch(a){}});CKEDITOR.env.iOS&&this.attachListener(e,"touchend",function(){a.focus()});d=c.document.getElementsByTag("title").getItem(0);d.data("cke-title",
|
||||
d.getText());if(CKEDITOR.env.ie)c.document.$.title=this._.docTitle;CKEDITOR.tools.setTimeout(function(){if(this.status=="unloaded")this.status="ready";c.fire("contentDom");if(this._.isPendingFocus){c.focus();this._.isPendingFocus=false}setTimeout(function(){c.fire("dataReady")},0);CKEDITOR.env.ie&&setTimeout(function(){if(c.document){var a=c.document.$.body;a.runtimeStyle.marginBottom="0px";a.runtimeStyle.marginBottom=""}},1E3)},0,this)}function f(a){function c(){var d;a.editable().attachListener(a,
|
||||
"selectionChange",function(){var c=a.getSelection().getSelectedElement();if(c){if(d){d.detachEvent("onresizestart",e);d=null}c.$.attachEvent("onresizestart",e);d=c.$}})}function e(a){a.returnValue=false}if(CKEDITOR.env.gecko)try{var d=a.document.$;d.execCommand("enableObjectResizing",false,!a.config.disableObjectResizing);d.execCommand("enableInlineTableEditing",false,!a.config.disableNativeTableHandles)}catch(f){}else CKEDITOR.env.ie&&(CKEDITOR.env.version<11&&a.config.disableObjectResizing)&&c(a)}
|
||||
function c(){var a=[];if(CKEDITOR.document.$.documentMode>=8){a.push("html.CSS1Compat [contenteditable=false]{min-height:0 !important}");var c=[],e;for(e in CKEDITOR.dtd.$removeEmpty)c.push("html.CSS1Compat "+e+"[contenteditable=false]");a.push(c.join(",")+"{display:inline-block}")}else if(CKEDITOR.env.gecko){a.push("html{height:100% !important}");a.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")}a.push("html{cursor:text;*cursor:auto}");a.push("img,input,textarea{cursor:default}");
|
||||
return a.join("\n")}CKEDITOR.plugins.add("wysiwygarea",{init:function(a){a.config.fullPage&&a.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",requiredContent:"body"});a.addMode("wysiwyg",function(c){function f(d){d&&d.removeListener();a.editable(new e(a,g.$.contentWindow.document.body));a.setData(a.getData(1),c)}var d="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",d=CKEDITOR.env.air?"javascript:void(0)":
|
||||
CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent(d)+"}())":"",g=CKEDITOR.dom.element.createFromHtml('<iframe src="'+d+'" frameBorder="0"></iframe>');g.setStyles({width:"100%",height:"100%"});g.addClass("cke_wysiwyg_frame cke_reset");var h=a.ui.space("contents");h.append(g);if(d=CKEDITOR.env.ie||CKEDITOR.env.gecko)g.on("load",f);var k=a.title,m=a.fire("ariaEditorHelpLabel",{}).label;if(k){CKEDITOR.env.ie&&m&&(k=k+(", "+m));g.setAttribute("title",k)}if(m){var k=CKEDITOR.tools.getNextId(),
|
||||
q=CKEDITOR.dom.element.createFromHtml('<span id="'+k+'" class="cke_voice_label">'+m+"</span>");h.append(q,1);g.setAttribute("aria-describedby",k)}a.on("beforeModeUnload",function(a){a.removeListener();q&&q.remove()});g.setAttributes({tabIndex:a.tabIndex,allowTransparency:"true"});!d&&f();if(CKEDITOR.env.webkit){d=function(){h.setStyle("width","100%");g.hide();g.setSize("width",h.getSize("width"));h.removeStyle("width");g.show()};g.setCustomData("onResize",d);CKEDITOR.document.getWindow().on("resize",
|
||||
d)}a.fire("ariaWidget",g)})}});CKEDITOR.editor.prototype.addContentsCss=function(a){var c=this.config,e=c.contentsCss;if(!CKEDITOR.tools.isArray(e))c.contentsCss=e?[e]:[];c.contentsCss.push(a)};var e=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(b){CKEDITOR.tools.setTimeout(a,0,this,b)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(a,e){var f=
|
||||
this.editor;if(e){this.setHtml(a);this.fixInitialSelection();f.fire("dataReady")}else{this._.isLoadingData=true;f._.dataStore={id:1};var d=f.config,g=d.fullPage,h=d.docType,k=CKEDITOR.tools.buildStyleHtml(c()).replace(/<style>/,'<style data-cke-temp="1">');g||(k=k+CKEDITOR.tools.buildStyleHtml(f.config.contentsCss));var m=d.baseHref?'<base href="'+d.baseHref+'" data-cke-temp="1" />':"";g&&(a=a.replace(/<!DOCTYPE[^>]*>/i,function(a){f.docType=h=a;return""}).replace(/<\?xml\s[^\?]*\?>/i,function(a){f.xmlDeclaration=
|
||||
a;return""}));a=f.dataProcessor.toHtml(a);if(g){/<body[\s|>]/.test(a)||(a="<body>"+a);/<html[\s|>]/.test(a)||(a="<html>"+a+"</html>");/<head[\s|>]/.test(a)?/<title[\s|>]/.test(a)||(a=a.replace(/<head[^>]*>/,"$&<title></title>")):a=a.replace(/<html[^>]*>/,"$&<head><title></title></head>");m&&(a=a.replace(/<head[^>]*?>/,"$&"+m));a=a.replace(/<\/head\s*>/,k+"$&");a=h+a}else a=d.docType+'<html dir="'+d.contentsLangDirection+'" lang="'+(d.contentsLanguage||f.langCode)+'"><head><title>'+this._.docTitle+
|
||||
"</title>"+m+k+"</head><body"+(d.bodyId?' id="'+d.bodyId+'"':"")+(d.bodyClass?' class="'+d.bodyClass+'"':"")+">"+a+"</body></html>";if(CKEDITOR.env.gecko){a=a.replace(/<body/,'<body contenteditable="true" ');CKEDITOR.env.version<2E4&&(a=a.replace(/<body[^>]*>/,"$&<\!-- cke-content-start --\>"))}d='<script id="cke_actscrpt" type="text/javascript"'+(CKEDITOR.env.ie?' defer="defer" ':"")+">var wasLoaded=0;function onload(){if(!wasLoaded)window.parent.CKEDITOR.tools.callFunction("+this._.frameLoadedHandler+
|
||||
",window);wasLoaded=1;}"+(CKEDITOR.env.ie?"onload();":'document.addEventListener("DOMContentLoaded", onload, false );')+"<\/script>";CKEDITOR.env.ie&&CKEDITOR.env.version<9&&(d=d+'<script id="cke_shimscrpt">window.parent.CKEDITOR.tools.enableHtml5Elements(document)<\/script>');m&&(CKEDITOR.env.ie&&CKEDITOR.env.version<10)&&(d=d+'<script id="cke_basetagscrpt">var baseTag = document.querySelector( "base" );baseTag.href = baseTag.href;<\/script>');a=a.replace(/(?=\s*<\/(:?head)>)/,d);this.clearCustomData();
|
||||
this.clearListeners();f.fire("contentDomUnload");var q=this.getDocument();try{q.write(a)}catch(p){setTimeout(function(){q.write(a)},0)}}},getData:function(a){if(a)return this.getHtml();var a=this.editor,c=a.config,e=c.fullPage,d=e&&a.docType,f=e&&a.xmlDeclaration,h=this.getDocument(),e=e?h.getDocumentElement().getOuterHtml():h.getBody().getHtml();CKEDITOR.env.gecko&&c.enterMode!=CKEDITOR.ENTER_BR&&(e=e.replace(/<br>(?=\s*(:?$|<\/body>))/,""));e=a.dataProcessor.toDataFormat(e);f&&(e=f+"\n"+e);d&&(e=
|
||||
d+"\n"+e);return e},focus:function(){this._.isLoadingData?this._.isPendingFocus=true:e.baseProto.focus.call(this)},detach:function(){var a=this.editor,c=a.document,a=a.window.getFrame();e.baseProto.detach.call(this);this.clearCustomData();c.getDocumentElement().clearCustomData();a.clearCustomData();CKEDITOR.tools.removeFunction(this._.frameLoadedHandler);(c=a.removeCustomData("onResize"))&&c.removeListener();a.remove()}}})}(),CKEDITOR.config.disableObjectResizing=!1,CKEDITOR.config.disableNativeTableHandles=
|
||||
!0,CKEDITOR.config.disableNativeSpellChecker=!0,CKEDITOR.config.contentsCss=CKEDITOR.getUrl("contents.css"),function(){function a(a,b){var i,j;b.on("refresh",function(a){var b=[f],e;for(e in a.data.states)b.push(a.data.states[e]);this.setState(CKEDITOR.tools.search(b,c)?c:f)},b,null,100);b.on("exec",function(b){i=a.getSelection();j=i.createBookmarks(1);if(!b.data)b.data={};b.data.done=false},b,null,0);b.on("exec",function(){a.forceNextSelectionCheck();i.selectBookmarks(j)},b,null,100)}var f=CKEDITOR.TRISTATE_DISABLED,
|
||||
c=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(c){var b=CKEDITOR.plugins.indent.genericDefinition;a(c,c.addCommand("indent",new b(true)));a(c,c.addCommand("outdent",new b));if(c.ui.addButton){c.ui.addButton("Indent",{label:c.lang.indent.indent,command:"indent",directional:true,toolbar:"indent,20"});c.ui.addButton("Outdent",{label:c.lang.indent.outdent,command:"outdent",directional:true,toolbar:"indent,10"})}c.on("dirChanged",function(a){var b=c.createRange(),d=a.data.node;b.setStartBefore(d);
|
||||
b.setEndAfter(d);for(var f=new CKEDITOR.dom.walker(b),h;h=f.next();)if(h.type==CKEDITOR.NODE_ELEMENT)if(!h.equals(d)&&h.getDirection()){b.setStartAfter(h);f=new CKEDITOR.dom.walker(b)}else{var k=c.config.indentClasses;if(k)for(var m=a.data.dir=="ltr"?["_rtl",""]:["","_rtl"],q=0;q<k.length;q++)if(h.hasClass(k[q]+m[0])){h.removeClass(k[q]+m[0]);h.addClass(k[q]+m[1])}k=h.getStyle("margin-right");m=h.getStyle("margin-left");k?h.setStyle("margin-left",k):h.removeStyle("margin-left");m?h.setStyle("margin-right",
|
||||
m):h.removeStyle("margin-right")}})}});CKEDITOR.plugins.indent={genericDefinition:function(a){this.isIndent=!!a;this.startDisabled=!this.isIndent},specificDefinition:function(a,b,c){this.name=b;this.editor=a;this.jobs={};this.enterBr=a.config.enterMode==CKEDITOR.ENTER_BR;this.isIndent=!!c;this.relatedGlobal=c?"indent":"outdent";this.indentKey=c?9:CKEDITOR.SHIFT+9;this.database={}},registerCommands:function(a,b){a.on("pluginsLoaded",function(){for(var a in b)(function(a,b){var c=a.getCommand(b.relatedGlobal),
|
||||
e;for(e in b.jobs){c.on("exec",function(c){if(!c.data.done){a.fire("lockSnapshot");if(b.execJob(a,e))c.data.done=true;a.fire("unlockSnapshot");CKEDITOR.dom.element.clearAllMarkers(b.database)}},this,null,e);c.on("refresh",function(c){if(!c.data.states)c.data.states={};c.data.states[b.name+"@"+e]=b.refreshJob(a,e,c.data.path)},this,null,e)}a.addFeature(b)})(this,b[a])})}};CKEDITOR.plugins.indent.genericDefinition.prototype={context:"p",exec:function(){}};CKEDITOR.plugins.indent.specificDefinition.prototype=
|
||||
{execJob:function(a,b){var c=this.jobs[b];if(c.state!=f)return c.exec.call(this,a)},refreshJob:function(a,b,c){b=this.jobs[b];b.state=a.activeFilter.checkFeature(this)?b.refresh.call(this,a,c):f;return b.state},getContext:function(a){return a.contains(this.context)}}}(),function(){function a(a){function b(f){for(var g=p.startContainer,o=p.endContainer;g&&!g.getParent().equals(f);)g=g.getParent();for(;o&&!o.getParent().equals(f);)o=o.getParent();if(!g||!o)return false;for(var n=g,g=[],q=false;!q;){n.equals(o)&&
|
||||
(q=true);g.push(n);n=n.getNext()}if(g.length<1)return false;n=f.getParents(true);for(o=0;o<n.length;o++)if(n[o].getName&&j[n[o].getName()]){f=n[o];break}for(var n=e.isIndent?1:-1,o=g[0],g=g[g.length-1],q=CKEDITOR.plugins.list.listToArray(f,i),u=q[g.getCustomData("listarray_index")].indent,o=o.getCustomData("listarray_index");o<=g.getCustomData("listarray_index");o++){q[o].indent=q[o].indent+n;if(n>0){var y=q[o].parent;q[o].parent=new CKEDITOR.dom.element(y.getName(),y.getDocument())}}for(o=g.getCustomData("listarray_index")+
|
||||
1;o<q.length&&q[o].indent>u;o++)q[o].indent=q[o].indent+n;g=CKEDITOR.plugins.list.arrayToList(q,i,null,a.config.enterMode,f.getDirection());if(!e.isIndent){var r;if((r=f.getParent())&&r.is("li"))for(var n=g.listNode.getChildren(),x=[],w,o=n.count()-1;o>=0;o--)(w=n.getItem(o))&&(w.is&&w.is("li"))&&x.push(w)}g&&g.listNode.replace(f);if(x&&x.length)for(o=0;o<x.length;o++){for(w=f=x[o];(w=w.getNext())&&w.is&&w.getName()in j;){CKEDITOR.env.needsNbspFiller&&!f.getFirst(c)&&f.append(p.document.createText(" "));
|
||||
f.append(w)}f.insertAfter(r)}g&&a.fire("contentDomInvalidated");return true}for(var e=this,i=this.database,j=this.context,q=a.getSelection(),q=(q&&q.getRanges()).createIterator(),p;p=q.getNextRange();){for(var o=p.getCommonAncestor();o&&!(o.type==CKEDITOR.NODE_ELEMENT&&j[o.getName()]);)o=o.getParent();o||(o=p.startPath().contains(j))&&p.setEndAt(o,CKEDITOR.POSITION_BEFORE_END);if(!o){var n=p.getEnclosedNode();if(n&&n.type==CKEDITOR.NODE_ELEMENT&&n.getName()in j){p.setStartAt(n,CKEDITOR.POSITION_AFTER_START);
|
||||
p.setEndAt(n,CKEDITOR.POSITION_BEFORE_END);o=n}}if(o&&p.startContainer.type==CKEDITOR.NODE_ELEMENT&&p.startContainer.getName()in j){n=new CKEDITOR.dom.walker(p);n.evaluator=f;p.startContainer=n.next()}if(o&&p.endContainer.type==CKEDITOR.NODE_ELEMENT&&p.endContainer.getName()in j){n=new CKEDITOR.dom.walker(p);n.evaluator=f;p.endContainer=n.previous()}if(o)return b(o)}return 0}function f(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is("li")}function c(a){return e(a)&&b(a)}var e=CKEDITOR.dom.walker.whitespaces(true),
|
||||
b=CKEDITOR.dom.walker.bookmark(false,true),i=CKEDITOR.TRISTATE_DISABLED,j=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(b){function c(b){e.specificDefinition.apply(this,arguments);this.requiredContent=["ul","ol"];b.on("key",function(a){if(b.mode=="wysiwyg"&&a.data.keyCode==this.indentKey){var c=this.getContext(b.elementPath());if(c&&(!this.isIndent||!CKEDITOR.plugins.indentList.firstItemInPath(this.context,b.elementPath(),c))){b.execCommand(this.relatedGlobal);
|
||||
a.cancel()}}},this);this.jobs[this.isIndent?10:30]={refresh:this.isIndent?function(a,b){var c=this.getContext(b),d=CKEDITOR.plugins.indentList.firstItemInPath(this.context,b,c);return!c||!this.isIndent||d?i:j}:function(a,b){return!this.getContext(b)||this.isIndent?i:j},exec:CKEDITOR.tools.bind(a,this)}}var e=CKEDITOR.plugins.indent;e.registerCommands(b,{indentlist:new c(b,"indentlist",true),outdentlist:new c(b,"outdentlist")});CKEDITOR.tools.extend(c.prototype,e.specificDefinition.prototype,{context:{ol:1,
|
||||
ul:1}})}});CKEDITOR.plugins.indentList={};CKEDITOR.plugins.indentList.firstItemInPath=function(a,b,c){var e=b.contains(f);c||(c=b.contains(a));return c&&e&&e.equals(c.getFirst(f))}}(),function(){function a(a,b,c){function d(c){if((j=i[c?"getFirst":"getLast"]())&&(!j.is||!j.isBlockBoundary())&&(k=b.root[c?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(true)))&&(!k.is||!k.isBlockBoundary({br:1})))a.document.createElement("br")[c?"insertBefore":"insertAfter"](j)}for(var e=CKEDITOR.plugins.list.listToArray(b.root,
|
||||
c),f=[],h=0;h<b.contents.length;h++){var g=b.contents[h];if((g=g.getAscendant("li",true))&&!g.getCustomData("list_item_processed")){f.push(g);CKEDITOR.dom.element.setMarker(c,g,"list_item_processed",true)}}g=null;for(h=0;h<f.length;h++){g=f[h].getCustomData("listarray_index");e[g].indent=-1}for(h=g+1;h<e.length;h++)if(e[h].indent>e[h-1].indent+1){f=e[h-1].indent+1-e[h].indent;for(g=e[h].indent;e[h]&&e[h].indent>=g;){e[h].indent=e[h].indent+f;h++}h--}var i=CKEDITOR.plugins.list.arrayToList(e,c,null,
|
||||
a.config.enterMode,b.root.getAttribute("dir")).listNode,j,k;d(true);d();i.replace(b.root);a.fire("contentDomInvalidated")}function f(a,b){this.name=a;this.context=this.type=b;this.allowedContent=b+" li";this.requiredContent=b}function c(a,b,c,d){for(var e,f;e=a[d?"getLast":"getFirst"](p);){(f=e.getDirection(1))!==b.getDirection(1)&&e.setAttribute("dir",f);e.remove();c?e[d?"insertBefore":"insertAfter"](c):b.append(e,d)}}function e(a){function b(d){var e=a[d?"getPrevious":"getNext"](k);if(e&&e.type==
|
||||
CKEDITOR.NODE_ELEMENT&&e.is(a.getName())){c(a,e,null,!d);a.remove();a=e}}b();b(1)}function b(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.getName()in CKEDITOR.dtd.$block||a.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[a.getName()]["#"]}function i(a,b,d){a.fire("saveSnapshot");d.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var f=d.extractContents();b.trim(false,true);var h=b.createBookmark(),g=new CKEDITOR.dom.elementPath(b.startContainer),i=g.block,g=g.lastElement.getAscendant("li",1)||i,p=new CKEDITOR.dom.elementPath(d.startContainer),
|
||||
q=p.contains(CKEDITOR.dtd.$listItem),p=p.contains(CKEDITOR.dtd.$list);if(i)(i=i.getBogus())&&i.remove();else if(p)(i=p.getPrevious(k))&&m(i)&&i.remove();(i=f.getLast())&&(i.type==CKEDITOR.NODE_ELEMENT&&i.is("br"))&&i.remove();(i=b.startContainer.getChild(b.startOffset))?f.insertBefore(i):b.startContainer.append(f);if(q)if(f=j(q))if(g.contains(q)){c(f,q.getParent(),q);f.remove()}else g.append(f);for(;d.checkStartOfBlock()&&d.checkEndOfBlock();){p=d.startPath();f=p.block;if(!f)break;if(f.is("li")){g=
|
||||
f.getParent();f.equals(g.getLast(k))&&f.equals(g.getFirst(k))&&(f=g)}d.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);f.remove()}d=d.clone();f=a.editable();d.setEndAt(f,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d);d.evaluator=function(a){return k(a)&&!m(a)};(d=d.next())&&(d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in CKEDITOR.dtd.$list)&&e(d);b.moveToBookmark(h);b.select();a.fire("saveSnapshot")}function j(a){return(a=a.getLast(k))&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in d?a:
|
||||
null}var d={ol:1,ul:1},g=CKEDITOR.dom.walker.whitespaces(),h=CKEDITOR.dom.walker.bookmark(),k=function(a){return!(g(a)||h(a))},m=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(a,b,c,e,f){if(!d[a.getName()])return[];e||(e=0);c||(c=[]);for(var h=0,g=a.getChildCount();h<g;h++){var i=a.getChild(h);i.type==CKEDITOR.NODE_ELEMENT&&i.getName()in CKEDITOR.dtd.$list&&CKEDITOR.plugins.list.listToArray(i,b,c,e+1);if(i.$.nodeName.toLowerCase()=="li"){var j={parent:a,indent:e,element:i,
|
||||
contents:[]};if(f)j.grandparent=f;else{j.grandparent=a.getParent();if(j.grandparent&&j.grandparent.$.nodeName.toLowerCase()=="li")j.grandparent=j.grandparent.getParent()}b&&CKEDITOR.dom.element.setMarker(b,i,"listarray_index",c.length);c.push(j);for(var k=0,m=i.getChildCount(),p;k<m;k++){p=i.getChild(k);p.type==CKEDITOR.NODE_ELEMENT&&d[p.getName()]?CKEDITOR.plugins.list.listToArray(p,b,c,e+1,j.grandparent):j.contents.push(p)}}}return c},arrayToList:function(a,b,c,e,f){c||(c=0);if(!a||a.length<c+1)return null;
|
||||
for(var g,i=a[c].parent.getDocument(),j=new CKEDITOR.dom.documentFragment(i),m=null,p=c,q=Math.max(a[c].indent,0),w=null,z,A,F=e==CKEDITOR.ENTER_P?"p":"div";;){var C=a[p];g=C.grandparent;z=C.element.getDirection(1);if(C.indent==q){if(!m||a[p].parent.getName()!=m.getName()){m=a[p].parent.clone(false,1);f&&m.setAttribute("dir",f);j.append(m)}w=m.append(C.element.clone(0,1));z!=m.getDirection(1)&&w.setAttribute("dir",z);for(g=0;g<C.contents.length;g++)w.append(C.contents[g].clone(1,1));p++}else if(C.indent==
|
||||
Math.max(q,0)+1){C=a[p-1].element.getDirection(1);p=CKEDITOR.plugins.list.arrayToList(a,null,p,e,C!=z?z:null);!w.getChildCount()&&(CKEDITOR.env.needsNbspFiller&&i.$.documentMode<=7)&&w.append(i.createText(" "));w.append(p.listNode);p=p.nextIndex}else if(C.indent==-1&&!c&&g){if(d[g.getName()]){w=C.element.clone(false,true);z!=g.getDirection(1)&&w.setAttribute("dir",z)}else w=new CKEDITOR.dom.documentFragment(i);var m=g.getDirection(1)!=z,K=C.element,G=K.getAttribute("class"),D=K.getAttribute("style"),
|
||||
E=w.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(e!=CKEDITOR.ENTER_BR||m||D||G),J,N=C.contents.length,H;for(g=0;g<N;g++){J=C.contents[g];if(h(J)&&N>1)E?H=J.clone(1,1):w.append(J.clone(1,1));else if(J.type==CKEDITOR.NODE_ELEMENT&&J.isBlockBoundary()){m&&!J.getDirection()&&J.setAttribute("dir",z);A=J;var T=K.getAttribute("style");T&&A.setAttribute("style",T.replace(/([^;])$/,"$1;")+(A.getAttribute("style")||""));G&&J.addClass(G);A=null;if(H){w.append(H);H=null}w.append(J.clone(1,1))}else if(E){if(!A){A=
|
||||
i.createElement(F);w.append(A);m&&A.setAttribute("dir",z)}D&&A.setAttribute("style",D);G&&A.setAttribute("class",G);if(H){A.append(H);H=null}A.append(J.clone(1,1))}else w.append(J.clone(1,1))}if(H){(A||w).append(H);H=null}if(w.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&p!=a.length-1){if(CKEDITOR.env.needsBrFiller)(z=w.getLast())&&(z.type==CKEDITOR.NODE_ELEMENT&&z.is("br"))&&z.remove();z=w.getLast(k);(!z||!(z.type==CKEDITOR.NODE_ELEMENT&&z.is(CKEDITOR.dtd.$block)))&&w.append(i.createElement("br"))}z=w.$.nodeName.toLowerCase();
|
||||
(z=="div"||z=="p")&&w.appendBogus();j.append(w);m=null;p++}else return null;A=null;if(a.length<=p||Math.max(a[p].indent,0)<q)break}if(b)for(a=j.getFirst();a;){if(a.type==CKEDITOR.NODE_ELEMENT){CKEDITOR.dom.element.clearMarkers(b,a);if(a.getName()in CKEDITOR.dtd.$listItem){c=a;i=f=e=void 0;if(e=c.getDirection()){for(f=c.getParent();f&&!(i=f.getDirection());)f=f.getParent();e==i&&c.removeAttribute("dir")}}}a=a.getNextSourceNode()}return{listNode:j,nextIndex:p}}};var q=/^h[1-6]$/,p=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);
|
||||
f.prototype={exec:function(b){this.refresh(b,b.elementPath());var c=b.config,f=b.getSelection(),g=f&&f.getRanges();if(this.state==CKEDITOR.TRISTATE_OFF){var h=b.editable();if(h.getFirst(k)){var i=g.length==1&&g[0];(c=i&&i.getEnclosedNode())&&(c.is&&this.type==c.getName())&&this.setState(CKEDITOR.TRISTATE_ON)}else{c.enterMode==CKEDITOR.ENTER_BR?h.appendBogus():g[0].fixBlock(1,c.enterMode==CKEDITOR.ENTER_P?"p":"div");f.selectRanges(g)}}for(var c=f.createBookmarks(true),h=[],j={},g=g.createIterator(),
|
||||
m=0;(i=g.getNextRange())&&++m;){var p=i.getBoundaryNodes(),r=p.startNode,x=p.endNode;r.type==CKEDITOR.NODE_ELEMENT&&r.getName()=="td"&&i.setStartAt(p.startNode,CKEDITOR.POSITION_AFTER_START);x.type==CKEDITOR.NODE_ELEMENT&&x.getName()=="td"&&i.setEndAt(p.endNode,CKEDITOR.POSITION_BEFORE_END);i=i.createIterator();for(i.forceBrBreak=this.state==CKEDITOR.TRISTATE_OFF;p=i.getNextParagraph();)if(!p.getCustomData("list_block")){CKEDITOR.dom.element.setMarker(j,p,"list_block",1);for(var w=b.elementPath(p),
|
||||
r=w.elements,x=0,w=w.blockLimit,z,A=r.length-1;A>=0&&(z=r[A]);A--)if(d[z.getName()]&&w.contains(z)){w.removeCustomData("list_group_object_"+m);if(r=z.getCustomData("list_group_object"))r.contents.push(p);else{r={root:z,contents:[p]};h.push(r);CKEDITOR.dom.element.setMarker(j,z,"list_group_object",r)}x=1;break}if(!x){x=w;if(x.getCustomData("list_group_object_"+m))x.getCustomData("list_group_object_"+m).contents.push(p);else{r={root:x,contents:[p]};CKEDITOR.dom.element.setMarker(j,x,"list_group_object_"+
|
||||
m,r);h.push(r)}}}}for(z=[];h.length>0;){r=h.shift();if(this.state==CKEDITOR.TRISTATE_OFF)if(d[r.root.getName()]){g=b;m=r;r=j;i=z;x=CKEDITOR.plugins.list.listToArray(m.root,r);w=[];for(p=0;p<m.contents.length;p++){A=m.contents[p];if((A=A.getAscendant("li",true))&&!A.getCustomData("list_item_processed")){w.push(A);CKEDITOR.dom.element.setMarker(r,A,"list_item_processed",true)}}for(var A=m.root.getDocument(),F=void 0,C=void 0,p=0;p<w.length;p++){var K=w[p].getCustomData("listarray_index"),F=x[K].parent;
|
||||
if(!F.is(this.type)){C=A.createElement(this.type);F.copyAttributes(C,{start:1,type:1});C.removeStyle("list-style-type");x[K].parent=C}}r=CKEDITOR.plugins.list.arrayToList(x,r,null,g.config.enterMode);x=void 0;w=r.listNode.getChildCount();for(p=0;p<w&&(x=r.listNode.getChild(p));p++)x.getName()==this.type&&i.push(x);r.listNode.replace(m.root);g.fire("contentDomInvalidated")}else{x=b;p=r;i=z;w=p.contents;g=p.root.getDocument();m=[];if(w.length==1&&w[0].equals(p.root)){r=g.createElement("div");w[0].moveChildren&&
|
||||
w[0].moveChildren(r);w[0].append(r);w[0]=r}p=p.contents[0].getParent();for(A=0;A<w.length;A++)p=p.getCommonAncestor(w[A].getParent());F=x.config.useComputedState;x=r=void 0;F=F===void 0||F;for(A=0;A<w.length;A++)for(C=w[A];K=C.getParent();){if(K.equals(p)){m.push(C);!x&&C.getDirection()&&(x=1);C=C.getDirection(F);r!==null&&(r=r&&r!=C?null:C);break}C=K}if(!(m.length<1)){w=m[m.length-1].getNext();A=g.createElement(this.type);i.push(A);for(F=i=void 0;m.length;){i=m.shift();F=g.createElement("li");if(i.is("pre")||
|
||||
q.test(i.getName())||i.getAttribute("contenteditable")=="false")i.appendTo(F);else{i.copyAttributes(F);if(r&&i.getDirection()){F.removeStyle("direction");F.removeAttribute("dir")}i.moveChildren(F);i.remove()}F.appendTo(A)}r&&x&&A.setAttribute("dir",r);w?A.insertBefore(w):A.appendTo(p)}}else this.state==CKEDITOR.TRISTATE_ON&&d[r.root.getName()]&&a.call(this,b,r,j)}for(A=0;A<z.length;A++)e(z[A]);CKEDITOR.dom.element.clearAllMarkers(j);f.selectBookmarks(c);b.focus()},refresh:function(a,b){var c=b.contains(d,
|
||||
1),e=b.blockLimit||b.root;c&&e.contains(c)?this.setState(c.is(this.type)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add("list",{requires:"indentlist",init:function(a){if(!a.blockless){a.addCommand("numberedlist",new f("numberedlist","ol"));a.addCommand("bulletedlist",new f("bulletedlist","ul"));if(a.ui.addButton){a.ui.addButton("NumberedList",{label:a.lang.list.numberedlist,command:"numberedlist",directional:true,toolbar:"list,10"});a.ui.addButton("BulletedList",
|
||||
{label:a.lang.list.bulletedlist,command:"bulletedlist",directional:true,toolbar:"list,20"})}a.on("key",function(c){var e=c.data.domEvent.getKey(),f;if(a.mode=="wysiwyg"&&e in{8:1,46:1}){var g=a.getSelection().getRanges()[0],h=g&&g.startPath();if(g&&g.collapsed){var p=e==8,q=a.editable(),y=new CKEDITOR.dom.walker(g.clone());y.evaluator=function(a){return k(a)&&!m(a)};y.guard=function(a,b){return!(b&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("table"))};e=g.clone();if(p){var r;if((r=h.contains(d))&&g.checkBoundaryOfElement(r,
|
||||
CKEDITOR.START)&&(r=r.getParent())&&r.is("li")&&(r=j(r))){f=r;r=r.getPrevious(k);e.moveToPosition(r&&m(r)?r:f,CKEDITOR.POSITION_BEFORE_START)}else{y.range.setStartAt(q,CKEDITOR.POSITION_AFTER_START);y.range.setEnd(g.startContainer,g.startOffset);if((r=y.previous())&&r.type==CKEDITOR.NODE_ELEMENT&&(r.getName()in d||r.is("li"))){if(!r.is("li")){y.range.selectNodeContents(r);y.reset();y.evaluator=b;r=y.previous()}f=r;e.moveToElementEditEnd(f)}}if(f){i(a,e,g);c.cancel()}else if((e=h.contains(d))&&g.checkBoundaryOfElement(e,
|
||||
CKEDITOR.START)){f=e.getFirst(k);if(g.checkBoundaryOfElement(f,CKEDITOR.START)){r=e.getPrevious(k);if(j(f)){if(r){g.moveToElementEditEnd(r);g.select()}}else a.execCommand("outdent");c.cancel()}}}else if(f=h.contains("li")){y.range.setEndAt(q,CKEDITOR.POSITION_BEFORE_END);f=(h=f.getLast(k))&&b(h)?h:f;q=0;if((r=y.next())&&r.type==CKEDITOR.NODE_ELEMENT&&r.getName()in d&&r.equals(h)){q=1;r=y.next()}else g.checkBoundaryOfElement(f,CKEDITOR.END)&&(q=1);if(q&&r){g=g.clone();g.moveToElementEditStart(r);i(a,
|
||||
e,g);c.cancel()}}else{y.range.setEndAt(q,CKEDITOR.POSITION_BEFORE_END);if((r=y.next())&&r.type==CKEDITOR.NODE_ELEMENT&&r.is(d)){r=r.getFirst(k);if(h.block&&g.checkStartOfBlock()&&g.checkEndOfBlock()){h.block.remove();g.moveToElementEditStart(r);g.select()}else if(j(r)){g.moveToElementEditStart(r);g.select()}else{g=g.clone();g.moveToElementEditStart(r);i(a,e,g)}c.cancel()}}setTimeout(function(){a.selectionChange(1)})}}})}}})}(),"use strict",function(){function a(a,b,c){return k(b)&&k(c)&&c.equals(b.getNext(function(a){return!(S(a)||
|
||||
W(a)||m(a))}))}function f(a){this.upper=a[0];this.lower=a[1];this.set.apply(this,a.slice(2))}function c(a){var b=a.element;if(b&&k(b))if((b=b.getAscendant(a.triggers,true))&&a.editable.contains(b)){var c=i(b);if(c.getAttribute("contenteditable")=="true")return b;if(c.is(a.triggers))return c}return null}function e(a,b,c){t(a,b);t(a,c);a=b.size.bottom;c=c.size.top;return a&&c?0|(a+c)/2:a||c}function b(a,b,c){return b=b[c?"getPrevious":"getNext"](function(b){return b&&b.type==CKEDITOR.NODE_TEXT&&!S(b)||
|
||||
k(b)&&!m(b)&&!h(a,b)})}function i(a,b){if(a.data("cke-editable"))return null;for(b||(a=a.getParent());a;){if(a.data("cke-editable"))break;if(a.hasAttribute("contenteditable"))return a;a=a.getParent()}return null}function j(a){var b=a.doc,c=w('<span contenteditable="false" style="'+R+"position:absolute;border-top:1px dashed "+a.boxColor+'"></span>',b),e=CKEDITOR.getUrl(this.path+"images/"+(z.hidpi?"hidpi/":"")+"icon"+(a.rtl?"-rtl":"")+".png");r(c,{attach:function(){this.wrap.getParent()||this.wrap.appendTo(a.editable,
|
||||
true);return this},lineChildren:[r(w('<span title="'+a.editor.lang.magicline.title+'" contenteditable="false">↵</span>',b),{base:R+"height:17px;width:17px;"+(a.rtl?"left":"right")+":17px;background:url("+e+") center no-repeat "+a.boxColor+";cursor:pointer;"+(z.hc?"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;":"")+(z.hidpi?"background-size: 9px 10px;":""),looks:["top:-8px;"+CKEDITOR.tools.cssVendorPrefix("border-radius","2px",1),"top:-17px;"+CKEDITOR.tools.cssVendorPrefix("border-radius",
|
||||
"2px 2px 0px 0px",1),"top:-1px;"+CKEDITOR.tools.cssVendorPrefix("border-radius","0px 0px 2px 2px",1)]}),r(w(X,b),{base:U+"left:0px;border-left-color:"+a.boxColor+";",looks:["border-width:8px 0 8px 8px;top:-8px","border-width:8px 0 0 8px;top:-8px","border-width:0 0 8px 8px;top:0px"]}),r(w(X,b),{base:U+"right:0px;border-right-color:"+a.boxColor+";",looks:["border-width:8px 8px 8px 0;top:-8px","border-width:8px 8px 0 0;top:-8px","border-width:0 8px 8px 0;top:0px"]})],detach:function(){this.wrap.getParent()&&
|
||||
this.wrap.remove();return this},mouseNear:function(){t(a,this);var b=a.holdDistance,c=this.size;return c&&a.mouse.y>c.top-b&&a.mouse.y<c.bottom+b&&a.mouse.x>c.left-b&&a.mouse.x<c.right+b?true:false},place:function(){var b=a.view,c=a.editable,d=a.trigger,e=d.upper,f=d.lower,g=e||f,h=g.getParent(),i={};this.trigger=d;e&&t(a,e,true);f&&t(a,f,true);t(a,h,true);a.inInlineMode&&B(a,true);if(h.equals(c)){i.left=b.scroll.x;i.right=-b.scroll.x;i.width=""}else{i.left=g.size.left-g.size.margin.left+b.scroll.x-
|
||||
(a.inInlineMode?b.editable.left+b.editable.border.left:0);i.width=g.size.outerWidth+g.size.margin.left+g.size.margin.right+b.scroll.x;i.right=""}if(e&&f)i.top=e.size.margin.bottom===f.size.margin.top?0|e.size.bottom+e.size.margin.bottom/2:e.size.margin.bottom<f.size.margin.top?e.size.bottom+e.size.margin.bottom:e.size.bottom+e.size.margin.bottom-f.size.margin.top;else if(e){if(!f)i.top=e.size.bottom+e.size.margin.bottom}else i.top=f.size.top-f.size.margin.top;if(d.is(N)||i.top>b.scroll.y-15&&i.top<
|
||||
b.scroll.y+5){i.top=a.inInlineMode?0:b.scroll.y;this.look(N)}else if(d.is(H)||i.top>b.pane.bottom-5&&i.top<b.pane.bottom+15){i.top=a.inInlineMode?b.editable.height+b.editable.padding.top+b.editable.padding.bottom:b.pane.bottom-1;this.look(H)}else{if(a.inInlineMode)i.top=i.top-(b.editable.top+b.editable.border.top);this.look(T)}if(a.inInlineMode){i.top--;i.top=i.top+b.editable.scroll.top;i.left=i.left+b.editable.scroll.left}for(var j in i)i[j]=CKEDITOR.tools.cssLength(i[j]);this.setStyles(i)},look:function(a){if(this.oldLook!=
|
||||
a){for(var b=this.lineChildren.length,c;b--;)(c=this.lineChildren[b]).setAttribute("style",c.base+c.looks[0|a/2]);this.oldLook=a}},wrap:new x("span",a.doc)});for(b=c.lineChildren.length;b--;)c.lineChildren[b].appendTo(c);c.look(T);c.appendTo(c.wrap);c.unselectable();c.lineChildren[0].on("mouseup",function(b){c.detach();d(a,function(b){var c=a.line.trigger;b[c.is(K)?"insertBefore":"insertAfter"](c.is(K)?c.lower:c.upper)},true);a.editor.focus();!z.ie&&a.enterMode!=CKEDITOR.ENTER_BR&&a.hotNode.scrollIntoView();
|
||||
b.data.preventDefault(true)});c.on("mousedown",function(a){a.data.preventDefault(true)});a.line=c}function d(a,b,c){var d=new CKEDITOR.dom.range(a.doc),e=a.editor,f;if(z.ie&&a.enterMode==CKEDITOR.ENTER_BR)f=a.doc.createText(O);else{f=(f=i(a.element,true))&&f.data("cke-enter-mode")||a.enterMode;f=new x(C[f],a.doc);f.is("br")||a.doc.createText(O).appendTo(f)}c&&e.fire("saveSnapshot");b(f);d.moveToPosition(f,CKEDITOR.POSITION_AFTER_START);e.getSelection().selectRanges([d]);a.hotNode=f;c&&e.fire("saveSnapshot")}
|
||||
function g(a,e){return{canUndo:true,modes:{wysiwyg:1},exec:function(){function f(b){var c=z.ie&&z.version<9?" ":O,g=a.hotNode&&a.hotNode.getText()==c&&a.element.equals(a.hotNode)&&a.lastCmdDirection===!!e;d(a,function(c){g&&a.hotNode&&a.hotNode.remove();c[e?"insertAfter":"insertBefore"](b);c.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!e});a.lastCmdDirection=!!e});!z.ie&&a.enterMode!=CKEDITOR.ENTER_BR&&a.hotNode.scrollIntoView();a.line.detach()}return function(d){var d=d.getSelection().getStartElement(),
|
||||
g,d=d.getAscendant(L,1);if(!o(a,d)&&d&&!d.equals(a.editable)&&!d.contains(a.editable)){if((g=i(d))&&g.getAttribute("contenteditable")=="false")d=g;a.element=d;g=b(a,d,!e);var h;if(k(g)&&g.is(a.triggers)&&g.is(P)&&(!b(a,g,!e)||(h=b(a,g,!e))&&k(h)&&h.is(a.triggers)))f(g);else{h=c(a,d);if(k(h))if(b(a,h,!e))(d=b(a,h,!e))&&(k(d)&&d.is(a.triggers))&&f(h);else f(h)}}}}()}}function h(a,b){if(!b||!(b.type==CKEDITOR.NODE_ELEMENT&&b.$))return false;var c=a.line;return c.wrap.equals(b)||c.wrap.contains(b)}function k(a){return a&&
|
||||
a.type==CKEDITOR.NODE_ELEMENT&&a.$}function m(a){if(!k(a))return false;var b;if(!(b=q(a)))if(k(a)){b={left:1,right:1,center:1};b=!(!b[a.getComputedStyle("float")]&&!b[a.getAttribute("align")])}else b=false;return b}function q(a){return!!{absolute:1,fixed:1}[a.getComputedStyle("position")]}function p(a,b){return k(b)?b.is(a.triggers):null}function o(a,b){if(!b)return false;for(var c=b.getParents(1),d=c.length;d--;)for(var e=a.tabuList.length;e--;)if(c[d].hasAttribute(a.tabuList[e]))return true;return false}
|
||||
function n(a,b,c){b=b[c?"getLast":"getFirst"](function(b){return a.isRelevant(b)&&!b.is(I)});if(!b)return false;t(a,b);return c?b.size.top>a.mouse.y:b.size.bottom<a.mouse.y}function l(a){var b=a.editable,c=a.mouse,d=a.view,e=a.triggerOffset;B(a);var g=c.y>(a.inInlineMode?d.editable.top+d.editable.height/2:Math.min(d.editable.height,d.pane.height)/2),b=b[g?"getLast":"getFirst"](function(a){return!(S(a)||W(a))});if(!b)return null;h(a,b)&&(b=a.line.wrap[g?"getPrevious":"getNext"](function(a){return!(S(a)||
|
||||
W(a))}));if(!k(b)||m(b)||!p(a,b))return null;t(a,b);if(!g&&b.size.top>=0&&c.y>0&&c.y<b.size.top+e){a=a.inInlineMode||d.scroll.y===0?N:T;return new f([null,b,K,E,a])}if(g&&b.size.bottom<=d.pane.height&&c.y>b.size.bottom-e&&c.y<d.pane.height){a=a.inInlineMode||b.size.bottom>d.pane.height-e&&b.size.bottom<d.pane.height?H:T;return new f([b,null,G,E,a])}return null}function s(a){var d=a.mouse,e=a.view,g=a.triggerOffset,h=c(a);if(!h)return null;t(a,h);var g=Math.min(g,0|h.size.outerHeight/2),i=[],j,l;if(d.y>
|
||||
h.size.top-1&&d.y<h.size.top+g)l=false;else if(d.y>h.size.bottom-g&&d.y<h.size.bottom+1)l=true;else return null;if(m(h)||n(a,h,l)||h.getParent().is(M))return null;var s=b(a,h,!l);if(s){if(s&&s.type==CKEDITOR.NODE_TEXT)return null;if(k(s)){if(m(s)||!p(a,s)||s.getParent().is(M))return null;i=[s,h][l?"reverse":"concat"]().concat([D,E])}}else{if(h.equals(a.editable[l?"getLast":"getFirst"](a.isRelevant))){B(a);l&&d.y>h.size.bottom-g&&d.y<e.pane.height&&h.size.bottom>e.pane.height-g&&h.size.bottom<e.pane.height?
|
||||
j=H:d.y>0&&d.y<h.size.top+g&&(j=N)}else j=T;i=[null,h][l?"reverse":"concat"]().concat([l?G:K,E,j,h.equals(a.editable[l?"getLast":"getFirst"](a.isRelevant))?l?H:N:T])}return 0 in i?new f(i):null}function v(a,b,c,d){for(var e=function(){var c=z.ie?b.$.currentStyle:a.win.$.getComputedStyle(b.$,"");return z.ie?function(a){return c[CKEDITOR.tools.cssStyleToDomStyle(a)]}:function(a){return c.getPropertyValue(a)}}(),f=b.getDocumentPosition(),g={},h={},i={},j={},k=Y.length;k--;){g[Y[k]]=parseInt(e("border-"+
|
||||
Y[k]+"-width"),10)||0;i[Y[k]]=parseInt(e("padding-"+Y[k]),10)||0;h[Y[k]]=parseInt(e("margin-"+Y[k]),10)||0}(!c||d)&&u(a,d);j.top=f.y-(c?0:a.view.scroll.y);j.left=f.x-(c?0:a.view.scroll.x);j.outerWidth=b.$.offsetWidth;j.outerHeight=b.$.offsetHeight;j.height=j.outerHeight-(i.top+i.bottom+g.top+g.bottom);j.width=j.outerWidth-(i.left+i.right+g.left+g.right);j.bottom=j.top+j.outerHeight;j.right=j.left+j.outerWidth;if(a.inInlineMode)j.scroll={top:b.$.scrollTop,left:b.$.scrollLeft};return r({border:g,padding:i,
|
||||
margin:h,ignoreScroll:c},j,true)}function t(a,b,c){if(!k(b))return b.size=null;if(b.size){if(b.size.ignoreScroll==c&&b.size.date>new Date-Q)return null}else b.size={};return r(b.size,v(a,b,c),{date:+new Date},true)}function B(a,b){a.view.editable=v(a,a.editable,b,true)}function u(a,b){if(!a.view)a.view={};var c=a.view;if(b||!(c&&c.date>new Date-Q)){var d=a.win,c=d.getScrollPosition(),d=d.getViewPaneSize();r(a.view,{scroll:{x:c.x,y:c.y,width:a.doc.$.documentElement.scrollWidth-d.width,height:a.doc.$.documentElement.scrollHeight-
|
||||
d.height},pane:{width:d.width,height:d.height,bottom:d.height+c.y},date:+new Date},true)}}function y(a,b,c,d){for(var e=d,g=d,h=0,i=false,j=false,k=a.view.pane.height,l=a.mouse;l.y+h<k&&l.y-h>0;){i||(i=b(e,d));j||(j=b(g,d));!i&&l.y-h>0&&(e=c(a,{x:l.x,y:l.y-h}));!j&&l.y+h<k&&(g=c(a,{x:l.x,y:l.y+h}));if(i&&j)break;h=h+2}return new f([e,g,null,null])}CKEDITOR.plugins.add("magicline",{init:function(a){var e=a.config,i=e.magicline_triggerOffset||30,n={editor:a,enterMode:e.enterMode,triggerOffset:i,holdDistance:0|
|
||||
i*(e.magicline_holdDistance||0.5),boxColor:e.magicline_color||"#ff0000",rtl:e.contentsLangDirection=="rtl",tabuList:["data-cke-hidden-sel"].concat(e.magicline_tabuList||[]),triggers:e.magicline_everywhere?L:{table:1,hr:1,div:1,ul:1,ol:1,dl:1,form:1,blockquote:1}},p,S,t;n.isRelevant=function(a){return k(a)&&!h(n,a)&&!m(a)};a.on("contentDom",function(){var i=a.editable(),k=a.document,m=a.window;r(n,{editable:i,inInlineMode:i.isInline(),doc:k,win:m,hotNode:null},true);n.boundary=n.inInlineMode?n.editable:
|
||||
n.doc.getDocumentElement();if(!i.is(F.$inline)){n.inInlineMode&&!q(i)&&i.setStyles({position:"relative",top:null,left:null});j.call(this,n);u(n);i.attachListener(a,"beforeUndoImage",function(){n.line.detach()});i.attachListener(a,"beforeGetData",function(){if(n.line.wrap.getParent()){n.line.detach();a.once("getData",function(){n.line.attach()},null,null,1E3)}},null,null,0);i.attachListener(n.inInlineMode?k:k.getWindow().getFrame(),"mouseout",function(b){if(a.mode=="wysiwyg")if(n.inInlineMode){var c=
|
||||
b.data.$.clientX,b=b.data.$.clientY;u(n);B(n,true);var d=n.view.editable,e=n.view.scroll;if(!(c>d.left-e.x&&c<d.right-e.x)||!(b>d.top-e.y&&b<d.bottom-e.y)){clearTimeout(t);t=null;n.line.detach()}}else{clearTimeout(t);t=null;n.line.detach()}});i.attachListener(i,"keyup",function(){n.hiddenMode=0});i.attachListener(i,"keydown",function(b){if(a.mode=="wysiwyg")switch(b.data.getKeystroke()){case 2228240:case 16:n.hiddenMode=1;n.line.detach()}});i.attachListener(n.inInlineMode?i:k,"mousemove",function(b){S=
|
||||
true;if(!(a.mode!="wysiwyg"||a.readOnly||t)){var c={x:b.data.$.clientX,y:b.data.$.clientY};t=setTimeout(function(){n.mouse=c;t=n.trigger=null;u(n);if(S&&!n.hiddenMode&&a.focusManager.hasFocus&&!n.line.mouseNear()&&(n.element=V(n,true))){if((n.trigger=l(n)||s(n)||Z(n))&&!o(n,n.trigger.upper||n.trigger.lower))n.line.attach().place();else{n.trigger=null;n.line.detach()}S=false}},30)}});i.attachListener(m,"scroll",function(){if(a.mode=="wysiwyg"){n.line.detach();if(z.webkit){n.hiddenMode=1;clearTimeout(p);
|
||||
p=setTimeout(function(){if(!n.mouseDown)n.hiddenMode=0},50)}}});i.attachListener(A?k:m,"mousedown",function(){if(a.mode=="wysiwyg"){n.line.detach();n.hiddenMode=1;n.mouseDown=1}});i.attachListener(A?k:m,"mouseup",function(){n.hiddenMode=0;n.mouseDown=0});a.addCommand("accessPreviousSpace",g(n));a.addCommand("accessNextSpace",g(n,true));a.setKeystroke([[e.magicline_keystrokePrevious,"accessPreviousSpace"],[e.magicline_keystrokeNext,"accessNextSpace"]]);a.on("loadSnapshot",function(){var b,c,d,e;for(e in{p:1,
|
||||
br:1,div:1}){b=a.document.getElementsByTag(e);for(d=b.count();d--;)if((c=b.getItem(d)).data("cke-magicline-hot")){n.hotNode=c;n.lastCmdDirection=c.data("cke-magicline-dir")==="true"?true:false;return}}});this.backdoor={accessFocusSpace:d,boxTrigger:f,isLine:h,getAscendantTrigger:c,getNonEmptyNeighbour:b,getSize:v,that:n,triggerEdge:s,triggerEditable:l,triggerExpand:Z}}},this)}});var r=CKEDITOR.tools.extend,x=CKEDITOR.dom.element,w=x.createFromHtml,z=CKEDITOR.env,A=CKEDITOR.env.ie&&CKEDITOR.env.version<
|
||||
9,F=CKEDITOR.dtd,C={},K=128,G=64,D=32,E=16,J=8,N=4,H=2,T=1,O=" ",M=F.$listItem,I=F.$tableContent,P=r({},F.$nonEditable,F.$empty),L=F.$block,Q=100,R="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",U=R+"border-color:transparent;display:block;border-style:solid;",X="<span>"+O+"</span>";C[CKEDITOR.ENTER_BR]="br";C[CKEDITOR.ENTER_P]="p";C[CKEDITOR.ENTER_DIV]="div";f.prototype={set:function(a,b,c){this.properties=a+b+
|
||||
(c||T);return this},is:function(a){return(this.properties&a)==a}};var V=function(){function a(b,c){var d=b.$.elementFromPoint(c.x,c.y);return d&&d.nodeType?new CKEDITOR.dom.element(d):null}return function(b,c,d){if(!b.mouse)return null;var e=b.doc,f=b.line.wrap,d=d||b.mouse,g=a(e,d);if(c&&h(b,g)){f.hide();g=a(e,d);f.show()}return!g||!(g.type==CKEDITOR.NODE_ELEMENT&&g.$)||z.ie&&z.version<9&&!b.boundary.equals(g)&&!b.boundary.contains(g)?null:g}}(),S=CKEDITOR.dom.walker.whitespaces(),W=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),
|
||||
Z=function(){function b(d){var f=d.element,g,h,i;if(!k(f)||f.contains(d.editable)||f.isReadOnly())return null;i=y(d,function(a,b){return!b.equals(a)},function(a,b){return V(a,true,b)},f);g=i.upper;h=i.lower;if(a(d,g,h))return i.set(D,J);if(g&&f.contains(g))for(;!g.getParent().equals(f);)g=g.getParent();else g=f.getFirst(function(a){return c(d,a)});if(h&&f.contains(h))for(;!h.getParent().equals(f);)h=h.getParent();else h=f.getLast(function(a){return c(d,a)});if(!g||!h)return null;t(d,g);t(d,h);if(!(d.mouse.y>
|
||||
g.size.top&&d.mouse.y<h.size.bottom))return null;for(var f=Number.MAX_VALUE,j,l,n,m;h&&!h.equals(g);){if(!(l=g.getNext(d.isRelevant)))break;j=Math.abs(e(d,g,l)-d.mouse.y);if(j<f){f=j;n=g;m=l}g=l;t(d,g)}if(!n||!m||!(d.mouse.y>n.size.top&&d.mouse.y<m.size.bottom))return null;i.upper=n;i.lower=m;return i.set(D,J)}function c(a,b){return!(b&&b.type==CKEDITOR.NODE_TEXT||W(b)||m(b)||h(a,b)||b.type==CKEDITOR.NODE_ELEMENT&&b.$&&b.is("br"))}return function(c){var d=b(c),e;if(e=d){e=d.upper;var f=d.lower;e=
|
||||
!e||!f||m(f)||m(e)||f.equals(e)||e.equals(f)||f.contains(e)||e.contains(f)?false:p(c,e)&&p(c,f)&&a(c,e,f)?true:false}return e?d:null}}(),Y=["top","left","right","bottom"]}(),CKEDITOR.config.magicline_keystrokePrevious=CKEDITOR.CTRL+CKEDITOR.SHIFT+51,CKEDITOR.config.magicline_keystrokeNext=CKEDITOR.CTRL+CKEDITOR.SHIFT+52,function(){function a(a){if(!a||a.type!=CKEDITOR.NODE_ELEMENT||a.getName()!="form")return[];for(var b=[],c=["style","className"],e=0;e<c.length;e++){var f=a.$.elements.namedItem(c[e]);
|
||||
if(f){f=new CKEDITOR.dom.element(f);b.push([f,f.nextSibling]);f.remove()}}return b}function f(a,b){if(a&&!(a.type!=CKEDITOR.NODE_ELEMENT||a.getName()!="form")&&b.length>0)for(var c=b.length-1;c>=0;c--){var e=b[c][0],f=b[c][1];f?e.insertBefore(f):e.appendTo(a)}}function c(b,c){var d=a(b),e={},h=b.$;if(!c){e["class"]=h.className||"";h.className=""}e.inline=h.style.cssText||"";if(!c)h.style.cssText="position: static; overflow: visible";f(d);return e}function e(b,c){var d=a(b),e=b.$;if("class"in c)e.className=
|
||||
c["class"];if("inline"in c)e.style.cssText=c.inline;f(d)}function b(a){if(!a.editable().isInline()){var b=CKEDITOR.instances,c;for(c in b){var e=b[c];if(e.mode=="wysiwyg"&&!e.readOnly){e=e.document.getBody();e.setAttribute("contentEditable",false);e.setAttribute("contentEditable",true)}}if(a.editable().hasFocus){a.toolbox.focus();a.focus()}}}CKEDITOR.plugins.add("maximize",{init:function(a){function f(){var b=h.getViewPaneSize();a.resize(b.width,b.height,null,true)}if(a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var d=
|
||||
a.lang,g=CKEDITOR.document,h=g.getWindow(),k,m,q,p=CKEDITOR.TRISTATE_OFF;a.addCommand("maximize",{modes:{wysiwyg:!CKEDITOR.env.iOS,source:!CKEDITOR.env.iOS},readOnly:1,editorFocus:false,exec:function(){var o=a.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}),n=a.ui.space("contents");if(a.mode=="wysiwyg"){var l=a.getSelection();k=l&&l.getRanges();m=h.getScrollPosition()}else{var s=a.editable().$;k=!CKEDITOR.env.ie&&[s.selectionStart,s.selectionEnd];m=[s.scrollLeft,
|
||||
s.scrollTop]}if(this.state==CKEDITOR.TRISTATE_OFF){h.on("resize",f);q=h.getScrollPosition();for(l=a.container;l=l.getParent();){l.setCustomData("maximize_saved_styles",c(l));l.setStyle("z-index",a.config.baseFloatZIndex-5)}n.setCustomData("maximize_saved_styles",c(n,true));o.setCustomData("maximize_saved_styles",c(o,true));n={overflow:CKEDITOR.env.webkit?"":"hidden",width:0,height:0};g.getDocumentElement().setStyles(n);!CKEDITOR.env.gecko&&g.getDocumentElement().setStyle("position","fixed");(!CKEDITOR.env.gecko||
|
||||
!CKEDITOR.env.quirks)&&g.getBody().setStyles(n);CKEDITOR.env.ie?setTimeout(function(){h.$.scrollTo(0,0)},0):h.$.scrollTo(0,0);o.setStyle("position",CKEDITOR.env.gecko&&CKEDITOR.env.quirks?"fixed":"absolute");o.$.offsetLeft;o.setStyles({"z-index":a.config.baseFloatZIndex-5,left:"0px",top:"0px"});o.addClass("cke_maximized");f();n=o.getDocumentPosition();o.setStyles({left:-1*n.x+"px",top:-1*n.y+"px"});CKEDITOR.env.gecko&&b(a)}else if(this.state==CKEDITOR.TRISTATE_ON){h.removeListener("resize",f);n=[n,
|
||||
o];for(l=0;l<n.length;l++){e(n[l],n[l].getCustomData("maximize_saved_styles"));n[l].removeCustomData("maximize_saved_styles")}for(l=a.container;l=l.getParent();){e(l,l.getCustomData("maximize_saved_styles"));l.removeCustomData("maximize_saved_styles")}CKEDITOR.env.ie?setTimeout(function(){h.$.scrollTo(q.x,q.y)},0):h.$.scrollTo(q.x,q.y);o.removeClass("cke_maximized");if(CKEDITOR.env.webkit){o.setStyle("display","inline");setTimeout(function(){o.setStyle("display","block")},0)}a.fire("resize")}this.toggleState();
|
||||
if(l=this.uiItems[0]){n=this.state==CKEDITOR.TRISTATE_OFF?d.maximize.maximize:d.maximize.minimize;l=CKEDITOR.document.getById(l._.id);l.getChild(1).setHtml(n);l.setAttribute("title",n);l.setAttribute("href",'javascript:void("'+n+'");')}if(a.mode=="wysiwyg")if(k){CKEDITOR.env.gecko&&b(a);a.getSelection().selectRanges(k);(s=a.getSelection().getStartElement())&&s.scrollIntoView(true)}else h.$.scrollTo(m.x,m.y);else{if(k){s.selectionStart=k[0];s.selectionEnd=k[1]}s.scrollLeft=m[0];s.scrollTop=m[1]}k=
|
||||
m=null;p=this.state;a.fire("maximize",this.state)},canUndo:false});a.ui.addButton&&a.ui.addButton("Maximize",{label:d.maximize.maximize,command:"maximize",toolbar:"tools,10"});a.on("mode",function(){var b=a.getCommand("maximize");b.setState(b.state==CKEDITOR.TRISTATE_DISABLED?CKEDITOR.TRISTATE_DISABLED:p)},null,null,100)}}})}(),function(){var a={canUndo:false,async:true,exec:function(f){f.getClipboardData({title:f.lang.pastetext.title},function(c){c&&f.fire("paste",{type:"text",dataValue:c.dataValue});
|
||||
f.fire("afterCommandExec",{name:"pastetext",command:a,returnValue:!!c})})}};CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(f){f.addCommand("pastetext",a);f.ui.addButton&&f.ui.addButton("PasteText",{label:f.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"});if(f.config.forcePasteAsPlainText)f.on("beforePaste",function(a){if(a.data.type!="html")a.data.type="text"});f.on("pasteState",function(a){f.getCommand("pastetext").setState(a.data)})}})}(),function(){function a(a,
|
||||
e,b){var f=CKEDITOR.cleanWord;if(f)b();else{a=CKEDITOR.getUrl(a.config.pasteFromWordCleanupFile||e+"filter/default.js");CKEDITOR.scriptLoader.load(a,b,null,true)}return!f}function f(a){a.data.type="html"}CKEDITOR.plugins.add("pastefromword",{requires:"clipboard",init:function(c){var e=0,b=this.path;c.addCommand("pastefromword",{canUndo:false,async:true,exec:function(a){var b=this;e=1;a.once("beforePaste",f);a.getClipboardData({title:a.lang.pastefromword.title},function(c){c&&a.fire("paste",{type:"html",
|
||||
dataValue:c.dataValue});a.fire("afterCommandExec",{name:"pastefromword",command:b,returnValue:!!c})})}});c.ui.addButton&&c.ui.addButton("PasteFromWord",{label:c.lang.pastefromword.toolbar,command:"pastefromword",toolbar:"clipboard,50"});c.on("pasteState",function(a){c.getCommand("pastefromword").setState(a.data)});c.on("paste",function(f){var j=f.data,d=j.dataValue;if(d&&(e||/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(d))){var g=a(c,b,function(){if(g)c.fire("paste",j);else if(!c.config.pasteFromWordPromptCleanup||
|
||||
e||confirm(c.lang.pastefromword.confirmCleanup))j.dataValue=CKEDITOR.cleanWord(d,c);e=0});g&&f.cancel()}},null,null,3)}})}(),CKEDITOR.plugins.add("removeformat",{init:function(a){a.addCommand("removeFormat",CKEDITOR.plugins.removeformat.commands.removeformat);a.ui.addButton&&a.ui.addButton("RemoveFormat",{label:a.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"})}}),CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(a){for(var f=a._.removeFormatRegex||(a._.removeFormatRegex=
|
||||
RegExp("^(?:"+a.config.removeFormatTags.replace(/,/g,"|")+")$","i")),c=a._.removeAttributes||(a._.removeAttributes=a.config.removeFormatAttributes.split(",")),e=CKEDITOR.plugins.removeformat.filter,b=a.getSelection().getRanges(),i=b.createIterator(),j=function(a){return a.type==CKEDITOR.NODE_ELEMENT},d;d=i.getNextRange();){d.collapsed||d.enlarge(CKEDITOR.ENLARGE_ELEMENT);var g=d.createBookmark(),h=g.startNode,k=g.endNode,m=function(b){for(var c=a.elementPath(b),d=c.elements,g=1,h;h=d[g];g++){if(h.equals(c.block)||
|
||||
h.equals(c.blockLimit))break;f.test(h.getName())&&e(a,h)&&b.breakParent(h)}};m(h);if(k){m(k);for(h=h.getNextSourceNode(true,CKEDITOR.NODE_ELEMENT);h;){if(h.equals(k))break;if(h.isReadOnly()){if(h.getPosition(k)&CKEDITOR.POSITION_CONTAINS)break;h=h.getNext(j)}else{m=h.getNextSourceNode(false,CKEDITOR.NODE_ELEMENT);if(!(h.getName()=="img"&&h.data("cke-realelement"))&&e(a,h))if(f.test(h.getName()))h.remove(1);else{h.removeAttributes(c);a.fire("removeFormatCleanup",h)}h=m}}}d.moveToBookmark(g)}a.forceNextSelectionCheck();
|
||||
a.getSelection().selectRanges(b)}}},filter:function(a,f){for(var c=a._.removeFormatFilters||[],e=0;e<c.length;e++)if(c[e](f)===false)return false;return true}},CKEDITOR.editor.prototype.addRemoveFormatFilter=function(a){if(!this._.removeFormatFilters)this._.removeFormatFilters=[];this._.removeFormatFilters.push(a)},CKEDITOR.config.removeFormatTags="b,big,cite,code,del,dfn,em,font,i,ins,kbd,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var",CKEDITOR.config.removeFormatAttributes="class,style,lang,width,height,align,hspace,valign",
|
||||
function(){CKEDITOR.plugins.add("sourcearea",{init:function(f){function c(){var a=b&&this.equals(CKEDITOR.document.getActive());this.hide();this.setStyle("height",this.getParent().$.clientHeight+"px");this.setStyle("width",this.getParent().$.clientWidth+"px");this.show();a&&this.focus()}if(f.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var e=CKEDITOR.plugins.sourcearea;f.addMode("source",function(b){var e=f.ui.space("contents").getDocument().createElement("textarea");e.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat?
|
||||
"99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",f.config.sourceAreaTabSize||4)));e.setAttribute("dir","ltr");e.addClass("cke_source cke_reset cke_enable_context_menu");f.ui.space("contents").append(e);e=f.editable(new a(f,e));e.setData(f.getData(1));if(CKEDITOR.env.ie){e.attachListener(f,"resize",c,e);e.attachListener(CKEDITOR.document.getWindow(),"resize",c,e);CKEDITOR.tools.setTimeout(c,0,e)}f.fire("ariaWidget",this);b()});f.addCommand("source",
|
||||
e.commands.source);f.ui.addButton&&f.ui.addButton("Source",{label:f.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"});f.on("mode",function(){f.getCommand("source").setState(f.mode=="source"?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)});var b=CKEDITOR.env.ie&&CKEDITOR.env.version==9}}});var a=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(a){this.setValue(a);this.status="ready";this.editor.fire("dataReady")},getData:function(){return this.getValue()},insertHtml:function(){},
|
||||
insertElement:function(){},insertText:function(){},setReadOnly:function(a){this[(a?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){a.baseProto.detach.call(this);this.clearCustomData();this.remove()}}})}(),CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(a){a.mode=="wysiwyg"&&a.fire("saveSnapshot");a.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);a.setMode(a.mode=="source"?"wysiwyg":"source")},canUndo:!1}}},
|
||||
CKEDITOR.plugins.add("specialchar",{availableLangs:{af:1,ar:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,en:1,"en-gb":1,eo:1,es:1,et:1,fa:1,fi:1,fr:1,"fr-ca":1,gl:1,he:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ku:1,lt:1,lv:1,nb:1,nl:1,no:1,pl:1,pt:1,"pt-br":1,ru:1,si:1,sk:1,sl:1,sq:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},requires:"dialog",init:function(a){var f=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js");a.addCommand("specialchar",{exec:function(){var c=a.langCode,c=f.availableLangs[c]?
|
||||
c:f.availableLangs[c.replace(/-.*/,"")]?c.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(f.path+"dialogs/lang/"+c+".js"),function(){CKEDITOR.tools.extend(a.lang.specialchar,f.langEntries[c]);a.openDialog("specialchar")})},modes:{wysiwyg:1},canUndo:false});a.ui.addButton&&a.ui.addButton("SpecialChar",{label:a.lang.specialchar.toolbar,command:"specialchar",toolbar:"insert,50"})}}),CKEDITOR.config.specialChars="! " # $ % & ' ( ) * + - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ € ‘ ’ “ ” – — ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯ ° ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ Œ œ Ŵ Ŷ ŵ ŷ ‚ ‛ „ … ™ ► • → ⇒ ⇔ ♦ ≈".split(" "),
|
||||
function(){CKEDITOR.plugins.add("stylescombo",{requires:"richcombo",init:function(a){var f=a.config,c=a.lang.stylescombo,e={},b=[],i=[];a.on("stylesSet",function(c){if(c=c.data.styles){for(var d,g,h,k=0,m=c.length;k<m;k++){d=c[k];if(!(a.blockless&&d.element in CKEDITOR.dtd.$block)){g=d.name;d=new CKEDITOR.style(d);if(!a.filter.customConfig||a.filter.check(d)){d._name=g;d._.enterMode=f.enterMode;d._.type=h=d.assignedTo||d.type;d._.weight=k+(h==CKEDITOR.STYLE_OBJECT?1:h==CKEDITOR.STYLE_BLOCK?2:3)*1E3;
|
||||
e[g]=d;b.push(d);i.push(d)}}}b.sort(function(a,b){return a._.weight-b._.weight})}});a.ui.addRichCombo("Styles",{label:c.label,title:c.panelTitle,toolbar:"styles,10",allowedContent:i,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(f.contentsCss),multiSelect:true,attributes:{"aria-label":c.panelTitle}},init:function(){var a,d,e,f,i,m;i=0;for(m=b.length;i<m;i++){a=b[i];d=a._name;f=a._.type;if(f!=e){this.startGroup(c["panelTitle"+f]);e=f}this.add(d,a.type==CKEDITOR.STYLE_OBJECT?d:a.buildPreview(),
|
||||
d)}this.commit()},onClick:function(b){a.focus();a.fire("saveSnapshot");var b=e[b],c=a.elementPath();a[b.checkActive(c,a)?"removeStyle":"applyStyle"](b);a.fire("saveSnapshot")},onRender:function(){a.on("selectionChange",function(b){for(var c=this.getValue(),b=b.data.path.elements,f=0,h=b.length,i;f<h;f++){i=b[f];for(var m in e)if(e[m].checkElementRemovable(i,true,a)){m!=c&&this.setValue(m);return}}this.setValue("")},this)},onOpen:function(){var b=a.getSelection().getSelectedElement(),b=a.elementPath(b),
|
||||
d=[0,0,0,0];this.showAll();this.unmarkAll();for(var f in e){var h=e[f],i=h._.type;h.checkApplicable(b,a,a.activeFilter)?d[i]++:this.hideItem(f);h.checkActive(b,a)&&this.mark(f)}d[CKEDITOR.STYLE_BLOCK]||this.hideGroup(c["panelTitle"+CKEDITOR.STYLE_BLOCK]);d[CKEDITOR.STYLE_INLINE]||this.hideGroup(c["panelTitle"+CKEDITOR.STYLE_INLINE]);d[CKEDITOR.STYLE_OBJECT]||this.hideGroup(c["panelTitle"+CKEDITOR.STYLE_OBJECT])},refresh:function(){var b=a.elementPath();if(b){for(var c in e)if(e[c].checkApplicable(b,
|
||||
a,a.activeFilter))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}},reset:function(){e={};b=[]}})}})}(),function(){function a(a){return{editorFocus:false,canUndo:false,modes:{wysiwyg:1},exec:function(c){if(c.editable().hasFocus){var e=c.getSelection(),d;if(d=(new CKEDITOR.dom.elementPath(e.getCommonAncestor(),e.root)).contains({td:1,th:1},1)){var e=c.createRange(),f=CKEDITOR.tools.tryThese(function(){var c=d.getParent().$.cells[d.$.cellIndex+(a?-1:1)];c.parentNode.parentNode;return c},function(){var c=
|
||||
d.getParent(),c=c.getAscendant("table").$.rows[c.$.rowIndex+(a?-1:1)];return c.cells[a?c.cells.length-1:0]});if(!f&&!a){for(var h=d.getAscendant("table").$,f=d.getParent().$.cells,h=new CKEDITOR.dom.element(h.insertRow(-1),c.document),k=0,m=f.length;k<m;k++)h.append((new CKEDITOR.dom.element(f[k],c.document)).clone(false,false)).appendBogus();e.moveToElementEditStart(h)}else if(f){f=new CKEDITOR.dom.element(f);e.moveToElementEditStart(f);(!e.checkStartOfBlock()||!e.checkEndOfBlock())&&e.selectNodeContents(f)}else return true;
|
||||
e.select(true);return true}}return false}}}var f={editorFocus:false,modes:{wysiwyg:1,source:1}},c={exec:function(a){a.container.focusNext(true,a.tabIndex)}},e={exec:function(a){a.container.focusPrevious(true,a.tabIndex)}};CKEDITOR.plugins.add("tab",{init:function(b){for(var i=b.config.enableTabKeyTools!==false,j=b.config.tabSpaces||0,d="";j--;)d=d+" ";if(d)b.on("key",function(a){if(a.data.keyCode==9){b.insertText(d);a.cancel()}});if(i)b.on("key",function(a){(a.data.keyCode==9&&b.execCommand("selectNextCell")||
|
||||
a.data.keyCode==CKEDITOR.SHIFT+9&&b.execCommand("selectPreviousCell"))&&a.cancel()});b.addCommand("blur",CKEDITOR.tools.extend(c,f));b.addCommand("blurBack",CKEDITOR.tools.extend(e,f));b.addCommand("selectNextCell",a());b.addCommand("selectPreviousCell",a(true))}})}(),CKEDITOR.dom.element.prototype.focusNext=function(a,f){var c=f===void 0?this.getTabIndex():f,e,b,i,j,d,g;if(c<=0)for(d=this.getNextSourceNode(a,CKEDITOR.NODE_ELEMENT);d;){if(d.isVisible()&&d.getTabIndex()===0){i=d;break}d=d.getNextSourceNode(false,
|
||||
CKEDITOR.NODE_ELEMENT)}else for(d=this.getDocument().getBody().getFirst();d=d.getNextSourceNode(false,CKEDITOR.NODE_ELEMENT);){if(!e)if(!b&&d.equals(this)){b=true;if(a){if(!(d=d.getNextSourceNode(true,CKEDITOR.NODE_ELEMENT)))break;e=1}}else b&&!this.contains(d)&&(e=1);if(d.isVisible()&&!((g=d.getTabIndex())<0)){if(e&&g==c){i=d;break}if(g>c&&(!i||!j||g<j)){i=d;j=g}else if(!i&&g===0){i=d;j=g}}}i&&i.focus()},CKEDITOR.dom.element.prototype.focusPrevious=function(a,f){for(var c=f===void 0?this.getTabIndex():
|
||||
f,e,b,i,j=0,d,g=this.getDocument().getBody().getLast();g=g.getPreviousSourceNode(false,CKEDITOR.NODE_ELEMENT);){if(!e)if(!b&&g.equals(this)){b=true;if(a){if(!(g=g.getPreviousSourceNode(true,CKEDITOR.NODE_ELEMENT)))break;e=1}}else b&&!this.contains(g)&&(e=1);if(g.isVisible()&&!((d=g.getTabIndex())<0))if(c<=0){if(e&&d===0){i=g;break}if(d>j){i=g;j=d}}else{if(e&&d==c){i=g;break}if(d<c&&(!i||d>j)){i=g;j=d}}}i&&i.focus()},CKEDITOR.plugins.add("table",{requires:"dialog",init:function(a){function f(a){return CKEDITOR.tools.extend(a||
|
||||
{},{contextSensitive:1,refresh:function(a,c){this.setState(c.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!a.blockless){var c=a.lang.table;a.addCommand("table",new CKEDITOR.dialogCommand("table",{context:"table",allowedContent:"table{width,height}[align,border,cellpadding,cellspacing,summary];caption tbody thead tfoot;th td tr[scope];"+(a.plugins.dialogadvtab?"table"+a.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle",
|
||||
"table[width]: sizeToAttribute"]]}));a.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",f()));a.addCommand("tableDelete",f({exec:function(a){var b=a.elementPath().contains("table",1);if(b){var c=b.getParent(),f=a.editable();c.getChildCount()==1&&(!c.is("td","th")&&!c.equals(f))&&(b=c);a=a.createRange();a.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START);b.remove();a.select()}}}));a.ui.addButton&&a.ui.addButton("Table",{label:c.toolbar,command:"table",toolbar:"insert,30"});
|
||||
CKEDITOR.dialog.add("table",this.path+"dialogs/table.js");CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js");a.addMenuItems&&a.addMenuItems({table:{label:c.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:c.deleteTable,command:"tableDelete",group:"table",order:1}});a.on("doubleclick",function(a){if(a.data.element.is("table"))a.data.dialog="tableProperties"});a.contextMenu&&a.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}}),
|
||||
function(){function a(a){function b(a){if(!(c.length>0)&&a.type==CKEDITOR.NODE_ELEMENT&&q.test(a.getName())&&!a.getCustomData("selected_cell")){CKEDITOR.dom.element.setMarker(d,a,"selected_cell",true);c.push(a)}}for(var a=a.getRanges(),c=[],d={},e=0;e<a.length;e++){var f=a[e];if(f.collapsed){f=f.getCommonAncestor();(f=f.getAscendant("td",true)||f.getAscendant("th",true))&&c.push(f)}else{var f=new CKEDITOR.dom.walker(f),g;for(f.guard=b;g=f.next();)if(g.type!=CKEDITOR.NODE_ELEMENT||!g.is(CKEDITOR.dtd.table))if((g=
|
||||
g.getAscendant("td",true)||g.getAscendant("th",true))&&!g.getCustomData("selected_cell")){CKEDITOR.dom.element.setMarker(d,g,"selected_cell",true);c.push(g)}}}CKEDITOR.dom.element.clearAllMarkers(d);return c}function f(b,c){for(var d=a(b),e=d[0],f=e.getAscendant("table"),e=e.getDocument(),g=d[0].getParent(),h=g.$.rowIndex,d=d[d.length-1],i=d.getParent().$.rowIndex+d.$.rowSpan-1,d=new CKEDITOR.dom.element(f.$.rows[i]),h=c?h:i,g=c?g:d,d=CKEDITOR.tools.buildTableMap(f),f=d[h],h=c?d[h-1]:d[h+1],d=d[0].length,
|
||||
e=e.createElement("tr"),i=0;f[i]&&i<d;i++){var j;if(f[i].rowSpan>1&&h&&f[i]==h[i]){j=f[i];j.rowSpan=j.rowSpan+1}else{j=(new CKEDITOR.dom.element(f[i])).clone();j.removeAttribute("rowSpan");j.appendBogus();e.append(j);j=j.$}i=i+(j.colSpan-1)}c?e.insertBefore(g):e.insertAfter(g)}function c(b){if(b instanceof CKEDITOR.dom.selection){for(var d=a(b),e=d[0].getAscendant("table"),f=CKEDITOR.tools.buildTableMap(e),b=d[0].getParent().$.rowIndex,d=d[d.length-1],g=d.getParent().$.rowIndex+d.$.rowSpan-1,d=[],
|
||||
h=b;h<=g;h++){for(var i=f[h],j=new CKEDITOR.dom.element(e.$.rows[h]),k=0;k<i.length;k++){var m=new CKEDITOR.dom.element(i[k]),q=m.getParent().$.rowIndex;if(m.$.rowSpan==1)m.remove();else{m.$.rowSpan=m.$.rowSpan-1;if(q==h){q=f[h+1];q[k-1]?m.insertAfter(new CKEDITOR.dom.element(q[k-1])):(new CKEDITOR.dom.element(e.$.rows[h+1])).append(m,1)}}k=k+(m.$.colSpan-1)}d.push(j)}f=e.$.rows;e=new CKEDITOR.dom.element(f[g+1]||(b>0?f[b-1]:null)||e.$.parentNode);for(h=d.length;h>=0;h--)c(d[h]);return e}if(b instanceof
|
||||
CKEDITOR.dom.element){e=b.getAscendant("table");e.$.rows.length==1?e.remove():b.remove()}return null}function e(a,b){for(var c=b?Infinity:0,d=0;d<a.length;d++){var e;e=a[d];for(var f=b,g=e.getParent().$.cells,h=0,i=0;i<g.length;i++){var j=g[i],h=h+(f?1:j.colSpan);if(j==e.$)break}e=h-1;if(b?e<c:e>c)c=e}return c}function b(b,c){for(var d=a(b),f=d[0].getAscendant("table"),g=e(d,1),d=e(d),g=c?g:d,h=CKEDITOR.tools.buildTableMap(f),f=[],d=[],i=h.length,j=0;j<i;j++){f.push(h[j][g]);d.push(c?h[j][g-1]:h[j][g+
|
||||
1])}for(j=0;j<i;j++)if(f[j]){if(f[j].colSpan>1&&d[j]==f[j]){g=f[j];g.colSpan=g.colSpan+1}else{g=(new CKEDITOR.dom.element(f[j])).clone();g.removeAttribute("colSpan");g.appendBogus();g[c?"insertBefore":"insertAfter"].call(g,new CKEDITOR.dom.element(f[j]));g=g.$}j=j+(g.rowSpan-1)}}function i(a,b){var c=a.getStartElement();if(c=c.getAscendant("td",1)||c.getAscendant("th",1)){var d=c.clone();d.appendBogus();b?d.insertBefore(c):d.insertAfter(c)}}function j(b){if(b instanceof CKEDITOR.dom.selection){var b=
|
||||
a(b),c=b[0]&&b[0].getAscendant("table"),e;a:{var f=0;e=b.length-1;for(var g={},h,i;h=b[f++];)CKEDITOR.dom.element.setMarker(g,h,"delete_cell",true);for(f=0;h=b[f++];)if((i=h.getPrevious())&&!i.getCustomData("delete_cell")||(i=h.getNext())&&!i.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(g);e=i;break a}CKEDITOR.dom.element.clearAllMarkers(g);i=b[0].getParent();if(i=i.getPrevious())e=i.getLast();else{i=b[e].getParent();e=(i=i.getNext())?i.getChild(0):null}}for(i=b.length-1;i>=
|
||||
0;i--)j(b[i]);e?d(e,true):c&&c.remove()}else if(b instanceof CKEDITOR.dom.element){c=b.getParent();c.getChildCount()==1?c.remove():b.remove()}}function d(a,b){var c=a.getDocument(),d=CKEDITOR.document;if(CKEDITOR.env.ie&&CKEDITOR.env.version==10){d.focus();c.focus()}c=new CKEDITOR.dom.range(c);if(!c["moveToElementEdit"+(b?"End":"Start")](a)){c.selectNodeContents(a);c.collapse(b?false:true)}c.select(true)}function g(a,b,c){a=a[b];if(typeof c=="undefined")return a;for(b=0;a&&b<a.length;b++){if(c.is&&
|
||||
a[b]==c.$)return b;if(b==c)return new CKEDITOR.dom.element(a[b])}return c.is?-1:null}function h(b,c,d){var e=a(b),f;if((c?e.length!=1:e.length<2)||(f=b.getCommonAncestor())&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("table"))return false;var h,b=e[0];f=b.getAscendant("table");var i=CKEDITOR.tools.buildTableMap(f),j=i.length,k=i[0].length,m=b.getParent().$.rowIndex,q=g(i,m,b);if(c){var x;try{var w=parseInt(b.getAttribute("rowspan"),10)||1;h=parseInt(b.getAttribute("colspan"),10)||1;x=i[c=="up"?m-w:c=="down"?
|
||||
m+w:m][c=="left"?q-h:c=="right"?q+h:q]}catch(z){return false}if(!x||b.$==x)return false;e[c=="up"||c=="left"?"unshift":"push"](new CKEDITOR.dom.element(x))}for(var c=b.getDocument(),A=m,w=x=0,F=!d&&new CKEDITOR.dom.documentFragment(c),C=0,c=0;c<e.length;c++){h=e[c];var K=h.getParent(),G=h.getFirst(),D=h.$.colSpan,E=h.$.rowSpan,K=K.$.rowIndex,J=g(i,K,h),C=C+D*E,w=Math.max(w,J-q+D);x=Math.max(x,K-m+E);if(!d){D=h;(E=D.getBogus())&&E.remove();D.trim();if(h.getChildren().count()){if(K!=A&&G&&(!G.isBlockBoundary||
|
||||
!G.isBlockBoundary({br:1})))(A=F.getLast(CKEDITOR.dom.walker.whitespaces(true)))&&(!A.is||!A.is("br"))&&F.append("br");h.moveChildren(F)}c?h.remove():h.setHtml("")}A=K}if(d)return x*w==C;F.moveChildren(b);b.appendBogus();w>=k?b.removeAttribute("rowSpan"):b.$.rowSpan=x;x>=j?b.removeAttribute("colSpan"):b.$.colSpan=w;d=new CKEDITOR.dom.nodeList(f.$.rows);e=d.count();for(c=e-1;c>=0;c--){f=d.getItem(c);if(!f.$.cells.length){f.remove();e++}}return b}function k(b,c){var d=a(b);if(d.length>1)return false;
|
||||
if(c)return true;var d=d[0],e=d.getParent(),f=e.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(f),i=e.$.rowIndex,j=g(h,i,d),k=d.$.rowSpan,m;if(k>1){m=Math.ceil(k/2);for(var k=Math.floor(k/2),e=i+m,f=new CKEDITOR.dom.element(f.$.rows[e]),h=g(h,e),q,e=d.clone(),i=0;i<h.length;i++){q=h[i];if(q.parentNode==f.$&&i>j){e.insertBefore(new CKEDITOR.dom.element(q));break}else q=null}q||f.append(e)}else{k=m=1;f=e.clone();f.insertAfter(e);f.append(e=d.clone());q=g(h,i);for(j=0;j<q.length;j++)q[j].rowSpan++}e.appendBogus();
|
||||
d.$.rowSpan=m;e.$.rowSpan=k;m==1&&d.removeAttribute("rowSpan");k==1&&e.removeAttribute("rowSpan");return e}function m(b,c){var d=a(b);if(d.length>1)return false;if(c)return true;var d=d[0],e=d.getParent(),f=e.getAscendant("table"),f=CKEDITOR.tools.buildTableMap(f),h=g(f,e.$.rowIndex,d),i=d.$.colSpan;if(i>1){e=Math.ceil(i/2);i=Math.floor(i/2)}else{for(var i=e=1,j=[],k=0;k<f.length;k++){var m=f[k];j.push(m[h]);m[h].rowSpan>1&&(k=k+(m[h].rowSpan-1))}for(f=0;f<j.length;f++)j[f].colSpan++}f=d.clone();
|
||||
f.insertAfter(d);f.appendBogus();d.$.colSpan=e;f.$.colSpan=i;e==1&&d.removeAttribute("colSpan");i==1&&f.removeAttribute("colSpan");return f}var q=/^(?:td|th)$/;CKEDITOR.plugins.tabletools={requires:"table,dialog,contextmenu",init:function(e){function g(a){return CKEDITOR.tools.extend(a||{},{contextSensitive:1,refresh:function(a,b){this.setState(b.contains({td:1,th:1},1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}function n(a,b){var c=e.addCommand(a,b);e.addFeature(c)}var l=e.lang.table;
|
||||
n("cellProperties",new CKEDITOR.dialogCommand("cellProperties",g({allowedContent:"td th{width,height,border-color,background-color,white-space,vertical-align,text-align}[colspan,rowspan]",requiredContent:"table"})));CKEDITOR.dialog.add("cellProperties",this.path+"dialogs/tableCell.js");n("rowDelete",g({requiredContent:"table",exec:function(a){a=a.getSelection();d(c(a))}}));n("rowInsertBefore",g({requiredContent:"table",exec:function(a){a=a.getSelection();f(a,true)}}));n("rowInsertAfter",g({requiredContent:"table",
|
||||
exec:function(a){a=a.getSelection();f(a)}}));n("columnDelete",g({requiredContent:"table",exec:function(b){for(var b=b.getSelection(),b=a(b),c=b[0],e=b[b.length-1],b=c.getAscendant("table"),f=CKEDITOR.tools.buildTableMap(b),g,h,i=[],j=0,k=f.length;j<k;j++)for(var l=0,m=f[j].length;l<m;l++){f[j][l]==c.$&&(g=l);f[j][l]==e.$&&(h=l)}for(j=g;j<=h;j++)for(l=0;l<f.length;l++){e=f[l];c=new CKEDITOR.dom.element(b.$.rows[l]);e=new CKEDITOR.dom.element(e[j]);if(e.$){e.$.colSpan==1?e.remove():e.$.colSpan=e.$.colSpan-
|
||||
1;l=l+(e.$.rowSpan-1);c.$.cells.length||i.push(c)}}h=b.$.rows[0]&&b.$.rows[0].cells;g=new CKEDITOR.dom.element(h[g]||(g?h[g-1]:b.$.parentNode));i.length==k&&b.remove();g&&d(g,true)}}));n("columnInsertBefore",g({requiredContent:"table",exec:function(a){a=a.getSelection();b(a,true)}}));n("columnInsertAfter",g({requiredContent:"table",exec:function(a){a=a.getSelection();b(a)}}));n("cellDelete",g({requiredContent:"table",exec:function(a){a=a.getSelection();j(a)}}));n("cellMerge",g({allowedContent:"td[colspan,rowspan]",
|
||||
requiredContent:"td[colspan,rowspan]",exec:function(a){d(h(a.getSelection()),true)}}));n("cellMergeRight",g({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a){d(h(a.getSelection(),"right"),true)}}));n("cellMergeDown",g({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a){d(h(a.getSelection(),"down"),true)}}));n("cellVerticalSplit",g({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a){d(k(a.getSelection()))}}));n("cellHorizontalSplit",
|
||||
g({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a){d(m(a.getSelection()))}}));n("cellInsertBefore",g({requiredContent:"table",exec:function(a){a=a.getSelection();i(a,true)}}));n("cellInsertAfter",g({requiredContent:"table",exec:function(a){a=a.getSelection();i(a)}}));e.addMenuItems&&e.addMenuItems({tablecell:{label:l.cell.menu,group:"tablecell",order:1,getItems:function(){var b=e.getSelection(),c=a(b);return{tablecell_insertBefore:CKEDITOR.TRISTATE_OFF,tablecell_insertAfter:CKEDITOR.TRISTATE_OFF,
|
||||
tablecell_delete:CKEDITOR.TRISTATE_OFF,tablecell_merge:h(b,null,true)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_right:h(b,"right",true)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_down:h(b,"down",true)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_vertical:k(b,true)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_horizontal:m(b,true)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_properties:c.length>0?CKEDITOR.TRISTATE_OFF:
|
||||
CKEDITOR.TRISTATE_DISABLED}}},tablecell_insertBefore:{label:l.cell.insertBefore,group:"tablecell",command:"cellInsertBefore",order:5},tablecell_insertAfter:{label:l.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",order:10},tablecell_delete:{label:l.cell.deleteCell,group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:l.cell.merge,group:"tablecell",command:"cellMerge",order:16},tablecell_merge_right:{label:l.cell.mergeRight,group:"tablecell",command:"cellMergeRight",
|
||||
order:17},tablecell_merge_down:{label:l.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:l.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:l.cell.splitVertical,group:"tablecell",command:"cellVerticalSplit",order:20},tablecell_properties:{label:l.cell.title,group:"tablecellproperties",command:"cellProperties",order:21},tablerow:{label:l.row.menu,group:"tablerow",order:1,getItems:function(){return{tablerow_insertBefore:CKEDITOR.TRISTATE_OFF,
|
||||
tablerow_insertAfter:CKEDITOR.TRISTATE_OFF,tablerow_delete:CKEDITOR.TRISTATE_OFF}}},tablerow_insertBefore:{label:l.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:l.row.insertAfter,group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:l.row.deleteRow,group:"tablerow",command:"rowDelete",order:15},tablecolumn:{label:l.column.menu,group:"tablecolumn",order:1,getItems:function(){return{tablecolumn_insertBefore:CKEDITOR.TRISTATE_OFF,
|
||||
tablecolumn_insertAfter:CKEDITOR.TRISTATE_OFF,tablecolumn_delete:CKEDITOR.TRISTATE_OFF}}},tablecolumn_insertBefore:{label:l.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:l.column.insertAfter,group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:l.column.deleteColumn,group:"tablecolumn",command:"columnDelete",order:15}});e.contextMenu&&e.contextMenu.addListener(function(a,b,c){return(a=c.contains({td:1,th:1},
|
||||
1))&&!a.isReadOnly()?{tablecell:CKEDITOR.TRISTATE_OFF,tablerow:CKEDITOR.TRISTATE_OFF,tablecolumn:CKEDITOR.TRISTATE_OFF}:null})},getSelectedCells:a};CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)}(),CKEDITOR.tools.buildTableMap=function(a){for(var a=a.$.rows,f=-1,c=[],e=0;e<a.length;e++){f++;!c[f]&&(c[f]=[]);for(var b=-1,i=0;i<a[e].cells.length;i++){var j=a[e].cells[i];for(b++;c[f][b];)b++;for(var d=isNaN(j.colSpan)?1:j.colSpan,j=isNaN(j.rowSpan)?1:j.rowSpan,g=0;g<j;g++){c[f+g]||(c[f+
|
||||
g]=[]);for(var h=0;h<d;h++)c[f+g][b+h]=a[e].cells[i]}b=b+(d-1)}}return c},"use strict",function(){var a=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],f={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(b){function e(a){j.enabled&&a.data.command.canUndo!==false&&j.save()}function f(){j.enabled=b.readOnly?false:b.mode=="wysiwyg";j.onChange()}var j=b.undoManager=new c(b),m=j.editingHandler=new i(j),q=b.addCommand("undo",{exec:function(){if(j.undo()){b.selectionChange();this.fire("afterUndo")}},
|
||||
startDisabled:true,canUndo:false}),p=b.addCommand("redo",{exec:function(){if(j.redo()){b.selectionChange();this.fire("afterRedo")}},startDisabled:true,canUndo:false});b.setKeystroke([[a[0],"undo"],[a[1],"redo"],[a[2],"redo"]]);j.onChange=function(){q.setState(j.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);p.setState(j.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};b.on("beforeCommandExec",e);b.on("afterCommandExec",e);b.on("saveSnapshot",function(a){j.save(a.data&&a.data.contentOnly)});
|
||||
b.on("contentDom",m.attachListeners,m);b.on("instanceReady",function(){b.fire("saveSnapshot")});b.on("beforeModeUnload",function(){b.mode=="wysiwyg"&&j.save(true)});b.on("mode",f);b.on("readOnly",f);if(b.ui.addButton){b.ui.addButton("Undo",{label:b.lang.undo.undo,command:"undo",toolbar:"undo,10"});b.ui.addButton("Redo",{label:b.lang.undo.redo,command:"redo",toolbar:"undo,20"})}b.resetUndo=function(){j.reset();b.fire("saveSnapshot")};b.on("updateSnapshot",function(){j.currentImage&&j.update()});b.on("lockSnapshot",
|
||||
function(a){a=a.data;j.lock(a&&a.dontUpdate,a&&a.forceUpdate)});b.on("unlockSnapshot",j.unlock,j)}});CKEDITOR.plugins.undo={};var c=CKEDITOR.plugins.undo.UndoManager=function(a){this.strokesRecorded=[0,0];this.locked=null;this.previousKeyGroup=-1;this.limit=a.config.undoStackSize||20;this.strokesLimit=25;this.editor=a;this.reset()};c.prototype={type:function(a,b){var e=c.getKeyGroup(a),f=this.strokesRecorded[e]+1,b=b||f>=this.strokesLimit;if(!this.typing){this.hasUndo=this.typing=true;this.hasRedo=
|
||||
false;this.onChange()}if(b){f=0;this.editor.fire("saveSnapshot")}else this.editor.fire("change");this.strokesRecorded[e]=f;this.previousKeyGroup=e},keyGroupChanged:function(a){return c.getKeyGroup(a)!=this.previousKeyGroup},reset:function(){this.snapshots=[];this.index=-1;this.currentImage=null;this.hasRedo=this.hasUndo=false;this.locked=null;this.resetType()},resetType:function(){this.strokesRecorded=[0,0];this.typing=false;this.previousKeyGroup=-1},refreshState:function(){this.hasUndo=!!this.getNextImage(true);
|
||||
this.hasRedo=!!this.getNextImage(false);this.resetType();this.onChange()},save:function(a,b,c){var f=this.editor;if(this.locked||f.status!="ready"||f.mode!="wysiwyg")return false;var i=f.editable();if(!i||i.status!="ready")return false;i=this.snapshots;b||(b=new e(f));if(b.contents===false)return false;if(this.currentImage)if(b.equalsContent(this.currentImage)){if(a||b.equalsSelection(this.currentImage))return false}else c!==false&&f.fire("change");i.splice(this.index+1,i.length-this.index-1);i.length==
|
||||
this.limit&&i.shift();this.index=i.push(b)-1;this.currentImage=b;c!==false&&this.refreshState();return true},restoreImage:function(a){var b=this.editor,c;if(a.bookmarks){b.focus();c=b.getSelection()}this.locked={level:999};this.editor.loadSnapshot(a.contents);if(a.bookmarks)c.selectBookmarks(a.bookmarks);else if(CKEDITOR.env.ie){c=this.editor.document.getBody().$.createTextRange();c.collapse(true);c.select()}this.locked=null;this.index=a.index;this.currentImage=this.snapshots[this.index];this.update();
|
||||
this.refreshState();b.fire("change")},getNextImage:function(a){var b=this.snapshots,c=this.currentImage,e;if(c)if(a)for(e=this.index-1;e>=0;e--){a=b[e];if(!c.equalsContent(a)){a.index=e;return a}}else for(e=this.index+1;e<b.length;e++){a=b[e];if(!c.equalsContent(a)){a.index=e;return a}}return null},redoable:function(){return this.enabled&&this.hasRedo},undoable:function(){return this.enabled&&this.hasUndo},undo:function(){if(this.undoable()){this.save(true);var a=this.getNextImage(true);if(a)return this.restoreImage(a),
|
||||
true}return false},redo:function(){if(this.redoable()){this.save(true);if(this.redoable()){var a=this.getNextImage(false);if(a)return this.restoreImage(a),true}}return false},update:function(a){if(!this.locked){a||(a=new e(this.editor));for(var b=this.index,c=this.snapshots;b>0&&this.currentImage.equalsContent(c[b-1]);)b=b-1;c.splice(b,this.index-b+1,a);this.index=b;this.currentImage=a}},updateSelection:function(a){if(!this.snapshots.length)return false;var b=this.snapshots,c=b[b.length-1];if(c.equalsContent(a)&&
|
||||
!c.equalsSelection(a)){this.currentImage=b[b.length-1]=a;return true}return false},lock:function(a,b){if(this.locked)this.locked.level++;else if(a)this.locked={level:1};else{var c=null;if(b)c=true;else{var f=new e(this.editor,true);this.currentImage&&this.currentImage.equalsContent(f)&&(c=f)}this.locked={update:c,level:1}}},unlock:function(){if(this.locked&&!--this.locked.level){var a=this.locked.update;this.locked=null;if(a===true)this.update();else if(a){var b=new e(this.editor,true);a.equalsContent(b)||
|
||||
this.update()}}}};c.navigationKeyCodes={37:1,38:1,39:1,40:1,36:1,35:1,33:1,34:1};c.keyGroups={PRINTABLE:0,FUNCTIONAL:1};c.isNavigationKey=function(a){return!!c.navigationKeyCodes[a]};c.getKeyGroup=function(a){var b=c.keyGroups;return f[a]?b.FUNCTIONAL:b.PRINTABLE};c.getOppositeKeyGroup=function(a){var b=c.keyGroups;return a==b.FUNCTIONAL?b.PRINTABLE:b.FUNCTIONAL};c.ieFunctionalKeysBug=function(a){return CKEDITOR.env.ie&&c.getKeyGroup(a)==c.keyGroups.FUNCTIONAL};var e=CKEDITOR.plugins.undo.Image=function(a,
|
||||
b){this.editor=a;a.fire("beforeUndoImage");var c=a.getSnapshot();CKEDITOR.env.ie&&c&&(c=c.replace(/\s+data-cke-expando=".*?"/g,""));this.contents=c;if(!b)this.bookmarks=(c=c&&a.getSelection())&&c.createBookmarks2(true);a.fire("afterUndoImage")},b=/\b(?:href|src|name)="[^"]*?"/gi;e.prototype={equalsContent:function(a){var c=this.contents,a=a.contents;if(CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)){c=c.replace(b,"");a=a.replace(b,"")}return c!=a?false:true},equalsSelection:function(a){var b=
|
||||
this.bookmarks,a=a.bookmarks;if(b||a){if(!b||!a||b.length!=a.length)return false;for(var c=0;c<b.length;c++){var e=b[c],f=a[c];if(e.startOffset!=f.startOffset||e.endOffset!=f.endOffset||!CKEDITOR.tools.arrayCompare(e.start,f.start)||!CKEDITOR.tools.arrayCompare(e.end,f.end))return false}}return true}};var i=CKEDITOR.plugins.undo.NativeEditingHandler=function(a){this.undoManager=a;this.ignoreInputEvent=false;this.keyEventsStack=new j;this.lastKeydownImage=null};i.prototype={onKeydown:function(b){var f=
|
||||
b.data.getKey();if(f!==229)if(CKEDITOR.tools.indexOf(a,b.data.getKeystroke())>-1)b.data.preventDefault();else{this.keyEventsStack.cleanUp(b);b=this.undoManager;this.keyEventsStack.getLast(f)||this.keyEventsStack.push(f);this.lastKeydownImage=new e(b.editor);if(c.isNavigationKey(f)||this.undoManager.keyGroupChanged(f))if(b.strokesRecorded[0]||b.strokesRecorded[1]){b.save(false,this.lastKeydownImage,false);b.resetType()}}},onInput:function(){if(this.ignoreInputEvent)this.ignoreInputEvent=false;else{var a=
|
||||
this.keyEventsStack.getLast();a||(a=this.keyEventsStack.push(0));this.keyEventsStack.increment(a.keyCode);if(this.keyEventsStack.getTotalInputs()>=this.undoManager.strokesLimit){this.undoManager.type(a.keyCode,true);this.keyEventsStack.resetInputs()}}},onKeyup:function(a){var b=this.undoManager,a=a.data.getKey(),f=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(a);if(!c.ieFunctionalKeysBug(a)||!this.lastKeydownImage||!this.lastKeydownImage.equalsContent(new e(b.editor,true)))if(f>
|
||||
0)b.type(a);else if(c.isNavigationKey(a))this.onNavigationKey(true)},onNavigationKey:function(a){var b=this.undoManager;(a||!b.save(true,null,false))&&b.updateSelection(new e(b.editor));b.resetType()},ignoreInputEventListener:function(){this.ignoreInputEvent=true},attachListeners:function(){var a=this.undoManager.editor,b=a.editable(),e=this;b.attachListener(b,"keydown",function(a){e.onKeydown(a);if(c.ieFunctionalKeysBug(a.data.getKey()))e.onInput()},null,null,999);b.attachListener(b,CKEDITOR.env.ie?
|
||||
"keypress":"input",e.onInput,e,null,999);b.attachListener(b,"keyup",e.onKeyup,e,null,999);b.attachListener(b,"paste",e.ignoreInputEventListener,e,null,999);b.attachListener(b,"drop",e.ignoreInputEventListener,e,null,999);b.attachListener(b.isInline()?b:a.document.getDocumentElement(),"click",function(){e.onNavigationKey()},null,null,999);b.attachListener(this.undoManager.editor,"blur",function(){e.keyEventsStack.remove(9)},null,null,999)}};var j=CKEDITOR.plugins.undo.KeyEventsStack=function(){this.stack=
|
||||
[]};j.prototype={push:function(a){return this.stack[this.stack.push({keyCode:a,inputs:0})-1]},getLastIndex:function(a){if(typeof a!="number")return this.stack.length-1;for(var b=this.stack.length;b--;)if(this.stack[b].keyCode==a)return b;return-1},getLast:function(a){a=this.getLastIndex(a);return a!=-1?this.stack[a]:null},increment:function(a){this.getLast(a).inputs++},remove:function(a){a=this.getLastIndex(a);a!=-1&&this.stack.splice(a,1)},resetInputs:function(a){if(typeof a=="number")this.getLast(a).inputs=
|
||||
0;else for(a=this.stack.length;a--;)this.stack[a].inputs=0},getTotalInputs:function(){for(var a=this.stack.length,b=0;a--;)b=b+this.stack[a].inputs;return b},cleanUp:function(a){a=a.data.$;!a.ctrlKey&&!a.metaKey&&this.remove(17);a.shiftKey||this.remove(16);a.altKey||this.remove(18)}}}(),function(){function a(a,b){var b=b===void 0||b,c;if(b)c=a.getComputedStyle("text-align");else{for(;!a.hasAttribute||!a.hasAttribute("align")&&!a.getStyle("text-align");){c=a.getParent();if(!c)break;a=c}c=a.getStyle("text-align")||
|
||||
a.getAttribute("align")||""}c&&(c=c.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i,""));!c&&b&&(c=a.getComputedStyle("direction")=="rtl"?"right":"left");return c}function f(a,b,c){this.editor=a;this.name=b;this.value=c;this.context="p";var b=a.config.justifyClasses,f=a.config.enterMode==CKEDITOR.ENTER_P?"p":"div";if(b){switch(c){case "left":this.cssClassName=b[0];break;case "center":this.cssClassName=b[1];break;case "right":this.cssClassName=b[2];break;case "justify":this.cssClassName=b[3]}this.cssClassRegex=
|
||||
RegExp("(?:^|\\s+)(?:"+b.join("|")+")(?=$|\\s)");this.requiredContent=f+"("+this.cssClassName+")"}else this.requiredContent=f+"{text-align}";this.allowedContent={"caption div h1 h2 h3 h4 h5 h6 p pre td th li":{propertiesOnly:true,styles:this.cssClassName?null:"text-align",classes:this.cssClassName||null}};if(a.config.enterMode==CKEDITOR.ENTER_BR)this.allowedContent.div=true}function c(a){var b=a.editor,c=b.createRange();c.setStartBefore(a.data.node);c.setEndAfter(a.data.node);for(var f=new CKEDITOR.dom.walker(c),
|
||||
d;d=f.next();)if(d.type==CKEDITOR.NODE_ELEMENT)if(!d.equals(a.data.node)&&d.getDirection()){c.setStartAfter(d);f=new CKEDITOR.dom.walker(c)}else{var g=b.config.justifyClasses;if(g)if(d.hasClass(g[0])){d.removeClass(g[0]);d.addClass(g[2])}else if(d.hasClass(g[2])){d.removeClass(g[2]);d.addClass(g[0])}g=d.getStyle("text-align");g=="left"?d.setStyle("text-align","right"):g=="right"&&d.setStyle("text-align","left")}}f.prototype={exec:function(c){var b=c.getSelection(),f=c.config.enterMode;if(b){for(var j=
|
||||
b.createBookmarks(),d=b.getRanges(),g=this.cssClassName,h,k,m=c.config.useComputedState,m=m===void 0||m,q=d.length-1;q>=0;q--){h=d[q].createIterator();for(h.enlargeBr=f!=CKEDITOR.ENTER_BR;k=h.getNextParagraph(f==CKEDITOR.ENTER_P?"p":"div");)if(!k.isReadOnly()){k.removeAttribute("align");k.removeStyle("text-align");var p=g&&(k.$.className=CKEDITOR.tools.ltrim(k.$.className.replace(this.cssClassRegex,""))),o=this.state==CKEDITOR.TRISTATE_OFF&&(!m||a(k,true)!=this.value);g?o?k.addClass(g):p||k.removeAttribute("class"):
|
||||
o&&k.setStyle("text-align",this.value)}}c.focus();c.forceNextSelectionCheck();b.selectBookmarks(j)}},refresh:function(c,b){var f=b.block||b.blockLimit;this.setState(f.getName()!="body"&&a(f,this.editor.config.useComputedState)==this.value?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add("justify",{init:function(a){if(!a.blockless){var b=new f(a,"justifyleft","left"),i=new f(a,"justifycenter","center"),j=new f(a,"justifyright","right"),d=new f(a,"justifyblock","justify");a.addCommand("justifyleft",
|
||||
b);a.addCommand("justifycenter",i);a.addCommand("justifyright",j);a.addCommand("justifyblock",d);if(a.ui.addButton){a.ui.addButton("JustifyLeft",{label:a.lang.justify.left,command:"justifyleft",toolbar:"align,10"});a.ui.addButton("JustifyCenter",{label:a.lang.justify.center,command:"justifycenter",toolbar:"align,20"});a.ui.addButton("JustifyRight",{label:a.lang.justify.right,command:"justifyright",toolbar:"align,30"});a.ui.addButton("JustifyBlock",{label:a.lang.justify.block,command:"justifyblock",
|
||||
toolbar:"align,40"})}a.on("dirChanged",c)}}})}(),function(){var a={readOnly:1,preserveState:true,editorFocus:false,exec:function(a){this.toggleState();this.refresh(a)},refresh:function(a){if(a.document){var c=this.state==CKEDITOR.TRISTATE_ON&&(a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE||a.focusManager.hasFocus)?"attachClass":"removeClass";a.editable()[c]("cke_show_blocks")}}};CKEDITOR.plugins.add("showblocks",{onLoad:function(){var a=["p","div","pre","address","blockquote","h1","h2","h3","h4","h5",
|
||||
"h6"],c,e,b,i,j=CKEDITOR.getUrl(this.path),d=!(CKEDITOR.env.ie&&CKEDITOR.env.version<9),g=d?":not([contenteditable=false]):not(.cke_show_blocks_off)":"",h,k;for(c=e=b=i="";h=a.pop();){k=a.length?",":"";c=c+(".cke_show_blocks "+h+g+k);b=b+(".cke_show_blocks.cke_contents_ltr "+h+g+k);i=i+(".cke_show_blocks.cke_contents_rtl "+h+g+k);e=e+(".cke_show_blocks "+h+g+"{background-image:url("+CKEDITOR.getUrl(j+"images/block_"+h+".png")+")}")}CKEDITOR.addCss((c+"{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px}").concat(e,
|
||||
b+"{background-position:top left;padding-left:8px}",i+"{background-position:top right;padding-right:8px}"));d||CKEDITOR.addCss(".cke_show_blocks [contenteditable=false],.cke_show_blocks .cke_show_blocks_off{border:none;padding-top:0;background-image:none}.cke_show_blocks.cke_contents_rtl [contenteditable=false],.cke_show_blocks.cke_contents_rtl .cke_show_blocks_off{padding-right:0}.cke_show_blocks.cke_contents_ltr [contenteditable=false],.cke_show_blocks.cke_contents_ltr .cke_show_blocks_off{padding-left:0}")},
|
||||
init:function(f){function c(){e.refresh(f)}if(!f.blockless){var e=f.addCommand("showblocks",a);e.canUndo=false;f.config.startupOutlineBlocks&&e.setState(CKEDITOR.TRISTATE_ON);f.ui.addButton&&f.ui.addButton("ShowBlocks",{label:f.lang.showblocks.toolbar,command:"showblocks",toolbar:"tools,20"});f.on("mode",function(){e.state!=CKEDITOR.TRISTATE_DISABLED&&e.refresh(f)});if(f.elementMode==CKEDITOR.ELEMENT_MODE_INLINE){f.on("focus",c);f.on("blur",c)}f.on("contentDom",function(){e.state!=CKEDITOR.TRISTATE_DISABLED&&
|
||||
e.refresh(f)})}}})}(),function(){var a={preserveState:true,editorFocus:false,readOnly:1,exec:function(a){this.toggleState();this.refresh(a)},refresh:function(a){if(a.document){var c=this.state==CKEDITOR.TRISTATE_ON?"attachClass":"removeClass";a.editable()[c]("cke_show_borders")}}};CKEDITOR.plugins.add("showborders",{modes:{wysiwyg:1},onLoad:function(){var a;a=(CKEDITOR.env.ie6Compat?[".%1 table.%2,",".%1 table.%2 td, .%1 table.%2 th","{","border : #d3d3d3 1px dotted","}"]:[".%1 table.%2,",".%1 table.%2 > tr > td, .%1 table.%2 > tr > th,",
|
||||
".%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,",".%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,",".%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th","{","border : #d3d3d3 1px dotted","}"]).join("").replace(/%2/g,"cke_show_border").replace(/%1/g,"cke_show_borders ");CKEDITOR.addCss(a)},init:function(f){var c=f.addCommand("showborders",a);c.canUndo=false;f.config.startupShowBorders!==false&&c.setState(CKEDITOR.TRISTATE_ON);f.on("mode",function(){c.state!=
|
||||
CKEDITOR.TRISTATE_DISABLED&&c.refresh(f)},null,null,100);f.on("contentDom",function(){c.state!=CKEDITOR.TRISTATE_DISABLED&&c.refresh(f)});f.on("removeFormatCleanup",function(a){a=a.data;f.getCommand("showborders").state==CKEDITOR.TRISTATE_ON&&(a.is("table")&&(!a.hasAttribute("border")||parseInt(a.getAttribute("border"),10)<=0))&&a.addClass("cke_show_border")})},afterInit:function(a){var c=a.dataProcessor,a=c&&c.dataFilter,c=c&&c.htmlFilter;a&&a.addRules({elements:{table:function(a){var a=a.attributes,
|
||||
b=a["class"],c=parseInt(a.border,10);if((!c||c<=0)&&(!b||b.indexOf("cke_show_border")==-1))a["class"]=(b||"")+" cke_show_border"}}});c&&c.addRules({elements:{table:function(a){var a=a.attributes,b=a["class"];b&&(a["class"]=b.replace("cke_show_border","").replace(/\s{2}/," ").replace(/^\s+|\s+$/,""))}}})}});CKEDITOR.on("dialogDefinition",function(a){var c=a.data.name;if(c=="table"||c=="tableProperties"){a=a.data.definition;c=a.getContents("info").get("txtBorder");c.commit=CKEDITOR.tools.override(c.commit,
|
||||
function(a){return function(b,c){a.apply(this,arguments);var f=parseInt(this.getValue(),10);c[!f||f<=0?"addClass":"removeClass"]("cke_show_border")}});if(a=(a=a.getContents("advanced"))&&a.get("advCSSClasses")){a.setup=CKEDITOR.tools.override(a.setup,function(a){return function(){a.apply(this,arguments);this.setValue(this.getValue().replace(/cke_show_border/,""))}});a.commit=CKEDITOR.tools.override(a.commit,function(a){return function(b,c){a.apply(this,arguments);parseInt(c.getAttribute("border"),
|
||||
10)||c.addClass("cke_show_border")}})}}})}(),function(){function a(a){return CKEDITOR.env.ie?a.$.clientWidth:parseInt(a.getComputedStyle("width"),10)}function f(a,b){var c=a.getComputedStyle("border-"+b+"-width"),d={thin:"0px",medium:"1px",thick:"2px"};c.indexOf("px")<0&&(c=c in d&&a.getComputedStyle("border-style")!="none"?d[c]:0);return parseInt(c,10)}function c(a){var b=[],c=-1,d=a.getComputedStyle("direction")=="rtl",e;e=a.$.rows;for(var i=0,j,n,l,s=0,v=e.length;s<v;s++){l=e[s];j=l.cells.length;
|
||||
if(j>i){i=j;n=l}}e=n;i=new CKEDITOR.dom.element(a.$.tBodies[0]);j=i.getDocumentPosition();n=0;for(l=e.cells.length;n<l;n++){var s=new CKEDITOR.dom.element(e.cells[n]),v=e.cells[n+1]&&new CKEDITOR.dom.element(e.cells[n+1]),c=c+(s.$.colSpan||1),t,B,u=s.getDocumentPosition().x;d?B=u+f(s,"left"):t=u+s.$.offsetWidth-f(s,"right");if(v){u=v.getDocumentPosition().x;d?t=u+v.$.offsetWidth-f(v,"right"):B=u+f(v,"left")}else{u=a.getDocumentPosition().x;d?t=u:B=u+a.$.offsetWidth}s=Math.max(B-t,3);b.push({table:a,
|
||||
index:c,x:t,y:j.y,width:s,height:i.$.offsetHeight,rtl:d})}return b}function e(a){(a.data||a).preventDefault()}function b(b){function c(){s=0;l.setOpacity(0);t&&i();var a=o.table;setTimeout(function(){a.removeCustomData("_cke_table_pillars")},0);n.removeListener("dragstart",e)}function i(){for(var b=o.rtl,c=b?u.length:B.length,d=0;d<c;d++){var e=B[d],h=u[d],g=o.table;CKEDITOR.tools.setTimeout(function(a,c,d,e,f,h){a&&a.setStyle("width",j(Math.max(c+h,1)));d&&d.setStyle("width",j(Math.max(e-h,1)));
|
||||
f&&g.setStyle("width",j(f+h*(b?-1:1)))},0,this,[e,e&&a(e),h,h&&a(h),(!e||!h)&&a(g)+f(g,"left")+f(g,"right"),t])}}function m(b){e(b);for(var b=o.index,c=CKEDITOR.tools.buildTableMap(o.table),d=[],f=[],h=Number.MAX_VALUE,g=h,i=o.rtl,j=0,k=c.length;j<k;j++){var m=c[j],x=m[b+(i?1:0)],m=m[b+(i?0:1)],x=x&&new CKEDITOR.dom.element(x),m=m&&new CKEDITOR.dom.element(m);if(!x||!m||!x.equals(m)){x&&(h=Math.min(h,a(x)));m&&(g=Math.min(g,a(m)));d.push(x);f.push(m)}}B=d;u=f;y=o.x-h;r=o.x+g;l.setOpacity(0.5);v=parseInt(l.getStyle("left"),
|
||||
10);t=0;s=1;l.on("mousemove",p);n.on("dragstart",e);n.on("mouseup",q,this)}function q(a){a.removeListener();c()}function p(a){x(a.data.getPageOffset().x)}var o,n,l,s,v,t,B,u,y,r;n=b.document;l=CKEDITOR.dom.element.createFromHtml('<div data-cke-temp=1 contenteditable=false unselectable=on style="position:absolute;cursor:col-resize;filter:alpha(opacity=0);opacity:0;padding:0;background-color:#004;background-image:none;border:0px none;z-index:10"></div>',n);b.on("destroy",function(){l.remove()});d||
|
||||
n.getDocumentElement().append(l);this.attachTo=function(a){if(!s){if(d){n.getBody().append(l);t=0}o=a;l.setStyles({width:j(a.width),height:j(a.height),left:j(a.x),top:j(a.y)});d&&l.setOpacity(0.25);l.on("mousedown",m,this);n.getBody().setStyle("cursor","col-resize");l.show()}};var x=this.move=function(a){if(!o)return 0;if(!s&&(a<o.x||a>o.x+o.width)){o=null;s=t=0;n.removeListener("mouseup",q);l.removeListener("mousedown",m);l.removeListener("mousemove",p);n.getBody().setStyle("cursor","auto");d?l.remove():
|
||||
l.hide();return 0}a=a-Math.round(l.$.offsetWidth/2);if(s){if(a==y||a==r)return 1;a=Math.max(a,y);a=Math.min(a,r);t=a-v}l.setStyle("left",j(a));return 1}}function i(a){var b=a.data.getTarget();if(a.name=="mouseout"){if(!b.is("table"))return;for(var c=new CKEDITOR.dom.element(a.data.$.relatedTarget||a.data.$.toElement);c&&c.$&&!c.equals(b)&&!c.is("body");)c=c.getParent();if(!c||c.equals(b))return}b.getAscendant("table",1).removeCustomData("_cke_table_pillars");a.removeListener()}var j=CKEDITOR.tools.cssLength,
|
||||
d=CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks);CKEDITOR.plugins.add("tableresize",{requires:"tabletools",init:function(a){a.on("contentDom",function(){var d,f=a.editable();f.attachListener(f.isInline()?f:a.document,"mousemove",function(f){var f=f.data,j=f.getTarget();if(j.type==CKEDITOR.NODE_ELEMENT){var k=f.getPageOffset().x;if(d&&d.move(k))e(f);else if(j.is("table")||j.getAscendant("tbody",1)){j=j.getAscendant("table",1);if(a.editable().contains(j)){if(!(f=j.getCustomData("_cke_table_pillars"))){j.setCustomData("_cke_table_pillars",
|
||||
f=c(j));j.on("mouseout",i);j.on("mousedown",i)}a:{for(var j=0,o=f.length;j<o;j++){var n=f[j];if(k>=n.x&&k<=n.x+n.width){k=n;break a}}k=null}if(k){!d&&(d=new b(a));d.attachTo(k)}}}}})})}})}(),function(){function a(a,e,b){var i=CKEDITOR.document.getById(b),j;if(i)if(b=a.fire("uiSpace",{space:e,html:""}).html){a.on("uiSpace",function(a){a.data.space==e&&a.cancel()},null,null,1);j=i.append(CKEDITOR.dom.element.createFromHtml(f.output({id:a.id,name:a.name,langDir:a.lang.dir,langCode:a.langCode,space:e,
|
||||
spaceId:a.ui.spaceId(e),content:b})));i.getCustomData("cke_hasshared")?j.hide():i.setCustomData("cke_hasshared",1);j.unselectable();j.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});a.focusManager.add(j,1);a.on("focus",function(){for(var a=0,b,c=i.getChildren();b=c.getItem(a);a++)b.type==CKEDITOR.NODE_ELEMENT&&(!b.equals(j)&&b.hasClass("cke_shared"))&&b.hide();j.show()});a.on("destroy",function(){j.remove()})}}var f=CKEDITOR.addTemplate("sharedcontainer",
|
||||
'<div id="cke_{name}" class="cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_shared cke_detached cke_{langDir} '+CKEDITOR.env.cssClass+'" dir="{langDir}" title="'+(CKEDITOR.env.gecko?" ":"")+'" lang="{langCode}" role="presentation"><div class="cke_inner"><div id="{spaceId}" class="cke_{space}" role="presentation">{content}</div></div></div>');CKEDITOR.plugins.add("sharedspace",{init:function(c){c.on("loaded",function(){var e=c.config.sharedSpaces;if(e)for(var b in e)a(c,b,e[b])},null,null,
|
||||
9)}})}(),CKEDITOR.plugins.add("sourcedialog",{init:function(a){a.addCommand("sourcedialog",new CKEDITOR.dialogCommand("sourcedialog"));CKEDITOR.dialog.add("sourcedialog",this.path+"dialogs/sourcedialog.js");a.ui.addButton&&a.ui.addButton("Sourcedialog",{label:a.lang.sourcedialog.toolbar,command:"sourcedialog",toolbar:"mode,10"})}}),"use strict",function(){function a(a,b){CKEDITOR.tools.extend(this,{editor:a,editable:a.editable(),doc:a.document,win:a.window},b,true);this.inline=this.editable.isInline();
|
||||
if(!this.inline)this.frame=this.win.getFrame();this.target=this[this.inline?"editable":"doc"]}function f(a,b){CKEDITOR.tools.extend(this,b,{editor:a},true)}function c(a,c){var d=a.editable();CKEDITOR.tools.extend(this,{editor:a,editable:d,doc:a.document,win:a.window,container:CKEDITOR.document.getBody(),winTop:CKEDITOR.document.getWindow()},c,true);this.hidden={};this.visible={};this.inline=d.isInline();if(!this.inline)this.frame=this.win.getFrame();this.queryViewport();var e=CKEDITOR.tools.bind(this.queryViewport,
|
||||
this),f=CKEDITOR.tools.bind(this.hideVisible,this),g=CKEDITOR.tools.bind(this.removeAll,this);d.attachListener(this.winTop,"resize",e);d.attachListener(this.winTop,"scroll",e);d.attachListener(this.winTop,"resize",f);d.attachListener(this.win,"scroll",f);d.attachListener(this.inline?d:this.frame,"mouseout",function(a){var b=a.data.$.clientX,a=a.data.$.clientY;this.queryViewport();(b<=this.rect.left||b>=this.rect.right||a<=this.rect.top||a>=this.rect.bottom)&&this.hideVisible();(b<=0||b>=this.winTopPane.width||
|
||||
a<=0||a>=this.winTopPane.height)&&this.hideVisible()},this);d.attachListener(a,"resize",e);d.attachListener(a,"mode",g);a.on("destroy",g);this.lineTpl=(new CKEDITOR.template(j)).output({lineStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},i,this.lineStyle,true)),tipLeftStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},b,{left:"0px","border-left-color":"red","border-width":"6px 0 6px 6px"},this.tipCss,this.tipLeftStyle,true)),tipRightStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},
|
||||
b,{right:"0px","border-right-color":"red","border-width":"6px 6px 6px 0"},this.tipCss,this.tipRightStyle,true))})}function e(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&!(d[a.getComputedStyle("float")]||d[a.getAttribute("align")])&&!g[a.getComputedStyle("position")]}CKEDITOR.plugins.add("lineutils");CKEDITOR.LINEUTILS_BEFORE=1;CKEDITOR.LINEUTILS_AFTER=2;CKEDITOR.LINEUTILS_INSIDE=4;a.prototype={start:function(a){var b=this,c=this.editor,d=this.doc,e,f,g,i=CKEDITOR.tools.eventsBuffer(50,function(){if(!(c.readOnly||
|
||||
c.mode!="wysiwyg")){b.relations={};e=new CKEDITOR.dom.element(d.$.elementFromPoint(f,g));b.traverseSearch(e);isNaN(f+g)||b.pixelSearch(e,f,g);a&&a(b.relations,f,g)}});this.listener=this.editable.attachListener(this.target,"mousemove",function(a){f=a.data.$.clientX;g=a.data.$.clientY;i.input()});this.editable.attachListener(this.inline?this.editable:this.frame,"mouseout",function(){i.reset()})},stop:function(){this.listener&&this.listener.removeListener()},getRange:function(){var a={};a[CKEDITOR.LINEUTILS_BEFORE]=
|
||||
CKEDITOR.POSITION_BEFORE_START;a[CKEDITOR.LINEUTILS_AFTER]=CKEDITOR.POSITION_AFTER_END;a[CKEDITOR.LINEUTILS_INSIDE]=CKEDITOR.POSITION_AFTER_START;return function(b){var c=this.editor.createRange();c.moveToPosition(this.relations[b.uid].element,a[b.type]);return c}}(),store:function(){function a(b,c,d){var e=b.getUniqueId();e in d?d[e].type=d[e].type|c:d[e]={element:b,type:c}}return function(b,c){var d;if(c&CKEDITOR.LINEUTILS_AFTER&&e(d=b.getNext())&&d.isVisible()){a(d,CKEDITOR.LINEUTILS_BEFORE,this.relations);
|
||||
c=c^CKEDITOR.LINEUTILS_AFTER}if(c&CKEDITOR.LINEUTILS_INSIDE&&e(d=b.getFirst())&&d.isVisible()){a(d,CKEDITOR.LINEUTILS_BEFORE,this.relations);c=c^CKEDITOR.LINEUTILS_INSIDE}a(b,c,this.relations)}}(),traverseSearch:function(a){var b,c,d;do{d=a.$["data-cke-expando"];if(!(d&&d in this.relations)){if(a.equals(this.editable))break;if(e(a))for(b in this.lookups)(c=this.lookups[b](a))&&this.store(a,c)}}while(!(a&&a.type==CKEDITOR.NODE_ELEMENT&&a.getAttribute("contenteditable")=="true")&&(a=a.getParent()))},
|
||||
pixelSearch:function(){function a(c,d,f,g,h){for(var i=0,j;h(f);){f=f+g;if(++i==25)break;if(j=this.doc.$.elementFromPoint(d,f))if(j==c)i=0;else if(b(c,j)){i=0;if(e(j=new CKEDITOR.dom.element(j)))return j}}}var b=CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a,b){return a.contains(b)}:function(a,b){return!!(a.compareDocumentPosition(b)&16)};return function(b,c,d){var f=this.win.getViewPaneSize().height,g=a.call(this,b.$,c,d,-1,function(a){return a>0}),c=a.call(this,b.$,c,d,1,function(a){return a<f});
|
||||
if(g)for(this.traverseSearch(g);!g.getParent().equals(b);)g=g.getParent();if(c)for(this.traverseSearch(c);!c.getParent().equals(b);)c=c.getParent();for(;g||c;){g&&(g=g.getNext(e));if(!g||g.equals(c))break;this.traverseSearch(g);c&&(c=c.getPrevious(e));if(!c||c.equals(g))break;this.traverseSearch(c)}}}(),greedySearch:function(){this.relations={};for(var a=this.editable.getElementsByTag("*"),b=0,c,d,f;c=a.getItem(b++);)if(!c.equals(this.editable)&&(c.hasAttribute("contenteditable")||!c.isReadOnly())&&
|
||||
e(c)&&c.isVisible())for(f in this.lookups)(d=this.lookups[f](c))&&this.store(c,d);return this.relations}};f.prototype={locate:function(){function a(b,c){var d=b.element[c===CKEDITOR.LINEUTILS_BEFORE?"getPrevious":"getNext"]();if(d&&e(d)){b.siblingRect=d.getClientRect();return c==CKEDITOR.LINEUTILS_BEFORE?(b.siblingRect.bottom+b.elementRect.top)/2:(b.elementRect.bottom+b.siblingRect.top)/2}return c==CKEDITOR.LINEUTILS_BEFORE?b.elementRect.top:b.elementRect.bottom}return function(b){var c;this.locations=
|
||||
{};for(var d in b){c=b[d];c.elementRect=c.element.getClientRect();c.type&CKEDITOR.LINEUTILS_BEFORE&&this.store(d,CKEDITOR.LINEUTILS_BEFORE,a(c,CKEDITOR.LINEUTILS_BEFORE));c.type&CKEDITOR.LINEUTILS_AFTER&&this.store(d,CKEDITOR.LINEUTILS_AFTER,a(c,CKEDITOR.LINEUTILS_AFTER));c.type&CKEDITOR.LINEUTILS_INSIDE&&this.store(d,CKEDITOR.LINEUTILS_INSIDE,(c.elementRect.top+c.elementRect.bottom)/2)}return this.locations}}(),sort:function(){var a,b,c,d;return function(e,f){a=this.locations;b=[];for(var g in a)for(var i in a[g]){c=
|
||||
Math.abs(e-a[g][i]);if(b.length){for(d=0;d<b.length;d++)if(c<b[d].dist){b.splice(d,0,{uid:+g,type:i,dist:c});break}d==b.length&&b.push({uid:+g,type:i,dist:c})}else b.push({uid:+g,type:i,dist:c})}return typeof f!="undefined"?b.slice(0,f):b}}(),store:function(a,b,c){this.locations[a]||(this.locations[a]={});this.locations[a][b]=c}};var b={display:"block",width:"0px",height:"0px","border-color":"transparent","border-style":"solid",position:"absolute",top:"-6px"},i={height:"0px","border-top":"1px dashed red",
|
||||
position:"absolute","z-index":9999},j='<div data-cke-lineutils-line="1" class="cke_reset_all" style="{lineStyle}"><span style="{tipLeftStyle}"> </span><span style="{tipRightStyle}"> </span></div>';c.prototype={removeAll:function(){for(var a in this.hidden){this.hidden[a].remove();delete this.hidden[a]}for(a in this.visible){this.visible[a].remove();delete this.visible[a]}},hideLine:function(a){var b=a.getUniqueId();a.hide();this.hidden[b]=a;delete this.visible[b]},showLine:function(a){var b=
|
||||
a.getUniqueId();a.show();this.visible[b]=a;delete this.hidden[b]},hideVisible:function(){for(var a in this.visible)this.hideLine(this.visible[a])},placeLine:function(a,b){var c,d,e;if(c=this.getStyle(a.uid,a.type)){for(e in this.visible)if(this.visible[e].getCustomData("hash")!==this.hash){d=this.visible[e];break}if(!d)for(e in this.hidden)if(this.hidden[e].getCustomData("hash")!==this.hash){this.showLine(d=this.hidden[e]);break}d||this.showLine(d=this.addLine());d.setCustomData("hash",this.hash);
|
||||
this.visible[d.getUniqueId()]=d;d.setStyles(c);b&&b(d)}},getStyle:function(a,b){var c=this.relations[a],d=this.locations[a][b],e={};e.width=c.siblingRect?Math.max(c.siblingRect.width,c.elementRect.width):c.elementRect.width;e.top=this.inline?d+this.winTopScroll.y:this.rect.top+this.winTopScroll.y+d;if(e.top-this.winTopScroll.y<this.rect.top||e.top-this.winTopScroll.y>this.rect.bottom)return false;if(this.inline)e.left=c.elementRect.left;else{if(c.elementRect.left>0)e.left=this.rect.left+c.elementRect.left;
|
||||
else{e.width=e.width+c.elementRect.left;e.left=this.rect.left}if((c=e.left+e.width-(this.rect.left+this.winPane.width))>0)e.width=e.width-c}e.left=e.left+this.winTopScroll.x;for(var f in e)e[f]=CKEDITOR.tools.cssLength(e[f]);return e},addLine:function(){var a=CKEDITOR.dom.element.createFromHtml(this.lineTpl);a.appendTo(this.container);return a},prepare:function(a,b){this.relations=a;this.locations=b;this.hash=Math.random()},cleanup:function(){var a,b;for(b in this.visible){a=this.visible[b];a.getCustomData("hash")!==
|
||||
this.hash&&this.hideLine(a)}},queryViewport:function(){this.winPane=this.win.getViewPaneSize();this.winTopScroll=this.winTop.getScrollPosition();this.winTopPane=this.winTop.getViewPaneSize();this.rect=this.inline?this.editable.getClientRect():this.frame.getClientRect()}};var d={left:1,right:1,center:1},g={absolute:1,fixed:1};CKEDITOR.plugins.lineutils={finder:a,locator:f,liner:c}}(),"use strict",function(){function a(a){this.editor=a;this.registered={};this.instances={};this.selected=[];this.widgetHoldingFocusedEditable=
|
||||
this.focused=null;this._={nextId:0,upcasts:[],upcastCallbacks:[],filters:{}};F(this);A(this);this.on("checkWidgets",i);this.editor.on("contentDomInvalidated",this.checkWidgets,this);z(this);r(this);x(this);y(this);w(this)}function f(a,b,c,d,e){var g=a.editor;CKEDITOR.tools.extend(this,d,{editor:g,id:b,inline:c.getParent().getName()=="span",element:c,data:CKEDITOR.tools.extend({},typeof d.defaults=="function"?d.defaults():d.defaults),dataReady:false,inited:false,ready:false,edit:f.prototype.edit,focusedEditable:null,
|
||||
definition:d,repository:a,draggable:d.draggable!==false,_:{downcastFn:d.downcast&&typeof d.downcast=="string"?d.downcasts[d.downcast]:d.downcast}},true);a.fire("instanceCreated",this);L(this,d);this.init&&this.init();this.inited=true;(a=this.element.data("cke-widget-data"))&&this.setData(JSON.parse(decodeURIComponent(a)));e&&this.setData(e);this.data.classes||this.setData("classes",this.getClasses());this.dataReady=true;R(this);this.fire("data",this.data);if(this.isInited()&&g.editable().contains(this.wrapper)){this.ready=
|
||||
true;this.fire("ready")}}function c(a,b,c){CKEDITOR.dom.element.call(this,b.$);this.editor=a;b=this.filter=c.filter;if(CKEDITOR.dtd[this.getName()].p){this.enterMode=b?b.getAllowedEnterMode(a.enterMode):a.enterMode;this.shiftEnterMode=b?b.getAllowedEnterMode(a.shiftEnterMode,true):a.shiftEnterMode}else this.enterMode=this.shiftEnterMode=CKEDITOR.ENTER_BR}function e(a,b){a.addCommand(b.name,{exec:function(){function c(){a.widgets.finalizeCreation(g)}var d=a.widgets.focused;if(d&&d.name==b.name)d.edit();
|
||||
else if(b.insert)b.insert();else if(b.template){var d=typeof b.defaults=="function"?b.defaults():b.defaults,d=CKEDITOR.dom.element.createFromHtml(b.template.output(d)),e,f=a.widgets.wrapElement(d,b.name),g=new CKEDITOR.dom.documentFragment(f.getDocument());g.append(f);if(e=a.widgets.initOn(d,b)){d=e.once("edit",function(b){if(b.data.dialog)e.once("dialog",function(b){var b=b.data,d,f;d=b.once("ok",c,null,null,20);f=b.once("cancel",function(){a.widgets.destroy(e,true)});b.once("hide",function(){d.removeListener();
|
||||
f.removeListener()})});else c()},null,null,999);e.edit();d.removeListener()}else c()}},refresh:function(a,b){this.setState(g(a.editable(),b.blockLimit)?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF)},context:"div",allowedContent:b.allowedContent,requiredContent:b.requiredContent,contentForms:b.contentForms,contentTransformations:b.contentTransformations})}function b(a,b){a.focused=null;if(b.isInited()){var c=b.editor.checkDirty();a.fire("widgetBlurred",{widget:b});b.setFocused(false);!c&&b.editor.resetDirty()}}
|
||||
function i(a){a=a.data;if(this.editor.mode=="wysiwyg"){var b=this.editor.editable(),c=this.instances,d,e;if(b){for(d in c)b.contains(c[d].wrapper)||this.destroy(c[d],true);if(a&&a.initOnlyNew)b=this.initOnAll();else{var f=b.find(".cke_widget_wrapper"),b=[];d=0;for(c=f.count();d<c;d++){e=f.getItem(d);var g;if(g=!this.getByElement(e,true)){a:{g=l;for(var h=e;h=h.getParent();)if(g(h)){g=true;break a}g=false}g=!g}if(g){e.addClass("cke_widget_new");b.push(this.initOn(e.getFirst(q)))}}}a&&(a.focusInited&&
|
||||
b.length==1)&&b[0].focus()}}}function j(a,b,c){if(!c.allowedContent)return null;var d=this._.filters[a];d||(this._.filters[a]=d={});(a=d[b])||(d[b]=a=new CKEDITOR.filter(c.allowedContent));return a}function d(a){var b=[],c=a._.upcasts,d=a._.upcastCallbacks;return{toBeWrapped:b,iterator:function(a){var e,f,g,h,i;if("data-cke-widget-wrapper"in a.attributes){(a=a.getFirst(m))&&b.push([a]);return false}if("data-widget"in a.attributes){b.push([a]);return false}if(i=c.length){if(a.attributes["data-cke-widget-upcasted"])return false;
|
||||
h=0;for(e=d.length;h<e;++h)if(d[h](a)===false)return;for(h=0;h<i;++h){e=c[h];g={};if(f=e[0](a,g)){f instanceof CKEDITOR.htmlParser.element&&(a=f);a.attributes["data-cke-widget-data"]=encodeURIComponent(JSON.stringify(g));a.attributes["data-cke-widget-upcasted"]=1;b.push([a,e[1]]);return false}}}}}}function g(a,b){return!b||b.equals(a)?null:n(b)?b:g(a,b.getParent())}function h(a){return{tabindex:-1,contenteditable:"false","data-cke-widget-wrapper":1,"data-cke-filter":"off","class":"cke_widget_wrapper cke_widget_new cke_widget_"+
|
||||
(a?"inline":"block")}}function k(a,b,c){if(a.type==CKEDITOR.NODE_ELEMENT){var d=CKEDITOR.dtd[a.name];if(d&&!d[c.name]){var d=a.split(b),e=a.parent,b=d.getIndex();if(!a.children.length){b=b-1;a.remove()}d.children.length||d.remove();return k(e,b,c)}}a.add(c,b)}function m(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-widget"]}function q(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-widget")}function p(a,b){return typeof a.inline=="boolean"?a.inline:!!CKEDITOR.dtd.$inline[b]}
|
||||
function o(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-wrapper")}function n(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-editable")}function l(a){return a.hasAttribute("data-cke-temp")}function s(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_widget_drag_handler_container")}function v(a,b,c){b.focus();a.fire("saveSnapshot");a.fire("lockSnapshot",{dontUpdate:true});c.select();c=b.wrapper.getOuterHtml();b.wrapper.remove();a.widgets.destroy(b,
|
||||
true);a.execCommand("paste",c);a.fire("unlockSnapshot")}function t(a,b,c,d){var e=a.editor;e.fire("lockSnapshot");if(c){d=c.data("cke-widget-editable");d=b.editables[d];a.widgetHoldingFocusedEditable=b;b.focusedEditable=d;c.addClass("cke_widget_editable_focused");d.filter&&e.setActiveFilter(d.filter);e.setActiveEnterMode(d.enterMode,d.shiftEnterMode)}else{d||b.focusedEditable.removeClass("cke_widget_editable_focused");b.focusedEditable=null;a.widgetHoldingFocusedEditable=null;e.setActiveFilter(null);
|
||||
e.setActiveEnterMode(null,null)}e.fire("unlockSnapshot")}function B(a){a.contextMenu&&a.contextMenu.addListener(function(b){if(b=a.widgets.getByElement(b,true))return b.fire("contextMenu",{})})}function u(a,b){return CKEDITOR.tools.trim(b)}function y(a){var b=a.editor,c=CKEDITOR.plugins.lineutils;b.on("contentDom",function(){var d=b.editable(),e=CKEDITOR.env.ie&&CKEDITOR.env.version<9||d.isInline()?d:b.document;d.attachListener(e,"drop",function(c){var d=c.data.$.dataTransfer.getData("text"),e,f;
|
||||
if(d){try{e=JSON.parse(d)}catch(g){return}if(e.type=="cke-widget"){c.data.preventDefault();if(e.editor==b.name&&(f=a.instances[e.id])){a:{e=c.data.$;d=b.createRange();if(c.data.testRange)d=c.data.testRange;else if(document.caretRangeFromPoint){c=b.document.$.caretRangeFromPoint(e.clientX,e.clientY);d.setStart(CKEDITOR.dom.node(c.startContainer),c.startOffset);d.collapse(true)}else if(e.rangeParent){d.setStart(CKEDITOR.dom.node(e.rangeParent),e.rangeOffset);d.collapse(true)}else if(document.body.createTextRange){c=
|
||||
b.document.getBody().$.createTextRange();c.moveToPoint(e.clientX,e.clientY);e="cke-temp-"+(new Date).getTime();c.pasteHTML('<span id="'+e+'"></span>');c=b.document.getById(e);d.moveToPosition(c,CKEDITOR.POSITION_BEFORE_START);c.remove()}else{d=null;break a}}d&&(CKEDITOR.env.gecko?setTimeout(v,0,b,f,d):v(b,f,d))}}}});CKEDITOR.tools.extend(a,{finder:new c.finder(b,{lookups:{"default":function(a){if(!a.is(CKEDITOR.dtd.$listItem)&&a.is(CKEDITOR.dtd.$block)){for(;a;){if(n(a))return;a=a.getParent()}return CKEDITOR.LINEUTILS_BEFORE|
|
||||
CKEDITOR.LINEUTILS_AFTER}}}}),locator:new c.locator(b),liner:new c.liner(b,{lineStyle:{cursor:"move !important","border-top-color":"#666"},tipLeftStyle:{"border-left-color":"#666"},tipRightStyle:{"border-right-color":"#666"}})},true)})}function r(a){var b=a.editor;b.on("contentDom",function(){var c=b.editable(),d=c.isInline()?c:b.document,e,f;c.attachListener(d,"mousedown",function(b){var c=b.data.getTarget();if(!c.type)return false;e=a.getByElement(c);f=0;if(e)if(e.inline&&c.type==CKEDITOR.NODE_ELEMENT&&
|
||||
c.hasAttribute("data-cke-widget-drag-handler"))f=1;else if(g(e.wrapper,c))e=null;else{b.data.preventDefault();CKEDITOR.env.ie||e.focus()}});c.attachListener(d,"mouseup",function(){if(e&&f){f=0;e.focus()}});CKEDITOR.env.ie&&c.attachListener(d,"mouseup",function(){e&&setTimeout(function(){e.focus();e=null})})});b.on("doubleclick",function(b){var c=a.getByElement(b.data.element);if(c&&!g(c.wrapper,b.data.element))return c.fire("doubleclick",{element:b.data.element})},null,null,1)}function x(a){a.editor.on("key",
|
||||
function(b){var c=a.focused,d=a.widgetHoldingFocusedEditable,e;if(c)e=c.fire("key",{keyCode:b.data.keyCode});else if(d){c=b.data.keyCode;b=d.focusedEditable;if(c==CKEDITOR.CTRL+65){c=b.getBogus();d=d.editor.createRange();d.selectNodeContents(b);c&&d.setEndAt(c,CKEDITOR.POSITION_BEFORE_START);d.select();e=false}else if(c==8||c==46){e=d.editor.getSelection().getRanges();d=e[0];e=!(e.length==1&&d.collapsed&&d.checkBoundaryOfElement(b,CKEDITOR[c==8?"START":"END"]))}else e=void 0}return e},null,null,1)}
|
||||
function w(a){function b(c){a.focused&&D(a.focused,c.name=="cut")}var c=a.editor;c.on("contentDom",function(){var a=c.editable();a.attachListener(a,"copy",b);a.attachListener(a,"cut",b)})}function z(a){var c=a.editor;c.on("selectionCheck",function(){a.fire("checkSelection")});a.on("checkSelection",a.checkSelection,a);c.on("selectionChange",function(b){var d=(b=g(c.editable(),b.data.selection.getStartElement()))&&a.getByElement(b),e=a.widgetHoldingFocusedEditable;if(e){if(e!==d||!e.focusedEditable.equals(b)){t(a,
|
||||
e,null);d&&b&&t(a,d,b)}}else d&&b&&t(a,d,b)});c.on("dataReady",function(){C(a).commit()});c.on("blur",function(){var c;(c=a.focused)&&b(a,c);(c=a.widgetHoldingFocusedEditable)&&t(a,c,null)})}function A(a){var b=a.editor,c={};b.on("toDataFormat",function(b){var d=CKEDITOR.tools.getNextNumber(),e=[];b.data.downcastingSessionId=d;c[d]=e;b.data.dataValue.forEach(function(b){var c=b.attributes,d;if("data-cke-widget-id"in c){if(c=a.instances[c["data-cke-widget-id"]]){d=b.getFirst(m);e.push({wrapper:b,element:d,
|
||||
widget:c,editables:{}});d.attributes["data-cke-widget-keep-attr"]!="1"&&delete d.attributes["data-widget"]}}else if("data-cke-widget-editable"in c){e[e.length-1].editables[c["data-cke-widget-editable"]]=b;return false}},CKEDITOR.NODE_ELEMENT,true)},null,null,8);b.on("toDataFormat",function(a){if(a.data.downcastingSessionId)for(var a=c[a.data.downcastingSessionId],b,d,e,f,g,h;b=a.shift();){d=b.widget;e=b.element;f=d._.downcastFn&&d._.downcastFn.call(d,e);for(h in b.editables){g=b.editables[h];delete g.attributes.contenteditable;
|
||||
g.setHtml(d.editables[h].getData())}f||(f=e);b.wrapper.replaceWith(f)}},null,null,13);b.on("contentDomUnload",function(){a.destroyAll(true)})}function F(a){function b(){c.fire("lockSnapshot");a.checkWidgets({initOnlyNew:true,focusInited:e});c.fire("unlockSnapshot")}var c=a.editor,e,f;c.on("toHtml",function(b){var c=d(a),f;for(b.data.dataValue.forEach(c.iterator,CKEDITOR.NODE_ELEMENT,true);f=c.toBeWrapped.pop();){var g=f[0],h=g.parent;h.type==CKEDITOR.NODE_ELEMENT&&h.attributes["data-cke-widget-wrapper"]&&
|
||||
h.replaceWith(g);a.wrapElement(f[0],f[1])}e=b.data.dataValue.children.length==1&&b.data.dataValue.children[0].type==CKEDITOR.NODE_ELEMENT&&b.data.dataValue.children[0].attributes["data-cke-widget-wrapper"]},null,null,8);c.on("dataReady",function(){if(f)for(var b=a,d=c.editable().find(".cke_widget_wrapper"),e,g,h=0,i=d.count();h<i;++h){e=d.getItem(h);g=e.getFirst(q);if(g.type==CKEDITOR.NODE_ELEMENT&&g.data("widget")){g.replace(e);b.wrapElement(g)}else e.remove()}f=0;a.destroyAll(true);a.initOnAll()});
|
||||
c.on("loadSnapshot",function(b){/data-cke-widget/.test(b.data)&&(f=1);a.destroyAll(true)},null,null,9);c.on("paste",function(a){a.data.dataValue=a.data.dataValue.replace(X,u)});c.on("insertText",b,null,null,999);c.on("insertHtml",b,null,null,999)}function C(a){var c=a.selected,d=[],e=c.slice(0),f=null;return{select:function(a){CKEDITOR.tools.indexOf(c,a)<0&&d.push(a);a=CKEDITOR.tools.indexOf(e,a);a>=0&&e.splice(a,1);return this},focus:function(a){f=a;return this},commit:function(){var g=a.focused!==
|
||||
f,h,i;a.editor.fire("lockSnapshot");for(g&&(h=a.focused)&&b(a,h);h=e.pop();){c.splice(CKEDITOR.tools.indexOf(c,h),1);if(h.isInited()){i=h.editor.checkDirty();h.setSelected(false);!i&&h.editor.resetDirty()}}if(g&&f){i=a.editor.checkDirty();a.focused=f;a.fire("widgetFocused",{widget:f});f.setFocused(true);!i&&a.editor.resetDirty()}for(;h=d.pop();){c.push(h);h.setSelected(true)}a.editor.fire("unlockSnapshot")}}}function K(a,b,c){var d=0,b=E(b),e=a.data.classes||{},f;if(b){for(e=CKEDITOR.tools.clone(e);f=
|
||||
b.pop();)if(c)e[f]||(d=e[f]=1);else if(e[f]){delete e[f];d=1}d&&a.setData("classes",e)}}function G(a){a.cancel()}function D(a,b){var c=a.editor,d=c.document;if(!d.getById("cke_copybin")){var e=c.blockless||CKEDITOR.env.ie?"span":"div",f=d.createElement(e),g=d.createElement(e),e=CKEDITOR.env.ie&&CKEDITOR.env.version<9;g.setAttributes({id:"cke_copybin","data-cke-temp":"1"});f.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"});f.setStyle(c.config.contentsLangDirection=="ltr"?
|
||||
"left":"right","-5000px");f.setHtml('<span data-cke-copybin-start="1"></span>'+a.wrapper.getOuterHtml()+'<span data-cke-copybin-end="1"></span>');c.fire("saveSnapshot");c.fire("lockSnapshot");g.append(f);c.editable().append(g);var h=c.on("selectionChange",G,null,null,0),i=a.repository.on("checkSelection",G,null,null,0);if(e)var j=d.getDocumentElement().$,k=j.scrollTop;d=c.createRange();d.selectNodeContents(f);d.select();if(e)j.scrollTop=k;setTimeout(function(){b||a.focus();g.remove();h.removeListener();
|
||||
i.removeListener();c.fire("unlockSnapshot");if(b){a.repository.del(a);c.fire("saveSnapshot")}},100)}}function E(a){return(a=(a=a.getDefinition().attributes)&&a["class"])?a.split(/\s+/):null}function J(){var a=CKEDITOR.document.getActive(),b=this.editor,c=b.editable();(c.isInline()?c:b.document.getWindow().getFrame()).equals(a)&&b.focusManager.focus(c)}function N(){CKEDITOR.env.gecko&&this.editor.unlockSelection();if(!CKEDITOR.env.webkit){this.editor.forceNextSelectionCheck();this.editor.selectionChange(1)}}
|
||||
function H(a){var b=null;a.on("data",function(){var a=this.data.classes,c;if(b!=a){for(c in b)(!a||!a[c])&&this.removeClass(c);for(c in a)this.addClass(c);b=a}})}function T(a){if(a.draggable){var b=a.editor,c=a.wrapper.getLast(s),d;if(c)d=c.findOne("img");else{c=new CKEDITOR.dom.element("span",b.document);c.setAttributes({"class":"cke_reset cke_widget_drag_handler_container",style:"background:rgba(220,220,220,0.5);background-image:url("+b.plugins.widget.path+"images/handle.png)"});d=new CKEDITOR.dom.element("img",
|
||||
b.document);d.setAttributes({"class":"cke_reset cke_widget_drag_handler","data-cke-widget-drag-handler":"1",src:CKEDITOR.tools.transparentImageData,width:U,title:b.lang.widget.move,height:U});a.inline&&d.setAttribute("draggable","true");c.append(d);a.wrapper.append(c)}a.wrapper.on("mouseenter",a.updateDragHandlerPosition,a);setTimeout(function(){a.on("data",a.updateDragHandlerPosition,a)},50);if(a.inline)d.on("dragstart",function(c){c.data.$.dataTransfer.setData("text",JSON.stringify({type:"cke-widget",
|
||||
editor:b.name,id:a.id}))});else d.on("mousedown",O,a);a.dragHandlerContainer=c}}function O(){function a(){var b;for(j.reset();b=g.pop();)b.removeListener();var c=h,d=this.repository.finder;b=this.repository.liner;var e=this.editor,f=this.editor.editable();if(!CKEDITOR.tools.isEmpty(b.visible)){c=d.getRange(c[0]);this.focus();e.fire("saveSnapshot");e.fire("lockSnapshot",{dontUpdate:1});e.getSelection().reset();f.insertElementIntoRange(this.wrapper,c);this.focus();e.fire("unlockSnapshot");e.fire("saveSnapshot")}f.removeClass("cke_widget_dragging");
|
||||
b.hideVisible()}var b=this.repository.finder,c=this.repository.locator,d=this.repository.liner,e=this.editor,f=e.editable(),g=[],h=[],i=b.greedySearch(),j=CKEDITOR.tools.eventsBuffer(50,function(){k=c.locate(i);h=c.sort(l,1);if(h.length){d.prepare(i,k);d.placeLine(h[0]);d.cleanup()}}),k,l;f.addClass("cke_widget_dragging");g.push(f.on("mousemove",function(a){l=a.data.$.clientY;j.input()}));g.push(e.document.once("mouseup",a,this));g.push(CKEDITOR.document.once("mouseup",a,this))}function M(a){var b,
|
||||
c,d=a.editables;a.editables={};if(a.editables)for(b in d){c=d[b];a.initEditable(b,typeof c=="string"?{selector:c}:c)}}function I(a){if(a.mask){var b=a.wrapper.findOne(".cke_widget_mask");if(!b){b=new CKEDITOR.dom.element("img",a.editor.document);b.setAttributes({src:CKEDITOR.tools.transparentImageData,"class":"cke_reset cke_widget_mask"});a.wrapper.append(b)}a.mask=b}}function P(a){if(a.parts){var b={},c,d;for(d in a.parts){c=a.wrapper.findOne(a.parts[d]);b[d]=c}a.parts=b}}function L(a,b){Q(a);P(a);
|
||||
M(a);I(a);T(a);H(a);if(CKEDITOR.env.ie&&CKEDITOR.env.version<9)a.wrapper.on("dragstart",function(b){var c=b.data.getTarget();!g(a,c)&&(!a.inline||!(c.type==CKEDITOR.NODE_ELEMENT&&c.hasAttribute("data-cke-widget-drag-handler")))&&b.data.preventDefault()});a.wrapper.removeClass("cke_widget_new");a.element.addClass("cke_widget_element");a.on("key",function(b){b=b.data.keyCode;if(b==13)a.edit();else{if(b==CKEDITOR.CTRL+67||b==CKEDITOR.CTRL+88){D(a,b==CKEDITOR.CTRL+88);return}if(b in V||CKEDITOR.CTRL&
|
||||
b||CKEDITOR.ALT&b)return}return false},null,null,999);a.on("doubleclick",function(b){a.edit()&&b.cancel()});if(b.data)a.on("data",b.data);if(b.edit)a.on("edit",b.edit)}function Q(a){(a.wrapper=a.element.getParent()).setAttribute("data-cke-widget-id",a.id)}function R(a){a.element.data("cke-widget-data",encodeURIComponent(JSON.stringify(a.data)))}var U=15;CKEDITOR.plugins.add("widget",{requires:"lineutils,clipboard",onLoad:function(){CKEDITOR.addCss(".cke_widget_wrapper{position:relative;outline:none}.cke_widget_inline{display:inline-block}.cke_widget_wrapper:hover>.cke_widget_element{outline:2px solid yellow;cursor:default}.cke_widget_wrapper:hover .cke_widget_editable{outline:2px solid yellow}.cke_widget_wrapper.cke_widget_focused>.cke_widget_element,.cke_widget_wrapper .cke_widget_editable.cke_widget_editable_focused{outline:2px solid #ace}.cke_widget_editable{cursor:text}.cke_widget_drag_handler_container{position:absolute;width:"+
|
||||
U+"px;height:0;left:-9999px;opacity:0.75;transition:height 0s 0.2s;line-height:0}.cke_widget_wrapper:hover>.cke_widget_drag_handler_container{height:"+U+"px;transition:none}.cke_widget_drag_handler_container:hover{opacity:1}img.cke_widget_drag_handler{cursor:move;width:"+U+"px;height:"+U+"px;display:inline-block}.cke_widget_mask{position:absolute;top:0;left:0;width:100%;height:100%;display:block}.cke_editable.cke_widget_dragging, .cke_editable.cke_widget_dragging *{cursor:move !important}")},beforeInit:function(b){b.widgets=
|
||||
new a(b)},afterInit:function(a){var b=a.widgets.registered,c,d,e;for(d in b){c=b[d];(e=c.button)&&a.ui.addButton&&a.ui.addButton(CKEDITOR.tools.capitalize(c.name,true),{label:e,command:c.name,toolbar:"insert,10"})}B(a)}});a.prototype={MIN_SELECTION_CHECK_INTERVAL:500,add:function(a,b){b=CKEDITOR.tools.prototypedCopy(b);b.name=a;b._=b._||{};this.editor.fire("widgetDefinition",b);if(b.template)b.template=new CKEDITOR.template(b.template);e(this.editor,b);var c=b,d=c.upcast;if(d)if(typeof d=="string")for(d=
|
||||
d.split(",");d.length;)this._.upcasts.push([c.upcasts[d.pop()],c.name]);else this._.upcasts.push([d,c.name]);return this.registered[a]=b},addUpcastCallback:function(a){this._.upcastCallbacks.push(a)},checkSelection:function(){var a=this.editor.getSelection(),b=a.getSelectedElement(),c=C(this),d;if(b&&(d=this.getByElement(b,true)))return c.focus(d).select(d).commit();a=a.getRanges()[0];if(!a||a.collapsed)return c.commit();a=new CKEDITOR.dom.walker(a);for(a.evaluator=o;b=a.next();)c.select(this.getByElement(b));
|
||||
c.commit()},checkWidgets:function(a){this.fire("checkWidgets",CKEDITOR.tools.copy(a||{}))},del:function(a){if(this.focused===a){var b=a.editor,c=b.createRange(),d;if(!(d=c.moveToClosestEditablePosition(a.wrapper,true)))d=c.moveToClosestEditablePosition(a.wrapper,false);d&&b.getSelection().selectRanges([c])}a.wrapper.remove();this.destroy(a,true)},destroy:function(a,b){this.widgetHoldingFocusedEditable===a&&t(this,a,null,b);a.destroy(b);delete this.instances[a.id];this.fire("instanceDestroyed",a)},
|
||||
destroyAll:function(a){var b=this.instances,c,d;for(d in b){c=b[d];this.destroy(c,a)}},finalizeCreation:function(a){if((a=a.getFirst())&&o(a)){this.editor.insertElement(a);a=this.getByElement(a);a.ready=true;a.fire("ready");a.focus()}},getByElement:function(){var a={div:1,span:1};return function(b,c){if(!b)return null;var d=b.is(a)&&b.data("cke-widget-id");if(!c&&!d){var e=this.editor.editable();do b=b.getParent();while(b&&!b.equals(e)&&!(d=b.is(a)&&b.data("cke-widget-id")))}return this.instances[d]||
|
||||
null}}(),initOn:function(a,b,c){b?typeof b=="string"&&(b=this.registered[b]):b=this.registered[a.data("widget")];if(!b)return null;var d=this.wrapElement(a,b.name);if(d){if(d.hasClass("cke_widget_new")){a=new f(this,this._.nextId++,a,b,c);if(a.isInited())return this.instances[a.id]=a;return null}return this.getByElement(a)}return null},initOnAll:function(a){for(var a=(a||this.editor.editable()).find(".cke_widget_new"),b=[],c,d=a.count();d--;)(c=this.initOn(a.getItem(d).getFirst(q)))&&b.push(c);return b},
|
||||
parseElementClasses:function(a){if(!a)return null;for(var a=CKEDITOR.tools.trim(a).split(/\s+/),b,c={},d=0;b=a.pop();)b.indexOf("cke_")==-1&&(c[b]=d=1);return d?c:null},wrapElement:function(a,b){var c=null,d,e;if(a instanceof CKEDITOR.dom.element){d=this.registered[b||a.data("widget")];if(!d)return null;if((c=a.getParent())&&c.type==CKEDITOR.NODE_ELEMENT&&c.data("cke-widget-wrapper"))return c;a.hasAttribute("data-cke-widget-keep-attr")||a.data("cke-widget-keep-attr",a.data("widget")?1:0);b&&a.data("widget",
|
||||
b);e=p(d,a.getName());c=new CKEDITOR.dom.element(e?"span":"div");c.setAttributes(h(e));c.data("cke-display-name",d.pathName?d.pathName:a.getName());a.getParent(true)&&c.replace(a);a.appendTo(c)}else if(a instanceof CKEDITOR.htmlParser.element){d=this.registered[b||a.attributes["data-widget"]];if(!d)return null;if((c=a.parent)&&c.type==CKEDITOR.NODE_ELEMENT&&c.attributes["data-cke-widget-wrapper"])return c;"data-cke-widget-keep-attr"in a.attributes||(a.attributes["data-cke-widget-keep-attr"]=a.attributes["data-widget"]?
|
||||
1:0);b&&(a.attributes["data-widget"]=b);e=p(d,a.name);c=new CKEDITOR.htmlParser.element(e?"span":"div",h(e));c.attributes["data-cke-display-name"]=d.pathName?d.pathName:a.name;d=a.parent;var f;if(d){f=a.getIndex();a.remove()}c.add(a);d&&k(d,f,c)}return c},_tests_getNestedEditable:g,_tests_createEditableFilter:j};CKEDITOR.event.implementOn(a.prototype);f.prototype={addClass:function(a){this.element.addClass(a)},applyStyle:function(a){K(this,a,1)},checkStyleActive:function(a){var a=E(a),b;if(!a)return false;
|
||||
for(;b=a.pop();)if(!this.hasClass(b))return false;return true},destroy:function(a){this.fire("destroy");if(this.editables)for(var b in this.editables)this.destroyEditable(b,a);if(!a){this.element.data("cke-widget-keep-attr")=="0"&&this.element.removeAttribute("data-widget");this.element.removeAttributes(["data-cke-widget-data","data-cke-widget-keep-attr"]);this.element.removeClass("cke_widget_element");this.element.replace(this.wrapper)}this.wrapper=null},destroyEditable:function(a,b){var c=this.editables[a];
|
||||
c.removeListener("focus",N);c.removeListener("blur",J);this.editor.focusManager.remove(c);if(!b){c.removeClass("cke_widget_editable");c.removeClass("cke_widget_editable_focused");c.removeAttributes(["contenteditable","data-cke-widget-editable","data-cke-enter-mode"])}delete this.editables[a]},edit:function(){var a={dialog:this.dialog},b=this;if(this.fire("edit",a)===false||!a.dialog)return false;this.editor.openDialog(a.dialog,function(a){var c,d;if(b.fire("dialog",a)!==false){c=a.on("show",function(){a.setupContent(b)});
|
||||
d=a.on("ok",function(){var c,d=b.on("data",function(a){c=1;a.cancel()},null,null,0);b.editor.fire("saveSnapshot");a.commitContent(b);d.removeListener();if(c){b.fire("data",b.data);b.editor.fire("saveSnapshot")}});a.once("hide",function(){c.removeListener();d.removeListener()})}});return true},getClasses:function(){return this.repository.parseElementClasses(this.element.getAttribute("class"))},hasClass:function(a){return this.element.hasClass(a)},initEditable:function(a,b){var d=this.wrapper.findOne(b.selector);
|
||||
if(d&&d.is(CKEDITOR.dtd.$editable)){d=new c(this.editor,d,{filter:j.call(this.repository,this.name,a,b)});this.editables[a]=d;d.setAttributes({contenteditable:"true","data-cke-widget-editable":a,"data-cke-enter-mode":d.enterMode});d.filter&&d.data("cke-filter",d.filter.id);d.addClass("cke_widget_editable");d.removeClass("cke_widget_editable_focused");b.pathName&&d.data("cke-display-name",b.pathName);this.editor.focusManager.add(d);d.on("focus",N,this);CKEDITOR.env.ie&&d.on("blur",J,this);d.setData(d.getHtml());
|
||||
return true}return false},isInited:function(){return!(!this.wrapper||!this.inited)},isReady:function(){return this.isInited()&&this.ready},focus:function(){var a=this.editor.getSelection();if(a){var b=this.editor.checkDirty();a.fake(this.wrapper);!b&&this.editor.resetDirty()}this.editor.focus()},removeClass:function(a){this.element.removeClass(a)},removeStyle:function(a){K(this,a,0)},setData:function(a,b){var c=this.data,d=0;if(typeof a=="string"){if(c[a]!==b){c[a]=b;d=1}}else{var e=a;for(a in e)if(c[a]!==
|
||||
e[a]){d=1;c[a]=e[a]}}if(d&&this.dataReady){R(this);this.fire("data",c)}return this},setFocused:function(a){this.wrapper[a?"addClass":"removeClass"]("cke_widget_focused");this.fire(a?"focus":"blur");return this},setSelected:function(a){this.wrapper[a?"addClass":"removeClass"]("cke_widget_selected");this.fire(a?"select":"deselect");return this},updateDragHandlerPosition:function(){var a=this.editor,b=this.element.$,c=this._.dragHandlerOffset,b={x:b.offsetLeft,y:b.offsetTop-U};if(!c||!(b.x==c.x&&b.y==
|
||||
c.y)){c=a.checkDirty();a.fire("lockSnapshot");this.dragHandlerContainer.setStyles({top:b.y+"px",left:b.x+"px"});a.fire("unlockSnapshot");!c&&a.resetDirty();this._.dragHandlerOffset=b}}};CKEDITOR.event.implementOn(f.prototype);c.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.dom.element.prototype),{setData:function(a){a=this.editor.dataProcessor.toHtml(a,{context:this.getName(),filter:this.filter,enterMode:this.enterMode});this.setHtml(a);this.editor.widgets.initOnAll(this)},
|
||||
getData:function(){return this.editor.dataProcessor.toDataFormat(this.getHtml(),{context:this.getName(),filter:this.filter,enterMode:this.enterMode})}});var X=RegExp('^(?:<(?:div|span)(?: data-cke-temp="1")?(?: id="cke_copybin")?(?: data-cke-temp="1")?>)?(?:<(?:div|span)(?: style="[^"]+")?>)?<span [^>]*data-cke-copybin-start="1"[^>]*>.?</span>([\\s\\S]+)<span [^>]*data-cke-copybin-end="1"[^>]*>.?</span>(?:</(?:div|span)>)?(?:</(?:div|span)>)?$'),V={37:1,38:1,39:1,40:1,8:1,46:1};(function(){function a(){}
|
||||
function b(a,c,d){if(!d||!this.checkElement(a))return false;return(a=d.widgets.getByElement(a,true))&&a.checkStyleActive(this)}CKEDITOR.style.addCustomHandler({type:"widget",setup:function(a){this.widget=a.widget},apply:function(a){a instanceof CKEDITOR.editor&&this.checkApplicable(a.elementPath(),a)&&a.widgets.focused.applyStyle(this)},remove:function(a){a instanceof CKEDITOR.editor&&this.checkApplicable(a.elementPath(),a)&&a.widgets.focused.removeStyle(this)},checkActive:function(a,b){return this.checkElementMatch(a.lastElement,
|
||||
0,b)},checkApplicable:function(a,b){return!(b instanceof CKEDITOR.editor)?false:this.checkElement(a.lastElement)},checkElementMatch:b,checkElementRemovable:b,checkElement:function(a){if(!o(a))return false;return(a=a.getFirst(q))&&a.data("widget")==this.widget},buildPreview:function(a){return a||this._.definition.name},toAllowedContentRules:function(a){if(!a)return null;var a=a.widgets.registered[this.widget],b,c={};if(!a)return null;if(a.styleableElements){b=this.getClassesArray();if(!b)return null;
|
||||
c[a.styleableElements]={classes:b,propertiesOnly:true};return c}return a.styleToAllowedContentRules?a.styleToAllowedContentRules(this):null},getClassesArray:function(){var a=this._.definition.attributes&&this._.definition.attributes["class"];return a?CKEDITOR.tools.trim(a).split(/\s+/):null},applyToRange:a,removeFromRange:a,applyToObject:a})})();CKEDITOR.plugins.widget=f;f.repository=a;f.nestedEditable=c}(),"use strict",function(){function a(a){function b(){if(!this.deflated){if(a.widgets.focused==
|
||||
this.widget)this.focused=true;a.widgets.destroy(this.widget);this.deflated=true}}function d(){var b=a.editable(),c=a.document;if(this.deflated){this.widget=a.widgets.initOn(this.element,"image",this.widget.data);if(this.widget.inline&&!(new CKEDITOR.dom.elementPath(this.widget.wrapper,b)).block){b=c.createElement(a.activeEnterMode==CKEDITOR.ENTER_P?"p":"div");b.replace(this.widget.wrapper);this.widget.wrapper.move(b)}if(this.focused){this.widget.focus();delete this.focused}delete this.deflated}else{var f=
|
||||
this.widget,b=e,c=f.wrapper,g=f.data.align,f=f.data.hasCaption;if(b){for(var h=3;h--;)c.removeClass(b[h]);g=="center"?f&&c.addClass(b[1]):g!="none"&&c.addClass(b[o[g]])}else if(g=="center"){f?c.setStyle("text-align","center"):c.removeStyle("text-align");c.removeStyle("float")}else{g=="none"?c.removeStyle("float"):c.setStyle("float",g);c.removeStyle("text-align")}}}var e=a.config.image2_alignClasses,g=a.config.image2_captionedClass;return{allowedContent:h(a),requiredContent:"img[src,alt]",features:k(a),
|
||||
styleableElements:"img figure",contentTransformations:[["img[width]: sizeToAttribute"]],editables:{caption:{selector:"figcaption",allowedContent:"br em strong sub sup u s; a[!href]"}},parts:{image:"img",caption:"figcaption"},dialog:"image2",template:q,data:function(){var c=this.features;if(this.data.hasCaption&&!a.filter.checkFeature(c.caption))this.data.hasCaption=false;if(this.data.align!="none"&&!a.filter.checkFeature(c.align))this.data.align="none";this.shiftState({widget:this,element:this.element,
|
||||
oldData:this.oldData,newData:this.data,deflate:b,inflate:d});if(this.data.link){if(!this.parts.link)this.parts.link=this.parts.image.getParent()}else this.parts.link&&delete this.parts.link;this.parts.image.setAttributes({src:this.data.src,"data-cke-saved-src":this.data.src,alt:this.data.alt});if(this.oldData&&!this.oldData.hasCaption&&this.data.hasCaption)for(var e in this.data.classes)this.parts.image.removeClass(e);if(a.filter.checkFeature(c.dimension)){c=this.data;c={width:c.width,height:c.height};
|
||||
e=this.parts.image;for(var f in c)c[f]?e.setAttribute(f,c[f]):e.removeAttribute(f)}this.oldData=CKEDITOR.tools.extend({},this.data)},init:function(){var b=CKEDITOR.plugins.image2,c=this.parts.image,d={hasCaption:!!this.parts.caption,src:c.getAttribute("src"),alt:c.getAttribute("alt")||"",width:c.getAttribute("width")||"",height:c.getAttribute("height")||"",lock:this.ready?b.checkHasNaturalRatio(c):true},f=c.getAscendant("a");if(f&&this.wrapper.contains(f))this.parts.link=f;if(!d.align)if(e){if(this.element.hasClass(e[0]))d.align=
|
||||
"left";else if(this.element.hasClass(e[2]))d.align="right";d.align?this.element.removeClass(e[o[d.align]]):d.align="none"}else{d.align=this.element.getStyle("float")||c.getStyle("float")||"none";this.element.removeStyle("float");c.removeStyle("float")}if(a.plugins.link&&this.parts.link){d.link=CKEDITOR.plugins.link.parseLinkAttributes(a,this.parts.link);if((c=d.link.advanced)&&c.advCSSClasses)c.advCSSClasses=CKEDITOR.tools.trim(c.advCSSClasses.replace(/cke_\S+/,""))}this.wrapper[(d.hasCaption?"remove":
|
||||
"add")+"Class"]("cke_image_nocaption");this.setData(d);a.filter.checkFeature(this.features.dimension)&&i(this);this.shiftState=b.stateShifter(this.editor);this.on("contextMenu",function(a){a.data.image=CKEDITOR.TRISTATE_OFF;if(this.parts.link||this.wrapper.getAscendant("a"))a.data.link=a.data.unlink=CKEDITOR.TRISTATE_OFF});this.on("dialog",function(a){a.data.widget=this},this)},addClass:function(a){m(this).addClass(a)},hasClass:function(a){return m(this).hasClass(a)},removeClass:function(a){m(this).removeClass(a)},
|
||||
getClasses:function(){var a=RegExp("^("+[].concat(g,e).join("|")+")$");return function(){var b=this.repository.parseElementClasses(m(this).getAttribute("class")),c;for(c in b)a.test(c)&&delete b[c];return b}}(),upcast:f(a),downcast:c(a)}}function f(a){var c=e(a),d=a.config.image2_captionedClass;return function(a,e){var f={width:1,height:1},g=a.name,h;if(!a.attributes["data-cke-realelement"]){if(c(a)){if(g=="div")if(h=a.getFirst("figure")){a.replaceWith(h);a=h}e.align="center";h=a.getFirst("img")||
|
||||
a.getFirst("a").getFirst("img")}else g=="figure"&&a.hasClass(d)?h=a.getFirst("img")||a.getFirst("a").getFirst("img"):b(a)&&(h=a.name=="a"?a.children[0]:a);if(h){for(var i in f)(g=h.attributes[i])&&g.match(n)&&delete h.attributes[i];return a}}}}function c(a){var b=a.config.image2_alignClasses;return function(a){var c=a.name=="a"?a.getFirst():a,d=c.attributes,e=this.data.align;if(!this.inline){var f=a.getFirst("span");f&&f.replaceWith(f.getFirst({img:1,a:1}))}if(e&&e!="none"){f=CKEDITOR.tools.parseCssText(d.style||
|
||||
"");e=="center"&&a.name=="figure"?a=a.wrapWith(new CKEDITOR.htmlParser.element("div",b?{"class":b[1]}:{style:"text-align:center"})):e in{left:1,right:1}&&(b?c.addClass(b[o[e]]):f["float"]=e);if(!b&&!CKEDITOR.tools.isEmpty(f))d.style=CKEDITOR.tools.writeCssText(f)}return a}}function e(a){var c=a.config.image2_captionedClass,d=a.config.image2_alignClasses,e={figure:1,a:1,img:1};return function(f){if(!(f.name in{div:1,p:1}))return false;var g=f.children;if(g.length!==1)return false;g=g[0];if(!(g.name in
|
||||
e))return false;if(f.name=="p"){if(!b(g))return false}else if(g.name=="figure"){if(!g.hasClass(c))return false}else if(a.enterMode==CKEDITOR.ENTER_P||!b(g))return false;return(d?f.hasClass(d[1]):CKEDITOR.tools.parseCssText(f.attributes.style||"",true)["text-align"]=="center")?true:false}}function b(a){return a.name=="img"?true:a.name=="a"?a.children.length==1&&a.getFirst("img"):false}function i(a){var b=a.editor,c=b.editable(),d=b.document,e=a.resizer=d.createElement("span");e.addClass("cke_image_resizer");
|
||||
e.setAttribute("title",b.lang.image2.resizer);e.append(new CKEDITOR.dom.text("",d));if(a.inline)a.wrapper.append(e);else{var f=a.parts.link||a.parts.image,g=f.getParent(),h=d.createElement("span");h.addClass("cke_image_resizer_wrapper");h.append(f);h.append(e);a.element.append(h,true);g.is("span")&&g.remove()}e.on("mousedown",function(f){function g(a,b,c){var e=CKEDITOR.document,f=[];d.equals(e)||f.push(e.on(a,b));f.push(d.on(a,b));if(c)for(a=f.length;a--;)c.push(f.pop())}function h(){O=o+k*P;M=
|
||||
Math.round(O/q)}function i(){M=p-L;O=Math.round(M*q)}var j=a.parts.image,k=a.data.align=="right"?-1:1,m=f.data.$.screenX,n=f.data.$.screenY,o=j.$.clientWidth,p=j.$.clientHeight,q=o/p,r=[],u="cke_image_s"+(!~k?"w":"e"),y,O,M,I,P,L,Q;b.fire("saveSnapshot");g("mousemove",function(a){y=a.data.$;P=y.screenX-m;L=n-y.screenY;Q=Math.abs(P/L);k==1?P<=0?L<=0?h():Q>=q?h():i():L<=0?Q>=q?i():h():i():P<=0?L<=0?Q>=q?i():h():i():L<=0?h():Q>=q?h():i();if(O>=15&&M>=15){j.setAttributes({width:O,height:M});I=true}else I=
|
||||
false},r);g("mouseup",function(){for(var d;d=r.pop();)d.removeListener();c.removeClass(u);e.removeClass("cke_image_resizing");if(I){a.setData({width:O,height:M});b.fire("saveSnapshot")}I=false},r);c.addClass(u);e.addClass("cke_image_resizing")});a.on("data",function(){e[a.data.align=="right"?"addClass":"removeClass"]("cke_image_resizer_left")})}function j(a){var b=[],c;return function(d){var e=a.getCommand("justify"+d);if(e){b.push(function(){e.refresh(a,a.elementPath())});if(d in{right:1,left:1,
|
||||
center:1})e.on("exec",function(c){var e=g(a);if(e){e.setData("align",d);for(e=b.length;e--;)b[e]();c.cancel()}});e.on("refresh",function(b){var e=g(a),f={right:1,left:1,center:1};if(e){c===void 0&&(c=a.filter.checkFeature(a.widgets.registered.image.features.align));c?this.setState(e.data.align==d?CKEDITOR.TRISTATE_ON:d in f?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED):this.setState(CKEDITOR.TRISTATE_DISABLED);b.cancel()}})}}}function d(a){if(a.plugins.link){CKEDITOR.on("dialogDefinition",function(b){b=
|
||||
b.data;if(b.name=="link"){var b=b.definition,c=b.onShow,d=b.onOk;b.onShow=function(){var b=g(a);b&&(b.inline?!b.wrapper.getAscendant("a"):1)?this.setupContent(b.data.link||{}):c.apply(this,arguments)};b.onOk=function(){var b=g(a);if(b&&(b.inline?!b.wrapper.getAscendant("a"):1)){var c={};this.commitContent(c);b.setData("link",c)}else d.apply(this,arguments)}}});a.getCommand("unlink").on("exec",function(b){var c=g(a);if(c&&c.parts.link){c.setData("link",null);this.refresh(a,a.elementPath());b.cancel()}});
|
||||
a.getCommand("unlink").on("refresh",function(b){var c=g(a);if(c){this.setState(c.data.link||c.wrapper.getAscendant("a")?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);b.cancel()}})}}function g(a){return(a=a.widgets.focused)&&a.name=="image"?a:null}function h(a){var b=a.config.image2_alignClasses,a={div:{match:e(a)},p:{match:e(a)},img:{attributes:"!src,alt,width,height"},figure:{classes:"!"+a.config.image2_captionedClass},figcaption:true};if(b){a.div.classes=b[1];a.p.classes=a.div.classes;a.img.classes=
|
||||
b[0]+","+b[2];a.figure.classes=a.figure.classes+(","+a.img.classes)}else{a.div.styles="text-align";a.p.styles="text-align";a.img.styles="float";a.figure.styles="float,display"}return a}function k(a){a=a.config.image2_alignClasses;return{dimension:{requiredContent:"img[width,height]"},align:{requiredContent:"img"+(a?"("+a[0]+")":"{float}")},caption:{requiredContent:"figcaption"}}}function m(a){return a.data.hasCaption?a.element:a.parts.image}var q='<img alt="" src="" />',p=new CKEDITOR.template('<figure class="{captionedClass}">'+
|
||||
q+"<figcaption>{captionPlaceholder}</figcaption></figure>"),o={left:0,center:1,right:2},n=/^\s*(\d+\%)\s*$/i;CKEDITOR.plugins.add("image2",{requires:"widget,dialog",icons:"image",hidpi:true,onLoad:function(){CKEDITOR.addCss(".cke_image_nocaption{line-height:0}.cke_editable.cke_image_sw, .cke_editable.cke_image_sw *{cursor:sw-resize !important}.cke_editable.cke_image_se, .cke_editable.cke_image_se *{cursor:se-resize !important}.cke_image_resizer{display:none;position:absolute;width:10px;height:10px;bottom:-5px;right:-5px;background:#000;outline:1px solid #fff;line-height:0;cursor:se-resize;}.cke_image_resizer_wrapper{position:relative;display:inline-block;line-height:0;}.cke_image_resizer.cke_image_resizer_left{right:auto;left:-5px;cursor:sw-resize;}.cke_widget_wrapper:hover .cke_image_resizer,.cke_image_resizer.cke_image_resizing{display:block}.cke_widget_wrapper>a{display:inline-block}")},
|
||||
init:function(b){var c=b.config,d=b.lang.image2,e=a(b);c.filebrowserImage2BrowseUrl=c.filebrowserImageBrowseUrl;c.filebrowserImage2UploadUrl=c.filebrowserImageUploadUrl;e.pathName=d.pathName;e.editables.caption.pathName=d.pathNameCaption;b.widgets.add("image",e);b.ui.addButton&&b.ui.addButton("Image",{label:b.lang.common.image,command:"image",toolbar:"insert,10"});if(b.contextMenu){b.addMenuGroup("image",10);b.addMenuItem("image",{label:d.menu,command:"image",group:"image"})}CKEDITOR.dialog.add("image2",
|
||||
this.path+"dialogs/image2.js")},afterInit:function(a){var b={left:1,right:1,center:1,block:1},c=j(a),e;for(e in b)c(e);d(a)}});CKEDITOR.plugins.image2={stateShifter:function(a){function b(a,f){var g={};e?g.attributes={"class":e[1]}:g.styles={"text-align":"center"};g=d.createElement(a.activeEnterMode==CKEDITOR.ENTER_P?"p":"div",g);c(g,f);f.move(g);return g}function c(b,d){if(d.getParent()){var e=a.createRange();e.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);d.remove();g.insertElementIntoRange(b,
|
||||
e)}else b.replace(d)}var d=a.document,e=a.config.image2_alignClasses,f=a.config.image2_captionedClass,g=a.editable(),h=["hasCaption","align","link"],i={align:function(c,d,f){var g=c.element;if(c.changed.align){if(!c.newData.hasCaption){if(f=="center"){c.deflate();c.element=b(a,g)}if(!c.changed.hasCaption&&d=="center"&&f!="center"){c.deflate();d=g.findOne("a,img");d.replace(g);c.element=d}}}else if(f=="center"&&c.changed.hasCaption&&!c.newData.hasCaption){c.deflate();c.element=b(a,g)}!e&&g.is("figure")&&
|
||||
(f=="center"?g.setStyle("display","inline-block"):g.removeStyle("display"))},hasCaption:function(b,e,g){if(b.changed.hasCaption){e=b.element.is({img:1,a:1})?b.element:b.element.findOne("a,img");b.deflate();if(g){g=CKEDITOR.dom.element.createFromHtml(p.output({captionedClass:f,captionPlaceholder:a.lang.image2.captionPlaceholder}),d);c(g,b.element);e.replace(g.findOne("img"));b.element=g}else{e.replace(b.element);b.element=e}}},link:function(b,c,e){if(b.changed.link){var f=b.element.is("img")?b.element:
|
||||
b.element.findOne("img"),g=b.element.is("a")?b.element:b.element.findOne("a"),h=b.element.is("a")&&!e||b.element.is("img")&&e,i;h&&b.deflate();if(e){if(!c){i=d.createElement("a",{attributes:{href:b.newData.link.url}});i.replace(f);f.move(i)}e=CKEDITOR.plugins.link.getLinkAttributes(a,e);CKEDITOR.tools.isEmpty(e.set)||(i||g).setAttributes(e.set);e.removed.length&&(i||g).removeAttributes(e.removed)}else{e=g.findOne("img");e.replace(g);i=e}if(h)b.element=i}}};return function(a){var b,c;a.changed={};
|
||||
for(c=0;c<h.length;c++){b=h[c];a.changed[b]=a.oldData?a.oldData[b]!==a.newData[b]:false}for(c=0;c<h.length;c++){b=h[c];i[b](a,a.oldData?a.oldData[b]:null,a.newData[b])}a.inflate()}},checkHasNaturalRatio:function(a){var b=a.$,a=this.getNatural(a);return Math.round(b.clientWidth/a.width*a.height)==b.clientHeight||Math.round(b.clientHeight/a.height*a.width)==b.clientWidth},getNatural:function(a){if(a.$.naturalWidth)a={width:a.$.naturalWidth,height:a.$.naturalHeight};else{var b=new Image;b.src=a.getAttribute("src");
|
||||
a={width:b.width,height:b.height}}return a}}}(),CKEDITOR.config.image2_captionedClass="image",CKEDITOR.config.plugins="dialogui,dialog,about,a11yhelp,basicstyles,blockquote,clipboard,panel,floatpanel,menu,contextmenu,resize,button,toolbar,elementspath,enterkey,entities,popup,filebrowser,floatingspace,listblock,richcombo,format,htmlwriter,horizontalrule,wysiwygarea,indent,indentlist,list,magicline,maximize,pastetext,pastefromword,removeformat,sourcearea,specialchar,stylescombo,tab,table,tabletools,undo,justify,showblocks,showborders,tableresize,sharedspace,sourcedialog,lineutils,widget,image2",
|
||||
CKEDITOR.config.skin="moono",function(){var a=function(a,c){for(var e=CKEDITOR.getUrl("plugins/"+c),a=a.split(","),b=0;b<a.length;b++)CKEDITOR.skin.icons[a[b]]={path:e,offset:-a[++b],bgsize:a[++b]}};CKEDITOR.env.hidpi?a("about,0,,bold,24,,italic,48,,strike,72,,subscript,96,,superscript,120,,underline,144,,blockquote,168,,copy-rtl,192,,copy,216,,cut-rtl,240,,cut,264,,paste-rtl,288,,paste,312,,horizontalrule,336,,image,360,,indent-rtl,384,,indent,408,,outdent-rtl,432,,outdent,456,,justifyblock,480,,justifycenter,504,,justifyleft,528,,justifyright,552,,bulletedlist-rtl,576,,bulletedlist,600,,numberedlist-rtl,624,,numberedlist,648,,maximize,672,,pastefromword-rtl,696,,pastefromword,720,,pastetext-rtl,744,,pastetext,768,,removeformat,792,,showblocks-rtl,816,,showblocks,840,,source-rtl,864,,source,888,,sourcedialog-rtl,912,,sourcedialog,936,,specialchar,960,,table,984,,redo-rtl,1008,,redo,1032,,undo-rtl,1056,,undo,1080,,simplebox,2208,auto",
|
||||
"icons_hidpi.png"):a("about,0,auto,bold,24,auto,italic,48,auto,strike,72,auto,subscript,96,auto,superscript,120,auto,underline,144,auto,blockquote,168,auto,copy-rtl,192,auto,copy,216,auto,cut-rtl,240,auto,cut,264,auto,paste-rtl,288,auto,paste,312,auto,horizontalrule,336,auto,image,360,auto,indent-rtl,384,auto,indent,408,auto,outdent-rtl,432,auto,outdent,456,auto,justifyblock,480,auto,justifycenter,504,auto,justifyleft,528,auto,justifyright,552,auto,bulletedlist-rtl,576,auto,bulletedlist,600,auto,numberedlist-rtl,624,auto,numberedlist,648,auto,maximize,672,auto,pastefromword-rtl,696,auto,pastefromword,720,auto,pastetext-rtl,744,auto,pastetext,768,auto,removeformat,792,auto,showblocks-rtl,816,auto,showblocks,840,auto,source-rtl,864,auto,source,888,auto,sourcedialog-rtl,912,auto,sourcedialog,936,auto,specialchar,960,auto,table,984,auto,redo-rtl,1008,auto,redo,1032,auto,undo-rtl,1056,auto,undo,1080,auto,simplebox,1104,auto",
|
||||
"icons.png")}()})();
|
63
core/assets/vendor/ckeditor/lang/_translationstatus.txt
vendored
Normal file
63
core/assets/vendor/ckeditor/lang/_translationstatus.txt
vendored
Normal file
|
@ -0,0 +1,63 @@
|
|||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
|
||||
af.js Found: 62 Missing: 4
|
||||
ar.js Found: 51 Missing: 15
|
||||
bg.js Found: 58 Missing: 8
|
||||
bn.js Found: 40 Missing: 26
|
||||
bs.js Found: 29 Missing: 37
|
||||
ca.js Found: 61 Missing: 5
|
||||
cs.js Found: 66 Missing: 0
|
||||
cy.js Found: 66 Missing: 0
|
||||
da.js Found: 66 Missing: 0
|
||||
de.js Found: 66 Missing: 0
|
||||
el.js Found: 59 Missing: 7
|
||||
en-au.js Found: 38 Missing: 28
|
||||
en-ca.js Found: 37 Missing: 29
|
||||
en-gb.js Found: 61 Missing: 5
|
||||
eo.js Found: 66 Missing: 0
|
||||
es.js Found: 66 Missing: 0
|
||||
et.js Found: 66 Missing: 0
|
||||
eu.js Found: 48 Missing: 18
|
||||
fa.js Found: 66 Missing: 0
|
||||
fi.js Found: 66 Missing: 0
|
||||
fo.js Found: 66 Missing: 0
|
||||
fr-ca.js Found: 42 Missing: 24
|
||||
fr.js Found: 66 Missing: 0
|
||||
gl.js Found: 40 Missing: 26
|
||||
gu.js Found: 66 Missing: 0
|
||||
he.js Found: 66 Missing: 0
|
||||
hi.js Found: 43 Missing: 23
|
||||
hr.js Found: 66 Missing: 0
|
||||
hu.js Found: 63 Missing: 3
|
||||
is.js Found: 41 Missing: 25
|
||||
it.js Found: 66 Missing: 0
|
||||
ja.js Found: 62 Missing: 4
|
||||
ka.js Found: 62 Missing: 4
|
||||
km.js Found: 40 Missing: 26
|
||||
ko.js Found: 40 Missing: 26
|
||||
lt.js Found: 66 Missing: 0
|
||||
lv.js Found: 40 Missing: 26
|
||||
mk.js Found: 0 Missing: 66
|
||||
mn.js Found: 40 Missing: 26
|
||||
ms.js Found: 39 Missing: 27
|
||||
nb.js Found: 66 Missing: 0
|
||||
nl.js Found: 65 Missing: 1
|
||||
no.js Found: 66 Missing: 0
|
||||
pl.js Found: 66 Missing: 0
|
||||
pt-br.js Found: 66 Missing: 0
|
||||
pt.js Found: 52 Missing: 14
|
||||
ro.js Found: 61 Missing: 5
|
||||
ru.js Found: 66 Missing: 0
|
||||
sk.js Found: 49 Missing: 17
|
||||
sl.js Found: 48 Missing: 18
|
||||
sr-latn.js Found: 40 Missing: 26
|
||||
sr.js Found: 40 Missing: 26
|
||||
sv.js Found: 62 Missing: 4
|
||||
th.js Found: 40 Missing: 26
|
||||
tr.js Found: 66 Missing: 0
|
||||
ug.js Found: 66 Missing: 0
|
||||
uk.js Found: 66 Missing: 0
|
||||
vi.js Found: 66 Missing: 0
|
||||
zh-cn.js Found: 66 Missing: 0
|
||||
zh.js Found: 58 Missing: 8
|
5
core/assets/vendor/ckeditor/lang/af.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/af.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/ar.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/ar.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/bg.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/bg.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/bn.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/bn.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/bs.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/bs.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/ca.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/ca.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/cs.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/cs.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/cy.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/cy.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/da.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/da.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/de.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/de.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/el.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/el.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/en-au.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/en-au.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/en-ca.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/en-ca.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/en-gb.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/en-gb.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/en.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/en.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/eo.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/eo.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/es.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/es.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/et.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/et.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/eu.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/eu.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/fa.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/fa.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/fi.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/fi.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/fo.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/fo.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/fr-ca.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/fr-ca.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/fr.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/fr.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/gl.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/gl.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/gu.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/gu.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/he.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/he.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/hi.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/hi.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/hr.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/hr.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/hu.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/hu.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/id.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/id.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/is.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/is.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/it.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/it.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/ja.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/ja.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/ka.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/ka.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/km.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/km.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/ko.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/ko.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/ku.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/ku.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/lt.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/lt.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/lv.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/lv.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/mk.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/mk.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/mn.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/mn.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/ms.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/ms.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/nb.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/nb.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/nl.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/nl.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/no.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/no.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/pl.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/pl.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/pt-br.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/pt-br.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/pt.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/pt.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/ro.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/ro.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/ru.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/ru.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/si.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/si.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/sk.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/sk.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/sl.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/sl.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/sq.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/sq.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/sr-latn.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/sr-latn.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/sr.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/sr.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/sv.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/sv.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/th.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/th.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/tr.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/tr.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/tt.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/tt.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/ug.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/ug.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/uk.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/uk.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/vi.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/vi.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/zh-cn.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/zh-cn.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
core/assets/vendor/ckeditor/lang/zh.js
vendored
Normal file
5
core/assets/vendor/ckeditor/lang/zh.js
vendored
Normal file
File diff suppressed because one or more lines are too long
10
core/assets/vendor/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js
vendored
Normal file
10
core/assets/vendor/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add("a11yHelp",function(j){var a=j.lang.a11yhelp,l=CKEDITOR.tools.getNextId(),e={8:a.backspace,9:a.tab,13:a.enter,16:a.shift,17:a.ctrl,18:a.alt,19:a.pause,20:a.capslock,27:a.escape,33:a.pageUp,34:a.pageDown,35:a.end,36:a.home,37:a.leftArrow,38:a.upArrow,39:a.rightArrow,40:a.downArrow,45:a.insert,46:a["delete"],91:a.leftWindowKey,92:a.rightWindowKey,93:a.selectKey,96:a.numpad0,97:a.numpad1,98:a.numpad2,99:a.numpad3,100:a.numpad4,101:a.numpad5,102:a.numpad6,103:a.numpad7,104:a.numpad8,
|
||||
105:a.numpad9,106:a.multiply,107:a.add,109:a.subtract,110:a.decimalPoint,111:a.divide,112:a.f1,113:a.f2,114:a.f3,115:a.f4,116:a.f5,117:a.f6,118:a.f7,119:a.f8,120:a.f9,121:a.f10,122:a.f11,123:a.f12,144:a.numLock,145:a.scrollLock,186:a.semiColon,187:a.equalSign,188:a.comma,189:a.dash,190:a.period,191:a.forwardSlash,192:a.graveAccent,219:a.openBracket,220:a.backSlash,221:a.closeBracket,222:a.singleQuote};e[CKEDITOR.ALT]=a.alt;e[CKEDITOR.SHIFT]=a.shift;e[CKEDITOR.CTRL]=a.ctrl;var f=[CKEDITOR.ALT,CKEDITOR.SHIFT,
|
||||
CKEDITOR.CTRL],m=/\$\{(.*?)\}/g,p=function(){var a=j.keystrokeHandler.keystrokes,g={},c;for(c in a)g[a[c]]=c;return function(a,c){var b;if(g[c]){b=g[c];for(var h,i,k=[],d=0;d<f.length;d++)i=f[d],h=b/f[d],1<h&&2>=h&&(b-=i,k.push(e[i]));k.push(e[b]||String.fromCharCode(b));b=k.join("+")}else b=a;return b}}();return{title:a.title,minWidth:600,minHeight:400,contents:[{id:"info",label:j.lang.common.generalTab,expand:!0,elements:[{type:"html",id:"legends",style:"white-space:normal;",focus:function(){this.getElement().focus()},
|
||||
html:function(){for(var e='<div class="cke_accessibility_legend" role="document" aria-labelledby="'+l+'_arialbl" tabIndex="-1">%1</div><span id="'+l+'_arialbl" class="cke_voice_label">'+a.contents+" </span>",g=[],c=a.legend,j=c.length,f=0;f<j;f++){for(var b=c[f],h=[],i=b.items,k=i.length,d=0;d<k;d++){var n=i[d],o=n.legend.replace(m,p);o.match(m)||h.push("<dt>%1</dt><dd>%2</dd>".replace("%1",n.name).replace("%2",o))}g.push("<h1>%1</h1><dl>%2</dl>".replace("%1",b.name).replace("%2",h.join("")))}return e.replace("%1",
|
||||
g.join(""))}()+'<style type="text/css">.cke_accessibility_legend{width:600px;height:400px;padding-right:5px;overflow-y:auto;overflow-x:hidden;}.cke_browser_quirks .cke_accessibility_legend,{height:390px}.cke_accessibility_legend *{white-space:normal;}.cke_accessibility_legend h1{font-size: 20px;border-bottom: 1px solid #AAA;margin: 5px 0px 15px;}.cke_accessibility_legend dl{margin-left: 5px;}.cke_accessibility_legend dt{font-size: 13px;font-weight: bold;}.cke_accessibility_legend dd{margin:10px}</style>'}]}],
|
||||
buttons:[CKEDITOR.dialog.cancelButton]}});
|
25
core/assets/vendor/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt
vendored
Normal file
25
core/assets/vendor/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
|
||||
cs.js Found: 30 Missing: 0
|
||||
cy.js Found: 30 Missing: 0
|
||||
da.js Found: 12 Missing: 18
|
||||
de.js Found: 30 Missing: 0
|
||||
el.js Found: 25 Missing: 5
|
||||
eo.js Found: 30 Missing: 0
|
||||
fa.js Found: 30 Missing: 0
|
||||
fi.js Found: 30 Missing: 0
|
||||
fr.js Found: 30 Missing: 0
|
||||
gu.js Found: 12 Missing: 18
|
||||
he.js Found: 30 Missing: 0
|
||||
it.js Found: 30 Missing: 0
|
||||
mk.js Found: 5 Missing: 25
|
||||
nb.js Found: 30 Missing: 0
|
||||
nl.js Found: 30 Missing: 0
|
||||
no.js Found: 30 Missing: 0
|
||||
pt-br.js Found: 30 Missing: 0
|
||||
ro.js Found: 6 Missing: 24
|
||||
tr.js Found: 30 Missing: 0
|
||||
ug.js Found: 27 Missing: 3
|
||||
vi.js Found: 6 Missing: 24
|
||||
zh-cn.js Found: 30 Missing: 0
|
11
core/assets/vendor/ckeditor/plugins/a11yhelp/dialogs/lang/af.js
vendored
Normal file
11
core/assets/vendor/ckeditor/plugins/a11yhelp/dialogs/lang/af.js
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang("a11yhelp","af",{title:"Toeganglikheid instruksies",contents:"Hulp inhoud. Druk ESC om toe te maak.",legend:[{name:"Algemeen",items:[{name:"Bewerker balk",legend:"Druk ${toolbarFocus} om op die werkbalk te land. Beweeg na die volgende en voorige wekrbalkgroep met TAB and SHIFT-TAB. Beweeg na die volgende en voorige werkbalkknop met die regter of linker pyl. Druk SPASIE of ENTER om die knop te bevestig."},{name:"Bewerker dialoog",legend:"In 'n dialoog, druk TAB vir die volgende dialoog veld, SHIFT + TAB vir die vorige dialoog veld, ENTER om te bevestig enESC om die dialoog af te breek. Vir 'n dialoog met meer as een leisie, druk ALT + F10 om die leisielys te wys. Beweeg dan met TAB of Regter pyl na die volgende leise of SHIFT + TAB of Linker pyl na die voorige leisie. Druk SPACE of ENTER om na die leisie bladsy toe te gaan."},
|
||||
{name:"Bewerkerinhoudmenu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
|
||||
{name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Commands",items:[{name:" Undo command",legend:"Press ${undo}"},{name:" Redo command",legend:"Press ${redo}"},{name:" Bold command",legend:"Press ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
|
||||
legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
|
||||
{name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}],backspace:"Backspace",tab:"Tab",enter:"Enter",shift:"Shift",ctrl:"Ctrl",alt:"Alt",pause:"Pouse",capslock:"Hoofletterslot",escape:"Ontsnap",pageUp:"Blaaiop",pageDown:"Blaaiaf",end:"Einde",home:"Tuis",leftArrow:"Linkspyl",upArrow:"Oppyl",rightArrow:"Regterpyl",downArrow:"Afpyl",insert:"Toevoeg","delete":"Verwyder",leftWindowKey:"Left Windows key",rightWindowKey:"Right Windows key",selectKey:"Select key",numpad0:"Nommerblok 0",numpad1:"Nommerblok 1",
|
||||
numpad2:"Nommerblok 2",numpad3:"Nommerblok 3",numpad4:"Nommerblok 4",numpad5:"Nommerblok 5",numpad6:"Nommerblok 6",numpad7:"Nommerblok 7",numpad8:"Nommerblok 8",numpad9:"Nommerblok 9",multiply:"Maal",add:"Plus",subtract:"Minus",decimalPoint:"Desimaalepunt",divide:"Gedeeldeur",f1:"F1",f2:"F2",f3:"F3",f4:"F4",f5:"F5",f6:"F6",f7:"F7",f8:"F8",f9:"F9",f10:"F10",f11:"F11",f12:"F12",numLock:"Nommervergrendel",scrollLock:"Rolvergrendel",semiColon:"Kommapunt",equalSign:"Isgelykaan",comma:"Komma",dash:"Koppelteken",
|
||||
period:"Punt",forwardSlash:"Skuinsstreep",graveAccent:"Aksentteken",openBracket:"Oopblokhakkie",backSlash:"Trustreep",closeBracket:"Toeblokhakkie",singleQuote:"Enkelaanhaalingsteken"});
|
11
core/assets/vendor/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js
vendored
Normal file
11
core/assets/vendor/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang("a11yhelp","ar",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"عام",items:[{name:"Editor Toolbar",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"Editor Dialog",legend:"Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
|
||||
{name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
|
||||
{name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Commands",items:[{name:" Undo command",legend:"Press ${undo}"},{name:" Redo command",legend:"Press ${redo}"},{name:" Bold command",legend:"Press ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
|
||||
legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
|
||||
{name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}],backspace:"Backspace",tab:"Tab",enter:"Enter",shift:"Shift",ctrl:"Ctrl",alt:"Alt",pause:"Pause",capslock:"Caps Lock",escape:"Escape",pageUp:"Page Up",pageDown:"Page Down",end:"End",home:"Home",leftArrow:"Left Arrow",upArrow:"Up Arrow",rightArrow:"Right Arrow",downArrow:"Down Arrow",insert:"Insert","delete":"Delete",leftWindowKey:"Left Windows key",rightWindowKey:"Right Windows key",selectKey:"Select key",numpad0:"Numpad 0",numpad1:"Numpad 1",
|
||||
numpad2:"Numpad 2",numpad3:"Numpad 3",numpad4:"Numpad 4",numpad5:"Numpad 5",numpad6:"Numpad 6",numpad7:"Numpad 7",numpad8:"Numpad 8",numpad9:"Numpad 9",multiply:"Multiply",add:"إضافة",subtract:"Subtract",decimalPoint:"Decimal Point",divide:"تقسيم",f1:"F1",f2:"F2",f3:"F3",f4:"F4",f5:"F5",f6:"F6",f7:"F7",f8:"F8",f9:"F9",f10:"F10",f11:"F11",f12:"F12",numLock:"Num Lock",scrollLock:"Scroll Lock",semiColon:"Semicolon",equalSign:"Equal Sign",comma:"فاصلة",dash:"Dash",period:"نقطة",forwardSlash:"Forward Slash",
|
||||
graveAccent:"Grave Accent",openBracket:"Open Bracket",backSlash:"Backslash",closeBracket:"Close Bracket",singleQuote:"Single Quote"});
|
11
core/assets/vendor/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js
vendored
Normal file
11
core/assets/vendor/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang("a11yhelp","bg",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"Общо",items:[{name:"Editor Toolbar",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"Editor Dialog",legend:"Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
|
||||
{name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
|
||||
{name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Commands",items:[{name:" Undo command",legend:"Press ${undo}"},{name:" Redo command",legend:"Press ${redo}"},{name:" Bold command",legend:"Press ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
|
||||
legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
|
||||
{name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}],backspace:"Backspace",tab:"Tab",enter:"Enter",shift:"Shift",ctrl:"Ctrl",alt:"Alt",pause:"Pause",capslock:"Caps Lock",escape:"Escape",pageUp:"Page Up",pageDown:"Page Down",end:"End",home:"Home",leftArrow:"Left Arrow",upArrow:"Up Arrow",rightArrow:"Right Arrow",downArrow:"Down Arrow",insert:"Insert","delete":"Delete",leftWindowKey:"Left Windows key",rightWindowKey:"Right Windows key",selectKey:"Select key",numpad0:"Numpad 0",numpad1:"Numpad 1",
|
||||
numpad2:"Numpad 2",numpad3:"Numpad 3",numpad4:"Numpad 4",numpad5:"Numpad 5",numpad6:"Numpad 6",numpad7:"Numpad 7",numpad8:"Numpad 8",numpad9:"Numpad 9",multiply:"Multiply",add:"Add",subtract:"Subtract",decimalPoint:"Decimal Point",divide:"Divide",f1:"F1",f2:"F2",f3:"F3",f4:"F4",f5:"F5",f6:"F6",f7:"F7",f8:"F8",f9:"F9",f10:"F10",f11:"F11",f12:"F12",numLock:"Num Lock",scrollLock:"Scroll Lock",semiColon:"Semicolon",equalSign:"Equal Sign",comma:"Comma",dash:"Dash",period:"Period",forwardSlash:"Forward Slash",
|
||||
graveAccent:"Grave Accent",openBracket:"Open Bracket",backSlash:"Backslash",closeBracket:"Close Bracket",singleQuote:"Single Quote"});
|
13
core/assets/vendor/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js
vendored
Normal file
13
core/assets/vendor/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang("a11yhelp","ca",{title:"Instruccions d'Accessibilitat",contents:"Continguts de l'Ajuda. Per tancar aquest quadre de diàleg premi ESC.",legend:[{name:"General",items:[{name:"Editor de barra d'eines",legend:"Premi ${toolbarFocus} per desplaçar-se per la barra d'eines. Vagi en el següent i anterior grup de barra d'eines amb TAB i SHIFT-TAB. Vagi en el següent i anterior botó de la barra d'eines amb RIGHT ARROW i LEFT ARROW. Premi SPACE o ENTER per activar el botó de la barra d'eines."},
|
||||
{name:"Editor de quadre de diàleg",legend:"Dins d'un quadre de diàleg, premi la tecla TAB per desplaçar-se al següent camp del quadre de diàleg, premi SHIFT + TAB per desplaçar-se a l'anterior camp, premi ENTER per acceptar el quadre de diàleg, premi ESC per cancel·lar el quadre de diàleg. Per els quadres de diàleg que tenen diverses pestanyes, premi ALT + F10 per anar a la llista de pestanyes. Després podrà desplaçar-se a la següent pestanya amb TAB o RIGHT ARROW. Anar a la pestanya anterior amb SHIFT + TAB o LEFT ARROW. Premi SPACE o ENTER per seleccionar la pestanya."},
|
||||
{name:"Editor de menú contextual",legend:"Premi ${contextMenu} o APPLICATION KEY per obrir el menú contextual. Després desplacis a la següent opció del menú amb TAB o DOWN ARROW. Desplacis a l'anterior opció amb SHIFT+TAB o UP ARROW. Premi SPACE o ENTER per seleccionar l'opció del menú. Obri el submenú de l'actual opció utilitzant SPACE o ENTER o RIGHT ARROW. Pot tornar a l'opció del menú pare amb ESC o LEFT ARROW. Tanqui el menú contextual amb ESC."},{name:"Editor de caixa de llista",legend:"Dins d'un quadre de llista, desplacis al següent element de la llista amb TAB o DOWN ARROW. Desplacis a l'anterior element de la llista amb SHIFT + TAB o UP ARROW. Premi SPACE o ENTER per seleccionar l'opció de la llista. Premi ESC per tancar el quadre de llista."},
|
||||
{name:"Editor de barra de ruta de l'element",legend:"Premi ${elementsPathFocus} per anar als elements de la barra de ruta. Desplacis al botó de l'element següent amb TAB o RIGHT ARROW. Desplacis a l'anterior botó amb SHIFT+TAB o LEFT ARROW. Premi SPACE o ENTER per seleccionar l'element a l'editor."}]},{name:"Ordres",items:[{name:"Desfer ordre",legend:"Premi ${undo}"},{name:"Refer ordre",legend:"Premi ${redo}"},{name:"Ordre negreta",legend:"Premi ${bold}"},{name:"Ordre cursiva",legend:"Premi ${italic}"},
|
||||
{name:"Ordre subratllat",legend:"Premi ${underline}"},{name:"Ordre enllaç",legend:"Premi ${link}"},{name:"Ordre amagar barra d'eines",legend:"Premi ${toolbarCollapse}"},{name:"Ordre per accedir a l'anterior espai enfocat",legend:"Premi ${accessPreviousSpace} per accedir a l'enfocament d'espai més proper inabastable abans del símbol d'intercalació, per exemple: dos elements HR adjacents. Repetiu la combinació de tecles per arribar a enfocaments d'espais distants."},{name:"Ordre per accedir al següent espai enfocat",
|
||||
legend:"Premi ${accessNextSpace} per accedir a l'enfocament d'espai més proper inabastable després del símbol d'intercalació, per exemple: dos elements HR adjacents. Repetiu la combinació de tecles per arribar a enfocaments d'espais distants."},{name:"Ajuda d'accessibilitat",legend:"Premi ${a11yHelp}"}]}],backspace:"Retrocés",tab:"Tabulació",enter:"Intro",shift:"Majúscules",ctrl:"Ctrl",alt:"Alt",pause:"Pausa",capslock:"Bloqueig de majúscules",escape:"Escape",pageUp:"Pàgina Amunt",pageDown:"Pàgina Avall",
|
||||
end:"Fi",home:"Inici",leftArrow:"Fletxa Esquerra",upArrow:"Fletxa Amunt",rightArrow:"Fletxa Dreta",downArrow:"Fletxa Avall",insert:"Inserir","delete":"Eliminar",leftWindowKey:"Tecla Windows Esquerra",rightWindowKey:"Tecla Windows Dreta",selectKey:"Tecla Seleccionar",numpad0:"Teclat Numèric 0",numpad1:"Teclat Numèric 1",numpad2:"Teclat Numèric 2",numpad3:"Teclat Numèric 3",numpad4:"Teclat Numèric 4",numpad5:"Teclat Numèric 5",numpad6:"Teclat Numèric 6",numpad7:"Teclat Numèric 7",numpad8:"Teclat Numèric 8",
|
||||
numpad9:"Teclat Numèric 9",multiply:"Multiplicació",add:"Suma",subtract:"Resta",decimalPoint:"Punt Decimal",divide:"Divisió",f1:"F1",f2:"F2",f3:"F3",f4:"F4",f5:"F5",f6:"F6",f7:"F7",f8:"F8",f9:"F9",f10:"F10",f11:"F11",f12:"F12",numLock:"Bloqueig Teclat Numèric",scrollLock:"Bloqueig de Desplaçament",semiColon:"Punt i Coma",equalSign:"Símbol Igual",comma:"Coma",dash:"Guió",period:"Punt",forwardSlash:"Barra Diagonal",graveAccent:"Accent Obert",openBracket:"Claudàtor Obert",backSlash:"Barra Invertida",
|
||||
closeBracket:"Claudàtor Tancat",singleQuote:"Cometa Simple"});
|
13
core/assets/vendor/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js
vendored
Normal file
13
core/assets/vendor/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang("a11yhelp","cs",{title:"Instrukce pro přístupnost",contents:"Obsah nápovědy. Pro uzavření tohoto dialogu stiskněte klávesu ESC.",legend:[{name:"Obecné",items:[{name:"Panel nástrojů editoru",legend:"Stiskněte${toolbarFocus} k procházení panelu nástrojů. Přejděte na další a předchozí skupiny pomocí TAB a SHIFT-TAB. Přechod na další a předchozí tlačítko panelu nástrojů je pomocí ŠIPKA VPRAVO nebo ŠIPKA VLEVO. Stisknutím mezerníku nebo klávesy ENTER tlačítko aktivujete."},{name:"Dialogové okno editoru",
|
||||
legend:"Uvnitř dialogového okna stiskněte TAB pro přesunutí na další pole, stiskněte SHIFT + TAB pro přesun na předchozí pole, stiskněte ENTER pro odeslání dialogu, stiskněte ESC pro jeho zrušení. Pro dialogová okna, která mají mnoho karet stiskněte ALT + F10 pr oprocházení seznamu karet. Pak se přesuňte na další kartu pomocí TAB nebo ŠIPKA VPRAVO. Pro přesun na předchozí stiskněte SHIFT + TAB nebo ŠIPKA VLEVO. Stiskněte MEZERNÍK nebo ENTER pro vybrání stránky karet."},{name:"Kontextové menu editoru",
|
||||
legend:"Stiskněte ${contextMenu} nebo klávesu APPLICATION k otevření kontextového menu. Pak se přesuňte na další možnost menu pomocí TAB nebo ŠIPKY DOLŮ. Přesuňte se na předchozí možnost pomocí SHIFT+TAB nebo ŠIPKY NAHORU. Stiskněte MEZERNÍK nebo ENTER pro zvolení možnosti menu. Podmenu současné možnosti otevřete pomocí MEZERNÍKU nebo ENTER či ŠIPKY DOLEVA. Kontextové menu uzavřete stiskem ESC."},{name:"Rámeček seznamu editoru",legend:"Uvnitř rámečku seznamu se přesunete na další položku menu pomocí TAB nebo ŠIPKA DOLŮ. Na předchozí položku se přesunete SHIFT + TAB nebo ŠIPKA NAHORU. Stiskněte MEZERNÍK nebo ENTER pro zvolení možnosti seznamu. Stiskněte ESC pro uzavření seznamu."},
|
||||
{name:"Lišta cesty prvku v editoru",legend:"Stiskněte ${elementsPathFocus} pro procházení lišty cesty prvku. Na další tlačítko prvku se přesunete pomocí TAB nebo ŠIPKA VPRAVO. Na předchozí položku se přesunete pomocí SHIFT + TAB nebo ŠIPKA VLEVO. Stiskněte MEZERNÍK nebo ENTER pro vybrání prvku v editoru."}]},{name:"Příkazy",items:[{name:" Příkaz Zpět",legend:"Stiskněte ${undo}"},{name:" Příkaz Znovu",legend:"Stiskněte ${redo}"},{name:" Příkaz Tučné",legend:"Stiskněte ${bold}"},{name:" Příkaz Kurzíva",
|
||||
legend:"Stiskněte ${italic}"},{name:" Příkaz Podtržení",legend:"Stiskněte ${underline}"},{name:" Příkaz Odkaz",legend:"Stiskněte ${link}"},{name:" Příkaz Skrýt panel nástrojů",legend:"Stiskněte ${toolbarCollapse}"},{name:"Příkaz pro přístup k předchozímu prostoru zaměření",legend:"Stiskněte ${accessPreviousSpace} pro přístup k nejbližšímu nedosažitelnému prostoru zaměření před stříškou, například: dva přilehlé prvky HR. Pro dosažení vzdálených prostorů zaměření tuto kombinaci kláves opakujte."},{name:"Příkaz pro přístup k dalšímu prostoru zaměření",
|
||||
legend:"Stiskněte ${accessNextSpace} pro přístup k nejbližšímu nedosažitelnému prostoru zaměření po stříšce, například: dva přilehlé prvky HR. Pro dosažení vzdálených prostorů zaměření tuto kombinaci kláves opakujte."},{name:" Nápověda přístupnosti",legend:"Stiskněte ${a11yHelp}"}]}],backspace:"Backspace",tab:"Tabulátor",enter:"Enter",shift:"Shift",ctrl:"Ctrl",alt:"Alt",pause:"Pauza",capslock:"Caps lock",escape:"Escape",pageUp:"Stránka nahoru",pageDown:"Stránka dolů",end:"Konec",home:"Domů",leftArrow:"Šipka vlevo",
|
||||
upArrow:"Šipka nahoru",rightArrow:"Šipka vpravo",downArrow:"Šipka dolů",insert:"Vložit","delete":"Smazat",leftWindowKey:"Levá klávesa Windows",rightWindowKey:"Pravá klávesa Windows",selectKey:"Vyberte klávesu",numpad0:"Numerická klávesa 0",numpad1:"Numerická klávesa 1",numpad2:"Numerická klávesa 2",numpad3:"Numerická klávesa 3",numpad4:"Numerická klávesa 4",numpad5:"Numerická klávesa 5",numpad6:"Numerická klávesa 6",numpad7:"Numerická klávesa 7",numpad8:"Numerická klávesa 8",numpad9:"Numerická klávesa 9",
|
||||
multiply:"Numerická klávesa násobení",add:"Přidat",subtract:"Numerická klávesa odečítání",decimalPoint:"Desetinná tečka",divide:"Numerická klávesa dělení",f1:"F1",f2:"F2",f3:"F3",f4:"F4",f5:"F5",f6:"F6",f7:"F7",f8:"F8",f9:"F9",f10:"F10",f11:"F11",f12:"F12",numLock:"Num lock",scrollLock:"Scroll lock",semiColon:"Středník",equalSign:"Rovnítko",comma:"Čárka",dash:"Pomlčka",period:"Tečka",forwardSlash:"Lomítko",graveAccent:"Přízvuk",openBracket:"Otevřená hranatá závorka",backSlash:"Obrácené lomítko",closeBracket:"Uzavřená hranatá závorka",
|
||||
singleQuote:"Jednoduchá uvozovka"});
|
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue