Merge branch 'dhtml-editor' of github.com:gnuboard/gnuboard5 into dhtml-editor

This commit is contained in:
kagla
2021-07-19 11:13:45 +09:00
221 changed files with 16780 additions and 247 deletions

2
.gitignore vendored
View File

@ -9,7 +9,7 @@ test.php
log
g5_tree
cheditor5.*/
ckeditor*/
!ckeditor*/
log/
g5_tree/
.vscode/

View File

@ -12,6 +12,7 @@ $content = '';
$token = _token();
set_session('ss_qa_delete_token', $token);
set_session('ss_qa_write_token', $token);
$g5['title'] = $qaconfig['qa_title'];
include_once('./qahead.php');

View File

@ -197,7 +197,8 @@ for ($i=1; $i<=$upload_count; $i++) {
// image type
if ( preg_match("/\.({$config['cf_image_extension']})$/i", $filename) ||
preg_match("/\.({$config['cf_flash_extension']})$/i", $filename) ) {
if ($timg['2'] < 1 || $timg['2'] > 16)
// webp 파일의 type 이 18 이므로 업로드가 가능하도록 수정
if ($timg['2'] < 1 || $timg['2'] > 18)
continue;
}
//=================================================================

View File

@ -12,7 +12,7 @@ if(function_exists('clean_relative_paths')){
$extension = pathinfo($filename, PATHINFO_EXTENSION);
if ( ! preg_match('/(jpg|jpeg|png|gif|bmp)$/i', $extension) ){
if ( ! preg_match('/(jpg|jpeg|png|gif|bmp|webp)$/i', $extension) ){
alert_close('이미지 확장자가 아닙니다.');
}

View File

@ -532,7 +532,7 @@ if(isset($_FILES['bf_file']['name']) && is_array($_FILES['bf_file']['name'])) {
// image type
if ( preg_match("/\.({$config['cf_image_extension']})$/i", $filename) ||
preg_match("/\.({$config['cf_flash_extension']})$/i", $filename) ) {
if ($timg['2'] < 1 || $timg['2'] > 16)
if ($timg['2'] < 1 || $timg['2'] > 18)
continue;
}
//=================================================================

View File

@ -235,3 +235,5 @@ if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') { //https 통신일때
} else { //http 통신일때 daum 주소 js
define('G5_POSTCODE_JS', '<script src="http://dmaps.daum.net/map_js_init/postcode.v2.js"></script>');
}
define('G5_IMAGE_EXTENSIONS', array(1=>'gif', 2=>'jpg', 3=>'png', 18=>'webp'));

View File

@ -197,7 +197,7 @@ if($g5_install || !$result) {
cf_member_img_width = '60',
cf_member_img_height = '60',
cf_login_minutes = '10',
cf_image_extension = 'gif|jpg|jpeg|png',
cf_image_extension = 'gif|jpg|jpeg|png|webp',
cf_flash_extension = 'swf',
cf_movie_extension = 'asx|asf|wmv|wma|mpg|mpeg|mov|avi|mp3',
cf_formmail_is_member = '1',

View File

@ -294,7 +294,7 @@ function get_thumbnail_find_cache($bo_table, $wr_id, $wr_key){
return get_write($write_table, $wr_id, true);
}
return get_board_file_db($bo_table, $wr_id, 'bf_file, bf_content', "and bf_type between '1' and '3'", true);
return get_board_file_db($bo_table, $wr_id, 'bf_file, bf_content', "and bf_type in (1, 2, 3, 18) ", true);
}
function get_write_table_name($bo_table){

View File

@ -70,7 +70,7 @@ function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40, $cache_time=
}
$list[$i] = get_list($row, $board, $latest_skin_url, $subject_len);
$list[$i]['first_file_thumb'] = (isset($row['wr_file']) && $row['wr_file']) ? get_board_file_db($bo_table, $row['wr_id'], 'bf_file, bf_content', "and bf_type between '1' and '3'", true) : array('bf_file'=>'', 'bf_content'=>'');
$list[$i]['first_file_thumb'] = (isset($row['wr_file']) && $row['wr_file']) ? get_board_file_db($bo_table, $row['wr_id'], 'bf_file, bf_content', "and bf_type in (1, 2, 3, 18) ", true) : array('bf_file'=>'', 'bf_content'=>'');
$list[$i]['bo_table'] = $bo_table;
// 썸네일 추가
if($options && is_string($options)) {

View File

@ -85,7 +85,7 @@ function get_file_thumbnail($file){
if( ! is_array($file) ) return '';
if( preg_match('/(\.jpg|\.jpeg|\.gif|\.png|\.bmp)$/i', $file['file']) && $contents = run_replace('get_file_thumbnail_tags', '', $file) ){
if( preg_match('/(\.jpg|\.jpeg|\.gif|\.png|\.bmp|\.webp)$/i', $file['file']) && $contents = run_replace('get_file_thumbnail_tags', '', $file) ){
return $contents;
} else if ($file['view']) {
return get_view_thumbnail($file['view']);
@ -108,6 +108,8 @@ function get_view_thumbnail($contents, $thumb_width=0)
if(empty($matches))
return $contents;
// $extensions = array(1=>'gif', 2=>'jpg', 3=>'png', 18=>'webp');
for($i=0; $i<count($matches[1]); $i++) {
$img = $matches[1][$i];
@ -138,8 +140,12 @@ function get_view_thumbnail($contents, $thumb_width=0)
if(empty($size))
continue;
// $file_ext = $extensions[$size[2]];
$file_ext = G5_IMAGE_EXTENSIONS[$size[2]];
if (!$file_ext) continue;
// jpg 이면 exif 체크
if($size[2] == 2 && function_exists('exif_read_data')) {
if( $file_ext === 'jpg' && function_exists('exif_read_data')) {
$degree = 0;
$exif = @exif_read_data($srcfile);
if(!empty($exif['Orientation'])) {
@ -166,7 +172,7 @@ function get_view_thumbnail($contents, $thumb_width=0)
// Animated GIF 체크
$is_animated = false;
if($size[2] == 1) {
if($file_ext === 'gif') {
$is_animated = is_animated_gif($srcfile);
if($replace_content = run_replace('thumbnail_is_animated_gif_content', '', $contents, $srcfile, $is_animated, $img_tag, $data_path, $size)){
@ -226,9 +232,21 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
if(!is_file($source_file)) // 원본 파일이 없다면
return;
$size = @getimagesize($source_file);
if(!isset($size[2]) || $size[2] < 1 || $size[2] > 3) // gif, jpg, png 에 대해서만 적용
return;
// $extensions = array(1 => 'gif', 2 => 'jpg', 3 => 'png', 18 => 'webp');
// $file_ext = $extensions[$size[2]]; // 파일 확장자
$file_ext = G5_IMAGE_EXTENSIONS[$size[2]];
if (!$file_ext) return;
// gif, jpg, png, webp 에 대해서만 적용
// if ( !(isset($size[2]) && ($size[2] == 1 || $size[2] == 2 || $size[2] == 3 || $size[2] == 18)) )
// return;
// $extensions 배열에 없는 확장자 라면 썸네일 만들지 않음
// if (!in_array($file_ext, $extensions))
// return;
if (!is_dir($target_path)) {
@mkdir($target_path, G5_DIR_PERMISSION);
@ -240,16 +258,19 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
return '';
// Animated GIF는 썸네일 생성하지 않음
if($size[2] == 1) {
if($file_ext === 'gif') {
if(is_animated_gif($source_file))
return basename($source_file);
} else if ($file_ext === 'webp') {
if(is_animated_webp($source_file))
return basename($source_file);
}
$ext = array(1 => 'gif', 2 => 'jpg', 3 => 'png');
$thumb_filename = preg_replace("/\.[^\.]+$/i", "", $filename); // 확장자제거
$thumb_file = "$target_path/thumb-{$thumb_filename}_{$thumb_width}x{$thumb_height}.".$ext[$size[2]];
// $thumb_file = "$target_path/thumb-{$thumb_filename}_{$thumb_width}x{$thumb_height}.".$ext[$size[2]];
$thumb_file = "$target_path/thumb-{$thumb_filename}_{$thumb_width}x{$thumb_height}.".$file_ext;
$thumb_time = @filemtime($thumb_file);
$source_time = @filemtime($source_file);
@ -263,10 +284,10 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
$src = null;
$degree = 0;
if ($size[2] == 1) {
if ($file_ext === 'gif') {
$src = @imagecreatefromgif($source_file);
$src_transparency = @imagecolortransparent($src);
} else if ($size[2] == 2) {
} else if ($file_ext === 'jpg') {
$src = @imagecreatefromjpeg($source_file);
if(function_exists('exif_read_data')) {
@ -298,9 +319,12 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
}
}
}
} else if ($size[2] == 3) {
} else if ($file_ext === 'png') {
$src = @imagecreatefrompng($source_file);
@imagealphablending($src, true);
} else if ($file_ext === 'webp') {
$src = @imagecreatefromwebp($source_file);
@imagealphablending($src, true);
} else {
return;
}
@ -363,10 +387,10 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
$dst = imagecreatetruecolor($dst_w, $dst_h);
if($size[2] == 3) {
if($file_ext === 'png') {
imagealphablending($dst, false);
imagesavealpha($dst, true);
} else if($size[2] == 1) {
} else if($file_ext === 'gif') {
$palletsize = imagecolorstotal($src);
if($src_transparency >= 0 && $src_transparency < $palletsize) {
$transparent_color = imagecolorsforindex($src, $src_transparency);
@ -391,12 +415,12 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
}
}
if($size[2] == 3) {
if($file_ext === 'png') {
$bgcolor = imagecolorallocatealpha($dst, 0, 0, 0, 127);
imagefill($dst, 0, 0, $bgcolor);
imagealphablending($dst, false);
imagesavealpha($dst, true);
} else if($size[2] == 1) {
} else if($file_ext === 'gif') {
$palletsize = imagecolorstotal($src);
if($src_transparency >= 0 && $src_transparency < $palletsize) {
$transparent_color = imagecolorsforindex($src, $src_transparency);
@ -474,12 +498,12 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
}
}
if($size[2] == 3) {
if($file_ext === 'png') {
$bgcolor = imagecolorallocatealpha($dst, 0, 0, 0, 127);
imagefill($dst, 0, 0, $bgcolor);
imagealphablending($dst, false);
imagesavealpha($dst, true);
} else if($size[2] == 1) {
} else if($file_ext === 'gif') {
$palletsize = imagecolorstotal($src);
if($src_transparency >= 0 && $src_transparency < $palletsize) {
$transparent_color = imagecolorsforindex($src, $src_transparency);
@ -502,22 +526,24 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
UnsharpMask($dst, $val[0], $val[1], $val[2]);
}
if($size[2] == 1) {
if($file_ext === 'gif') {
imagegif($dst, $thumb_file);
} else if($size[2] == 3) {
} else if($file_ext === 'png') {
if(!defined('G5_THUMB_PNG_COMPRESS'))
$png_compress = 5;
else
$png_compress = G5_THUMB_PNG_COMPRESS;
imagepng($dst, $thumb_file, $png_compress);
} else {
} else if ($file_ext === 'jpg') {
if(!defined('G5_THUMB_JPG_QUALITY'))
$jpg_quality = 90;
else
$jpg_quality = G5_THUMB_JPG_QUALITY;
imagejpeg($dst, $thumb_file, $jpg_quality);
} else if ($file_ext === 'webp') {
imagewebp($dst, $thumb_file);
}
chmod($thumb_file, G5_FILE_PERMISSION); // 추후 삭제를 위하여 파일모드 변경
@ -695,6 +721,22 @@ and the roundoff errors in the Gaussian blur process, are welcome.
}
// 움직이는 webp 파일인지 검사한다.
// 출처) https://stackoverflow.com/questions/45190469/how-to-identify-whether-webp-image-is-static-or-animated?answertab=votes#tab-top
function is_animated_webp($filename) {
$contents = file_get_contents($filename);
$where = strpos($contents, "ANMF");
if ($where !== false){
// animated
$is_animated = true;
}
else{
// non animated
$is_animated = false;
}
return $is_animated;
}
function is_animated_gif($filename) {
static $cache = array();

View File

@ -9,10 +9,11 @@ if( !function_exists('che_reprocessImage') ){
function che_reprocessImage($file_path, $callback){
$MIME_TYPES_PROCESSORS = array(
"image/gif" => array("imagecreatefromgif", "imagegif"),
"image/gif" => array("imagecreatefromgif", "imagegif"),
"image/jpg" => array("imagecreatefromjpeg", "imagejpeg"),
"image/jpeg" => array("imagecreatefromjpeg", "imagejpeg"),
"image/png" => array("imagecreatefrompng", "imagepng"),
"image/png" => array("imagecreatefrompng", "imagepng"),
"image/webp" => array("imagecreatefromwebp", "imagewebp"),
"image/bmp" => array("imagecreatefromwbmp", "imagewbmp")
);
@ -84,6 +85,7 @@ switch ($type) {
case "jpeg":
case "gif":
case "png":
case "webp":
$found = true;
}

View File

@ -14,7 +14,7 @@
<div style="margin: 0px 0px 10px 0px;">
<img src="../icons/imageUpload/remove_all.gif" class="remove-button" onclick="removeImages();"
alt="" style="vertical-align: middle" />
<input type="file" name="imageUpload[]" accept="image/jpeg,image/png,image/gif" id="inputImageUpload" multiple="multiple"
<input type="file" name="imageUpload[]" accept="image/jpeg,image/png,image/gif,image/webp" id="inputImageUpload" multiple="multiple"
onchange="selectedFiles(event)" style="vertical-align: middle; visibility: hidden; width: 0px"/>
<img id="fileSelectButton" src="../icons/imageUpload/add.gif" alt="image button" onclick="inputImageUpload.click()"
style="vertical-align: middle; margin-left: -5px; cursor: pointer"/>

View File

@ -14,7 +14,7 @@
<div style="margin: 0px 0px 10px 0px;">
<img src="../icons/imageUpload/remove_all.gif" class="remove-button" onclick="removeImages();"
alt="" style="vertical-align: middle" />
<input type="file" name="imageUpload[]" accept="image/jpeg,image/png,image/gif" id="inputImageUpload" multiple="multiple"
<input type="file" name="imageUpload[]" accept="image/jpeg,image/png,image/gif,image/webp" id="inputImageUpload" multiple="multiple"
onchange="selectedFiles(event)" style="vertical-align: middle; visibility: hidden; width: 0px"/>
<img id="fileSelectButton" src="../icons/imageUpload/add.gif" alt="image button" onclick="inputImageUpload.click()"
style="vertical-align: middle; margin-left: -5px; cursor: pointer"/>

View File

@ -14,7 +14,7 @@ var activeImage = null,
dragDropDiv,
eventDiff_x = 0,
eventDiff_y = 0,
fileTypeRe = /^image\/(png|jpeg|gif)$/i,
fileTypeRe = /^image\/(png|jpeg|gif|webp)$/i,
geckoOffsetX_marker = -3,
geckoOffsetY_marker = -1,
imageCompleted = 0,
@ -434,7 +434,12 @@ function startUpload(list) {
function fileFilterError(file) {
alert("선택하신 '" + file + "' 파일은 전송할 수 없습니다.\n" +
"gif, png, jpg 사진 파일만 전송할 수 있습니다.");
"gif, png, jpg, webp 사진 파일만 전송할 수 있습니다.");
}
function explorerFileFilterError(file) {
alert("선택하신 '" + file + "' 파일은 전송할 수 없습니다.\n" +
"익스플로러 환경에서는 gif, png, jpg 사진 파일만 \n전송할 수 있습니다.");
}
function imgComplete(img, imgSize, boxId) {
@ -962,7 +967,13 @@ DoUpload.prototype = {
file = files[i];
if (!file.type.match(fileTypeRe)) {
fileFilterError(file.name);
// 엣지를 제외한 ie브라우저인지 체크
var agent = navigator.userAgent.toLowerCase();
if (agent.indexOf('trident') != -1 || agent.indexOf("msie") != -1) {
explorerFileFilterError(file.name);
} else {
FileFilterError(file.name);
}
continue;
}
this.list.push(file);

View File

@ -14,7 +14,7 @@ var activeImage = null,
dragDropDiv,
eventDiff_x = 0,
eventDiff_y = 0,
fileTypeRe = /^image\/(png|jpeg|gif)$/i,
fileTypeRe = /^image\/(png|jpeg|gif|webp)$/i,
geckoOffsetX_marker = -3,
geckoOffsetY_marker = -1,
imageCompleted = 0,
@ -434,7 +434,12 @@ function startUpload(list) {
function fileFilterError(file) {
alert("선택하신 '" + file + "' 파일은 전송할 수 없습니다.\n" +
"gif, png, jpg 사진 파일만 전송할 수 있습니다.");
"gif, png, jpg, webp 사진 파일만 전송할 수 있습니다.");
}
function explorerFileFilterError(file) {
alert("선택하신 '" + file + "' 파일은 전송할 수 없습니다.\n" +
"익스플로러 환경에서는 gif, png, jpg 사진 파일만 \n전송할 수 있습니다.");
}
function imgComplete(img, imgSize, boxId) {
@ -962,10 +967,16 @@ DoUpload.prototype = {
file = files[i];
if (!file.type.match(fileTypeRe)) {
fileFilterError(file.name);
// 엣지를 제외한 ie브라우저인지 체크
var agent = navigator.userAgent.toLowerCase();
if (agent.indexOf('trident') != -1 || agent.indexOf("msie") != -1) {
explorerFileFilterError(file.name);
} else {
FileFilterError(file.name);
}
continue;
}
this.list.push(file);
this.list.push(file);
}
if (this.list.length < 1) {

View File

@ -335,7 +335,7 @@ function startUpload(count) {
function fileFilterError(file) {
alert("선택하신 '" + file + "' 파일은 전송할 수 없습니다.\n" +
"gif, png, jpg, 그림 파일만 전송할 수 있습니다.");
"gif, png, jpg, webp 그림 파일만 전송할 수 있습니다.");
}
function imgComplete(img, imgSize, boxId) {

View File

@ -54,7 +54,7 @@ function chkImgFormat (url)
{
var imageName = getFilename(url);
var allowSubmit = false;
var extArray = [".gif", ".jpg", ".jpeg", ".png"];
var extArray = [".gif", ".jpg", ".jpeg", ".png", ".webp"];
extArray.join(" ");
if (imageName === "") {
@ -72,7 +72,7 @@ function chkImgFormat (url)
}
if (!allowSubmit) {
alert("사진은 GIF, JPG, PNG 형식만 넣을 수 있습니다.");
alert("사진은 GIF, JPG, PNG, WEBP 형식만 넣을 수 있습니다.");
return false;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,39 @@
CKEditor 4
==========
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
http://ckeditor.com - See LICENSE.md for license information.
CKEditor is a text editor to be used inside web pages. It's not a replacement
for desktop text editors like Word or OpenOffice, but a component to be used as
part of web applications and websites.
## Documentation
The full editor documentation is available online at the following address:
https://ckeditor.com/docs/ckeditor4/latest/
## Installation
Installing CKEditor is an easy task. Just follow these simple steps:
1. **Download** the latest version from the CKEditor website:
http://ckeditor.com. You should have already completed this step, but be
sure you have the very latest version.
2. **Extract** (decompress) the downloaded file into the root of your website.
**Note:** CKEditor is by default installed in the `ckeditor` folder. You can
place the files in whichever you want though.
## Checking Your Installation
The editor comes with a few sample pages that can be used to verify that
installation proceeded properly. Take a look at the `samples` directory.
To test your installation, just call the following page at your website:
http://<your site>/<CKEditor installation path>/samples/index.html
For example:
http://www.example.com/ckeditor/samples/index.html

View File

@ -0,0 +1,10 @@
/*
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
(function(a){if("undefined"==typeof a)throw Error("jQuery should be loaded before CKEditor jQuery adapter.");if("undefined"==typeof CKEDITOR)throw Error("CKEditor should be loaded before CKEditor jQuery adapter.");CKEDITOR.config.jqueryOverrideVal="undefined"==typeof CKEDITOR.config.jqueryOverrideVal?!0:CKEDITOR.config.jqueryOverrideVal;a.extend(a.fn,{ckeditorGet:function(){var a=this.eq(0).data("ckeditorInstance");if(!a)throw"CKEditor is not initialized yet, use ckeditor() with a callback.";return a},
ckeditor:function(g,d){if(!CKEDITOR.env.isCompatible)throw Error("The environment is incompatible.");if(!a.isFunction(g)){var m=d;d=g;g=m}var k=[];d=d||{};this.each(function(){var b=a(this),c=b.data("ckeditorInstance"),f=b.data("_ckeditorInstanceLock"),h=this,l=new a.Deferred;k.push(l.promise());if(c&&!f)g&&g.apply(c,[this]),l.resolve();else if(f)c.once("instanceReady",function(){setTimeout(function(){c.element?(c.element.$==h&&g&&g.apply(c,[h]),l.resolve()):setTimeout(arguments.callee,100)},0)},
null,null,9999);else{if(d.autoUpdateElement||"undefined"==typeof d.autoUpdateElement&&CKEDITOR.config.autoUpdateElement)d.autoUpdateElementJquery=!0;d.autoUpdateElement=!1;b.data("_ckeditorInstanceLock",!0);c=a(this).is("textarea")?CKEDITOR.replace(h,d):CKEDITOR.inline(h,d);b.data("ckeditorInstance",c);c.on("instanceReady",function(d){var e=d.editor;setTimeout(function(){if(e.element){d.removeListener();e.on("dataReady",function(){b.trigger("dataReady.ckeditor",[e])});e.on("setData",function(a){b.trigger("setData.ckeditor",
[e,a.data])});e.on("getData",function(a){b.trigger("getData.ckeditor",[e,a.data])},999);e.on("destroy",function(){b.trigger("destroy.ckeditor",[e])});e.on("save",function(){a(h.form).submit();return!1},null,null,20);if(e.config.autoUpdateElementJquery&&b.is("textarea")&&a(h.form).length){var c=function(){b.ckeditor(function(){e.updateElement()})};a(h.form).submit(c);a(h.form).bind("form-pre-serialize",c);b.bind("destroy.ckeditor",function(){a(h.form).unbind("submit",c);a(h.form).unbind("form-pre-serialize",
c)})}e.on("destroy",function(){b.removeData("ckeditorInstance")});b.removeData("_ckeditorInstanceLock");b.trigger("instanceReady.ckeditor",[e]);g&&g.apply(e,[h]);l.resolve()}else setTimeout(arguments.callee,100)},0)},null,null,9999)}});var f=new a.Deferred;this.promise=f.promise();a.when.apply(this,k).then(function(){f.resolve()});this.editor=this.eq(0).data("ckeditorInstance");return this}});CKEDITOR.config.jqueryOverrideVal&&(a.fn.val=CKEDITOR.tools.override(a.fn.val,function(g){return function(d){if(arguments.length){var m=
this,k=[],f=this.each(function(){var b=a(this),c=b.data("ckeditorInstance");if(b.is("textarea")&&c){var f=new a.Deferred;c.setData(d,function(){f.resolve()});k.push(f.promise());return!0}return g.call(b,d)});if(k.length){var b=new a.Deferred;a.when.apply(this,k).done(function(){b.resolveWith(m)});return b.promise()}return f}var f=a(this).eq(0),c=f.data("ckeditorInstance");return f.is("textarea")&&c?c.getData():g.call(f)}}))})(window.jQuery);

View File

@ -0,0 +1,96 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
/**
* This file was added automatically by CKEditor builder.
* You may re-use it at any time to build CKEditor again.
*
* If you would like to build CKEditor online again
* (for example to upgrade), visit one the following links:
*
* (1) http://ckeditor.com/builder
* Visit online builder to build CKEditor from scratch.
*
* (2) http://ckeditor.com/builder/cd112ec67b59a67f8332bedaf04833cd
* Visit online builder to build CKEditor, starting with the same setup as before.
*
* (3) http://ckeditor.com/builder/download/cd112ec67b59a67f8332bedaf04833cd
* Straight download link to the latest version of CKEditor (Optimized) with the same setup as before.
*
* NOTE:
* This file is not used by CKEditor, you may remove it.
* Changing this file will not change your CKEditor configuration.
*/
var CKBUILDER_CONFIG = {
skin: 'office2013',
preset: 'full',
ignore: [
'.DS_Store',
'.bender',
'.editorconfig',
'.gitattributes',
'.gitignore',
'.idea',
'.jscsrc',
'.jshintignore',
'.jshintrc',
'.mailmap',
'.npm',
'.travis.yml',
'bender-err.log',
'bender-out.log',
'bender.ci.js',
'bender.js',
'dev',
'gruntfile.js',
'less',
'node_modules',
'package.json',
'tests'
],
plugins : {
'about' : 1,
'basicstyles' : 1,
'blockquote' : 1,
'clipboard' : 1,
'colorbutton' : 1,
'contextmenu' : 1,
'elementspath' : 1,
'enterkey' : 1,
'entities' : 1,
'filebrowser' : 1,
'floatingspace' : 1,
'font' : 1,
'htmlwriter' : 1,
'image' : 1,
'indentlist' : 1,
'justify' : 1,
'link' : 1,
'list' : 1,
'magicline' : 1,
'maximize' : 1,
'notificationaggregator' : 1,
'removeformat' : 1,
'resize' : 1,
'showblocks' : 1,
'showborders' : 1,
'sourcearea' : 1,
'tab' : 1,
'table' : 1,
'tableselection' : 1,
'tabletools' : 1,
'toolbar' : 1,
'undo' : 1,
'widget' : 1,
'wysiwygarea' : 1
},
languages : {
'en' : 1,
'ja' : 1,
'ko' : 1,
'zh-cn' : 1
}
};

1178
plugin/editor/ckeditor4/ckeditor.js vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,91 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see https://ckeditor.com/legal/ckeditor-oss-license
*/
// 모바일 체크
if(typeof(g5_is_mobile) == "undefined") g5_is_mobile = false;
CKEDITOR.editorConfig = function( config ) {
// 에디터 높이 설정
if(typeof(editor_height) != "undefined") {
config.height = editor_height+"px";
}
// 언어 설정
config.language = 'ko';
// 글꼴관련
config.font_names = '맑은 고딕;굴림;굴림체;궁서;궁서체;돋움;돋움체;바탕;바탕체;'; // + CKEDITOR.config.font_names;
config.font_defaultLabel = '맑은 고딕';
//config.font_defaultLabel = 'Malgun Gothic';
// 글자크기 출력
config.fontSize_sizes = '8pt;9pt;10pt;11pt;12pt;14pt;16pt;20pt;24pt;30pt;48pt;60pt;72pt;';
// 툴바 기능버튼 순서
config.toolbarGroups = [
{ name: '1', groups: [ 'styles', 'align', 'basicstyles', 'cleanup' ] },
{ name: '2', groups: [ 'insertImg', 'insert', 'colors', 'list', 'blocks', 'links', 'mode', 'tools', 'about' ] }
];
// 미노출 기능버튼
if(g5_is_mobile) {
//--- 모바일 ---//
config.removeButtons = 'Print,Cut,Copy,Paste,Subscript,Superscript,Anchor,Unlink,ShowBlocks,Undo,Redo,Smiley,Font';
} else {
//--- PC ---//
config.removeButtons = 'Print,Cut,Copy,Paste,Subscript,Superscript,Anchor,Unlink,ShowBlocks,Undo,Redo,Smiley';
}
/* 이미지 업로드 관련 소스 */
var up_url = "/upload.php?type=Images";
if( typeof(g5_editor_url) != "undefined" ) {
up_url = g5_editor_url + up_url;
} else {
up_url = "/plugin/editor/ckeditor4" + up_url;
}
// 에디터 구분
if(typeof(editor_id) != "undefined" && editor_id != "") {
up_url += "&editor_id="+editor_id;
}
// 업로드 경로 - editor_uri
if(typeof(editor_uri) != "undefined" && editor_uri != "") {
up_url += "&editor_uri="+editor_uri;
}
// 업로드 이미지용 토큰
if( typeof(editor_form_name) != "undefined" && editor_form_name != "") {
up_url += "&editor_form_name="+editor_form_name;
}
// 업로드 페이지 URL 선언
config.filebrowserImageUploadUrl = up_url;
// 이미지 다이얼로그 수정
CKEDITOR.on('dialogDefinition', function (ev) {
var dialogName = ev.data.name;
var dialog = ev.data.definition.dialog;
var dialogDefinition = ev.data.definition;
if (dialogName == 'image') {
dialog.on('show', function (obj) {
//this.selectPage('Upload'); //업로드텝으로 시작
});
dialogDefinition.removeContents('advanced'); // 자세히탭 제거
dialogDefinition.removeContents('Link'); // 링크탭 제거
var infoTab = dialogDefinition.getContents('info');
infoTab.remove('txtHSpace');
infoTab.remove('txtVSpace');
infoTab.remove('htmlPreview'); // 미리보기 제거
}
});
// 사용할 플러그인 추가
config.extraPlugins = 'uploadwidget,uploadimage';
// 본문내용 불러들일때 속성유지
config.allowedContent = true;
// iOS만 적용
if(/iPhone|iPad|iPod/i.test(navigator.userAgent) ) {
// 한글 입력 관련 줄바꿈 과정에서 문제발생하여 적용
config.removePlugins = 'enterkey';
}
};

View File

@ -0,0 +1,237 @@
/*
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
body
{
/* Font */
font-family: Arial,"돋움",Dotum;
/* Text color */
color: #333;
/* Remove the background color to make it transparent */
background-color: #fff;
margin: 20px;
}
@media all and (min-width:701px) {
body {
font-size: 0.875em;
}
}
@media all and (max-width:700px) {
body {
font-size: 1em
}
}
.cke_editable
{
/*
font-size: 13px;
line-height: 1.6;
*/
/* Fix for missing scrollbars with RTL texts. (#10488) */
font-family: "Malgun Gothic", "맑은 고딕";
/*font-size: 11pt;*/
line-height: 1.8;
word-wrap: break-word;
}
blockquote
{
/*font-style: italic;*/
/*font-family: Georgia, Times, "Times New Roman", serif;*/
padding: 2px 0;
border-style: solid;
border-color: #000;
border-width: 0;
margin:0;
}
.cke_contents_ltr blockquote
{
padding-left: 10px;
padding-right: 8px;
border-left-width: 3px;
}
.cke_contents_rtl blockquote
{
padding-left: 8px;
padding-right: 10px;
border-right-width: 3px;
}
p
{
margin:0;
padding:0;
}
a
{
color: #0782C1;
}
ol,ul,dl
{
/* IE7: reset rtl list margin. (#7334) */
*margin-right: 0px;
/* preserved spaces for list items with text direction other than the list. (#6249,#8049)*/
padding: 0 40px;
}
h1,h2,h6
{
font-weight: normal;
line-height: 1.2;
}
hr
{
border: 0px;
border-top: 1px solid #ccc;
}
p img
{
vertical-align:middle;
}
img.right
{
border: 1px solid #ccc;
float: right;
margin-left: 15px;
padding: 5px;
}
img.left
{
border: 1px solid #ccc;
float: left;
margin-right: 15px;
padding: 5px;
}
pre
{
white-space: pre-wrap; /* CSS 2.1 */
word-wrap: break-word; /* IE7 */
-moz-tab-size: 4;
tab-size: 4;
}
.marker
{
background-color: Yellow;
}
span[lang]
{
font-style: italic;
}
figure
{
text-align: center;
border: solid 1px #ccc;
border-radius: 2px;
background: rgba(0,0,0,0.05);
padding: 10px;
margin: 10px 20px;
display: inline-block;
}
figure > figcaption
{
text-align: center;
display: block; /* For IE8 */
}
a > img {
padding: 1px;
margin: 1px;
border: none;
outline: 1px solid #0782C1;
}
/* Widget Styles */
.code-featured
{
border: 5px solid red;
}
.math-featured
{
padding: 20px;
box-shadow: 0 0 2px rgba(200, 0, 0, 1);
background-color: rgba(255, 0, 0, 0.05);
margin: 10px;
}
.image-clean
{
border: 0;
background: none;
padding: 0;
}
.image-clean > figcaption
{
font-size: .9em;
text-align: right;
}
.image-grayscale
{
background-color: white;
color: #666;
}
.image-grayscale img, img.image-grayscale
{
filter: grayscale(100%);
}
.embed-240p
{
max-width: 426px;
max-height: 240px;
margin:0 auto;
}
.embed-360p
{
max-width: 640px;
max-height: 360px;
margin:0 auto;
}
.embed-480p
{
max-width: 854px;
max-height: 480px;
margin:0 auto;
}
.embed-720p
{
max-width: 1280px;
max-height: 720px;
margin:0 auto;
}
.embed-1080p
{
max-width: 1920px;
max-height: 1080px;
margin:0 auto;
}

View File

@ -0,0 +1 @@
.cke_editable {background:#161b22;color:#ddd}

View File

@ -0,0 +1,121 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
function editor_html($id, $content, $is_dhtml_editor=true)
{
global $g5, $config, $is_mobile, $w, $board, $write;
static $js = true;
if(
$is_dhtml_editor && $content &&
(
(!$w && (isset($board['bo_insert_content']) && !empty($board['bo_insert_content'])))
|| ($w == 'u' && isset($write['wr_option']) && strpos($write['wr_option'], 'html') === false )
)
){ //글쓰기 기본 내용 처리
if( preg_match('/\r|\n/', $content) && $content === strip_tags($content, '<a><strong><b>') ) { //textarea로 작성되고, html 내용이 없다면
$content = nl2br($content);
}
}
$editor_url = G5_EDITOR_URL.'/'.$config['cf_editor'];
$html = "";
$html .= "<span class=\"sound_only\">웹에디터 시작</span>";
if (!$is_mobile && $is_dhtml_editor) {
$html .= '<script>document.write("<div class=\'cke_sc\'><!--<button type=\'button\' class=\'btn_cke_sc\'>단축키 일람</button>--></div>");</script>';
}
if ($is_dhtml_editor && $js) {
switch($id) {
case "wr_content": $editor_height = 350; break;
default : $editor_height = 200; break;
}
$html .= "\n".'<script src="'.$editor_url.'/ckeditor.js?v=210624"></script>';
$html .= "\n".'<script>var g5_editor_url = "'.$editor_url.'";</script>';
$html .= "\n".'<script src="'.$editor_url.'/config.js?v=210624"></script>';
$html .= "\n<script>";
$html .= '
var editor_id = "'.$id.'", // 에디터 구분
editor_height = '.$editor_height.', // 에디터 높이
editor_chk_upload = true, // 업로드 상태
editor_uri = "'.urlencode($_SERVER['REQUEST_URI']).'"; // 업로드 경로
$(function(){
$(".btn_cke_sc").click(function(){
if ($(this).next("div.cke_sc_def").length) {
$(this).next("div.cke_sc_def").remove();
$(this).text("단축키 일람");
} else {
$(this).after("<div class=\'cke_sc_def\' />").next("div.cke_sc_def").load("'.$editor_url.'/shortcut.html");
$(this).text("단축키 일람 닫기");
}
});
$(".btn_cke_sc_close").live("click",function(){
$(this).parent("div.cke_sc_def").remove();
});
});';
$html .= "\n</script>";
$js = false;
}
// 로딩상태 띄우기 (에디터 사용상태일때만)
if($is_dhtml_editor) {
// 에디터 사용상태일때 textarea 숨기기
$editor_taDisplay = "border:none;";
$html .= "
<style>
.editor_loading { position: absolute; left: 50%; top: 50%; z-index: 1; margin: -25px 0 0 -25px; border: 5px solid #f3f3f3; border-radius: 50%; border-top: 5px solid #3498db; width: 30px; height: 30px; -webkit-animation: spin 2s linear infinite; animation: spin 2s linear infinite; }
@-webkit-keyframes spin { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); } }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
</style>
";
$html .= "<div class=\"editor_loading\"></div>".PHP_EOL; // 로딩이미지 출력 부
$html .= "
<script>
CKEDITOR.on( 'instanceLoaded', function (e) {
var loader = $(\"div.editor_loading\").css(\"display\",\"none\");
});
</script>
";
}
$ckeditor_class = $is_dhtml_editor ? "ckeditor" : "";
$html .= "\n<textarea id=\"$id\" name=\"$id\" class=\"$ckeditor_class\" maxlength=\"65536\" style=\"height:{$editor_height}px; {$editor_taDisplay}\">$content</textarea>";
$html .= "\n<span class=\"sound_only\">웹 에디터 끝</span>";
// 현재 폼이름 GET
$html .= "<script> var editor_form_name = document.getElementById('{$id}').form.name; </script>";
return $html;
}
// textarea 로 값을 넘긴다. javascript 반드시 필요
function get_editor_js($id, $is_dhtml_editor=true)
{
$print_js = "";
if ($is_dhtml_editor) {
$print_js .= "var {$id}_editor_data = CKEDITOR.instances.{$id}.getData();\n";
} else {
$print_js .= "var {$id}_editor = document.getElementById('{$id}');\n";
}
return $print_js;
}
// textarea 의 값이 비어 있는지 검사
function chk_editor_js($id, $is_dhtml_editor=true)
{
$print_js = "";
if ($is_dhtml_editor) {
$print_js .= "if (!{$id}_editor_data) { alert(\"내용을 입력해 주십시오.\"); CKEDITOR.instances.{$id}.focus(); return false; }\n";
$print_js .= "if (typeof(f.{$id})!=\"undefined\") f.{$id}.value = {$id}_editor_data;\n";
// 썸네일 이미지경로 원본파일로 변경
$print_js .= "
var temp_data = {$id}_editor_data.replace(/thumb\-([_\d\.]+)_\d+x\d+/gim, function(res1, res2) { return res2; });
CKEDITOR.instances.wr_content.setData(temp_data);".PHP_EOL;
} else {
$print_js .= "if (!{$id}_editor.value) { alert(\"내용을 입력해 주십시오.\"); {$id}_editor.focus(); return false; }\n";
}
$print_js .= "if(typeof(editor_chk_upload) != \"undefined\" && !editor_chk_upload) { alert(\"이미지가 업로드 중 입니다.\"); return false; }\n";
return $print_js;
}
?>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,8 @@
/*
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.dialog.add("about",function(a){a=a.lang.about;var b=CKEDITOR.getUrl(CKEDITOR.plugins.get("about").path+"dialogs/"+(CKEDITOR.env.hidpi?"hidpi/":"")+"logo_ckeditor.png");return{title:a.dlgTitle,minWidth:390,minHeight:210,contents:[{id:"tab1",label:"",title:"",expand:!0,padding:0,elements:[{type:"html",html:'\x3cstyle type\x3d"text/css"\x3e.cke_about_container{color:#000 !important;padding:10px 10px 0;margin-top:5px}.cke_about_container p{margin: 0 0 10px;}.cke_about_container .cke_about_logo{height:81px;background-color:#fff;background-image:url('+
b+");"+(CKEDITOR.env.hidpi?"background-size:194px 58px;":"")+'background-position:center; background-repeat:no-repeat;margin-bottom:10px;}.cke_about_container a{cursor:pointer !important;color:#00B2CE !important;text-decoration:underline !important;}.cke_about_container \x3e p,.cke_rtl .cke_about_container \x3e p{text-align:center;}\x3c/style\x3e\x3cdiv class\x3d"cke_about_container"\x3e\x3cdiv class\x3d"cke_about_logo"\x3e\x3c/div\x3e\x3cp\x3eCKEditor '+CKEDITOR.version+" (revision "+CKEDITOR.revision+
')\x3cbr\x3e\x3ca target\x3d"_blank" rel\x3d"noopener noreferrer" href\x3d"https://ckeditor.com/"\x3ehttps://ckeditor.com\x3c/a\x3e\x3c/p\x3e\x3cp\x3e'+a.moreInfo+'\x3cbr\x3e\x3ca target\x3d"_blank" rel\x3d"noopener noreferrer" href\x3d"https://ckeditor.com/legal/ckeditor-oss-license/"\x3ehttps://ckeditor.com/legal/ckeditor-oss-license/\x3c/a\x3e\x3c/p\x3e\x3cp\x3e'+a.copy.replace("$1",'\x3ca target\x3d"_blank" rel\x3d"noopener noreferrer" href\x3d"https://cksource.com/"\x3eCKSource\x3c/a\x3e - Frederico Knabben')+
"\x3c/p\x3e\x3c/div\x3e"}]}],buttons:[CKEDITOR.dialog.cancelButton]}});

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -0,0 +1,11 @@
/*
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.dialog.add("paste",function(c){function k(a){var b=new CKEDITOR.dom.document(a.document),g=b.getBody(),d=b.getById("cke_actscrpt");d&&d.remove();g.setAttribute("contenteditable",!0);g.on(e.mainPasteEvent,function(a){a=e.initPasteDataTransfer(a);f?a!=f&&(f=e.initPasteDataTransfer()):f=a});if(CKEDITOR.env.ie&&8>CKEDITOR.env.version)b.getWindow().on("blur",function(){b.$.selection.empty()});b.on("keydown",function(a){a=a.data;var b;switch(a.getKeystroke()){case 27:this.hide();b=1;break;case 9:case CKEDITOR.SHIFT+
9:this.changeFocus(1),b=1}b&&a.preventDefault()},this);c.fire("ariaWidget",new CKEDITOR.dom.element(a.frameElement));b.getWindow().getFrame().removeCustomData("pendingFocus")&&g.focus()}var h=c.lang.clipboard,e=CKEDITOR.plugins.clipboard,f;c.on("pasteDialogCommit",function(a){a.data&&c.fire("paste",{type:"auto",dataValue:a.data.dataValue,method:"paste",dataTransfer:a.data.dataTransfer||e.initPasteDataTransfer()})},null,null,1E3);return{title:h.paste,minWidth:CKEDITOR.env.ie&&CKEDITOR.env.quirks?370:
350,minHeight:CKEDITOR.env.quirks?250:245,onShow:function(){this.parts.dialog.$.offsetHeight;this.setupContent();this._.committed=!1},onLoad:function(){(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&"rtl"==c.lang.dir&&this.parts.contents.setStyle("overflow","hidden")},onOk:function(){this.commitContent()},contents:[{id:"general",label:c.lang.common.generalTab,elements:[{type:"html",id:"pasteMsg",html:'\x3cdiv style\x3d"white-space:normal;width:340px"\x3e'+h.pasteMsg+"\x3c/div\x3e"},{type:"html",
id:"editing_area",style:"width:100%;height:100%",html:"",focus:function(){var a=this.getInputElement(),b=a.getFrameDocument().getBody();!b||b.isReadOnly()?a.setCustomData("pendingFocus",1):b.focus()},setup:function(){var a=this.getDialog(),b='\x3chtml dir\x3d"'+c.config.contentsLangDirection+'" lang\x3d"'+(c.config.contentsLanguage||c.langCode)+'"\x3e\x3chead\x3e\x3cstyle\x3ebody{margin:3px;height:95%;word-break:break-all;}\x3c/style\x3e\x3c/head\x3e\x3cbody\x3e\x3cscript id\x3d"cke_actscrpt" type\x3d"text/javascript"\x3ewindow.parent.CKEDITOR.tools.callFunction('+
CKEDITOR.tools.addFunction(k,a)+",this);\x3c/script\x3e\x3c/body\x3e\x3c/html\x3e",g=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+'})())"':"",d=CKEDITOR.dom.element.createFromHtml('\x3ciframe class\x3d"cke_pasteframe" frameborder\x3d"0" allowTransparency\x3d"true" src\x3d"'+g+'" aria-label\x3d"'+h.pasteArea+'" aria-describedby\x3d"'+a.getContentElement("general",
"pasteMsg").domId+'"\x3e\x3c/iframe\x3e');f=null;d.on("load",function(a){a.removeListener();a=d.getFrameDocument();a.write(b);c.focusManager.add(a.getBody());CKEDITOR.env.air&&k.call(this,a.getWindow().$)},a);d.setCustomData("dialog",a);a=this.getElement();a.setHtml("");a.append(d);if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){var e=CKEDITOR.dom.element.createFromHtml('\x3cspan tabindex\x3d"-1" style\x3d"position:absolute" role\x3d"presentation"\x3e\x3c/span\x3e');e.on("focus",function(){setTimeout(function(){d.$.contentWindow.focus()})});
a.append(e);this.focus=function(){e.focus();this.fire("focus")}}this.getInputElement=function(){return d};CKEDITOR.env.ie&&(a.setStyle("display","block"),a.setStyle("height",d.$.offsetHeight+2+"px"))},commit:function(){var a=this.getDialog().getParentEditor(),b=this.getInputElement().getFrameDocument().getBody(),c=b.getBogus();c&&c.remove();b=b.getHtml();this.getDialog()._.committed=!0;a.fire("pasteDialogCommit",{dataValue:b,dataTransfer:f||e.initPasteDataTransfer()})}}]}]}});

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -0,0 +1,44 @@
/*
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
(function(){var u=function(d,k){function u(){var a=arguments,b=this.getContentElement("advanced","txtdlgGenStyle");b&&b.commit.apply(b,a);this.foreach(function(b){b.commit&&"txtdlgGenStyle"!=b.id&&b.commit.apply(b,a)})}function g(a){if(!v){v=1;var b=this.getDialog(),c=b.imageElement;if(c){this.commit(1,c);a=[].concat(a);for(var d=a.length,h,e=0;e<d;e++)(h=b.getContentElement.apply(b,a[e].split(":")))&&h.setup(1,c)}v=0}}var l=/^\s*(\d+)((px)|\%)?\s*$/i,y=/(^\s*(\d+)((px)|\%)?\s*$)|^$/i,q=/^\d+px$/,
z=function(){var a=this.getValue(),b=this.getDialog(),c=a.match(l);c&&("%"==c[2]&&m(b,!1),a=c[1]);b.lockRatio&&(c=b.originalElement,"true"==c.getCustomData("isReady")&&("txtHeight"==this.id?(a&&"0"!=a&&(a=Math.round(a/c.$.height*c.$.width)),isNaN(a)||b.setValueOf("info","txtWidth",a)):(a&&"0"!=a&&(a=Math.round(a/c.$.width*c.$.height)),isNaN(a)||b.setValueOf("info","txtHeight",a))));e(b)},e=function(a){if(!a.originalElement||!a.preview)return 1;a.commitContent(4,a.preview);return 0},v,m=function(a,
b){if(!a.getContentElement("info","ratioLock"))return null;var c=a.originalElement;if(!c)return null;if("check"==b){if(!a.userlockRatio&&"true"==c.getCustomData("isReady")){var d=a.getValueOf("info","txtWidth"),h=a.getValueOf("info","txtHeight"),c=c.$.width/c.$.height,e=d/h;a.lockRatio=!1;d||h?1==Math.round(c/e*100)/100&&(a.lockRatio=!0):a.lockRatio=!0}}else void 0!==b?a.lockRatio=b:(a.userlockRatio=1,a.lockRatio=!a.lockRatio);d=CKEDITOR.document.getById(r);a.lockRatio?d.removeClass("cke_btn_unlocked"):
d.addClass("cke_btn_unlocked");d.setAttribute("aria-checked",a.lockRatio);CKEDITOR.env.hc&&d.getChild(0).setHtml(a.lockRatio?CKEDITOR.env.ie?"■":"▣":CKEDITOR.env.ie?"□":"▢");return a.lockRatio},A=function(a,b){var c=a.originalElement;if("true"==c.getCustomData("isReady")){var d=a.getContentElement("info","txtWidth"),h=a.getContentElement("info","txtHeight"),f;b?c=f=0:(f=c.$.width,c=c.$.height);d&&d.setValue(f);h&&h.setValue(c)}e(a)},B=function(a,b){function c(a,b){var c=a.match(l);return c?("%"==
c[2]&&(c[1]+="%",m(d,!1)),c[1]):b}if(1==a){var d=this.getDialog(),e="",f="txtWidth"==this.id?"width":"height",g=b.getAttribute(f);g&&(e=c(g,e));e=c(b.getStyle(f),e);this.setValue(e)}},w,t=function(){var a=this.originalElement,b=CKEDITOR.document.getById(n);a.setCustomData("isReady","true");a.removeListener("load",t);a.removeListener("error",f);a.removeListener("abort",f);b&&b.setStyle("display","none");this.dontResetSize||A(this,!1===d.config.image_prefillDimensions);this.firstLoad&&CKEDITOR.tools.setTimeout(function(){m(this,
"check")},0,this);this.dontResetSize=this.firstLoad=!1;e(this)},f=function(){var a=this.originalElement,b=CKEDITOR.document.getById(n);a.removeListener("load",t);a.removeListener("error",f);a.removeListener("abort",f);a=CKEDITOR.getUrl(CKEDITOR.plugins.get("image").path+"images/noimage.png");this.preview&&this.preview.setAttribute("src",a);b&&b.setStyle("display","none");m(this,!1)},p=function(a){return CKEDITOR.tools.getNextId()+"_"+a},r=p("btnLockSizes"),x=p("btnResetSize"),n=p("ImagePreviewLoader"),
D=p("previewLink"),C=p("previewImage");return{title:d.lang.image["image"==k?"title":"titleButton"],minWidth:"moono-lisa"==(CKEDITOR.skinName||d.config.skin)?500:420,minHeight:360,onShow:function(){this.linkEditMode=this.imageEditMode=this.linkElement=this.imageElement=!1;this.lockRatio=!0;this.userlockRatio=0;this.dontResetSize=!1;this.firstLoad=!0;this.addLink=!1;var a=this.getParentEditor(),b=a.getSelection(),c=(b=b&&b.getSelectedElement())&&a.elementPath(b).contains("a",1),d=CKEDITOR.document.getById(n);
d&&d.setStyle("display","none");w=new CKEDITOR.dom.element("img",a.document);this.preview=CKEDITOR.document.getById(C);this.originalElement=a.document.createElement("img");this.originalElement.setAttribute("alt","");this.originalElement.setCustomData("isReady","false");c&&(this.linkElement=c,this.addLink=this.linkEditMode=!0,a=c.getChildren(),1==a.count()&&(d=a.getItem(0),d.type==CKEDITOR.NODE_ELEMENT&&(d.is("img")||d.is("input"))&&(this.imageElement=a.getItem(0),this.imageElement.is("img")?this.imageEditMode=
"img":this.imageElement.is("input")&&(this.imageEditMode="input"))),"image"==k&&this.setupContent(2,c));if(this.customImageElement)this.imageEditMode="img",this.imageElement=this.customImageElement,delete this.customImageElement;else if(b&&"img"==b.getName()&&!b.data("cke-realelement")||b&&"input"==b.getName()&&"image"==b.getAttribute("type"))this.imageEditMode=b.getName(),this.imageElement=b;this.imageEditMode&&(this.cleanImageElement=this.imageElement,this.imageElement=this.cleanImageElement.clone(!0,
!0),this.setupContent(1,this.imageElement));m(this,!0);CKEDITOR.tools.trim(this.getValueOf("info","txtUrl"))||(this.preview.removeAttribute("src"),this.preview.setStyle("display","none"))},onOk:function(){if(this.imageEditMode){var a=this.imageEditMode;"image"==k&&"input"==a&&confirm(d.lang.image.button2Img)?(this.imageElement=d.document.createElement("img"),this.imageElement.setAttribute("alt",""),d.insertElement(this.imageElement)):"image"!=k&&"img"==a&&confirm(d.lang.image.img2Button)?(this.imageElement=
d.document.createElement("input"),this.imageElement.setAttributes({type:"image",alt:""}),d.insertElement(this.imageElement)):(this.imageElement=this.cleanImageElement,delete this.cleanImageElement)}else"image"==k?this.imageElement=d.document.createElement("img"):(this.imageElement=d.document.createElement("input"),this.imageElement.setAttribute("type","image")),this.imageElement.setAttribute("alt","");this.linkEditMode||(this.linkElement=d.document.createElement("a"));this.commitContent(1,this.imageElement);
this.commitContent(2,this.linkElement);this.imageElement.getAttribute("style")||this.imageElement.removeAttribute("style");this.imageEditMode?!this.linkEditMode&&this.addLink?(d.insertElement(this.linkElement),this.imageElement.appendTo(this.linkElement)):this.linkEditMode&&!this.addLink&&(d.getSelection().selectElement(this.linkElement),d.insertElement(this.imageElement)):this.addLink?this.linkEditMode?this.linkElement.equals(d.getSelection().getSelectedElement())?(this.linkElement.setHtml(""),this.linkElement.append(this.imageElement,
!1)):d.insertElement(this.imageElement):(d.insertElement(this.linkElement),this.linkElement.append(this.imageElement,!1)):d.insertElement(this.imageElement)},onLoad:function(){"image"!=k&&this.hidePage("Link");var a=this._.element.getDocument();this.getContentElement("info","ratioLock")&&(this.addFocusable(a.getById(x),5),this.addFocusable(a.getById(r),5));this.commitContent=u},onHide:function(){this.preview&&this.commitContent(8,this.preview);this.originalElement&&(this.originalElement.removeListener("load",
t),this.originalElement.removeListener("error",f),this.originalElement.removeListener("abort",f),this.originalElement.remove(),this.originalElement=!1);delete this.imageElement},contents:[{id:"info",label:d.lang.image.infoTab,accessKey:"I",elements:[{type:"vbox",padding:0,children:[{type:"hbox",widths:["280px","110px"],align:"right",className:"cke_dialog_image_url",children:[{id:"txtUrl",type:"text",label:d.lang.common.url,required:!0,onChange:function(){var a=this.getDialog(),b=this.getValue();if(0<
b.length){var a=this.getDialog(),c=a.originalElement;a.preview&&a.preview.removeStyle("display");c.setCustomData("isReady","false");var d=CKEDITOR.document.getById(n);d&&d.setStyle("display","");c.on("load",t,a);c.on("error",f,a);c.on("abort",f,a);c.setAttribute("src",b);a.preview&&(w.setAttribute("src",b),a.preview.setAttribute("src",w.$.src),e(a))}else a.preview&&(a.preview.removeAttribute("src"),a.preview.setStyle("display","none"))},setup:function(a,b){if(1==a){var c=b.data("cke-saved-src")||
b.getAttribute("src");this.getDialog().dontResetSize=!0;this.setValue(c);this.setInitValue()}},commit:function(a,b){1==a&&(this.getValue()||this.isChanged())?(b.data("cke-saved-src",this.getValue()),b.setAttribute("src",this.getValue())):8==a&&(b.setAttribute("src",""),b.removeAttribute("src"))},validate:CKEDITOR.dialog.validate.notEmpty(d.lang.image.urlMissing)},{type:"button",id:"browse",style:"display:inline-block;margin-top:14px;",align:"center",label:d.lang.common.browseServer,hidden:!0,filebrowser:"info:txtUrl"}]}]},
{id:"txtAlt",type:"text",label:d.lang.image.alt,accessKey:"T","default":"",onChange:function(){e(this.getDialog())},setup:function(a,b){1==a&&this.setValue(b.getAttribute("alt"))},commit:function(a,b){1==a?(this.getValue()||this.isChanged())&&b.setAttribute("alt",this.getValue()):4==a?b.setAttribute("alt",this.getValue()):8==a&&b.removeAttribute("alt")}},{type:"hbox",children:[{id:"basic",type:"vbox",children:[{type:"hbox",requiredContent:"img{width,height}",widths:["50%","50%"],children:[{type:"vbox",
padding:1,children:[{type:"text",width:"45px",id:"txtWidth",label:d.lang.common.width,onKeyUp:z,onChange:function(){g.call(this,"advanced:txtdlgGenStyle")},validate:function(){var a=this.getValue().match(y);(a=!(!a||0===parseInt(a[1],10)))||alert(d.lang.common.invalidLength.replace("%1",d.lang.common.width).replace("%2","px, %"));return a},setup:B,commit:function(a,b){var c=this.getValue();1==a?(c&&d.activeFilter.check("img{width,height}")?b.setStyle("width",CKEDITOR.tools.cssLength(c)):b.removeStyle("width"),
b.removeAttribute("width")):4==a?c.match(l)?b.setStyle("width",CKEDITOR.tools.cssLength(c)):(c=this.getDialog().originalElement,"true"==c.getCustomData("isReady")&&b.setStyle("width",c.$.width+"px")):8==a&&(b.removeAttribute("width"),b.removeStyle("width"))}},{type:"text",id:"txtHeight",width:"45px",label:d.lang.common.height,onKeyUp:z,onChange:function(){g.call(this,"advanced:txtdlgGenStyle")},validate:function(){var a=this.getValue().match(y);(a=!(!a||0===parseInt(a[1],10)))||alert(d.lang.common.invalidLength.replace("%1",
d.lang.common.height).replace("%2","px, %"));return a},setup:B,commit:function(a,b){var c=this.getValue();1==a?(c&&d.activeFilter.check("img{width,height}")?b.setStyle("height",CKEDITOR.tools.cssLength(c)):b.removeStyle("height"),b.removeAttribute("height")):4==a?c.match(l)?b.setStyle("height",CKEDITOR.tools.cssLength(c)):(c=this.getDialog().originalElement,"true"==c.getCustomData("isReady")&&b.setStyle("height",c.$.height+"px")):8==a&&(b.removeAttribute("height"),b.removeStyle("height"))}}]},{id:"ratioLock",
type:"html",className:"cke_dialog_image_ratiolock",style:"margin-top:30px;width:40px;height:40px;",onLoad:function(){var a=CKEDITOR.document.getById(x),b=CKEDITOR.document.getById(r);a&&(a.on("click",function(a){A(this);a.data&&a.data.preventDefault()},this.getDialog()),a.on("mouseover",function(){this.addClass("cke_btn_over")},a),a.on("mouseout",function(){this.removeClass("cke_btn_over")},a));b&&(b.on("click",function(a){m(this);var b=this.originalElement,d=this.getValueOf("info","txtWidth");"true"==
b.getCustomData("isReady")&&d&&(b=b.$.height/b.$.width*d,isNaN(b)||(this.setValueOf("info","txtHeight",Math.round(b)),e(this)));a.data&&a.data.preventDefault()},this.getDialog()),b.on("mouseover",function(){this.addClass("cke_btn_over")},b),b.on("mouseout",function(){this.removeClass("cke_btn_over")},b))},html:'\x3cdiv\x3e\x3ca href\x3d"javascript:void(0)" tabindex\x3d"-1" title\x3d"'+d.lang.image.lockRatio+'" class\x3d"cke_btn_locked" id\x3d"'+r+'" role\x3d"checkbox"\x3e\x3cspan class\x3d"cke_icon"\x3e\x3c/span\x3e\x3cspan class\x3d"cke_label"\x3e'+
d.lang.image.lockRatio+'\x3c/span\x3e\x3c/a\x3e\x3ca href\x3d"javascript:void(0)" tabindex\x3d"-1" title\x3d"'+d.lang.image.resetSize+'" class\x3d"cke_btn_reset" id\x3d"'+x+'" role\x3d"button"\x3e\x3cspan class\x3d"cke_label"\x3e'+d.lang.image.resetSize+"\x3c/span\x3e\x3c/a\x3e\x3c/div\x3e"}]},{type:"vbox",padding:1,children:[{type:"text",id:"txtBorder",requiredContent:"img{border-width}",width:"60px",label:d.lang.image.border,"default":"",onKeyUp:function(){e(this.getDialog())},onChange:function(){g.call(this,
"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(d.lang.image.validateBorder),setup:function(a,b){if(1==a){var c;c=(c=(c=b.getStyle("border-width"))&&c.match(/^(\d+px)(?: \1 \1 \1)?$/))&&parseInt(c[1],10);isNaN(parseInt(c,10))&&(c=b.getAttribute("border"));this.setValue(c)}},commit:function(a,b){var c=parseInt(this.getValue(),10);1==a||4==a?(isNaN(c)?!c&&this.isChanged()&&b.removeStyle("border"):(b.setStyle("border-width",CKEDITOR.tools.cssLength(c)),b.setStyle("border-style",
"solid")),1==a&&b.removeAttribute("border")):8==a&&(b.removeAttribute("border"),b.removeStyle("border-width"),b.removeStyle("border-style"),b.removeStyle("border-color"))}},{type:"text",id:"txtHSpace",requiredContent:"img{margin-left,margin-right}",width:"60px",label:d.lang.image.hSpace,"default":"",onKeyUp:function(){e(this.getDialog())},onChange:function(){g.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(d.lang.image.validateHSpace),setup:function(a,b){if(1==a){var c,
d;c=b.getStyle("margin-left");d=b.getStyle("margin-right");c=c&&c.match(q);d=d&&d.match(q);c=parseInt(c,10);d=parseInt(d,10);c=c==d&&c;isNaN(parseInt(c,10))&&(c=b.getAttribute("hspace"));this.setValue(c)}},commit:function(a,b){var c=parseInt(this.getValue(),10);1==a||4==a?(isNaN(c)?!c&&this.isChanged()&&(b.removeStyle("margin-left"),b.removeStyle("margin-right")):(b.setStyle("margin-left",CKEDITOR.tools.cssLength(c)),b.setStyle("margin-right",CKEDITOR.tools.cssLength(c))),1==a&&b.removeAttribute("hspace")):
8==a&&(b.removeAttribute("hspace"),b.removeStyle("margin-left"),b.removeStyle("margin-right"))}},{type:"text",id:"txtVSpace",requiredContent:"img{margin-top,margin-bottom}",width:"60px",label:d.lang.image.vSpace,"default":"",onKeyUp:function(){e(this.getDialog())},onChange:function(){g.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(d.lang.image.validateVSpace),setup:function(a,b){if(1==a){var c,d;c=b.getStyle("margin-top");d=b.getStyle("margin-bottom");c=c&&c.match(q);
d=d&&d.match(q);c=parseInt(c,10);d=parseInt(d,10);c=c==d&&c;isNaN(parseInt(c,10))&&(c=b.getAttribute("vspace"));this.setValue(c)}},commit:function(a,b){var c=parseInt(this.getValue(),10);1==a||4==a?(isNaN(c)?!c&&this.isChanged()&&(b.removeStyle("margin-top"),b.removeStyle("margin-bottom")):(b.setStyle("margin-top",CKEDITOR.tools.cssLength(c)),b.setStyle("margin-bottom",CKEDITOR.tools.cssLength(c))),1==a&&b.removeAttribute("vspace")):8==a&&(b.removeAttribute("vspace"),b.removeStyle("margin-top"),b.removeStyle("margin-bottom"))}},
{id:"cmbAlign",requiredContent:"img{float}",type:"select",widths:["35%","65%"],style:"width:90px",label:d.lang.common.align,"default":"",items:[[d.lang.common.notSet,""],[d.lang.common.left,"left"],[d.lang.common.right,"right"]],onChange:function(){e(this.getDialog());g.call(this,"advanced:txtdlgGenStyle")},setup:function(a,b){if(1==a){var c=b.getStyle("float");switch(c){case "inherit":case "none":c=""}!c&&(c=(b.getAttribute("align")||"").toLowerCase());this.setValue(c)}},commit:function(a,b){var c=
this.getValue();if(1==a||4==a){if(c?b.setStyle("float",c):b.removeStyle("float"),1==a)switch(c=(b.getAttribute("align")||"").toLowerCase(),c){case "left":case "right":b.removeAttribute("align")}}else 8==a&&b.removeStyle("float")}}]}]},{type:"vbox",height:"250px",children:[{type:"html",id:"htmlPreview",style:"width:95%;",html:"\x3cdiv\x3e"+CKEDITOR.tools.htmlEncode(d.lang.common.preview)+'\x3cbr\x3e\x3cdiv id\x3d"'+n+'" class\x3d"ImagePreviewLoader" style\x3d"display:none"\x3e\x3cdiv class\x3d"loading"\x3e\x26nbsp;\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"ImagePreviewBox"\x3e\x3ctable\x3e\x3ctr\x3e\x3ctd\x3e\x3ca href\x3d"javascript:void(0)" target\x3d"_blank" onclick\x3d"return false;" id\x3d"'+
D+'"\x3e\x3cimg id\x3d"'+C+'" alt\x3d"" /\x3e\x3c/a\x3e'+(d.config.image_previewText||"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas feugiat consequat diam. Maecenas metus. Vivamus diam purus, cursus a, commodo non, facilisis vitae, nulla. Aenean dictum lacinia tortor. Nunc iaculis, nibh non iaculis aliquam, orci felis euismod neque, sed ornare massa mauris sed velit. Nulla pretium mi et risus. Fusce mi pede, tempor id, cursus ac, ullamcorper nec, enim. Sed tortor. Curabitur molestie. Duis velit augue, condimentum at, ultrices a, luctus ut, orci. Donec pellentesque egestas eros. Integer cursus, augue in cursus faucibus, eros pede bibendum sem, in tempus tellus justo quis ligula. Etiam eget tortor. Vestibulum rutrum, est ut placerat elementum, lectus nisl aliquam velit, tempor aliquam eros nunc nonummy metus. In eros metus, gravida a, gravida sed, lobortis id, turpis. Ut ultrices, ipsum at venenatis fringilla, sem nulla lacinia tellus, eget aliquet turpis mauris non enim. Nam turpis. Suspendisse lacinia. Curabitur ac tortor ut ipsum egestas elementum. Nunc imperdiet gravida mauris.")+
"\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e\x3c/div\x3e"}]}]}]},{id:"Link",requiredContent:"a[href]",label:d.lang.image.linkTab,padding:0,elements:[{id:"txtUrl",type:"text",label:d.lang.common.url,style:"width: 100%","default":"",setup:function(a,b){if(2==a){var c=b.data("cke-saved-href");c||(c=b.getAttribute("href"));this.setValue(c)}},commit:function(a,b){if(2==a&&(this.getValue()||this.isChanged())){var c=this.getValue();b.data("cke-saved-href",c);b.setAttribute("href",c);this.getValue()||
!d.config.image_removeLinkByEmptyURL?this.getDialog().addLink=!0:this.getDialog().addLink=!1}}},{type:"button",id:"browse",className:"cke_dialog_image_browse",filebrowser:{action:"Browse",target:"Link:txtUrl",url:d.config.filebrowserImageBrowseLinkUrl},style:"float:right",hidden:!0,label:d.lang.common.browseServer},{id:"cmbTarget",type:"select",requiredContent:"a[target]",label:d.lang.common.target,"default":"",items:[[d.lang.common.notSet,""],[d.lang.common.targetNew,"_blank"],[d.lang.common.targetTop,
"_top"],[d.lang.common.targetSelf,"_self"],[d.lang.common.targetParent,"_parent"]],setup:function(a,b){2==a&&this.setValue(b.getAttribute("target")||"")},commit:function(a,b){2==a&&(this.getValue()||this.isChanged())&&b.setAttribute("target",this.getValue())}}]},{id:"Upload",hidden:!0,filebrowser:"uploadButton",label:d.lang.image.upload,elements:[{type:"file",id:"upload",label:d.lang.image.btnUpload,style:"height:40px",size:38},{type:"fileButton",id:"uploadButton",filebrowser:"info:txtUrl",label:d.lang.image.btnUpload,
"for":["Upload","upload"]}]},{id:"advanced",label:d.lang.common.advancedTab,elements:[{type:"hbox",widths:["50%","25%","25%"],children:[{type:"text",id:"linkId",requiredContent:"img[id]",label:d.lang.common.id,setup:function(a,b){1==a&&this.setValue(b.getAttribute("id"))},commit:function(a,b){1==a&&(this.getValue()||this.isChanged())&&b.setAttribute("id",this.getValue())}},{id:"cmbLangDir",type:"select",requiredContent:"img[dir]",style:"width : 100px;",label:d.lang.common.langDir,"default":"",items:[[d.lang.common.notSet,
""],[d.lang.common.langDirLtr,"ltr"],[d.lang.common.langDirRtl,"rtl"]],setup:function(a,b){1==a&&this.setValue(b.getAttribute("dir"))},commit:function(a,b){1==a&&(this.getValue()||this.isChanged())&&b.setAttribute("dir",this.getValue())}},{type:"text",id:"txtLangCode",requiredContent:"img[lang]",label:d.lang.common.langCode,"default":"",setup:function(a,b){1==a&&this.setValue(b.getAttribute("lang"))},commit:function(a,b){1==a&&(this.getValue()||this.isChanged())&&b.setAttribute("lang",this.getValue())}}]},
{type:"text",id:"txtGenLongDescr",requiredContent:"img[longdesc]",label:d.lang.common.longDescr,setup:function(a,b){1==a&&this.setValue(b.getAttribute("longDesc"))},commit:function(a,b){1==a&&(this.getValue()||this.isChanged())&&b.setAttribute("longDesc",this.getValue())}},{type:"hbox",widths:["50%","50%"],children:[{type:"text",id:"txtGenClass",requiredContent:"img(cke-xyz)",label:d.lang.common.cssClass,"default":"",setup:function(a,b){1==a&&this.setValue(b.getAttribute("class"))},commit:function(a,
b){1==a&&(this.getValue()||this.isChanged())&&b.setAttribute("class",this.getValue())}},{type:"text",id:"txtGenTitle",requiredContent:"img[title]",label:d.lang.common.advisoryTitle,"default":"",onChange:function(){e(this.getDialog())},setup:function(a,b){1==a&&this.setValue(b.getAttribute("title"))},commit:function(a,b){1==a?(this.getValue()||this.isChanged())&&b.setAttribute("title",this.getValue()):4==a?b.setAttribute("title",this.getValue()):8==a&&b.removeAttribute("title")}}]},{type:"text",id:"txtdlgGenStyle",
requiredContent:"img{cke-xyz}",label:d.lang.common.cssStyle,validate:CKEDITOR.dialog.validate.inlineStyle(d.lang.common.invalidInlineStyle),"default":"",setup:function(a,b){if(1==a){var c=b.getAttribute("style");!c&&b.$.style.cssText&&(c=b.$.style.cssText);this.setValue(c);var d=b.$.style.height,c=b.$.style.width,d=(d?d:"").match(l),c=(c?c:"").match(l);this.attributesInStyle={height:!!d,width:!!c}}},onChange:function(){g.call(this,"info:cmbFloat info:cmbAlign info:txtVSpace info:txtHSpace info:txtBorder info:txtWidth info:txtHeight".split(" "));
e(this)},commit:function(a,b){1==a&&(this.getValue()||this.isChanged())&&b.setAttribute("style",this.getValue())}}]}]}};CKEDITOR.dialog.add("image",function(d){return u(d,"image")});CKEDITOR.dialog.add("imagebutton",function(d){return u(d,"imagebutton")})})();

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,8 @@
/*
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.dialog.add("anchor",function(c){function e(b,a){return b.createFakeElement(b.document.createElement("a",{attributes:a}),"cke_anchor","anchor")}return{title:c.lang.link.anchor.title,minWidth:300,minHeight:60,onOk:function(){var b=CKEDITOR.tools.trim(this.getValueOf("info","txtName")),a={id:b,name:b,"data-cke-saved-name":b};this._.selectedElement?this._.selectedElement.data("cke-realelement")?(b=e(c,a),b.replace(this._.selectedElement),CKEDITOR.env.ie&&c.getSelection().selectElement(b)):this._.selectedElement.setAttributes(a):
(b=(b=c.getSelection())&&b.getRanges()[0],b.collapsed?(a=e(c,a),b.insertNode(a)):(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(a["class"]="cke_anchor"),a=new CKEDITOR.style({element:"a",attributes:a}),a.type=CKEDITOR.STYLE_INLINE,a.applyToRange(b)))},onHide:function(){delete this._.selectedElement},onShow:function(){var b=c.getSelection(),a;a=b.getRanges()[0];var d=b.getSelectedElement();a.shrink(CKEDITOR.SHRINK_ELEMENT);a=(d=a.getEnclosedNode())&&d.type===CKEDITOR.NODE_ELEMENT&&("anchor"===d.data("cke-real-element-type")||
d.is("a"))?d:void 0;var f=(d=a&&a.data("cke-realelement"))?CKEDITOR.plugins.link.tryRestoreFakeAnchor(c,a):CKEDITOR.plugins.link.getSelectedLink(c);if(f){this._.selectedElement=f;var e=f.data("cke-saved-name");this.setValueOf("info","txtName",e||"");!d&&b.selectElement(f);a&&(this._.selectedElement=a)}this.getContentElement("info","txtName").focus()},contents:[{id:"info",label:c.lang.link.anchor.title,accessKey:"I",elements:[{type:"text",id:"txtName",label:c.lang.link.anchor.name,required:!0,validate:function(){return this.getValue()?
!0:(alert(c.lang.link.anchor.errorName),!1)}}]}]}});

View File

@ -0,0 +1,30 @@
/*
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
(function(){function u(){var c=this.getDialog(),p=c._.editor,n=p.config.linkPhoneRegExp,q=p.config.linkPhoneMsg,p=CKEDITOR.dialog.validate.notEmpty(p.lang.link.noTel).apply(this);if(!c.getContentElement("info","linkType")||"tel"!=c.getValueOf("info","linkType"))return!0;if(!0!==p)return p;if(n)return CKEDITOR.dialog.validate.regex(n,q).call(this)}CKEDITOR.dialog.add("link",function(c){function p(a,b){var c=a.createRange();c.setStartBefore(b);c.setEndAfter(b);return c}var n=CKEDITOR.plugins.link,q,
t=function(){var a=this.getDialog(),b=a.getContentElement("target","popupFeatures"),a=a.getContentElement("target","linkTargetName"),r=this.getValue();if(b&&a)switch(b=b.getElement(),b.hide(),a.setValue(""),r){case "frame":a.setLabel(c.lang.link.targetFrameName);a.getElement().show();break;case "popup":b.show();a.setLabel(c.lang.link.targetPopupName);a.getElement().show();break;default:a.setValue(r),a.getElement().hide()}},l=function(a){a.target&&this.setValue(a.target[this.id]||"")},e=function(a){a.advanced&&
this.setValue(a.advanced[this.id]||"")},k=function(a){a.target||(a.target={});a.target[this.id]=this.getValue()||""},m=function(a){a.advanced||(a.advanced={});a.advanced[this.id]=this.getValue()||""},g=c.lang.common,b=c.lang.link,d;return{title:b.title,minWidth:"moono-lisa"==(CKEDITOR.skinName||c.config.skin)?450:350,minHeight:240,contents:[{id:"info",label:b.info,title:b.info,elements:[{type:"text",id:"linkDisplayText",label:b.displayText,setup:function(){this.enable();this.setValue(c.getSelection().getSelectedText());
q=this.getValue()},commit:function(a){a.linkText=this.isEnabled()?this.getValue():""}},{id:"linkType",type:"select",label:b.type,"default":"url",items:[[b.toUrl,"url"],[b.toAnchor,"anchor"],[b.toEmail,"email"],[b.toPhone,"tel"]],onChange:function(){var a=this.getDialog(),b=["urlOptions","anchorOptions","emailOptions","telOptions"],r=this.getValue(),f=a.definition.getContents("upload"),f=f&&f.hidden;"url"==r?(c.config.linkShowTargetTab&&a.showPage("target"),f||a.showPage("upload")):(a.hidePage("target"),
f||a.hidePage("upload"));for(f=0;f<b.length;f++){var h=a.getContentElement("info",b[f]);h&&(h=h.getElement().getParent().getParent(),b[f]==r+"Options"?h.show():h.hide())}a.layout()},setup:function(a){this.setValue(a.type||"url")},commit:function(a){a.type=this.getValue()}},{type:"vbox",id:"urlOptions",children:[{type:"hbox",widths:["25%","75%"],children:[{id:"protocol",type:"select",label:g.protocol,"default":"http://",items:[["http://","http://"],["https://","https://"],["ftp://","ftp://"],["news://",
"news://"],[b.other,""]],setup:function(a){a.url&&this.setValue(a.url.protocol||"")},commit:function(a){a.url||(a.url={});a.url.protocol=this.getValue()}},{type:"text",id:"url",label:g.url,required:!0,onLoad:function(){this.allowOnChange=!0},onKeyUp:function(){this.allowOnChange=!1;var a=this.getDialog().getContentElement("info","protocol"),b=this.getValue(),c=/^((javascript:)|[#\/\.\?])/i,f=/^(http|https|ftp|news):\/\/(?=.)/i.exec(b);f?(this.setValue(b.substr(f[0].length)),a.setValue(f[0].toLowerCase())):
c.test(b)&&a.setValue("");this.allowOnChange=!0},onChange:function(){if(this.allowOnChange)this.onKeyUp()},validate:function(){var a=this.getDialog();return a.getContentElement("info","linkType")&&"url"!=a.getValueOf("info","linkType")?!0:!c.config.linkJavaScriptLinksAllowed&&/javascript\:/.test(this.getValue())?(alert(g.invalidValue),!1):this.getDialog().fakeObj?!0:CKEDITOR.dialog.validate.notEmpty(b.noUrl).apply(this)},setup:function(a){this.allowOnChange=!1;a.url&&this.setValue(a.url.url);this.allowOnChange=
!0},commit:function(a){this.onChange();a.url||(a.url={});a.url.url=this.getValue();this.allowOnChange=!1}}],setup:function(){this.getDialog().getContentElement("info","linkType")||this.getElement().show()}},{type:"button",id:"browse",hidden:"true",filebrowser:"info:url",label:g.browseServer}]},{type:"vbox",id:"anchorOptions",width:260,align:"center",padding:0,children:[{type:"fieldset",id:"selectAnchorText",label:b.selectAnchor,setup:function(){d=n.getEditorAnchors(c);this.getElement()[d&&d.length?
"show":"hide"]()},children:[{type:"hbox",id:"selectAnchor",children:[{type:"select",id:"anchorName","default":"",label:b.anchorName,style:"width: 100%;",items:[[""]],setup:function(a){this.clear();this.add("");if(d)for(var b=0;b<d.length;b++)d[b].name&&this.add(d[b].name);a.anchor&&this.setValue(a.anchor.name);(a=this.getDialog().getContentElement("info","linkType"))&&"email"==a.getValue()&&this.focus()},commit:function(a){a.anchor||(a.anchor={});a.anchor.name=this.getValue()}},{type:"select",id:"anchorId",
"default":"",label:b.anchorId,style:"width: 100%;",items:[[""]],setup:function(a){this.clear();this.add("");if(d)for(var b=0;b<d.length;b++)d[b].id&&this.add(d[b].id);a.anchor&&this.setValue(a.anchor.id)},commit:function(a){a.anchor||(a.anchor={});a.anchor.id=this.getValue()}}],setup:function(){this.getElement()[d&&d.length?"show":"hide"]()}}]},{type:"html",id:"noAnchors",style:"text-align: center;",html:'\x3cdiv role\x3d"note" tabIndex\x3d"-1"\x3e'+CKEDITOR.tools.htmlEncode(b.noAnchors)+"\x3c/div\x3e",
focus:!0,setup:function(){this.getElement()[d&&d.length?"hide":"show"]()}}],setup:function(){this.getDialog().getContentElement("info","linkType")||this.getElement().hide()}},{type:"vbox",id:"emailOptions",padding:1,children:[{type:"text",id:"emailAddress",label:b.emailAddress,required:!0,validate:function(){var a=this.getDialog();return a.getContentElement("info","linkType")&&"email"==a.getValueOf("info","linkType")?CKEDITOR.dialog.validate.notEmpty(b.noEmail).apply(this):!0},setup:function(a){a.email&&
this.setValue(a.email.address);(a=this.getDialog().getContentElement("info","linkType"))&&"email"==a.getValue()&&this.select()},commit:function(a){a.email||(a.email={});a.email.address=this.getValue()}},{type:"text",id:"emailSubject",label:b.emailSubject,setup:function(a){a.email&&this.setValue(a.email.subject)},commit:function(a){a.email||(a.email={});a.email.subject=this.getValue()}},{type:"textarea",id:"emailBody",label:b.emailBody,rows:3,"default":"",setup:function(a){a.email&&this.setValue(a.email.body)},
commit:function(a){a.email||(a.email={});a.email.body=this.getValue()}}],setup:function(){this.getDialog().getContentElement("info","linkType")||this.getElement().hide()}},{type:"vbox",id:"telOptions",padding:1,children:[{type:"tel",id:"telNumber",label:b.phoneNumber,required:!0,validate:u,setup:function(a){a.tel&&this.setValue(a.tel);(a=this.getDialog().getContentElement("info","linkType"))&&"tel"==a.getValue()&&this.select()},commit:function(a){a.tel=this.getValue()}}],setup:function(){this.getDialog().getContentElement("info",
"linkType")||this.getElement().hide()}}]},{id:"target",requiredContent:"a[target]",label:b.target,title:b.target,elements:[{type:"hbox",widths:["50%","50%"],children:[{type:"select",id:"linkTargetType",label:g.target,"default":"notSet",style:"width : 100%;",items:[[g.notSet,"notSet"],[b.targetFrame,"frame"],[b.targetPopup,"popup"],[g.targetNew,"_blank"],[g.targetTop,"_top"],[g.targetSelf,"_self"],[g.targetParent,"_parent"]],onChange:t,setup:function(a){a.target&&this.setValue(a.target.type||"notSet");
t.call(this)},commit:function(a){a.target||(a.target={});a.target.type=this.getValue()}},{type:"text",id:"linkTargetName",label:b.targetFrameName,"default":"",setup:function(a){a.target&&this.setValue(a.target.name)},commit:function(a){a.target||(a.target={});a.target.name=this.getValue().replace(/([^\x00-\x7F]|\s)/gi,"")}}]},{type:"vbox",width:"100%",align:"center",padding:2,id:"popupFeatures",children:[{type:"fieldset",label:b.popupFeatures,children:[{type:"hbox",children:[{type:"checkbox",id:"resizable",
label:b.popupResizable,setup:l,commit:k},{type:"checkbox",id:"status",label:b.popupStatusBar,setup:l,commit:k}]},{type:"hbox",children:[{type:"checkbox",id:"location",label:b.popupLocationBar,setup:l,commit:k},{type:"checkbox",id:"toolbar",label:b.popupToolbar,setup:l,commit:k}]},{type:"hbox",children:[{type:"checkbox",id:"menubar",label:b.popupMenuBar,setup:l,commit:k},{type:"checkbox",id:"fullscreen",label:b.popupFullScreen,setup:l,commit:k}]},{type:"hbox",children:[{type:"checkbox",id:"scrollbars",
label:b.popupScrollBars,setup:l,commit:k},{type:"checkbox",id:"dependent",label:b.popupDependent,setup:l,commit:k}]},{type:"hbox",children:[{type:"text",widths:["50%","50%"],labelLayout:"horizontal",label:g.width,id:"width",setup:l,commit:k},{type:"text",labelLayout:"horizontal",widths:["50%","50%"],label:b.popupLeft,id:"left",setup:l,commit:k}]},{type:"hbox",children:[{type:"text",labelLayout:"horizontal",widths:["50%","50%"],label:g.height,id:"height",setup:l,commit:k},{type:"text",labelLayout:"horizontal",
label:b.popupTop,widths:["50%","50%"],id:"top",setup:l,commit:k}]}]}]}]},{id:"upload",label:b.upload,title:b.upload,hidden:!0,filebrowser:"uploadButton",elements:[{type:"file",id:"upload",label:g.upload,style:"height:40px",size:29},{type:"fileButton",id:"uploadButton",label:g.uploadSubmit,filebrowser:"info:url","for":["upload","upload"]}]},{id:"advanced",label:b.advanced,title:b.advanced,elements:[{type:"vbox",padding:1,children:[{type:"hbox",widths:["45%","35%","20%"],children:[{type:"text",id:"advId",
requiredContent:"a[id]",label:b.id,setup:e,commit:m},{type:"select",id:"advLangDir",requiredContent:"a[dir]",label:b.langDir,"default":"",style:"width:110px",items:[[g.notSet,""],[b.langDirLTR,"ltr"],[b.langDirRTL,"rtl"]],setup:e,commit:m},{type:"text",id:"advAccessKey",requiredContent:"a[accesskey]",width:"80px",label:b.acccessKey,maxLength:1,setup:e,commit:m}]},{type:"hbox",widths:["45%","35%","20%"],children:[{type:"text",label:b.name,id:"advName",requiredContent:"a[name]",setup:e,commit:m},{type:"text",
label:b.langCode,id:"advLangCode",requiredContent:"a[lang]",width:"110px","default":"",setup:e,commit:m},{type:"text",label:b.tabIndex,id:"advTabIndex",requiredContent:"a[tabindex]",width:"80px",maxLength:5,setup:e,commit:m}]}]},{type:"vbox",padding:1,children:[{type:"hbox",widths:["45%","55%"],children:[{type:"text",label:b.advisoryTitle,requiredContent:"a[title]","default":"",id:"advTitle",setup:e,commit:m},{type:"text",label:b.advisoryContentType,requiredContent:"a[type]","default":"",id:"advContentType",
setup:e,commit:m}]},{type:"hbox",widths:["45%","55%"],children:[{type:"text",label:b.cssClasses,requiredContent:"a(cke-xyz)","default":"",id:"advCSSClasses",setup:e,commit:m},{type:"text",label:b.charset,requiredContent:"a[charset]","default":"",id:"advCharset",setup:e,commit:m}]},{type:"hbox",widths:["45%","55%"],children:[{type:"text",label:b.rel,requiredContent:"a[rel]","default":"",id:"advRel",setup:e,commit:m},{type:"text",label:b.styles,requiredContent:"a{cke-xyz}","default":"",id:"advStyles",
validate:CKEDITOR.dialog.validate.inlineStyle(c.lang.common.invalidInlineStyle),setup:e,commit:m}]},{type:"hbox",widths:["45%","55%"],children:[{type:"checkbox",id:"download",requiredContent:"a[download]",label:b.download,setup:function(a){void 0!==a.download&&this.setValue("checked","checked")},commit:function(a){this.getValue()&&(a.download=this.getValue())}}]}]}]}],onShow:function(){var a=this.getParentEditor(),b=a.getSelection(),c=this.getContentElement("info","linkDisplayText").getElement().getParent().getParent(),
f=n.getSelectedLink(a,!0),h=f[0]||null;h&&h.hasAttribute("href")&&(b.getSelectedElement()||b.isInTable()||b.selectElement(h));b=n.parseLinkAttributes(a,h);1>=f.length&&n.showDisplayTextForElement(h,a)?c.show():c.hide();this._.selectedElements=f;this.setupContent(b)},onOk:function(){var a={};this.commitContent(a);if(this._.selectedElements.length){var b=this._.selectedElements,g=n.getLinkAttributes(c,a),f=[],h,d,l,e,k;for(k=0;k<b.length;k++){h=b[k];d=h.data("cke-saved-href");l=h.getHtml();h.setAttributes(g.set);
h.removeAttributes(g.removed);if(a.linkText&&q!=a.linkText)e=a.linkText;else if(d==l||"email"==a.type&&-1!=l.indexOf("@"))e="email"==a.type?a.email.address:g.set["data-cke-saved-href"];e&&h.setText(e);f.push(p(c,h))}c.getSelection().selectRanges(f);delete this._.selectedElements}else{b=n.getLinkAttributes(c,a);g=c.getSelection().getRanges();f=new CKEDITOR.style({element:"a",attributes:b.set});h=[];f.type=CKEDITOR.STYLE_INLINE;for(l=0;l<g.length;l++){d=g[l];d.collapsed?(e=new CKEDITOR.dom.text(a.linkText||
("email"==a.type?a.email.address:b.set["data-cke-saved-href"]),c.document),d.insertNode(e),d.selectNodeContents(e)):q!==a.linkText&&(e=new CKEDITOR.dom.text(a.linkText,c.document),d.shrink(CKEDITOR.SHRINK_TEXT),c.editable().extractHtmlFromRange(d),d.insertNode(e));e=d._find("a");for(k=0;k<e.length;k++)e[k].remove(!0);f.applyToRange(d,c);h.push(d)}c.getSelection().selectRanges(h)}},onLoad:function(){c.config.linkShowAdvancedTab||this.hidePage("advanced");c.config.linkShowTargetTab||this.hidePage("target")},
onFocus:function(){var a=this.getContentElement("info","linkType");a&&"url"==a.getValue()&&(a=this.getContentElement("info","url"),a.select())}}})})();

Binary file not shown.

After

Width:  |  Height:  |  Size: 752 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 B

View File

@ -0,0 +1,21 @@
/*
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
(function(){function v(a){for(var f=0,n=0,l=0,p,e=a.$.rows.length;l<e;l++){p=a.$.rows[l];for(var d=f=0,b,c=p.cells.length;d<c;d++)b=p.cells[d],f+=b.colSpan;f>n&&(n=f)}return n}function r(a){return function(){var f=this.getValue(),f=!!(CKEDITOR.dialog.validate.integer()(f)&&0<f);f||(alert(a),this.select());return f}}function q(a,f){var n=function(e){return new CKEDITOR.dom.element(e,a.document)},q=a.editable(),p=a.plugins.dialogadvtab;return{title:a.lang.table.title,minWidth:310,minHeight:CKEDITOR.env.ie?
310:280,onLoad:function(){var e=this,a=e.getContentElement("advanced","advStyles");if(a)a.on("change",function(){var a=this.getStyle("width",""),c=e.getContentElement("info","txtWidth");c&&c.setValue(a,!0);a=this.getStyle("height","");(c=e.getContentElement("info","txtHeight"))&&c.setValue(a,!0)})},onShow:function(){var e=a.getSelection(),d=e.getRanges(),b,c=this.getContentElement("info","txtRows"),g=this.getContentElement("info","txtCols"),t=this.getContentElement("info","txtWidth"),m=this.getContentElement("info",
"txtHeight");"tableProperties"==f&&((e=e.getSelectedElement())&&e.is("table")?b=e:0<d.length&&(CKEDITOR.env.webkit&&d[0].shrink(CKEDITOR.NODE_ELEMENT),b=a.elementPath(d[0].getCommonAncestor(!0)).contains("table",1)),this._.selectedElement=b);b?(this.setupContent(b),c&&c.disable(),g&&g.disable()):(c&&c.enable(),g&&g.enable());t&&t.onChange();m&&m.onChange()},onOk:function(){var e=a.getSelection(),d=this._.selectedElement&&e.createBookmarks(),b=this._.selectedElement||n("table"),c={};this.commitContent(c,
b);if(c.info){c=c.info;if(!this._.selectedElement)for(var g=b.append(n("tbody")),f=parseInt(c.txtRows,10)||0,m=parseInt(c.txtCols,10)||0,k=0;k<f;k++)for(var h=g.append(n("tr")),l=0;l<m;l++)h.append(n("td")).appendBogus();f=c.selHeaders;if(!b.$.tHead&&("row"==f||"both"==f)){h=b.getElementsByTag("thead").getItem(0);g=b.getElementsByTag("tbody").getItem(0);m=g.getElementsByTag("tr").getItem(0);h||(h=new CKEDITOR.dom.element("thead"),h.insertBefore(g));for(k=0;k<m.getChildCount();k++)g=m.getChild(k),
g.type!=CKEDITOR.NODE_ELEMENT||g.data("cke-bookmark")||(g.renameNode("th"),g.setAttribute("scope","col"));h.append(m.remove())}if(null!==b.$.tHead&&"row"!=f&&"both"!=f){h=new CKEDITOR.dom.element(b.$.tHead);g=b.getElementsByTag("tbody").getItem(0);for(l=g.getFirst();0<h.getChildCount();){m=h.getFirst();for(k=0;k<m.getChildCount();k++)g=m.getChild(k),g.type==CKEDITOR.NODE_ELEMENT&&(g.renameNode("td"),g.removeAttribute("scope"));m.insertBefore(l)}h.remove()}if(!this.hasColumnHeaders&&("col"==f||"both"==
f))for(h=0;h<b.$.rows.length;h++)g=new CKEDITOR.dom.element(b.$.rows[h].cells[0]),g.renameNode("th"),g.setAttribute("scope","row");if(this.hasColumnHeaders&&"col"!=f&&"both"!=f)for(k=0;k<b.$.rows.length;k++)h=new CKEDITOR.dom.element(b.$.rows[k]),"tbody"==h.getParent().getName()&&(g=new CKEDITOR.dom.element(h.$.cells[0]),g.renameNode("td"),g.removeAttribute("scope"));c.txtHeight?b.setStyle("height",c.txtHeight):b.removeStyle("height");c.txtWidth?b.setStyle("width",c.txtWidth):b.removeStyle("width");
b.getAttribute("style")||b.removeAttribute("style")}if(this._.selectedElement)try{e.selectBookmarks(d)}catch(p){}else a.insertElement(b),setTimeout(function(){var e=new CKEDITOR.dom.element(b.$.rows[0].cells[0]),c=a.createRange();c.moveToPosition(e,CKEDITOR.POSITION_AFTER_START);c.select()},0)},contents:[{id:"info",label:a.lang.table.title,elements:[{type:"hbox",widths:[null,null],styles:["vertical-align:top"],children:[{type:"vbox",padding:0,children:[{type:"text",id:"txtRows","default":3,label:a.lang.table.rows,
required:!0,controlStyle:"width:5em",validate:r(a.lang.table.invalidRows),setup:function(e){this.setValue(e.$.rows.length)},commit:l},{type:"text",id:"txtCols","default":2,label:a.lang.table.columns,required:!0,controlStyle:"width:5em",validate:r(a.lang.table.invalidCols),setup:function(e){this.setValue(v(e))},commit:l},{type:"html",html:"\x26nbsp;"},{type:"select",id:"selHeaders",requiredContent:"th","default":"",label:a.lang.table.headers,items:[[a.lang.table.headersNone,""],[a.lang.table.headersRow,
"row"],[a.lang.table.headersColumn,"col"],[a.lang.table.headersBoth,"both"]],setup:function(e){var a=this.getDialog();a.hasColumnHeaders=!0;for(var b=0;b<e.$.rows.length;b++){var c=e.$.rows[b].cells[0];if(c&&"th"!=c.nodeName.toLowerCase()){a.hasColumnHeaders=!1;break}}null!==e.$.tHead?this.setValue(a.hasColumnHeaders?"both":"row"):this.setValue(a.hasColumnHeaders?"col":"")},commit:l},{type:"text",id:"txtBorder",requiredContent:"table[border]","default":a.filter.check("table[border]")?1:0,label:a.lang.table.border,
controlStyle:"width:3em",validate:CKEDITOR.dialog.validate.number(a.lang.table.invalidBorder),setup:function(a){this.setValue(a.getAttribute("border")||"")},commit:function(a,d){this.getValue()?d.setAttribute("border",this.getValue()):d.removeAttribute("border")}},{id:"cmbAlign",type:"select",requiredContent:"table[align]","default":"",label:a.lang.common.align,items:[[a.lang.common.notSet,""],[a.lang.common.left,"left"],[a.lang.common.center,"center"],[a.lang.common.right,"right"]],setup:function(a){this.setValue(a.getAttribute("align")||
"")},commit:function(a,d){this.getValue()?d.setAttribute("align",this.getValue()):d.removeAttribute("align")}}]},{type:"vbox",padding:0,children:[{type:"hbox",widths:["5em"],children:[{type:"text",id:"txtWidth",requiredContent:"table{width}",controlStyle:"width:5em",label:a.lang.common.width,title:a.lang.common.cssLengthTooltip,"default":a.filter.check("table{width}")?500>q.getSize("width")?"100%":500:0,getValue:u,validate:CKEDITOR.dialog.validate.cssLength(a.lang.common.invalidCssLength.replace("%1",
a.lang.common.width)),onChange:function(){var a=this.getDialog().getContentElement("advanced","advStyles");a&&a.updateStyle("width",this.getValue())},setup:function(a){a=a.getStyle("width");this.setValue(a)},commit:l}]},{type:"hbox",widths:["5em"],children:[{type:"text",id:"txtHeight",requiredContent:"table{height}",controlStyle:"width:5em",label:a.lang.common.height,title:a.lang.common.cssLengthTooltip,"default":"",getValue:u,validate:CKEDITOR.dialog.validate.cssLength(a.lang.common.invalidCssLength.replace("%1",
a.lang.common.height)),onChange:function(){var a=this.getDialog().getContentElement("advanced","advStyles");a&&a.updateStyle("height",this.getValue())},setup:function(a){(a=a.getStyle("height"))&&this.setValue(a)},commit:l}]},{type:"html",html:"\x26nbsp;"},{type:"text",id:"txtCellSpace",requiredContent:"table[cellspacing]",controlStyle:"width:3em",label:a.lang.table.cellSpace,"default":a.filter.check("table[cellspacing]")?1:0,validate:CKEDITOR.dialog.validate.number(a.lang.table.invalidCellSpacing),
setup:function(a){this.setValue(a.getAttribute("cellSpacing")||"")},commit:function(a,d){this.getValue()?d.setAttribute("cellSpacing",this.getValue()):d.removeAttribute("cellSpacing")}},{type:"text",id:"txtCellPad",requiredContent:"table[cellpadding]",controlStyle:"width:3em",label:a.lang.table.cellPad,"default":a.filter.check("table[cellpadding]")?1:0,validate:CKEDITOR.dialog.validate.number(a.lang.table.invalidCellPadding),setup:function(a){this.setValue(a.getAttribute("cellPadding")||"")},commit:function(a,
d){this.getValue()?d.setAttribute("cellPadding",this.getValue()):d.removeAttribute("cellPadding")}}]}]},{type:"html",align:"right",html:""},{type:"vbox",padding:0,children:[{type:"text",id:"txtCaption",requiredContent:"caption",label:a.lang.table.caption,setup:function(a){this.enable();a=a.getElementsByTag("caption");if(0<a.count()){a=a.getItem(0);var d=a.getFirst(CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT));d&&!d.equals(a.getBogus())?(this.disable(),this.setValue(a.getText())):(a=CKEDITOR.tools.trim(a.getText()),
this.setValue(a))}},commit:function(e,d){if(this.isEnabled()){var b=this.getValue(),c=d.getElementsByTag("caption");if(b)0<c.count()?(c=c.getItem(0),c.setHtml("")):(c=new CKEDITOR.dom.element("caption",a.document),d.append(c,!0)),c.append(new CKEDITOR.dom.text(b,a.document));else if(0<c.count())for(b=c.count()-1;0<=b;b--)c.getItem(b).remove()}}},{type:"text",id:"txtSummary",bidi:!0,requiredContent:"table[summary]",label:a.lang.table.summary,setup:function(a){this.setValue(a.getAttribute("summary")||
"")},commit:function(a,d){this.getValue()?d.setAttribute("summary",this.getValue()):d.removeAttribute("summary")}}]}]},p&&p.createAdvancedTab(a,null,"table")]}}var u=CKEDITOR.tools.cssLength,l=function(a){var f=this.id;a.info||(a.info={});a.info[f]=this.getValue()};CKEDITOR.dialog.add("table",function(a){return q(a,"table")});CKEDITOR.dialog.add("tableProperties",function(a){return q(a,"tableProperties")})})();

View File

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

View File

@ -0,0 +1,18 @@
/*
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.dialog.add("cellProperties",function(f){function d(a){return function(b){for(var c=a(b[0]),d=1;d<b.length;d++)if(a(b[d])!==c){c=null;break}"undefined"!=typeof c&&(this.setValue(c),CKEDITOR.env.gecko&&"select"==this.type&&!c&&(this.getInputElement().$.selectedIndex=-1))}}function l(a){if(a=n.exec(a.getStyle("width")||a.getAttribute("width")))return a[2]}var h=f.lang.table,c=h.cell,e=f.lang.common,k=CKEDITOR.dialog.validate,n=/^(\d+(?:\.\d+)?)(px|%)$/,g={type:"html",html:"\x26nbsp;"},p="rtl"==
f.lang.dir,m=f.plugins.colordialog;return{title:c.title,minWidth:CKEDITOR.env.ie&&CKEDITOR.env.quirks?450:410,minHeight:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?230:220,contents:[{id:"info",label:c.title,accessKey:"I",elements:[{type:"hbox",widths:["40%","5%","40%"],children:[{type:"vbox",padding:0,children:[{type:"hbox",widths:["70%","30%"],children:[{type:"text",id:"width",width:"100px",requiredContent:"td{width,height}",label:e.width,validate:k.number(c.invalidWidth),onLoad:function(){var a=
this.getDialog().getContentElement("info","widthType").getElement(),b=this.getInputElement(),c=b.getAttribute("aria-labelledby");b.setAttribute("aria-labelledby",[c,a.$.id].join(" "))},setup:d(function(a){var b=parseInt(a.getAttribute("width"),10);a=parseInt(a.getStyle("width"),10);return isNaN(a)?isNaN(b)?"":b:a}),commit:function(a){var b=parseInt(this.getValue(),10),c=this.getDialog().getValueOf("info","widthType")||l(a);isNaN(b)?a.removeStyle("width"):a.setStyle("width",b+c);a.removeAttribute("width")},
"default":""},{type:"select",id:"widthType",requiredContent:"td{width,height}",label:f.lang.table.widthUnit,labelStyle:"visibility:hidden","default":"px",items:[[h.widthPx,"px"],[h.widthPc,"%"]],setup:d(l)}]},{type:"hbox",widths:["70%","30%"],children:[{type:"text",id:"height",requiredContent:"td{width,height}",label:e.height,width:"100px","default":"",validate:k.number(c.invalidHeight),onLoad:function(){var a=this.getDialog().getContentElement("info","htmlHeightType").getElement(),b=this.getInputElement(),
c=b.getAttribute("aria-labelledby");this.getDialog().getContentElement("info","height").isVisible()&&(a.setHtml("\x3cbr /\x3e"+h.widthPx),a.setStyle("display","block"),this.getDialog().getContentElement("info","hiddenSpacer").getElement().setStyle("display","block"));b.setAttribute("aria-labelledby",[c,a.$.id].join(" "))},setup:d(function(a){var b=parseInt(a.getAttribute("height"),10);a=parseInt(a.getStyle("height"),10);return isNaN(a)?isNaN(b)?"":b:a}),commit:function(a){var b=parseInt(this.getValue(),
10);isNaN(b)?a.removeStyle("height"):a.setStyle("height",CKEDITOR.tools.cssLength(b));a.removeAttribute("height")}},{id:"htmlHeightType",type:"html",html:"",style:"display: none"}]},{type:"html",id:"hiddenSpacer",html:"\x26nbsp;",style:"display: none"},{type:"select",id:"wordWrap",label:c.wordWrap,"default":"yes",items:[[c.yes,"yes"],[c.no,"no"]],setup:d(function(a){var b=a.getAttribute("noWrap");if("nowrap"==a.getStyle("white-space")||b)return"no"}),commit:function(a){"no"==this.getValue()?a.setStyle("white-space",
"nowrap"):a.removeStyle("white-space");a.removeAttribute("noWrap")}},g,{type:"select",id:"hAlign",label:c.hAlign,"default":"",items:[[e.notSet,""],[e.left,"left"],[e.center,"center"],[e.right,"right"],[e.justify,"justify"]],setup:d(function(a){var b=a.getAttribute("align");return a.getStyle("text-align")||b||""}),commit:function(a){var b=this.getValue();b?a.setStyle("text-align",b):a.removeStyle("text-align");a.removeAttribute("align")}},{type:"select",id:"vAlign",label:c.vAlign,"default":"",items:[[e.notSet,
""],[e.alignTop,"top"],[e.alignMiddle,"middle"],[e.alignBottom,"bottom"],[c.alignBaseline,"baseline"]],setup:d(function(a){var b=a.getAttribute("vAlign");a=a.getStyle("vertical-align");switch(a){case "top":case "middle":case "bottom":case "baseline":break;default:a=""}return a||b||""}),commit:function(a){var b=this.getValue();b?a.setStyle("vertical-align",b):a.removeStyle("vertical-align");a.removeAttribute("vAlign")}}]},g,{type:"vbox",padding:0,children:[{type:"select",id:"cellType",label:c.cellType,
"default":"td",items:[[c.data,"td"],[c.header,"th"]],setup:d(function(a){return a.getName()}),commit:function(a){a.renameNode(this.getValue())}},g,{type:"text",id:"rowSpan",label:c.rowSpan,"default":"",validate:k.integer(c.invalidRowSpan),setup:d(function(a){if((a=parseInt(a.getAttribute("rowSpan"),10))&&1!=a)return a}),commit:function(a){var b=parseInt(this.getValue(),10);b&&1!=b?a.setAttribute("rowSpan",this.getValue()):a.removeAttribute("rowSpan")}},{type:"text",id:"colSpan",label:c.colSpan,"default":"",
validate:k.integer(c.invalidColSpan),setup:d(function(a){if((a=parseInt(a.getAttribute("colSpan"),10))&&1!=a)return a}),commit:function(a){var b=parseInt(this.getValue(),10);b&&1!=b?a.setAttribute("colSpan",this.getValue()):a.removeAttribute("colSpan")}},g,{type:"hbox",padding:0,widths:["60%","40%"],children:[{type:"text",id:"bgColor",label:c.bgColor,"default":"",setup:d(function(a){var b=a.getAttribute("bgColor");return a.getStyle("background-color")||b}),commit:function(a){this.getValue()?a.setStyle("background-color",
this.getValue()):a.removeStyle("background-color");a.removeAttribute("bgColor")}},m?{type:"button",id:"bgColorChoose","class":"colorChooser",label:c.chooseColor,onLoad:function(){this.getElement().getParent().setStyle("vertical-align","bottom")},onClick:function(){f.getColorFromDialog(function(a){a&&this.getDialog().getContentElement("info","bgColor").setValue(a);this.focus()},this)}}:g]},g,{type:"hbox",padding:0,widths:["60%","40%"],children:[{type:"text",id:"borderColor",label:c.borderColor,"default":"",
setup:d(function(a){var b=a.getAttribute("borderColor");return a.getStyle("border-color")||b}),commit:function(a){this.getValue()?a.setStyle("border-color",this.getValue()):a.removeStyle("border-color");a.removeAttribute("borderColor")}},m?{type:"button",id:"borderColorChoose","class":"colorChooser",label:c.chooseColor,style:(p?"margin-right":"margin-left")+": 10px",onLoad:function(){this.getElement().getParent().setStyle("vertical-align","bottom")},onClick:function(){f.getColorFromDialog(function(a){a&&
this.getDialog().getContentElement("info","borderColor").setValue(a);this.focus()},this)}}:g]}]}]}]}],onShow:function(){this.cells=CKEDITOR.plugins.tabletools.getSelectedCells(this._.editor.getSelection());this.setupContent(this.cells)},onOk:function(){for(var a=this._.editor.getSelection(),b=a.createBookmarks(),c=this.cells,d=0;d<c.length;d++)this.commitContent(c[d]);this._.editor.forceNextSelectionCheck();a.selectBookmarks(b);this._.editor.selectionChange()},onLoad:function(){var a={};this.foreach(function(b){b.setup&&
b.commit&&(b.setup=CKEDITOR.tools.override(b.setup,function(c){return function(){c.apply(this,arguments);a[b.id]=b.getValue()}}),b.commit=CKEDITOR.tools.override(b.commit,function(c){return function(){a[b.id]!==b.getValue()&&c.apply(this,arguments)}}))})}}});

View File

@ -0,0 +1,214 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
'use strict';
( function() {
var uniqueNameCounter = 0,
// Black rectangle which is shown before the image is loaded.
loadingImage = 'data:image/gif;base64,R0lGODlhDgAOAIAAAAAAAP///yH5BAAAAAAALAAAAAAOAA4AAAIMhI+py+0Po5y02qsKADs=';
// Returns number as a string. If a number has 1 digit only it returns it prefixed with an extra 0.
function padNumber( input ) {
if ( input <= 9 ) {
input = '0' + input;
}
return String( input );
}
// Returns a unique image file name.
function getUniqueImageFileName( type ) {
var date = new Date(),
dateParts = [ date.getFullYear(), date.getMonth() + 1, date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds() ];
uniqueNameCounter += 1;
return 'image-' + CKEDITOR.tools.array.map( dateParts, padNumber ).join( '' ) + '-' + uniqueNameCounter + '.' + type;
}
CKEDITOR.plugins.add( 'uploadimage', {
requires: 'uploadwidget',
onLoad: function() {
CKEDITOR.addCss(
'.cke_upload_uploading img{' +
'opacity: 0.3' +
'}'
);
},
init: function( editor ) {
editor.ui.addButton( 'Image', {
label: CKEDITOR.lang[editor.config.language].common.image,
command: 'openDialog',
toolbar: 'insertImg'
});
var fileDialog = $('<input type="file">'),
uploadType = '';
editor.addCommand('openDialog', {
exec: function(editor) {
fileDialog.click();
if(typeof(uploadType) != 'undefined') uploadType = 'fileDialog';
}
});
// Do not execute this paste listener if it will not be possible to upload file.
if ( !CKEDITOR.plugins.clipboard.isFileApiSupported ) {
return;
}
var fileTools = CKEDITOR.fileTools,
uploadUrl = fileTools.getUploadUrl( editor.config, 'image' );
if ( !uploadUrl ) {
return;
}
var supportedType = '';
var agent = navigator.userAgent.toLowerCase();
if (agent.indexOf('trident') != -1 || agent.indexOf("msie") != -1) {
supportedType = '';
} else {
supportedType = /image\/(jpeg|png|gif|bmp|webp)/;
}
// Handle images which are available in the dataTransfer.
fileTools.addUploadWidget( editor, 'uploadimage', {
supportedTypes: supportedType,
uploadUrl: uploadUrl,
fileDialog: fileDialog,
fileToElement: function() {
var img = new CKEDITOR.dom.element( 'img' );
img.setAttribute( 'src', loadingImage );
return img;
},
parts: {
img: 'img'
},
onUploading: function( upload ) {
// Show the image during the upload.
this.parts.img.setAttribute( 'src', upload.data );
},
onUploaded: function( upload ) {
// Width and height could be returned by server (https://dev.ckeditor.com/ticket/13519).
var $img = this.parts.img.$,
width = upload.responseData.width || $img.naturalWidth,
height = upload.responseData.height || $img.naturalHeight;
// Set width and height to prevent blinking.
this.replaceWith( '<img src="' + upload.url + '" ' +
'width="' + width + '" ' +
'height="' + height + '">' );
}
} );
editor.on("fileUploadRequest", function( evt ) {
// 이미지 업로드 시작 체크
var fileLoader = evt.data.fileLoader;
if(fileLoader.file.type.match(/image\/(jpeg|png|gif|bmp|webp)/) == null){
this.showNotification('익스플로러 환경에서는 jpg / gif / png 파일만 업로드 가능합니다.','warning');
return false;
}else {
if(typeof(editor_chk_upload) != "undefined") {
editor_chk_upload = false;
}
}
});
editor.on("fileUploadResponse", function( evt ) {
// 파일 브라우저 사용한 경우에만
if(typeof(uploadType) != 'undefined' && uploadType == 'fileDialog') {
var fileLoader = evt.data.fileLoader,
xhr = fileLoader.xhr,
data = evt.data,
res = JSON.parse(xhr.responseText);
var img = new CKEDITOR.dom.element( 'img' );
img.setAttribute( 'src', res.url );
if(typeof(res.width) != 'undefined') img.setAttribute( 'width', res.width );
if(typeof(res.height) != 'undefined') img.setAttribute( 'height', res.height );
editor.insertElement(img);
uploadType = ''; // 구분값 초기화
// 파일폼 초기화
for( var i = 0; i < fileDialog.length; i++ ) {
fileDialog[i].value = null;
}
}
// 이미지 업로드 완료 체크
if(typeof(editor_chk_upload) != "undefined") {
editor_chk_upload = true;
}
});
// Handle images which are not available in the dataTransfer.
// This means that we need to read them from the <img src="data:..."> elements.
editor.on( 'paste', function( evt ) {
// For performance reason do not parse data if it does not contain img tag and data attribute.
if ( !evt.data.dataValue.match( /<img[\s\S]+data:/i ) ) {
return;
}
var data = evt.data,
// Prevent XSS attacks.
tempDoc = document.implementation.createHTMLDocument( '' ),
temp = new CKEDITOR.dom.element( tempDoc.body ),
imgs, img, i;
// Without this isReadOnly will not works properly.
temp.data( 'cke-editable', 1 );
temp.appendHtml( data.dataValue );
imgs = temp.find( 'img' );
for ( i = 0; i < imgs.count(); i++ ) {
img = imgs.getItem( i );
// Assign src once, as it might be a big string, so there's no point in duplicating it all over the place.
var imgSrc = img.getAttribute( 'src' ),
// Image have to contain src=data:...
isDataInSrc = imgSrc && imgSrc.substring( 0, 5 ) == 'data:',
isRealObject = img.data( 'cke-realelement' ) === null;
// We are not uploading images in non-editable blocs and fake objects (https://dev.ckeditor.com/ticket/13003).
if ( isDataInSrc && isRealObject && !img.data( 'cke-upload-id' ) && !img.isReadOnly( 1 ) ) {
// Note that normally we'd extract this logic into a separate function, but we should not duplicate this string, as it might
// be large.
var imgFormat = imgSrc.match( /image\/([a-z]+?);/i ),
loader;
imgFormat = ( imgFormat && imgFormat[ 1 ] ) || 'jpg';
loader = editor.uploadRepository.create( imgSrc, getUniqueImageFileName( imgFormat ) );
loader.upload( uploadUrl );
fileTools.markElement( img, 'uploadimage', loader.id );
fileTools.bindNotifications( editor, loader );
}
}
data.dataValue = temp.getHtml();
} );
}
} );
/**
* The URL where images should be uploaded.
*
* @since 4.5
* @cfg {String} [imageUploadUrl='' (empty string = disabled)]
* @member CKEDITOR.config
*/
} )();

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,55 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
'use strict';
( function() {
CKEDITOR.plugins.add( 'filereader', {
requires: 'uploadwidget',
init: function( editor ) {
var fileTools = CKEDITOR.fileTools;
fileTools.addUploadWidget( editor, 'filereader', {
onLoaded: function( upload ) {
var data = upload.data;
if ( data && data.indexOf( ',' ) >= 0 && data.indexOf( ',' ) < data.length - 1 ) {
this.replaceWith( atob( upload.data.split( ',' )[ 1 ] ) );
} else {
editor.widgets.del( this );
}
}
} );
editor.on( 'paste', function( evt ) {
var data = evt.data,
dataTransfer = data.dataTransfer,
filesCount = dataTransfer.getFilesCount(),
file, i;
if ( data.dataValue || !filesCount ) {
return;
}
for ( i = 0; i < filesCount; i++ ) {
file = dataTransfer.getFile( i );
if ( fileTools.isTypeSupported( file, /text\/(plain|html)/ ) ) {
var el = new CKEDITOR.dom.element( 'span' ),
loader = editor.uploadRepository.create( file );
el.setText( '...' );
loader.load();
fileTools.markElement( el, 'filereader', loader.id );
fileTools.bindNotifications( editor, loader );
data.dataValue += el.getOuterHtml();
}
}
} );
}
} );
} )();

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'az', {
abort: 'Serverə yükləmə istifadəçi tərəfindən dayandırılıb',
doneOne: 'Fayl müvəffəqiyyətlə yüklənib',
doneMany: '%1 fayllar müvəffəqiyyətlə yüklənib',
uploadOne: 'Faylın yüklənməsi ({percentage}%)',
uploadMany: 'Faylların yüklənməsi, {max}-dan {current} hazır ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'bg', {
abort: 'Качването е прекратено от потребителя.',
doneOne: 'Файлът е качен успешно.',
doneMany: 'Успешно са качени %1 файла.',
uploadOne: 'Качване на файл ({percentage}%)...',
uploadMany: 'Качване на файлове, {current} от {max} качени ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'ca', {
abort: 'Pujada cancel·lada per l\'usuari.',
doneOne: 'Fitxer pujat correctament.',
doneMany: '%1 fitxers pujats correctament.',
uploadOne: 'Pujant fitxer ({percentage}%)...',
uploadMany: 'Pujant fitxers, {current} de {max} finalitzats ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'cs', {
abort: 'Nahrávání zrušeno uživatelem.',
doneOne: 'Soubor úspěšně nahrán.',
doneMany: 'Úspěšně nahráno %1 souborů.',
uploadOne: 'Nahrávání souboru ({percentage}%)...',
uploadMany: 'Nahrávání souborů, {current} z {max} hotovo ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'da', {
abort: 'Upload er afbrudt af brugen.',
doneOne: 'Filen er uploadet.',
doneMany: 'Du har uploadet %1 filer.',
uploadOne: 'Uploader fil ({percentage}%)...',
uploadMany: 'Uploader filer, {current} af {max} er uploadet ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'de-ch', {
abort: 'Hochladen durch den Benutzer abgebrochen.',
doneOne: 'Datei erfolgreich hochgeladen.',
doneMany: '%1 Dateien erfolgreich hochgeladen.',
uploadOne: 'Datei wird hochgeladen ({percentage}%)...',
uploadMany: 'Dateien werden hochgeladen, {current} von {max} fertig ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'de', {
abort: 'Hochladen durch den Benutzer abgebrochen.',
doneOne: 'Datei erfolgreich hochgeladen.',
doneMany: '%1 Dateien erfolgreich hochgeladen.',
uploadOne: 'Datei wird hochgeladen ({percentage}%)...',
uploadMany: 'Dateien werden hochgeladen, {current} von {max} fertig ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'el', {
abort: 'Αποστολή ακυρώθηκε απο χρήστη.',
doneOne: 'Αρχείο εστάλη επιτυχώς.',
doneMany: 'Επιτυχής αποστολή %1 αρχείων.',
uploadOne: 'Αποστολή αρχείου ({percentage}%)…',
uploadMany: 'Αποστολή αρχείων, {current} από {max} ολοκληρωμένα ({percentage}%)…'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'en-au', {
abort: 'Upload aborted by the user.',
doneOne: 'File successfully uploaded.',
doneMany: 'Successfully uploaded %1 files.',
uploadOne: 'Uploading file ({percentage}%)...',
uploadMany: 'Uploading files, {current} of {max} done ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'en', {
abort: 'Upload aborted by the user.',
doneOne: 'File successfully uploaded.',
doneMany: 'Successfully uploaded %1 files.',
uploadOne: 'Uploading file ({percentage}%)...',
uploadMany: 'Uploading files, {current} of {max} done ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'eo', {
abort: 'Alŝuto ĉesigita de la uzanto',
doneOne: 'Dosiero sukcese alŝutita.',
doneMany: 'Sukcese alŝutitaj %1 dosieroj.',
uploadOne: 'alŝutata dosiero ({percentage}%)...',
uploadMany: 'Alŝutataj dosieroj, {current} el {max} faritaj ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'es-mx', {
abort: 'La carga ha sido abortada por el usuario.',
doneOne: 'El archivo ha sido cargado completamente.',
doneMany: '%1 archivos cargados completamente.',
uploadOne: 'Cargando archivo ({percentage}%)...',
uploadMany: 'Cargando archivos, {current} de {max} listo ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'es', {
abort: 'Carga abortada por el usuario.',
doneOne: 'Archivo cargado exitósamente.',
doneMany: '%1 archivos exitósamente cargados.',
uploadOne: 'Cargando archivo ({percentage}%)...',
uploadMany: 'Cargando archivos, {current} de {max} hecho ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'et', {
abort: 'Upload aborted by the user.', // MISSING
doneOne: 'Fail on üles laaditud.',
doneMany: 'Successfully uploaded %1 files.', // MISSING
uploadOne: 'Uploading file ({percentage}%)...', // MISSING
uploadMany: 'Uploading files, {current} of {max} done ({percentage}%)...' // MISSING
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'eu', {
abort: 'Karga erabiltzaileak bertan behera utzita.',
doneOne: 'Fitxategia behar bezala kargatu da.',
doneMany: 'Behar bezala kargatu dira %1 fitxategi.',
uploadOne: 'Fitxategia kargatzen ({percentage}%)...',
uploadMany: 'Fitxategiak kargatzen, {current} / {max} eginda ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'fa', {
abort: 'بارگذاری توسط کاربر لغو شد.',
doneOne: 'فایل با موفقیت بارگذاری شد.',
doneMany: '%1 از فایل​ها با موفقیت بارگذاری شد.',
uploadOne: 'بارگذاری فایل ({percentage}%)...',
uploadMany: 'بارگذاری فایل​ها, {current} از {max} انجام شده ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'fr', {
abort: 'Téléversement interrompu par l\'utilisateur.',
doneOne: 'Fichier téléversé avec succès.',
doneMany: '%1 fichiers téléversés avec succès.',
uploadOne: 'Téléversement du fichier en cours ({percentage}%)…',
uploadMany: 'Téléversement des fichiers en cours, {current} sur {max} effectués ({percentage}%)…'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'gl', {
abort: 'Envío interrompido polo usuario.',
doneOne: 'Ficheiro enviado satisfactoriamente.',
doneMany: '%1 ficheiros enviados satisfactoriamente.',
uploadOne: 'Enviando o ficheiro ({percentage}%)...',
uploadMany: 'Enviando ficheiros, {current} de {max} feito o ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'hr', {
abort: 'Slanje prekinuto od strane korisnika',
doneOne: 'Datoteka uspješno poslana.',
doneMany: 'Uspješno poslano %1 datoteka.',
uploadOne: 'Slanje datoteke ({percentage}%)...',
uploadMany: 'Slanje datoteka, {current} od {max} gotovo ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'hu', {
abort: 'A feltöltést a felhasználó megszakította.',
doneOne: 'A fájl sikeresen feltöltve.',
doneMany: '%1 fájl sikeresen feltöltve.',
uploadOne: 'Fájl feltöltése ({percentage}%)...',
uploadMany: 'Fájlok feltöltése, {current}/{max} kész ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'id', {
abort: 'Pengunggahan dibatalkan oleh pengguna',
doneOne: 'Berkas telah berhasil diunggah',
doneMany: 'Pengunggahan berkas %1 berhasil',
uploadOne: 'Mengunggah berkas ({percentage}%)...',
uploadMany: 'Pengunggahan berkas {current} dari {max} berhasil ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'it', {
abort: 'Caricamento interrotto dall\'utente.',
doneOne: 'Il file è stato caricato correttamente.',
doneMany: '%1 file sono stati caricati correttamente.',
uploadOne: 'Caricamento del file ({percentage}%)...',
uploadMany: 'Caricamento dei file, {current} di {max} completati ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'ja', {
abort: 'アップロードを中止しました。',
doneOne: 'ファイルのアップロードに成功しました。',
doneMany: '%1個のファイルのアップロードに成功しました。',
uploadOne: 'ファイルのアップロード中 ({percentage}%)...',
uploadMany: '{max} 個中 {current} 個のファイルをアップロードしました。 ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'km', {
abort: 'បាន​ផ្ដាច់​ការផ្ទុកឡើង​ដោយ​អ្នក​ប្រើប្រាស់។',
doneOne: 'បាន​ផ្ទុកឡើង​នូវ​ឯកសារ​ដោយ​ជោគជ័យ។',
doneMany: 'បាន​ផ្ទុក​ឡើង​នូវ​ឯកសារ %1 ដោយ​ជោគជ័យ។',
uploadOne: 'កំពុង​ផ្ទុកឡើង​ឯកសារ ({percentage}%)...',
uploadMany: 'កំពុង​ផ្ទុកឡើង​ឯកសារ, រួចរាល់ {current} នៃ {max} ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'ko', {
abort: '사용자가 업로드를 중단했습니다.',
doneOne: '파일이 성공적으로 업로드되었습니다.',
doneMany: '파일 %1개를 성공적으로 업로드하였습니다.',
uploadOne: '파일 업로드중 ({percentage}%)...',
uploadMany: '파일 {max} 개 중 {current} 번째 파일 업로드 중 ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'ku', {
abort: 'بارکردنەکە بڕدرا لەلایەن بەکارهێنەر.',
doneOne: 'پەڕگەکە بەسەرکەوتووانە بارکرا.',
doneMany: 'بەسەرکەوتووانە بارکرا %1 پەڕگە.',
uploadOne: 'پەڕگە باردەکرێت ({percentage}%)...',
uploadMany: 'پەڕگە باردەکرێت, {current} لە {max} ئەنجامدراوە ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'lv', {
abort: 'Augšupielādi atcēla lietotājs.',
doneOne: 'Fails veiksmīgi ielādēts.',
doneMany: 'Veiksmīgi ielādēts %1 fails.',
uploadOne: 'Ielādāju failu ({percentage}%)...',
uploadMany: 'Ielādēju failus, {curent} no {max} izpildīts ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'nb', {
abort: 'Opplasting ble avbrutt av brukeren.',
doneOne: 'Filen har blitt lastet opp.',
doneMany: 'Fullført opplasting av %1 filer.',
uploadOne: 'Laster opp fil ({percentage}%)...',
uploadMany: 'Laster opp filer, {current} av {max} fullført ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'nl', {
abort: 'Upload gestopt door de gebruiker.',
doneOne: 'Bestand succesvol geüpload.',
doneMany: 'Succesvol %1 bestanden geüpload.',
uploadOne: 'Uploaden bestand ({percentage}%)…',
uploadMany: 'Bestanden aan het uploaden, {current} van {max} klaar ({percentage}%)…'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'no', {
abort: 'Opplasting ble avbrutt av brukeren.',
doneOne: 'Filen har blitt lastet opp.',
doneMany: 'Fullført opplasting av %1 filer.',
uploadOne: 'Laster opp fil ({percentage}%)...',
uploadMany: 'Laster opp filer, {current} av {max} fullført ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'oc', {
abort: 'Mandadís interromput per l\'utilizaire',
doneOne: 'Fichièr mandat amb succès.',
doneMany: '%1 fichièrs mandats amb succès.',
uploadOne: 'Mandadís del fichièr en cors ({percentage}%)…',
uploadMany: 'Mandadís dels fichièrs en cors, {current} sus {max} efectuats ({percentage}%)…'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'pl', {
abort: 'Wysyłanie przerwane przez użytkownika.',
doneOne: 'Plik został pomyślnie wysłany.',
doneMany: 'Pomyślnie wysłane pliki: %1.',
uploadOne: 'Wysyłanie pliku ({percentage}%)...',
uploadMany: 'Wysyłanie plików, gotowe {current} z {max} ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'pt-br', {
abort: 'Envio cancelado pelo usuário.',
doneOne: 'Arquivo enviado com sucesso.',
doneMany: 'Enviados %1 arquivos com sucesso.',
uploadOne: 'Enviando arquivo({percentage}%)...',
uploadMany: 'Enviando arquivos, {current} de {max} completos ({percentage}%)...'
} );

View File

@ -0,0 +1,12 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'uploadwidget', 'pt', {
abort: 'Carregamento cancelado pelo utilizador.',
doneOne: 'Ficheiro carregado com sucesso.',
doneMany: 'Successfully uploaded %1 files.', // MISSING
uploadOne: 'Uploading file ({percentage}%)...', // MISSING
uploadMany: 'Uploading files, {current} of {max} done ({percentage}%)...' // MISSING
} );

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