|
|
@ -1,6 +1,8 @@
|
|
|
|
define(['jquery'], function ($) {
|
|
|
|
define(['jquery'], function ($) {
|
|
|
|
var CKEDITOR = window.CKEDITOR;
|
|
|
|
var CKEDITOR = window.CKEDITOR;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var $iframe = $('iframe').contents().find('html');
|
|
|
|
|
|
|
|
|
|
|
|
$('body').on('click', '.cke_dialog_container a.cke_specialchar', function (e) {
|
|
|
|
$('body').on('click', '.cke_dialog_container a.cke_specialchar', function (e) {
|
|
|
|
e.preventDefault();
|
|
|
|
e.preventDefault();
|
|
|
|
var attr = $(e.currentTarget).attr('oonclick');
|
|
|
|
var attr = $(e.currentTarget).attr('oonclick');
|
|
|
@ -8,11 +10,11 @@ define(['jquery'], function ($) {
|
|
|
|
var reg = /CKEDITOR.tools.callFunction\(([0-9]+), this\);/;
|
|
|
|
var reg = /CKEDITOR.tools.callFunction\(([0-9]+), this\);/;
|
|
|
|
var m = attr.match(reg);
|
|
|
|
var m = attr.match(reg);
|
|
|
|
if (!m) { return; }
|
|
|
|
if (!m) { return; }
|
|
|
|
|
|
|
|
var s = $iframe.scrollTop();
|
|
|
|
CKEDITOR.tools.callFunction(Number(m[1]), e.currentTarget);
|
|
|
|
CKEDITOR.tools.callFunction(Number(m[1]), e.currentTarget);
|
|
|
|
|
|
|
|
$iframe.scrollTop(s);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
var $iframe = $('iframe').contents().find('html');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Buttons
|
|
|
|
// Buttons
|
|
|
|
var $a = $('.cke_toolbox_main').find('.cke_button, .cke_combo_button');
|
|
|
|
var $a = $('.cke_toolbox_main').find('.cke_button, .cke_combo_button');
|
|
|
|
$a.each(function (i, el) {
|
|
|
|
$a.each(function (i, el) {
|
|
|
@ -100,7 +102,9 @@ define(['jquery'], function ($) {
|
|
|
|
if (!match) { return; }
|
|
|
|
if (!match) { return; }
|
|
|
|
var f = match[1];
|
|
|
|
var f = match[1];
|
|
|
|
var el = match[2] !== "null" ? match[2] : null;
|
|
|
|
var el = match[2] !== "null" ? match[2] : null;
|
|
|
|
|
|
|
|
var s = $iframe.scrollTop();
|
|
|
|
CKEDITOR.tools.callFunction(Number(f), el, match[4]);
|
|
|
|
CKEDITOR.tools.callFunction(Number(f), el, match[4]);
|
|
|
|
|
|
|
|
$iframe.scrollTop(s);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// Register the CKEDITOR global.
|
|
|
|
// Register the CKEDITOR global.
|
|
|
|