mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:19:00 +01:00
W.I.P. implementing TinyMCE editor and deprecating CKEditor
This commit is contained in:
parent
b39bcc8c36
commit
1cbd0aa2a3
@ -39,7 +39,7 @@
|
||||
<select id="ident_email_alias" span="all" class="et2_fullWidth"/>
|
||||
</row>
|
||||
<row>
|
||||
<htmlarea expand_toolbar="false" height="200px" id="ident_signature" span="all" width="100%"/>
|
||||
<htmlarea expand_toolbar="false" height="237px" id="ident_signature" span="all"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
352
api/js/etemplate/et2_widget_ckeditor.js
Normal file
352
api/js/etemplate/et2_widget_ckeditor.js
Normal file
@ -0,0 +1,352 @@
|
||||
/**
|
||||
* EGroupware eTemplate2 - JS widget for HTML editing
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @package etemplate
|
||||
* @subpackage api
|
||||
* @link http://www.egroupware.org
|
||||
* @author Nathan Gray
|
||||
* @copyright Nathan Gray 2012
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/*egw:uses
|
||||
jsapi.jsapi; // Needed for egw_seperateJavaScript
|
||||
/vendor/bower-asset/jquery/dist/jquery.js;
|
||||
/vendor/egroupware/ckeditor/ckeditor.js;
|
||||
/vendor/egroupware/ckeditor/ckeditor.config;
|
||||
/vendor/egroupware/ckeditor/ckeditor.adapters/jquery;
|
||||
et2_core_baseWidget;
|
||||
*/
|
||||
|
||||
/**
|
||||
* @augments et2_inputWidget
|
||||
*/
|
||||
var et2_ckeditor = (function(){ "use strict"; return et2_inputWidget.extend([et2_IResizeable],
|
||||
{
|
||||
modes: ['ascii','simple','extended','advanced'],
|
||||
|
||||
attributes: {
|
||||
'mode': {
|
||||
'name': 'Mode',
|
||||
'description': 'One of {ascii|simple|extended|advanced}',
|
||||
'default': 'simple',
|
||||
'type': 'string'
|
||||
},
|
||||
'height': {
|
||||
'name': 'Height',
|
||||
'default': et2_no_init,
|
||||
'type': 'string'
|
||||
},
|
||||
'width': {
|
||||
'name': 'Width',
|
||||
'default': et2_no_init,
|
||||
'type': 'string'
|
||||
},
|
||||
'expand_toolbar': {
|
||||
'name': 'Expand Toolbar',
|
||||
'default': true,
|
||||
'type':'boolean',
|
||||
'description': 'Have the toolbar expanded (visible)'
|
||||
},
|
||||
'base_href': { // seems not to be used anymore
|
||||
'name': 'Image base path',
|
||||
'default': et2_no_init,
|
||||
'type': 'string',
|
||||
'description': 'activates the browser for images at the path (relative to the docroot)'
|
||||
},
|
||||
'config': {
|
||||
// internal default configuration
|
||||
'name': 'Internal configuration',
|
||||
'type':'any',
|
||||
'default': et2_no_init,
|
||||
'description': 'Internal configuration - managed by preferences & framework, passed in here',
|
||||
'translate': 'no_lang'
|
||||
},
|
||||
value: {
|
||||
name: "Value",
|
||||
description: "The value of the widget",
|
||||
type: "html", // "string" would remove html tags by running html_entity_decode
|
||||
default: et2_no_init
|
||||
},
|
||||
imageUpload: {
|
||||
name: "imageUpload",
|
||||
description: "Url to upload images dragged in or id of link_to widget to it's vfs upload. Can also be just a name for which content array contains a path to upload the picture.",
|
||||
type: "string",
|
||||
default: null
|
||||
}
|
||||
},
|
||||
|
||||
legacyOptions: ['mode','height','width','expand_toolbar','base_href'],
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param _parent
|
||||
* @param _attrs
|
||||
* @memberOf et2_ckeditor
|
||||
*/
|
||||
init: function(_parent, _attrs) {
|
||||
// _super.apply is responsible for the actual setting of the params (some magic)
|
||||
this._super.apply(this, arguments);
|
||||
|
||||
// CK instance
|
||||
this.ckeditor = null;
|
||||
|
||||
// Allow no child widgets
|
||||
this.supportedWidgetClasses = [];
|
||||
this.htmlNode = jQuery(document.createElement("textarea"))
|
||||
.css('height', this.options.height)
|
||||
.addClass('et2_textbox_ro');
|
||||
this.setDOMNode(this.htmlNode[0]);
|
||||
},
|
||||
|
||||
transformAttributes: function(_attrs) {
|
||||
|
||||
// Check mode, some apps jammed everything in there
|
||||
if(_attrs['mode'] && jQuery.inArray(_attrs['mode'], this.modes) < 0)
|
||||
{
|
||||
this.egw().debug("warn", "'%s' is an invalid mode for et2_ckeditor '%s'. Valid options:", _attrs['mode'],_attrs['id'], this.modes);
|
||||
var list = _attrs['mode'].split(',');
|
||||
for(var i = 0; i < list.length && i < this.legacyOptions.length; i++)
|
||||
{
|
||||
_attrs[this.legacyOptions[i]] = list[i];
|
||||
}
|
||||
}
|
||||
this._super.apply(this, arguments);
|
||||
},
|
||||
|
||||
doLoadingFinished: function() {
|
||||
this._super.apply(this, arguments);
|
||||
if(this.mode == 'ascii' || this.ckeditor != null) return;
|
||||
|
||||
var self = this;
|
||||
if (!this.options.imageUpload)
|
||||
{
|
||||
delete self.options.config.imageUploadUrl;
|
||||
}
|
||||
else if (this.options.imageUpload[0] !== '/' && this.options.imageUpload.substr(0, 4) != 'http')
|
||||
{
|
||||
self.options.config.imageUploadUrl = egw.ajaxUrl("EGroupware\\Api\\Etemplate\\Widget\\Vfs::ajax_htmlarea_upload")+
|
||||
'&request_id='+self.getInstanceManager().etemplate_exec_id+'&widget_id='+this.options.imageUpload;
|
||||
self.options.config.imageUploadUrl = self.options.config.imageUploadUrl.substr(egw.webserverUrl.length+1);
|
||||
}
|
||||
else
|
||||
{
|
||||
self.options.config.imageUploadUrl = this.options.imageUpload.substr(egw.webserverUrl.length+1);
|
||||
}
|
||||
try
|
||||
{
|
||||
this.ckeditor = CKEDITOR.replace(this.dom_id,jQuery.extend({},this.options.config,this.options));
|
||||
this.ckeditor.setData(self.value);
|
||||
delete self.value;
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
if(CKEDITOR.instances[this.dom_id])
|
||||
{
|
||||
CKEDITOR.instances[this.dom_id].destroy();
|
||||
}
|
||||
if(this.htmlNode.ckeditor)
|
||||
{
|
||||
this.ckeditor = CKEDITOR.replace(this.dom_id,this.options.config);
|
||||
this.ckeditor.setData(self.value);
|
||||
delete self.value;
|
||||
}
|
||||
}
|
||||
|
||||
if(this.ckeditor && this.options.config.preference_style)
|
||||
{
|
||||
var editor = this.ckeditor;
|
||||
this.ckeditor.on('instanceReady', function(e) {
|
||||
|
||||
// Add in user font preferences
|
||||
if (self.options.config.preference_style && !e.editor.getData())
|
||||
{
|
||||
e.editor.document.getBody().setHtml(self.options.config.preference_style);
|
||||
delete self.options.config.preference_style;
|
||||
}
|
||||
});
|
||||
|
||||
// Drag & drop of images inline won't work, because of database
|
||||
// field sizes. For some reason FF ignored just changing the cursor
|
||||
// when dragging, so we replace dropped images with error icon.
|
||||
var replaceImgText = function(html) {
|
||||
var ret = html.replace( /<img[^>]*src="(data:.*;base64,.*?)"[^>]*>/gi, function( img, src ){
|
||||
return '';
|
||||
});
|
||||
return ret;
|
||||
};
|
||||
|
||||
var chkImg = function(e) {
|
||||
// don't execute code if the editor is readOnly
|
||||
if (editor.readOnly)
|
||||
return;
|
||||
|
||||
// allow data-URL, returning false to stop regular upload
|
||||
if (!self.options.imageUpload)
|
||||
{
|
||||
// Remove the image from the text
|
||||
setTimeout( function() {
|
||||
editor.document.$.body.innerHTML = replaceImgText(editor.document.$.body.innerHTML);
|
||||
},200);
|
||||
}
|
||||
|
||||
// Supported file types for dropping on CKEditor imageUpload plugin
|
||||
var supportedTypesByCKEditor = /image\/(jpeg|png|gif)/;
|
||||
|
||||
// Try to pass the image into the first et2_file that will accept it
|
||||
if(e.data.$.dataTransfer && !CKEDITOR.fileTools.isTypeSupported(e.data.$.dataTransfer.files[0],supportedTypesByCKEditor))
|
||||
{
|
||||
self.getRoot().iterateOver(function(widget) {
|
||||
if(widget.options.drop_target)
|
||||
{
|
||||
widget.set_value(e.data.$.dataTransfer.files,e.data.$);
|
||||
return;
|
||||
}
|
||||
},e.data.$,et2_file);
|
||||
}
|
||||
};
|
||||
|
||||
editor.on( 'contentDom', function() {
|
||||
editor.document.on('drop', chkImg);
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
try
|
||||
{
|
||||
//this.htmlNode.ckeditorGet().destroy(true);
|
||||
if (this.ckeditor) this.ckeditor.destroy(true);
|
||||
this.ckeditor = null;
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
this.egw().debug("warn","Removing CKEDITOR: " + e.message, this,e);
|
||||
// Finish it
|
||||
delete CKEDITOR.instances[this.dom_id];
|
||||
}
|
||||
this.htmlNode.remove();
|
||||
this.htmlNode = null;
|
||||
this._super.apply(this, arguments);
|
||||
},
|
||||
set_value: function(_value) {
|
||||
this._oldValue = _value;
|
||||
|
||||
try {
|
||||
//this.htmlNode.ckeditorGet().setData(_value);
|
||||
var ckeditor = CKEDITOR.instances[this.dom_id];
|
||||
if (ckeditor)
|
||||
{
|
||||
ckeditor.setData(_value);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.htmlNode.val(_value);
|
||||
this.value = _value;
|
||||
}
|
||||
} catch (e) {
|
||||
// CK editor not ready - callback will do it
|
||||
this.value = _value;
|
||||
}
|
||||
},
|
||||
|
||||
getValue: function() {
|
||||
try
|
||||
{
|
||||
//return this.htmlNode.ckeditorGet().getData();
|
||||
var ckeditor = CKEDITOR.instances[this.dom_id];
|
||||
return ckeditor ? ckeditor.getData() : this.htmlNode.val();
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
// CK Error
|
||||
this.egw().debug("error",e);
|
||||
return null;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Resize htmlNode tag according to window size
|
||||
* @param {type} _height excess height which comes from window resize
|
||||
*/
|
||||
resize: function (_height)
|
||||
{
|
||||
if (_height && this.options.resize_ratio !== '0')
|
||||
{
|
||||
// apply the ratio
|
||||
_height = (this.options.resize_ratio != '')? _height * this.options.resize_ratio: _height;
|
||||
if (_height != 0)
|
||||
{
|
||||
if (this.ckeditor) // CKEDITOR HTML
|
||||
{
|
||||
var h = 0;
|
||||
if (typeof this.ckeditor.container !='undefined' && this.ckeditor.container.$.clientHeight > 0)
|
||||
{
|
||||
h = (this.ckeditor.container.$.clientHeight + _height) > 0 ?
|
||||
this.ckeditor.container.$.clientHeight + _height: this.ckeditor.config.height;
|
||||
}
|
||||
else if (this.ckeditor.ui.space('contents'))
|
||||
{
|
||||
h = parseInt(this.ckeditor.ui.space('contents').getStyle('height')) + _height;
|
||||
}
|
||||
else // fallback height size
|
||||
{
|
||||
h = this.ckeditor.config.height + _height;
|
||||
}
|
||||
|
||||
this.ckeditor.resize('',h);
|
||||
}
|
||||
else // No CKEDITOR
|
||||
{
|
||||
this.htmlNode.height(this.htmlNode.height() + _height);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});}).call(this);
|
||||
et2_register_widget(et2_ckeditor, ["ckeditor"]);
|
||||
|
||||
jQuery.extend(et2_ckeditor,
|
||||
{
|
||||
/**
|
||||
* Build VfsSelect widget for CKEditor Browse Server button
|
||||
* @param {array} _data
|
||||
*/
|
||||
buildVfsSelectForCKEditor: function(_data)
|
||||
{
|
||||
if (!_data) return;
|
||||
|
||||
// Don't rely only on app_name to fetch et2 object as app_name may not
|
||||
// always represent current app of the window, e.g.: mail admin account.
|
||||
// Try to fetch et2 from its template name.
|
||||
var etemplate = jQuery('form').data('etemplate');
|
||||
var et2 = {};
|
||||
if (etemplate && etemplate.name && !app[egw(window).app_name()])
|
||||
{
|
||||
et2 = etemplate2.getByTemplate(etemplate.name)[0]['widgetContainer'];
|
||||
}
|
||||
else
|
||||
{
|
||||
et2 = app[egw(window).app_name()].et2;
|
||||
}
|
||||
|
||||
var vfsSelect = et2_createWidget('vfs-select', {
|
||||
id:'upload',
|
||||
mode: 'open',
|
||||
name: '',
|
||||
button_caption:"Link",
|
||||
button_label:"Link",
|
||||
dialog_title: "Link file",
|
||||
method: "ckeditor"
|
||||
}, et2);
|
||||
jQuery(vfsSelect.getDOMNode()).on('change', function (){
|
||||
CKEDITOR.tools.callFunction(_data.funcNum, vfsSelect.get_value());
|
||||
});
|
||||
|
||||
// start the file selector dialog
|
||||
vfsSelect.click();
|
||||
}
|
||||
});
|
@ -5,17 +5,14 @@
|
||||
* @package etemplate
|
||||
* @subpackage api
|
||||
* @link http://www.egroupware.org
|
||||
* @author Nathan Gray
|
||||
* @copyright Nathan Gray 2012
|
||||
* @author Hadi Nategh <hn@egroupware.org>
|
||||
* @copyright Hadi Nategh <hn@egroupware.org>
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/*egw:uses
|
||||
jsapi.jsapi; // Needed for egw_seperateJavaScript
|
||||
/vendor/bower-asset/jquery/dist/jquery.js;
|
||||
/vendor/egroupware/ckeditor/ckeditor.js;
|
||||
/vendor/egroupware/ckeditor/ckeditor.config;
|
||||
/vendor/egroupware/ckeditor/ckeditor.adapters/jquery;
|
||||
/api/js/tinymce/tinymce.min.js;
|
||||
et2_core_baseWidget;
|
||||
*/
|
||||
|
||||
@ -24,8 +21,10 @@
|
||||
*/
|
||||
var et2_htmlarea = (function(){ "use strict"; return et2_inputWidget.extend([et2_IResizeable],
|
||||
{
|
||||
modes: ['ascii','simple','extended','advanced'],
|
||||
|
||||
font_size_formats: {
|
||||
pt: "8pt 10pt 12pt 14pt 18pt 24pt 36pt 48pt 72pt",
|
||||
px:"8px 10px 12px 14px 18px 24px 36px 48px 72px"
|
||||
},
|
||||
attributes: {
|
||||
'mode': {
|
||||
'name': 'Mode',
|
||||
@ -43,26 +42,6 @@ var et2_htmlarea = (function(){ "use strict"; return et2_inputWidget.extend([et2
|
||||
'default': et2_no_init,
|
||||
'type': 'string'
|
||||
},
|
||||
'expand_toolbar': {
|
||||
'name': 'Expand Toolbar',
|
||||
'default': true,
|
||||
'type':'boolean',
|
||||
'description': 'Have the toolbar expanded (visible)'
|
||||
},
|
||||
'base_href': { // seems not to be used anymore
|
||||
'name': 'Image base path',
|
||||
'default': et2_no_init,
|
||||
'type': 'string',
|
||||
'description': 'activates the browser for images at the path (relative to the docroot)'
|
||||
},
|
||||
'config': {
|
||||
// internal default configuration
|
||||
'name': 'Internal configuration',
|
||||
'type':'any',
|
||||
'default': et2_no_init,
|
||||
'description': 'Internal configuration - managed by preferences & framework, passed in here',
|
||||
'translate': 'no_lang'
|
||||
},
|
||||
value: {
|
||||
name: "Value",
|
||||
description: "The value of the widget",
|
||||
@ -74,11 +53,21 @@ var et2_htmlarea = (function(){ "use strict"; return et2_inputWidget.extend([et2
|
||||
description: "Url to upload images dragged in or id of link_to widget to it's vfs upload. Can also be just a name for which content array contains a path to upload the picture.",
|
||||
type: "string",
|
||||
default: null
|
||||
},
|
||||
file_picker_callback: {
|
||||
name: "File picker callback",
|
||||
description: "Callback function to get called when file picker is clicked",
|
||||
type: 'js',
|
||||
default: et2_no_init
|
||||
},
|
||||
images_upload_handler: {
|
||||
name: "Images upload handler",
|
||||
description: "Callback function for handling image upload",
|
||||
type: 'js',
|
||||
default: et2_no_init
|
||||
}
|
||||
},
|
||||
|
||||
legacyOptions: ['mode','height','width','expand_toolbar','base_href'],
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
@ -87,185 +76,163 @@ var et2_htmlarea = (function(){ "use strict"; return et2_inputWidget.extend([et2
|
||||
* @memberOf et2_htmlarea
|
||||
*/
|
||||
init: function(_parent, _attrs) {
|
||||
// _super.apply is responsible for the actual setting of the params (some magic)
|
||||
this._super.apply(this, arguments);
|
||||
|
||||
// CK instance
|
||||
this.ckeditor = null;
|
||||
|
||||
// Allow no child widgets
|
||||
this.supportedWidgetClasses = [];
|
||||
this.editor = null; // TinyMce editor instance
|
||||
this.supportedWidgetClasses = []; // Allow no child widgets
|
||||
this.htmlNode = jQuery(document.createElement("textarea"))
|
||||
.css('height', this.options.height)
|
||||
.addClass('et2_textbox_ro');
|
||||
this.setDOMNode(this.htmlNode[0]);
|
||||
},
|
||||
|
||||
transformAttributes: function(_attrs) {
|
||||
|
||||
// Check mode, some apps jammed everything in there
|
||||
if(_attrs['mode'] && jQuery.inArray(_attrs['mode'], this.modes) < 0)
|
||||
{
|
||||
this.egw().debug("warn", "'%s' is an invalid mode for htmlarea '%s'. Valid options:", _attrs['mode'],_attrs['id'], this.modes);
|
||||
var list = _attrs['mode'].split(',');
|
||||
for(var i = 0; i < list.length && i < this.legacyOptions.length; i++)
|
||||
{
|
||||
_attrs[this.legacyOptions[i]] = list[i];
|
||||
}
|
||||
}
|
||||
this._super.apply(this, arguments);
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns {undefined}
|
||||
*/
|
||||
doLoadingFinished: function() {
|
||||
this._super.apply(this, arguments);
|
||||
if(this.mode == 'ascii' || this.ckeditor != null) return;
|
||||
if(this.mode == 'ascii' || this.editor != null) return;
|
||||
|
||||
var self = this;
|
||||
if (!this.options.imageUpload)
|
||||
// default settings for initialization
|
||||
var settings = {
|
||||
target: this.htmlNode[0],
|
||||
body_id: this.dom + '_htmlarea',
|
||||
menubar: false,
|
||||
branding: false,
|
||||
resize: false,
|
||||
height: this.options.height,
|
||||
width: this.options.width,
|
||||
min_height: 100,
|
||||
language: egw.preference('lang', 'common'),
|
||||
paste_data_images: true,
|
||||
browser_spellcheck: true,
|
||||
images_upload_url: this.options.imageUpload,
|
||||
file_picker_callback: jQuery.proxy(this._file_picker_callback, this),
|
||||
images_upload_handler: jQuery.proxy(this._images_upload_handler, this),
|
||||
init_instance_callback : jQuery.proxy(this._instanceIsReady, this),
|
||||
plugins: [
|
||||
"print preview fullpage searchreplace autolink directionality "+
|
||||
"visualblocks visualchars fullscreen image link media template "+
|
||||
"codesample table charmap hr pagebreak nonbreaking anchor toc "+
|
||||
"insertdatetime advlist lists textcolor wordcount imagetools "+
|
||||
"colorpicker textpattern help paste"
|
||||
],
|
||||
toolbar: "formatselect | fontselect fontsizeselect | bold italic strikethrough forecolor backcolor | "+
|
||||
"link | alignleft aligncenter alignright alignjustify | numlist "+
|
||||
"bullist outdent indent | removeformat | image",
|
||||
block_formats: "Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;"+
|
||||
"Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre",
|
||||
font_formats: "Andale Mono=andale mono,times;Arial=arial,helvetica,"+
|
||||
"sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book "+
|
||||
"antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;"+
|
||||
"Courier New=courier new,courier;Georgia=georgia,palatino;"+
|
||||
"Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;"+
|
||||
"Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,"+
|
||||
"monaco;Times New Roman=times new roman,times;Trebuchet "+
|
||||
"MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;"+
|
||||
"Wingdings=wingdings,zapf dingbats",
|
||||
fontsize_formats: '8pt 10pt 12pt 14pt 18pt 24pt 36pt',
|
||||
};
|
||||
|
||||
// extend default settings with configured options and preferences
|
||||
jQuery.extend(settings, this._extendedSettings());
|
||||
this.tinymce = tinymce.init(settings);
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {type} _callback
|
||||
* @param {type} _value
|
||||
* @param {type} _meta
|
||||
* @returns {unresolved}
|
||||
*/
|
||||
_file_picker_callback: function(_callback, _value, _meta) {
|
||||
if (typeof this.file_picker_callback == 'function') return this.file_picker_callback.call(arguments, this);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {type} _blobInfo image blob info
|
||||
* @param {type} _success success callback
|
||||
* @param {type} _failure failure callback
|
||||
* @returns {}
|
||||
*/
|
||||
_images_upload_handler: function(_blobInfo, _success, _failure) {
|
||||
if (typeof this.images_upload_handler == 'function') return this.images_upload_handler.call(arguments, this);
|
||||
},
|
||||
|
||||
/**
|
||||
* Callback when instance is ready
|
||||
*
|
||||
* @param {type} _editor
|
||||
*/
|
||||
_instanceIsReady: function(_editor) {
|
||||
console.log("Editor: " + _editor.id + " is now initialized.");
|
||||
this.editor = _editor;
|
||||
this.editor.execCommand('fontName', true, egw.preference('rte_font', 'common'));
|
||||
this.editor.execCommand('fontSize', true, egw.preference('rte_font_size', 'common')
|
||||
+ egw.preference('rte_font_unit', 'common'));
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns {et2_widget_htmlareaet2_htmlarea.et2_widget_htmlareaAnonym$1._extendedSettings.settings}
|
||||
*/
|
||||
_extendedSettings: function () {
|
||||
|
||||
var settings = {
|
||||
fontsize_formats: this.font_size_formats[egw.preference('rte_font_unit', 'common')],
|
||||
};
|
||||
|
||||
var mode = this.mode || egw.preference('rte_features', 'common');
|
||||
switch (mode)
|
||||
{
|
||||
delete self.options.config.imageUploadUrl;
|
||||
case 'simple':
|
||||
settings.toolbar = "formatselect | fontselect fontsizeselect | bold italic strikethrough forecolor backcolor | "+
|
||||
"alignleft aligncenter alignright alignjustify | numlist "+
|
||||
"bullist outdent indent"
|
||||
break;
|
||||
case 'extended':
|
||||
settings.toolbar = "formatselect | fontselect fontsizeselect | bold italic strikethrough forecolor backcolor | "+
|
||||
"link | alignleft aligncenter alignright alignjustify | numlist "+
|
||||
"bullist outdent indent | removeformat | image"
|
||||
break;
|
||||
case 'advanced':
|
||||
settings.toolbar = "formatselect | fontselect fontsizeselect | bold italic strikethrough forecolor backcolor | "+
|
||||
"link | alignleft aligncenter alignright alignjustify | numlist "+
|
||||
"bullist outdent indent | removeformat | image"
|
||||
break;
|
||||
}
|
||||
else if (this.options.imageUpload[0] !== '/' && this.options.imageUpload.substr(0, 4) != 'http')
|
||||
{
|
||||
self.options.config.imageUploadUrl = egw.ajaxUrl("EGroupware\\Api\\Etemplate\\Widget\\Vfs::ajax_htmlarea_upload")+
|
||||
'&request_id='+self.getInstanceManager().etemplate_exec_id+'&widget_id='+this.options.imageUpload;
|
||||
self.options.config.imageUploadUrl = self.options.config.imageUploadUrl.substr(egw.webserverUrl.length+1);
|
||||
}
|
||||
else
|
||||
{
|
||||
self.options.config.imageUploadUrl = this.options.imageUpload.substr(egw.webserverUrl.length+1);
|
||||
}
|
||||
try
|
||||
{
|
||||
this.ckeditor = CKEDITOR.replace(this.dom_id,jQuery.extend({},this.options.config,this.options));
|
||||
this.ckeditor.setData(self.value);
|
||||
delete self.value;
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
if(CKEDITOR.instances[this.dom_id])
|
||||
{
|
||||
CKEDITOR.instances[this.dom_id].destroy();
|
||||
}
|
||||
if(this.htmlNode.ckeditor)
|
||||
{
|
||||
this.ckeditor = CKEDITOR.replace(this.dom_id,this.options.config);
|
||||
this.ckeditor.setData(self.value);
|
||||
delete self.value;
|
||||
}
|
||||
}
|
||||
|
||||
if(this.ckeditor && this.options.config.preference_style)
|
||||
{
|
||||
var editor = this.ckeditor;
|
||||
this.ckeditor.on('instanceReady', function(e) {
|
||||
|
||||
// Add in user font preferences
|
||||
if (self.options.config.preference_style && !e.editor.getData())
|
||||
{
|
||||
e.editor.document.getBody().setHtml(self.options.config.preference_style);
|
||||
delete self.options.config.preference_style;
|
||||
}
|
||||
});
|
||||
|
||||
// Drag & drop of images inline won't work, because of database
|
||||
// field sizes. For some reason FF ignored just changing the cursor
|
||||
// when dragging, so we replace dropped images with error icon.
|
||||
var replaceImgText = function(html) {
|
||||
var ret = html.replace( /<img[^>]*src="(data:.*;base64,.*?)"[^>]*>/gi, function( img, src ){
|
||||
return '';
|
||||
});
|
||||
return ret;
|
||||
};
|
||||
|
||||
var chkImg = function(e) {
|
||||
// don't execute code if the editor is readOnly
|
||||
if (editor.readOnly)
|
||||
return;
|
||||
|
||||
// allow data-URL, returning false to stop regular upload
|
||||
if (!self.options.imageUpload)
|
||||
{
|
||||
// Remove the image from the text
|
||||
setTimeout( function() {
|
||||
editor.document.$.body.innerHTML = replaceImgText(editor.document.$.body.innerHTML);
|
||||
},200);
|
||||
}
|
||||
|
||||
// Supported file types for dropping on CKEditor imageUpload plugin
|
||||
var supportedTypesByCKEditor = /image\/(jpeg|png|gif)/;
|
||||
|
||||
// Try to pass the image into the first et2_file that will accept it
|
||||
if(e.data.$.dataTransfer && !CKEDITOR.fileTools.isTypeSupported(e.data.$.dataTransfer.files[0],supportedTypesByCKEditor))
|
||||
{
|
||||
self.getRoot().iterateOver(function(widget) {
|
||||
if(widget.options.drop_target)
|
||||
{
|
||||
widget.set_value(e.data.$.dataTransfer.files,e.data.$);
|
||||
return;
|
||||
}
|
||||
},e.data.$,et2_file);
|
||||
}
|
||||
};
|
||||
|
||||
editor.on( 'contentDom', function() {
|
||||
editor.document.on('drop', chkImg);
|
||||
});
|
||||
}
|
||||
|
||||
return settings;
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
try
|
||||
if (this.editor)
|
||||
{
|
||||
//this.htmlNode.ckeditorGet().destroy(true);
|
||||
if (this.ckeditor) this.ckeditor.destroy(true);
|
||||
this.ckeditor = null;
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
this.egw().debug("warn","Removing CKEDITOR: " + e.message, this,e);
|
||||
// Finish it
|
||||
delete CKEDITOR.instances[this.dom_id];
|
||||
this.editor.destroy();
|
||||
}
|
||||
this.editor = null;
|
||||
this.tinymce = null;
|
||||
this.htmlNode.remove();
|
||||
this.htmlNode = null;
|
||||
this._super.apply(this, arguments);
|
||||
},
|
||||
set_value: function(_value) {
|
||||
this._oldValue = _value;
|
||||
|
||||
try {
|
||||
//this.htmlNode.ckeditorGet().setData(_value);
|
||||
var ckeditor = CKEDITOR.instances[this.dom_id];
|
||||
if (ckeditor)
|
||||
{
|
||||
ckeditor.setData(_value);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.htmlNode.val(_value);
|
||||
this.value = _value;
|
||||
}
|
||||
} catch (e) {
|
||||
// CK editor not ready - callback will do it
|
||||
if (this.editor)
|
||||
{
|
||||
this.editor.setContent(_value);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.htmlNode.val(_value);
|
||||
this.value = _value;
|
||||
}
|
||||
},
|
||||
|
||||
getValue: function() {
|
||||
try
|
||||
{
|
||||
//return this.htmlNode.ckeditorGet().getData();
|
||||
var ckeditor = CKEDITOR.instances[this.dom_id];
|
||||
return ckeditor ? ckeditor.getData() : this.htmlNode.val();
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
// CK Error
|
||||
this.egw().debug("error",e);
|
||||
return null;
|
||||
}
|
||||
return this.editor ? this.editor.getContent() : this.htmlNode.val();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -280,26 +247,23 @@ var et2_htmlarea = (function(){ "use strict"; return et2_inputWidget.extend([et2
|
||||
_height = (this.options.resize_ratio != '')? _height * this.options.resize_ratio: _height;
|
||||
if (_height != 0)
|
||||
{
|
||||
if (this.ckeditor) // CKEDITOR HTML
|
||||
if (this.editor) // TinyMCE HTML
|
||||
{
|
||||
var h = 0;
|
||||
if (typeof this.ckeditor.container !='undefined' && this.ckeditor.container.$.clientHeight > 0)
|
||||
if (typeof this.editor.iframeElement !='undefined' && this.editor.editorContainer.clientHeight > 0)
|
||||
{
|
||||
h = (this.ckeditor.container.$.clientHeight + _height) > 0 ?
|
||||
this.ckeditor.container.$.clientHeight + _height: this.ckeditor.config.height;
|
||||
}
|
||||
else if (this.ckeditor.ui.space('contents'))
|
||||
{
|
||||
h = parseInt(this.ckeditor.ui.space('contents').getStyle('height')) + _height;
|
||||
h = (this.editor.editorContainer.clientHeight + _height) > 0 ?
|
||||
(this.editor.editorContainer.clientHeight) + _height: this.editor.settings.min_height;
|
||||
}
|
||||
else // fallback height size
|
||||
{
|
||||
h = this.ckeditor.config.height + _height;
|
||||
h = this.editor.settings.min_height + _height;
|
||||
}
|
||||
|
||||
this.ckeditor.resize('',h);
|
||||
jQuery(this.editor.editorContainer).height(h);
|
||||
jQuery(this.editor.iframeElement).height(h - (this.editor.editorContainer.getElementsByClassName('tox-toolbar')[0].clientHeight +
|
||||
this.editor.editorContainer.getElementsByClassName('tox-statusbar')[0].clientHeight));
|
||||
}
|
||||
else // No CKEDITOR
|
||||
else // No TinyMCE
|
||||
{
|
||||
this.htmlNode.height(this.htmlNode.height() + _height);
|
||||
}
|
||||
@ -307,46 +271,4 @@ var et2_htmlarea = (function(){ "use strict"; return et2_inputWidget.extend([et2
|
||||
}
|
||||
}
|
||||
});}).call(this);
|
||||
et2_register_widget(et2_htmlarea, ["htmlarea"]);
|
||||
|
||||
jQuery.extend(et2_htmlarea,
|
||||
{
|
||||
/**
|
||||
* Build VfsSelect widget for CKEditor Browse Server button
|
||||
* @param {array} _data
|
||||
*/
|
||||
buildVfsSelectForCKEditor: function(_data)
|
||||
{
|
||||
if (!_data) return;
|
||||
|
||||
// Don't rely only on app_name to fetch et2 object as app_name may not
|
||||
// always represent current app of the window, e.g.: mail admin account.
|
||||
// Try to fetch et2 from its template name.
|
||||
var etemplate = jQuery('form').data('etemplate');
|
||||
var et2 = {};
|
||||
if (etemplate && etemplate.name && !app[egw(window).app_name()])
|
||||
{
|
||||
et2 = etemplate2.getByTemplate(etemplate.name)[0]['widgetContainer'];
|
||||
}
|
||||
else
|
||||
{
|
||||
et2 = app[egw(window).app_name()].et2;
|
||||
}
|
||||
|
||||
var vfsSelect = et2_createWidget('vfs-select', {
|
||||
id:'upload',
|
||||
mode: 'open',
|
||||
name: '',
|
||||
button_caption:"Link",
|
||||
button_label:"Link",
|
||||
dialog_title: "Link file",
|
||||
method: "ckeditor"
|
||||
}, et2);
|
||||
jQuery(vfsSelect.getDOMNode()).on('change', function (){
|
||||
CKEDITOR.tools.callFunction(_data.funcNum, vfsSelect.get_value());
|
||||
});
|
||||
|
||||
// start the file selector dialog
|
||||
vfsSelect.click();
|
||||
}
|
||||
});
|
||||
et2_register_widget(et2_htmlarea, ["htmlarea"]);
|
@ -36,6 +36,7 @@
|
||||
et2_widget_favorites;
|
||||
et2_widget_html;
|
||||
et2_widget_htmlarea;
|
||||
et2_widget_ckeditor;
|
||||
et2_widget_tabs;
|
||||
et2_widget_taglist;
|
||||
et2_widget_timestamper;
|
||||
|
1
api/js/tinymce/jquery.tinymce.min.js
vendored
Normal file
1
api/js/tinymce/jquery.tinymce.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){var f,c,u,p,d,s=[];d="undefined"!=typeof global?global:window,p=d.jQuery;var v=function(){return d.tinymce};p.fn.tinymce=function(o){var e,t,i,l=this,r="";if(!l.length)return l;if(!o)return v()?v().get(l[0].id):null;l.css("visibility","hidden");var n=function(){var a=[],c=0;u||(m(),u=!0),l.each(function(e,t){var n,i=t.id,r=o.oninit;i||(t.id=i=v().DOM.uniqueId()),v().get(i)||(n=v().createEditor(i,o),a.push(n),n.on("init",function(){var e,t=r;l.css("visibility",""),r&&++c==a.length&&("string"==typeof t&&(e=-1===t.indexOf(".")?null:v().resolve(t.replace(/\.\w+$/,"")),t=v().resolve(t)),t.apply(e||v(),a))}))}),p.each(a,function(e,t){t.render()})};if(d.tinymce||c||!(e=o.script_url))1===c?s.push(n):n();else{c=1,t=e.substring(0,e.lastIndexOf("/")),-1!=e.indexOf(".min")&&(r=".min"),d.tinymce=d.tinyMCEPreInit||{base:t,suffix:r},-1!=e.indexOf("gzip")&&(i=o.language||"en",e=e+(/\?/.test(e)?"&":"?")+"js=true&core=true&suffix="+escape(r)+"&themes="+escape(o.theme||"modern")+"&plugins="+escape(o.plugins||"")+"&languages="+(i||""),d.tinyMCE_GZ||(d.tinyMCE_GZ={start:function(){var n=function(e){v().ScriptLoader.markDone(v().baseURI.toAbsolute(e))};n("langs/"+i+".js"),n("themes/"+o.theme+"/theme"+r+".js"),n("themes/"+o.theme+"/langs/"+i+".js"),p.each(o.plugins.split(","),function(e,t){t&&(n("plugins/"+t+"/plugin"+r+".js"),n("plugins/"+t+"/langs/"+i+".js"))})},end:function(){}}));var a=document.createElement("script");a.type="text/javascript",a.onload=a.onreadystatechange=function(e){e=e||window.event,2===c||"load"!=e.type&&!/complete|loaded/.test(a.readyState)||(v().dom.Event.domLoaded=1,c=2,o.script_loaded&&o.script_loaded(),n(),p.each(s,function(e,t){t()}))},a.src=e,document.body.appendChild(a)}return l},p.extend(p.expr[":"],{tinymce:function(e){var t;return!!(e.id&&"tinymce"in d&&(t=v().get(e.id))&&t.editorManager===v())}});var m=function(){var r=function(e){"remove"===e&&this.each(function(e,t){var n=l(t);n&&n.remove()}),this.find("span.mceEditor,div.mceEditor").each(function(e,t){var n=v().get(t.id.replace(/_parent$/,""));n&&n.remove()})},o=function(i){var e,t=this;if(null!=i)r.call(t),t.each(function(e,t){var n;(n=v().get(t.id))&&n.setContent(i)});else if(0<t.length&&(e=v().get(t[0].id)))return e.getContent()},l=function(e){var t=null;return e&&e.id&&d.tinymce&&(t=v().get(e.id)),t},u=function(e){return!!(e&&e.length&&d.tinymce&&e.is(":tinymce"))},s={};p.each(["text","html","val"],function(e,t){var a=s[t]=p.fn[t],c="text"===t;p.fn[t]=function(e){var t=this;if(!u(t))return a.apply(t,arguments);if(e!==f)return o.call(t.filter(":tinymce"),e),a.apply(t.not(":tinymce"),arguments),t;var i="",r=arguments;return(c?t:t.eq(0)).each(function(e,t){var n=l(t);i+=n?c?n.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):n.getContent({save:!0}):a.apply(p(t),r)}),i}}),p.each(["append","prepend"],function(e,t){var n=s[t]=p.fn[t],r="prepend"===t;p.fn[t]=function(i){var e=this;return u(e)?i!==f?("string"==typeof i&&e.filter(":tinymce").each(function(e,t){var n=l(t);n&&n.setContent(r?i+n.getContent():n.getContent()+i)}),n.apply(e.not(":tinymce"),arguments),e):void 0:n.apply(e,arguments)}}),p.each(["remove","replaceWith","replaceAll","empty"],function(e,t){var n=s[t]=p.fn[t];p.fn[t]=function(){return r.call(this,t),n.apply(this,arguments)}}),s.attr=p.fn.attr,p.fn.attr=function(e,t){var n=this,i=arguments;if(!e||"value"!==e||!u(n))return s.attr.apply(n,i);if(t!==f)return o.call(n.filter(":tinymce"),t),s.attr.apply(n.not(":tinymce"),i),n;var r=n[0],a=l(r);return a?a.getContent({save:!0}):s.attr.apply(p(r),i)}}}();
|
3
api/js/tinymce/langs/readme.md
Normal file
3
api/js/tinymce/langs/readme.md
Normal file
@ -0,0 +1,3 @@
|
||||
This is where language files should be placed.
|
||||
|
||||
Please DO NOT translate these directly use this service: https://www.transifex.com/projects/p/tinymce/
|
504
api/js/tinymce/license.txt
Normal file
504
api/js/tinymce/license.txt
Normal file
@ -0,0 +1,504 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
1
api/js/tinymce/plugins/advlist/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/advlist/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";var n,t,e,r,o=tinymce.util.Tools.resolve("tinymce.PluginManager"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),O=function(n,t,e){var r="UL"===t?"InsertUnorderedList":"InsertOrderedList";n.execCommand(r,!1,!1===e?null:{"list-style-type":e})},u=function(e){e.addCommand("ApplyUnorderedListStyle",function(n,t){O(e,"UL",t["list-style-type"])}),e.addCommand("ApplyOrderedListStyle",function(n,t){O(e,"OL",t["list-style-type"])})},i=function(n){var t=n.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");return t?t.split(/[ ,]/):[]},l=function(n){var t=n.getParam("advlist_bullet_styles","default,circle,square");return t?t.split(/[ ,]/):[]},c=function(n){return function(){return n}},s=c(!1),f=c(!0),a=s,d=f,p=function(){return g},g=(r={fold:function(n,t){return n()},is:a,isSome:a,isNone:d,getOr:e=function(n){return n},getOrThunk:t=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:e,orThunk:t,map:p,ap:p,each:function(){},bind:p,flatten:p,exists:a,forall:d,filter:p,equals:n=function(n){return n.isNone()},equals_:n,toArray:function(){return[]},toString:c("none()")},Object.freeze&&Object.freeze(r),r),m=function(e){var n=function(){return e},t=function(){return o},r=function(n){return n(e)},o={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:d,isNone:a,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return m(n(e))},ap:function(n){return n.fold(p,function(n){return m(n(e))})},each:function(n){n(e)},bind:r,flatten:n,exists:r,forall:r,filter:function(n){return n(e)?o:g},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(a,function(n){return t(e,n)})},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return o},y=function(n){return null===n||n===undefined?g:m(n)},h=function(n){return n&&/^(TH|TD)$/.test(n.nodeName)},L=function(r){return function(n){return n&&/^(OL|UL|DL)$/.test(n.nodeName)&&(e=n,(t=r).$.contains(t.getBody(),e));var t,e}},b=function(n){var t=n.dom.getParent(n.selection.getNode(),"ol,ul"),e=n.dom.getStyle(t,"listStyleType");return y(e)},S=function(n,t,e){var r=function(n,t){for(var e=0;e<n.length;e++)if(t(n[e]))return e;return-1}(t.parents,h),o=-1!==r?t.parents.slice(0,r):t.parents,u=v.grep(o,L(n));return 0<u.length&&u[0].nodeName===e},T=function(n,t,e,r,o,u){var i,l,c,s,f,a,d,p,g,m,y;0<u.length?(d=t,p=e,g=r,m=o,y=u,(a=n).ui.registry.addSplitButton(d,{type:"splitbutton",active:!1,tooltip:p,icon:"OL"===m?"ordered-list":"unordered-list",presets:"toolbar",columns:3,fetch:function(n){n(v.map(y,function(n){var t;return{type:"choiceitem",value:"default"===n?"":n,icon:"list-"+("OL"===m?"num":"bull")+"-"+("disc"===n||"decimal"===n?"default":n),text:(t=n,t.replace(/\-/g," ").replace(/\b\w/g,function(n){return n.toUpperCase()}))}}))},onAction:function(){return a.execCommand(g)},onItemAction:function(n,t){O(a,m,t)},select:function(t){return b(a).map(function(n){return t===n}).getOr(!1)},onSetup:function(t){var n=function(n){t.setActive(S(a,n,m))};return a.on("nodeChange",n),function(){return a.off("nodeChange",n)}}})):(l=t,c=e,s=r,f=o,(i=n).ui.registry.addToggleButton(l,{active:!1,tooltip:c,icon:"OL"===f?"ordered-list":"unordered-list",onSetup:function(t){var n=function(n){t.setActive(S(i,n,f))};return i.on("nodeChange",n),function(){return i.off("nodeChange",n)}},onAction:function(){return i.execCommand(s)}}))},A=function(n){T(n,"numlist","Numbered list","InsertOrderedList","OL",i(n)),T(n,"bullist","Bullet list","InsertUnorderedList","UL",l(n))};o.add("advlist",function(n){var t,e,r;e="lists",r=(t=n).settings.plugins?t.settings.plugins:"",-1!==v.inArray(r.split(/[ ,]/),e)&&(A(n),u(n))}),function C(){}}();
|
1
api/js/tinymce/plugins/anchor/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/anchor/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=function(t){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)},n=function(t){var n=t.selection.getNode();return"A"===n.tagName&&""===t.dom.getAttrib(n,"href")?n.id||n.name:""},a=function(t,n){var e=t.selection.getNode();"A"===e.tagName&&""===t.dom.getAttrib(e,"href")?(e.removeAttribute("name"),e.id=n,t.undoManager.add()):(t.focus(),t.selection.collapse(!0),t.execCommand("mceInsertContent",!1,t.dom.createHTML("a",{id:n})))},e=function(o){var t=n(o);o.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"Id"}]},buttons:[{type:"submit",name:"ok",text:"Ok",primary:!0},{type:"cancel",name:"cancel",text:"Cancel"}],initialData:{id:t},onSubmit:function(t){var n,e;n=o,e=t.getData().id,(r(e)?(a(n,e),0):(n.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),1))||t.close()}})},o=function(t){t.addCommand("mceAnchor",function(){e(t)})},i=function(o){return function(t){for(var n=0;n<t.length;n++)(e=t[n]).attr("href")||!e.attr("id")&&!e.attr("name")||e.firstChild||t[n].attr("contenteditable",o);var e}},c=function(t){t.on("PreInit",function(){t.parser.addNodeFilter("a",i("false")),t.serializer.addNodeFilter("a",i(null))})},d=function(n){n.ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:function(){return n.execCommand("mceAnchor")},onSetup:function(t){return n.selection.selectorChangedWithUnbind("a:not([href])",t.setActive).unbind}}),n.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor",onAction:function(){return n.execCommand("mceAnchor")}})};t.add("anchor",function(t){c(t),o(t),d(t)}),function u(){}}();
|
1
api/js/tinymce/plugins/autolink/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/autolink/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=tinymce.util.Tools.resolve("tinymce.Env"),m=function(e){return e.getParam("autolink_pattern",/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i)},y=function(e){return e.getParam("default_link_target","")},o=function(e,t){if(t<0&&(t=0),3===e.nodeType){var n=e.data.length;n<t&&(t=n)}return t},k=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setStart(t,o(t,n)):e.setStartBefore(t)},p=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setEnd(t,o(t,n)):e.setEndAfter(t)},r=function(e,t,n){var i,o,r,a,f,s,d,l,c,u,g=m(e),h=y(e);if("A"!==e.selection.getNode().tagName){if((i=e.selection.getRng(!0).cloneRange()).startOffset<5){if(!(l=i.endContainer.previousSibling)){if(!i.endContainer.firstChild||!i.endContainer.firstChild.nextSibling)return;l=i.endContainer.firstChild.nextSibling}if(c=l.length,k(i,l,c),p(i,l,c),i.endOffset<5)return;o=i.endOffset,a=l}else{if(3!==(a=i.endContainer).nodeType&&a.firstChild){for(;3!==a.nodeType&&a.firstChild;)a=a.firstChild;3===a.nodeType&&(k(i,a,0),p(i,a,a.nodeValue.length))}o=1===i.endOffset?2:i.endOffset-1-t}for(r=o;k(i,a,2<=o?o-2:0),p(i,a,1<=o?o-1:0),o-=1," "!==(u=i.toString())&&""!==u&&160!==u.charCodeAt(0)&&0<=o-2&&u!==n;);var C;(C=i.toString())===n||" "===C||160===C.charCodeAt(0)?(k(i,a,o),p(i,a,r),o+=1):(0===i.startOffset?k(i,a,0):k(i,a,o),p(i,a,r)),"."===(s=i.toString()).charAt(s.length-1)&&p(i,a,r-1),(d=(s=i.toString().trim()).match(g))&&("www."===d[1]?d[1]="http://www.":/@$/.test(d[1])&&!/^mailto:/.test(d[1])&&(d[1]="mailto:"+d[1]),f=e.selection.getBookmark(),e.selection.setRng(i),e.execCommand("createlink",!1,d[1]+d[2]),h&&e.dom.setAttrib(e.selection.getNode(),"target",h),e.selection.moveToBookmark(f),e.nodeChanged())}},t=function(t){var n;t.on("keydown",function(e){13!==e.keyCode||r(t,-1,"")}),i.ie?t.on("focus",function(){if(!n){n=!0;try{t.execCommand("AutoUrlDetect",!1,!0)}catch(e){}}}):(t.on("keypress",function(e){41!==e.keyCode||r(t,-1,"(")}),t.on("keyup",function(e){32!==e.keyCode||r(t,0,"")}))};e.add("autolink",function(e){t(e)}),function n(){}}();
|
1
api/js/tinymce/plugins/autoresize/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/autoresize/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";var i=function(t){var e=t,n=function(){return e};return{get:n,set:function(t){e=t},clone:function(){return i(n())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),h=tinymce.util.Tools.resolve("tinymce.Env"),r=tinymce.util.Tools.resolve("tinymce.util.Delay"),v=function(t){return parseInt(t.getParam("min_height",t.getElement().offsetHeight,"number"),10)},b=function(t){return parseInt(t.getParam("max_height",0,"number"),10)},o=function(t){return t.getParam("autoresize_overflow_padding",1,"number")},a=function(t){return t.getParam("autoresize_bottom_margin",50,"number")},n=function(t){return t.getParam("autoresize_on_init",!0,"boolean")},u=function(t,e,n,i,o){r.setEditorTimeout(t,function(){I(t,e),n--?u(t,e,n,i,o):o&&o()},i)},S=function(t,e){var n=t.getBody();n&&(n.style.overflowY=e?"":"hidden",e||(n.scrollTop=0))},I=function(t,e){var n,i,o,r,a,u,s,l,g,c,f,d=t.dom;if(i=t.getDoc())if((m=t).plugins.fullscreen&&m.plugins.fullscreen.isFullscreen())S(t,!0);else{var m;o=i.body,r=v(t),u=d.getStyle(o,"margin-top",!0),s=d.getStyle(o,"margin-bottom",!0),l=d.getStyle(o,"padding-top",!0),g=d.getStyle(o,"padding-bottom",!0),c=d.getStyle(o,"border-top-width",!0),f=d.getStyle(o,"border-bottom-width",!0),a=o.offsetHeight+parseInt(u,10)+parseInt(s,10)+parseInt(l,10)+parseInt(g,10)+parseInt(c,10)+parseInt(f,10),(isNaN(a)||a<=0)&&(a=h.ie?o.scrollHeight:h.webkit&&0===o.clientHeight?0:o.offsetHeight),a>v(t)&&(r=a);var p=b(t);if(p&&p<a?(r=p,S(t,!0)):S(t,!1),r!==e.get()){n=r-e.get();var y=t.getContainer().scrollHeight-t.contentAreaContainer.scrollHeight;d.setStyle(t.getContainer(),"height",r+y+"px"),e.set(r),h.webkit&&n<0&&I(t,e)}}},s={setup:function(i,e){i.on("init",function(){var t,e,n=i.dom;t=o(i),e=a(i),!1!==t&&n.setStyles(i.getBody(),{paddingLeft:t,paddingRight:t}),!1!==e&&n.setStyles(i.getBody(),{paddingBottom:e})}),i.on("nodechange setcontent keyup FullscreenStateChanged",function(t){I(i,e)}),n(i)&&i.on("init",function(){u(i,e,20,100,function(){u(i,e,5,1e3)})})},resize:I},l=function(t,e){t.addCommand("mceAutoResize",function(){s.resize(t,e)})};t.add("autoresize",function(t){if(!t.inline){var e=i(0);l(t,e),s.setup(t,e)}}),function e(){}}();
|
1
api/js/tinymce/plugins/autosave/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/autosave/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";var n=function(t){var e=t,r=function(){return e};return{get:r,set:function(t){e=t},clone:function(){return n(r())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),a=tinymce.util.Tools.resolve("tinymce.util.Tools"),r=function(t){return t.fire("RestoreDraft")},i=function(t){return t.fire("StoreDraft")},u=function(t){return t.fire("RemoveDraft")},e=function(t,e){return((t=/^(\d+)([ms]?)$/.exec(""+(t||e)))[2]?{s:1e3,m:6e4}[t[2]]:1)*parseInt(t,10)},s=function(t){return t.getParam("autosave_ask_before_unload",!0)},f=function(t){var e=t.getParam("autosave_prefix","tinymce-autosave-{path}{query}{hash}-{id}-");return e=(e=(e=(e=e.replace(/\{path\}/g,document.location.pathname)).replace(/\{query\}/g,document.location.search)).replace(/\{hash\}/g,document.location.hash)).replace(/\{id\}/g,t.id)},c=function(t){return e(t.settings.autosave_interval,"30s")},l=function(t){return e(t.settings.autosave_retention,"20m")},m=function(t,e){var r=t.settings.forced_root_block;return""===(e=a.trim(void 0===e?t.getBody().innerHTML:e))||new RegExp("^<"+r+"[^>]*>((\xa0| |[ \t]|<br[^>]*>)+?|)</"+r+">|<br>$","i").test(e)},v=function(t){var e=parseInt(o.getItem(f(t)+"time"),10)||0;return!((new Date).getTime()-e>l(t)&&(d(t,!1),1))},d=function(t,e){var r=f(t);o.removeItem(r+"draft"),o.removeItem(r+"time"),!1!==e&&u(t)},D=function(t){var e=f(t);!m(t)&&t.isDirty()&&(o.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),o.setItem(e+"time",(new Date).getTime().toString()),i(t))},g=function(t){var e=f(t);v(t)&&(t.setContent(o.getItem(e+"draft"),{format:"raw"}),r(t))},y={isEmpty:m,hasDraft:v,removeDraft:d,storeDraft:D,restoreDraft:g,startStoreDraft:function(t,e){var r=c(t);e.get()||(setInterval(function(){t.removed||D(t)},r),e.set(!0))},restoreLastDraft:function(t){t.undoManager.transact(function(){g(t),d(t)}),t.focus()}},p=function(e,r){return function(){var t=Array.prototype.slice.call(arguments);return e.apply(null,[r].concat(t))}},h=function(t){return{hasDraft:p(y.hasDraft,t),storeDraft:p(y.storeDraft,t),restoreDraft:p(y.restoreDraft,t),removeDraft:p(y.removeDraft,t),isEmpty:p(y.isEmpty,t)}},b=tinymce.util.Tools.resolve("tinymce.EditorManager");b._beforeUnloadHandler=function(){var e;return a.each(b.get(),function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&s(t)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e};var _=function(t){window.onbeforeunload=b._beforeUnloadHandler},I=function(r,t){return function(t){t.setDisabled(!y.hasDraft(r));var e=function(){return t.setDisabled(!y.hasDraft(r))};return r.on("StoreDraft RestoreDraft RemoveDraft",e),function(){return r.off("StoreDraft RestoreDraft RemoveDraft",e)}}},w=function(t,e){y.startStoreDraft(t,e),t.ui.registry.addButton("restoredraft",{type:"button",text:"Restore last draft",icon:"restore-draft",onAction:function(){y.restoreLastDraft(t)},onSetup:I(t)}),t.ui.registry.addMenuItem("restoredraft",{type:"menuitem",text:"Restore last draft",icon:"restore-draft",onAction:function(){y.restoreLastDraft(t)},onSetup:I(t)})};t.add("autosave",function(t){var e=n(!1);return _(t),w(t,e),h(t)}),function R(){}}();
|
1
api/js/tinymce/plugins/bbcode/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/bbcode/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";var o=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.util.Tools"),e=function(e){e=t.trim(e);var o=function(o,t){e=e.replace(o,t)};return o(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]"),o(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]"),o(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]"),o(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]"),o(/<font>(.*?)<\/font>/gi,"$1"),o(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]"),o(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]"),o(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]"),o(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),o(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),o(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),o(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),o(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),o(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),o(/<\/(strong|b)>/gi,"[/b]"),o(/<(strong|b)>/gi,"[b]"),o(/<\/(em|i)>/gi,"[/i]"),o(/<(em|i)>/gi,"[i]"),o(/<\/u>/gi,"[/u]"),o(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]"),o(/<u>/gi,"[u]"),o(/<blockquote[^>]*>/gi,"[quote]"),o(/<\/blockquote>/gi,"[/quote]"),o(/<br \/>/gi,"\n"),o(/<br\/>/gi,"\n"),o(/<br>/gi,"\n"),o(/<p>/gi,""),o(/<\/p>/gi,"\n"),o(/ |\u00a0/gi," "),o(/"/gi,'"'),o(/</gi,"<"),o(/>/gi,">"),o(/&/gi,"&"),e},i=function(e){e=t.trim(e);var o=function(o,t){e=e.replace(o,t)};return o(/\n/gi,"<br />"),o(/\[b\]/gi,"<strong>"),o(/\[\/b\]/gi,"</strong>"),o(/\[i\]/gi,"<em>"),o(/\[\/i\]/gi,"</em>"),o(/\[u\]/gi,"<u>"),o(/\[\/u\]/gi,"</u>"),o(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>'),o(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>'),o(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />'),o(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>'),o(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span> '),o(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span> '),e};o.add("bbcode",function(){return{init:function(o){o.on("beforeSetContent",function(o){o.content=i(o.content)}),o.on("postProcess",function(o){o.set&&(o.content=i(o.content)),o.get&&(o.content=e(o.content))})}}}),function n(){}}();
|
1
api/js/tinymce/plugins/charmap/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/charmap/plugin.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
api/js/tinymce/plugins/code/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/code/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),i=function(t){return t.getParam("code_dialog_width",600)},c=function(t){return t.getParam("code_dialog_height",Math.min(e.DOM.getViewPort().h-200,500))},r=function(t,e){t.focus(),t.undoManager.transact(function(){t.setContent(e)}),t.selection.setCursorLocation(),t.nodeChanged()},u=function(t){return t.getContent({source_view:!0})},n=function(e){var t=i(e),n=c(e),o=u(e);e.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code",multiline:!0,flex:!0,minWidth:t,minHeight:n,spellcheck:!1,style:"direction: ltr; text-align: left"}]},buttons:[{type:"submit",name:"ok",text:"Ok",primary:!0},{type:"cancel",name:"cancel",text:"Cancel"}],initialData:{code:o},onSubmit:function(t){r(e,t.getData().code),t.close()}})},o=function(t){t.addCommand("mceCodeEditor",function(){n(t)})},a=function(t){t.ui.registry.addButton("code",{type:"button",icon:"sourcecode",tooltip:"Source code",onAction:function(){return n(t)}}),t.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:function(){return n(t)}})};t.add("code",function(t){return o(t),a(t),{}}),function d(){}}();
|
138
api/js/tinymce/plugins/codesample/css/prism.css
Normal file
138
api/js/tinymce/plugins/codesample/css/prism.css
Normal file
@ -0,0 +1,138 @@
|
||||
/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript */
|
||||
/**
|
||||
* prism.js default theme for JavaScript, CSS and HTML
|
||||
* Based on dabblet (http://dabblet.com)
|
||||
* @author Lea Verou
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: black;
|
||||
text-shadow: 0 1px white;
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection, code[class*="language-"] ::selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
@media print {
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #f5f2f0;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: slategray;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
color: #905;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #690;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: #a67f59;
|
||||
background: hsla(0, 0%, 100%, .5);
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.keyword {
|
||||
color: #07a;
|
||||
}
|
||||
|
||||
.token.function {
|
||||
color: #DD4A68;
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important,
|
||||
.token.variable {
|
||||
color: #e90;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
1
api/js/tinymce/plugins/codesample/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/codesample/plugin.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
api/js/tinymce/plugins/colorpicker/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/colorpicker/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("colorpicker",function(){console.warn("Color picker plugin is now built in to the core editor, please remove it from your editor configuration")}),function o(){}}();
|
1
api/js/tinymce/plugins/contextmenu/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/contextmenu/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("contextmenu",function(){console.warn("Context menu plugin is now built in to the core editor, please remove it from your editor configuration")}),function n(){}}();
|
1
api/js/tinymce/plugins/directionality/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/directionality/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),n=function(t,n){var e,i=t.dom,o=t.selection.getSelectedBlocks();o.length&&(e=i.getAttrib(o[0],"dir"),c.each(o,function(t){i.getParent(t.parentNode,'*[dir="'+n+'"]',i.getRoot())||i.setAttrib(t,"dir",e!==n?n:null)}),t.nodeChanged())},e=function(t){t.addCommand("mceDirectionLTR",function(){n(t,"ltr")}),t.addCommand("mceDirectionRTL",function(){n(t,"rtl")})},i=function(n){var e=[];return c.each("h1 h2 h3 h4 h5 h6 div p".split(" "),function(t){e.push(t+"[dir="+n+"]")}),e.join(",")},o=function(n){n.ui.registry.addToggleButton("ltr",{tooltip:"Left to right",icon:"ltr",onAction:function(){return n.execCommand("mceDirectionLTR")},onSetup:function(t){return n.selection.selectorChangedWithUnbind(i("ltr"),t.setActive).unbind}}),n.ui.registry.addToggleButton("rtl",{tooltip:"Right to left",icon:"rtl",onAction:function(){return n.execCommand("mceDirectionRTL")},onSetup:function(t){return n.selection.selectorChangedWithUnbind(i("rtl"),t.setActive).unbind}})};t.add("directionality",function(t){e(t),o(t)}),function r(){}}();
|
9015
api/js/tinymce/plugins/emoticons/json/emojis.js
Normal file
9015
api/js/tinymce/plugins/emoticons/json/emojis.js
Normal file
File diff suppressed because it is too large
Load Diff
1
api/js/tinymce/plugins/emoticons/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/emoticons/plugin.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
api/js/tinymce/plugins/fullpage/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/fullpage/plugin.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
api/js/tinymce/plugins/fullscreen/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/fullscreen/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";var i=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return i(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return{isFullscreen:function(){return null!==e.get()}}},t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),g=function(e,t){e.fire("FullscreenStateChanged",{state:t})},m=t.DOM,r=function(e,t){var n,r,o,i,l,c,u=document.body,s=document.documentElement,d=t.get(),a=function(){var e,t,n,i;m.setStyle(o,"height",(n=window,i=document.body,i.offsetWidth&&(e=i.offsetWidth,t=i.offsetHeight),n.innerWidth&&n.innerHeight&&(e=n.innerWidth,t=n.innerHeight),{w:e,h:t}).h-(r.clientHeight-o.clientHeight))},f=function(){m.unbind(window,"resize",a)};if(n=(r=e.getContainer()).style,i=(o=e.getContentAreaContainer().firstChild).style,d)i.width=d.iframeWidth,i.height=d.iframeHeight,d.containerWidth&&(n.width=d.containerWidth),d.containerHeight&&(n.height=d.containerHeight),m.removeClass(u,"tox-fullscreen"),m.removeClass(s,"tox-fullscreen"),m.removeClass(r,"tox-fullscreen"),l=d.scrollPos,window.scrollTo(l.x,l.y),m.unbind(window,"resize",d.resizeHandler),e.off("remove",d.removeHandler),t.set(null),g(e,!1);else{var h={scrollPos:(c=m.getViewPort(),{x:c.x,y:c.y}),containerWidth:n.width,containerHeight:n.height,iframeWidth:i.width,iframeHeight:i.height,resizeHandler:a,removeHandler:f};i.width=i.height="100%",n.width=n.height="",m.addClass(u,"tox-fullscreen"),m.addClass(s,"tox-fullscreen"),m.addClass(r,"tox-fullscreen"),m.bind(window,"resize",a),e.on("remove",f),a(),t.set(h),g(e,!0)}},o=function(e,t){e.addCommand("mceFullScreen",function(){r(e,t)})},l=function(n){return function(t){t.setActive(!1);var e=function(e){return t.setActive(e.state)};return n.on("FullscreenStateChanged",e),function(){return n.off("FullscreenStateChanged",e)}}},c=function(e){e.ui.registry.addToggleMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Shift+F",selectable:!0,onAction:function(){return e.execCommand("mceFullScreen")},onSetup:l(e)}),e.ui.registry.addToggleButton("fullscreen",{tooltip:"Fullscreen",icon:"fullscreen",onAction:function(){return e.execCommand("mceFullScreen")},onSetup:l(e)})};e.add("fullscreen",function(e){var t=i(null);return e.settings.inline||(o(e,t),c(e),e.addShortcut("Ctrl+Shift+F","","mceFullScreen")),n(t)}),function u(){}}();
|
1
api/js/tinymce/plugins/help/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/help/plugin.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
api/js/tinymce/plugins/hr/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/hr/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(n){n.addCommand("InsertHorizontalRule",function(){n.execCommand("mceInsertContent",!1,"<hr />")})},o=function(n){n.ui.registry.addButton("hr",{icon:"horizontal-rule",tooltip:"Horizontal line",onAction:function(){return n.execCommand("InsertHorizontalRule")}}),n.ui.registry.addMenuItem("hr",{icon:"horizontal-rule",text:"Horizontal line",onAction:function(){return n.execCommand("InsertHorizontalRule")},context:"insert"})};n.add("hr",function(n){t(n),o(n)}),function e(){}}();
|
1
api/js/tinymce/plugins/image/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/image/plugin.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
api/js/tinymce/plugins/imagetools/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/imagetools/plugin.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
api/js/tinymce/plugins/importcss/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/importcss/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";var t,e,n,r,o,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),g=tinymce.util.Tools.resolve("tinymce.EditorManager"),v=tinymce.util.Tools.resolve("tinymce.Env"),h=tinymce.util.Tools.resolve("tinymce.util.Tools"),c=function(t){return t.getParam("importcss_merge_classes")},u=function(t){return t.getParam("importcss_exclusive")},_=function(t){return t.getParam("importcss_selector_converter")},l=function(t){return t.getParam("importcss_selector_filter")},f=function(t){return t.getParam("importcss_groups")},m=function(t){return t.getParam("importcss_append")},p=function(t){return t.getParam("importcss_file_filter")},s=function(t){return function(){return t}},a=s(!1),y=s(!0),O=function(){return x},x=(r={fold:function(t,e){return t()},is:a,isSome:a,isNone:y,getOr:n=function(t){return t},getOrThunk:e=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:n,orThunk:e,map:O,ap:O,each:function(){},bind:O,flatten:O,exists:a,forall:y,filter:O,equals:t=function(t){return t.isNone()},equals_:t,toArray:function(){return[]},toString:s("none()")},Object.freeze&&Object.freeze(r),r),T=(o="function",function(t){return function(t){if(null===t)return"null";var e=typeof t;return"object"===e&&Array.prototype.isPrototypeOf(t)?"array":"object"===e&&String.prototype.isPrototypeOf(t)?"string":e}(t)===o}),b=Array.prototype.push,k=function(t,e){return function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!Array.prototype.isPrototypeOf(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);b.apply(e,t[n])}return e}(function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o,t)}return r}(t,e))},P=(Array.prototype.slice,T(Array.from)&&Array.from,function(e){return"string"==typeof e?function(t){return-1!==t.indexOf(e)}:e instanceof RegExp?function(t){return e.test(t)}:e}),S=function(f,t,m){var p=[],n={};function y(t,e){var n,r,o,i=t.href;if(r=i,o=v.cacheSuffix,"string"==typeof r&&(r=r.replace("?"+o,"").replace("&"+o,"")),(i=r)&&m(i,e)&&(c=i,s=(u=f).settings,!(a=!1!==s.skin&&(s.skin||"oxide"))||c!==(s.skin_url?u.documentBaseURI.toAbsolute(s.skin_url):g.baseURL+"/skins/"+a)+"/content"+(u.inline?".inline":"")+".min.css")){var u,c,s,a;h.each(t.imports,function(t){y(t,!0)});try{n=t.cssRules||t.rules}catch(l){}h.each(n,function(t){t.styleSheet?y(t.styleSheet,!0):t.selectorText&&h.each(t.selectorText.split(","),function(t){p.push(h.trim(t))})})}}h.each(f.contentCSS,function(t){n[t]=!0}),m||(m=function(t,e){return e||n[t]});try{h.each(t.styleSheets,function(t){y(t)})}catch(e){}return p},A=function(t,e){var n,r=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(e);if(r){var o=r[1],i=r[2].substr(1).split(".").join(" "),u=h.makeMap("a,img");return r[1]?(n={title:e},t.schema.getTextBlockElements()[o]?n.block=o:t.schema.getBlockElements()[o]||u[o.toLowerCase()]?n.selector=o:n.inline=o):r[2]&&(n={inline:"span",title:e.substr(1),classes:i}),!1!==c(t)?n.classes=i:n.attributes={"class":i},n}},w=function(t,e){return null===e||!1!==u(t)},E=A,I=function(g){g.on("init",function(t){var e,n,r,o,i=(e=[],n=[],r={},{addItemToGroup:function(t,e){r[t]?r[t].push(e):(n.push(t),r[t]=[e])},addItem:function(t){e.push(t)},toFormats:function(){return k(n,function(t){var e=r[t];return 0===e.length?[]:[{title:t,items:e}]}).concat(e)}}),y={},u=P(l(g)),c=(o=f(g),h.map(o,function(t){return h.extend({},t,{original:t,selectors:{},filter:P(t.filter),item:{text:t.title,menu:[]}})})),s=function(t,e){if(f=t,p=y,!(w(g,m=e)?f in p:f in m.selectors)){s=t,l=y,w(g,a=e)?l[s]=!0:a.selectors[s]=!0;var n=(i=(o=g).plugins.importcss,u=t,((c=e)&&c.selector_converter?c.selector_converter:_(o)?_(o):function(){return A(o,u)}).call(i,u,c));if(n){var r=n.name||d.DOM.uniqueId();return g.formatter.register(r,n),h.extend({},{title:n.title,format:r})}}var o,i,u,c,s,a,l,f,m,p;return null};h.each(S(g,t.doc||g.getDoc(),P(p(g))),function(n){if(-1===n.indexOf(".mce-")&&(!u||u(n))){var t=(r=c,o=n,h.grep(r,function(t){return!t.filter||t.filter(o)}));if(0<t.length)h.each(t,function(t){var e=s(n,t);e&&i.addItemToGroup(t.title,e)});else{var e=s(n,null);e&&i.addItem(e)}}var r,o});var a=i.toFormats();g.fire("addStyleModifications",{items:a,replace:!m(g)})})},M=function(e){return{convertSelectorToFormat:function(t){return E(e,t)}}};i.add("importcss",function(t){return I(t),M(t)}),function j(){}}();
|
1
api/js/tinymce/plugins/inlite/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/inlite/plugin.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
api/js/tinymce/plugins/insertdatetime/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/insertdatetime/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S"))},r=function(e){return e.getParam("insertdatetime_formats",["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"])},t=function(e){return e.getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d"))},a=n,i=r,o=function(e){var t=r(e);return 0<t.length?t[0]:n(e)},l=function(e){return e.getParam("insertdatetime_element",!1)},u="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),c="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),m="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),s="January February March April May June July August September October November December".split(" "),d=function(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e},p=function(e,t,n){return n=n||new Date,t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",d(n.getMonth()+1,2))).replace("%d",d(n.getDate(),2))).replace("%H",""+d(n.getHours(),2))).replace("%M",""+d(n.getMinutes(),2))).replace("%S",""+d(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(s[n.getMonth()]))).replace("%b",""+e.translate(m[n.getMonth()]))).replace("%A",""+e.translate(c[n.getDay()]))).replace("%a",""+e.translate(u[n.getDay()]))).replace("%%","%")},f=function(e,t){if(l(e)){var n=p(e,t),r=void 0;r=/%[HMSIp]/.test(t)?p(e,"%Y-%m-%dT%H:%M"):p(e,"%Y-%m-%d");var a=e.dom.getParent(e.selection.getStart(),"time");a?(o=a,u=r,c=n,m=(i=e).dom.create("time",{datetime:u},c),o.parentNode.insertBefore(m,o),i.dom.remove(o),i.selection.select(m,!0),i.selection.collapse(!1)):e.insertContent('<time datetime="'+r+'">'+n+"</time>")}else e.insertContent(p(e,t));var i,o,u,c,m},g=p,y=function(e){e.addCommand("mceInsertDate",function(){f(e,t(e))}),e.addCommand("mceInsertTime",function(){f(e,a(e))})},M=tinymce.util.Tools.resolve("tinymce.util.Tools"),S=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return S(n())}}},v=function(n){var t=i(n),r=S(o(n));n.ui.registry.addSplitButton("insertdatetime",{type:"splitbutton",icon:"insert-time",tooltip:"Insert date/time",fetch:function(e){e(M.map(t,function(e){return{type:"choiceitem",text:g(n,e),value:e}}))},onAction:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];f(n,r.get())},onItemAction:function(e,t){r.set(t),f(n,t)}}),n.ui.registry.addMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:function(){return M.map(t,function(e){return{type:"menuitem",text:g(n,e),onAction:(t=e,function(){r.set(t),f(n,t)})};var t})}})};e.add("insertdatetime",function(e){y(e),v(e)}),function h(){}}();
|
1
api/js/tinymce/plugins/legacyoutput/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/legacyoutput/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("legacyoutput",function(n){console.error("Legacy output plugin has not yet been updated for TinyMCE 5")}),function n(){}}();
|
1
api/js/tinymce/plugins/link/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/link/plugin.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
api/js/tinymce/plugins/lists/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/lists/plugin.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
api/js/tinymce/plugins/media/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/media/plugin.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
api/js/tinymce/plugins/nonbreaking/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/nonbreaking/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(n,e){var o,t=(o=n).plugins.visualchars&&o.plugins.visualchars.isEnabled()?'<span class="mce-nbsp"> </span>':" ";n.insertContent(function(n,e){for(var o="",t=0;t<e;t++)o+=n;return o}(t,e)),n.dom.setAttrib(n.dom.select("span.mce-nbsp"),"data-mce-bogus","1")},e=function(n){n.addCommand("mceNonBreaking",function(){t(n,1)})},i=tinymce.util.Tools.resolve("tinymce.util.VK"),a=function(n){var e=n.getParam("nonbreaking_force_tab",0);return"boolean"==typeof e?!0===e?3:0:e},o=function(e){var o=a(e);0<o&&e.on("keydown",function(n){if(n.keyCode===i.TAB&&!n.isDefaultPrevented()){if(n.shiftKey)return;n.preventDefault(),n.stopImmediatePropagation(),t(e,o)}})},r=function(n){n.ui.registry.addButton("nonbreaking",{icon:"non-breaking",tooltip:"Nonbreaking space",onAction:function(){return n.execCommand("mceNonBreaking")}}),n.ui.registry.addMenuItem("nonbreaking",{icon:"non-breaking",text:"Nonbreaking space",onAction:function(){return n.execCommand("mceNonBreaking")}})};n.add("nonbreaking",function(n){e(n),r(n),o(n)}),function c(){}}();
|
1
api/js/tinymce/plugins/noneditable/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/noneditable/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),l=function(t){return t.getParam("noneditable_noneditable_class","mceNonEditable")},u=function(t){return t.getParam("noneditable_editable_class","mceEditable")},f=function(t){var n=t.getParam("noneditable_regexp",[]);return n&&n.constructor===RegExp?[n]:n},s=function(n){return function(t){return-1!==(" "+t.attr("class")+" ").indexOf(n)}},d=function(i,o,c){return function(t){var n=arguments,e=n[n.length-2],r=0<e?o.charAt(e-1):"";if('"'===r)return t;if(">"===r){var a=o.lastIndexOf("<",e);if(-1!==a&&-1!==o.substring(a,e).indexOf('contenteditable="false"'))return t}return'<span class="'+c+'" data-mce-content="'+i.dom.encode(n[0])+'">'+i.dom.encode("string"==typeof n[1]?n[1]:n[0])+"</span>"}},n=function(n){var t,e,r="contenteditable";t=" "+c.trim(u(n))+" ",e=" "+c.trim(l(n))+" ";var a=s(t),i=s(e),o=f(n);n.on("PreInit",function(){0<o.length&&n.on("BeforeSetContent",function(t){!function(t,n,e){var r=n.length,a=e.content;if("raw"!==e.format){for(;r--;)a=a.replace(n[r],d(t,a,l(t)));e.content=a}}(n,o,t)}),n.parser.addAttributeFilter("class",function(t){for(var n,e=t.length;e--;)n=t[e],a(n)?n.attr(r,"true"):i(n)&&n.attr(r,"false")}),n.serializer.addAttributeFilter(r,function(t){for(var n,e=t.length;e--;)n=t[e],(a(n)||i(n))&&(0<o.length&&n.attr("data-mce-content")?(n.name="#text",n.type=3,n.raw=!0,n.value=n.attr("data-mce-content")):n.attr(r,null))})})};t.add("noneditable",function(t){n(t)}),function e(){}}();
|
1
api/js/tinymce/plugins/pagebreak/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/pagebreak/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.Env"),a=function(e){return e.getParam("pagebreak_separator","\x3c!-- pagebreak --\x3e")},i=function(e){return e.getParam("pagebreak_split_block",!1)},t=function(){return"mce-pagebreak"},r=function(){return'<img src="'+n.transparentSrc+'" class="mce-pagebreak" data-mce-resize="false" data-mce-placeholder />'},o=function(o){var c=a(o),n=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi");o.on("BeforeSetContent",function(e){e.content=e.content.replace(n,r())}),o.on("PreInit",function(){o.serializer.addNodeFilter("img",function(e){for(var n,a,t=e.length;t--;)if((a=(n=e[t]).attr("class"))&&-1!==a.indexOf("mce-pagebreak")){var r=n.parent;if(o.schema.getBlockElements()[r.name]&&i(o)){r.type=3,r.value=c,r.raw=!0,n.remove();continue}n.type=3,n.value=c,n.raw=!0}})})},c=r,u=t,g=function(e){e.addCommand("mcePageBreak",function(){e.settings.pagebreak_split_block?e.insertContent("<p>"+c()+"</p>"):e.insertContent(c())})},m=function(n){n.on("ResolveName",function(e){"IMG"===e.target.nodeName&&n.dom.hasClass(e.target,u())&&(e.name="pagebreak")})},s=function(e){e.ui.registry.addButton("pagebreak",{icon:"page-break",tooltip:"Page break",onAction:function(){return e.execCommand("mcePageBreak")}}),e.ui.registry.addMenuItem("pagebreak",{text:"Page break",icon:"page-break",onAction:function(){return e.execCommand("mcePageBreak")}})};e.add("pagebreak",function(e){g(e),s(e),o(e),m(e)}),function l(){}}();
|
1
api/js/tinymce/plugins/paste/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/paste/plugin.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
api/js/tinymce/plugins/preview/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/preview/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),s=function(e){return e.getParam("content_style","")},i=function(t){var n="",i=t.dom.encode,e=s(t);n+='<base href="'+i(t.documentBaseURI.getURI())+'">',e&&(n+='<style type="text/css">'+e+"</style>"),c.each(t.contentCSS,function(e){n+='<link type="text/css" rel="stylesheet" href="'+i(t.documentBaseURI.toAbsolute(e))+'">'});var o=t.settings.body_id||"tinymce";-1!==o.indexOf("=")&&(o=(o=t.getParam("body_id","","hash"))[t.id]||o);var r=t.settings.body_class||"";-1!==r.indexOf("=")&&(r=(r=t.getParam("body_class","","hash"))[t.id]||"");var a=t.settings.directionality?' dir="'+t.settings.directionality+'"':"";return"<!DOCTYPE html><html><head>"+n+'</head><body id="'+i(o)+'" class="mce-content-body '+i(r)+'"'+i(a)+">"+t.getContent()+'<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A") {e.preventDefault();}}}, false);<\/script> </body></html>'},t=function(n){n.addCommand("mcePreview",function(){var e,t;t=i(e=n),e.windowManager.open({title:"Preview",size:"large",body:{type:"panel",items:[{name:"preview",type:"iframe",sandboxed:!0,flex:!0}]},buttons:[{type:"cancel",name:"cancel",text:"Close",primary:!0}],initialData:{preview:t},onClose:function(){console.log("Preview Demo Close")}}).focus("cancel")})},n=function(e){e.ui.registry.addButton("preview",{icon:"preview",tooltip:"Preview Text",onAction:function(){return e.execCommand("mcePreview")}}),e.ui.registry.addMenuItem("preview",{icon:"preview",text:"Preview",onAction:function(){return e.execCommand("mcePreview")}})};e.add("preview",function(e){t(e),n(e)}),function o(){}}();
|
1
api/js/tinymce/plugins/print/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/print/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(n){n.addCommand("mcePrint",function(){n.getWin().print()})},i=function(n){n.ui.registry.addButton("print",{icon:"print",tooltip:"Print",onAction:function(){return n.execCommand("mcePrint")}}),n.ui.registry.addMenuItem("print",{text:"Print",icon:"print",onAction:function(){return n.execCommand("mcePrint")}})};n.add("print",function(n){t(n),i(n),n.addShortcut("Meta+P","","mcePrint")}),function r(){}}();
|
1
api/js/tinymce/plugins/save/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/save/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=function(n){return n.getParam("save_enablewhendirty",!0)},i=function(n){return!!n.getParam("save_onsavecallback")},c=function(n){return!!n.getParam("save_oncancelcallback")},r=function(n,e){n.notificationManager.open({text:n.translate(e),type:"error"})},e=function(n){var e;if(e=t.DOM.getParent(n.id,"form"),!a(n)||n.isDirty()){if(n.save(),i(n))return n.execCallback("save_onsavecallback",n),void n.nodeChanged();e?(n.setDirty(!1),e.onsubmit&&!e.onsubmit()||("function"==typeof e.submit?e.submit():r(n,"Error: Form submit field collision.")),n.nodeChanged()):r(n,"Error: No form element found.")}},u=function(n){var e=o.trim(n.startContent);c(n)?n.execCallback("save_oncancelcallback",n):(n.setContent(e),n.undoManager.clear(),n.nodeChanged())},l=function(n){n.addCommand("mceSave",function(){e(n)}),n.addCommand("mceCancel",function(){u(n)})},s=function(t){return function(n){var e=function(){n.setDisabled(a(t)&&!t.isDirty())};return t.on("nodeChange dirty",e),function(){return t.off("nodeChange dirty",e)}}},d=function(n){n.ui.registry.addButton("save",{icon:"save",tooltip:"Save",disabled:!0,onAction:function(){return n.execCommand("mceSave")},onSetup:s(n)}),n.ui.registry.addButton("cancel",{icon:"cancel",tooltip:"Cancel",disabled:!0,onAction:function(){return n.execCommand("mceSave")},onSetup:s(n)}),n.addShortcut("Meta+S","","mceSave")};n.add("save",function(n){d(n),l(n)}),function m(){}}();
|
1
api/js/tinymce/plugins/searchreplace/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/searchreplace/plugin.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
api/js/tinymce/plugins/spellchecker/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/spellchecker/plugin.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
api/js/tinymce/plugins/tabfocus/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/tabfocus/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),c=tinymce.util.Tools.resolve("tinymce.EditorManager"),s=tinymce.util.Tools.resolve("tinymce.Env"),a=tinymce.util.Tools.resolve("tinymce.util.Delay"),y=tinymce.util.Tools.resolve("tinymce.util.Tools"),f=tinymce.util.Tools.resolve("tinymce.util.VK"),d=function(e){return e.getParam("tab_focus",e.getParam("tabfocus_elements",":prev,:next"))},m=t.DOM,n=function(e){e.keyCode!==f.TAB||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()},i=function(r){function e(n){var i,o,e,l;if(!(n.keyCode!==f.TAB||n.ctrlKey||n.altKey||n.metaKey||n.isDefaultPrevented())&&(1===(e=y.explode(d(r))).length&&(e[1]=e[0],e[0]=":prev"),o=n.shiftKey?":prev"===e[0]?u(-1):m.get(e[0]):":next"===e[1]?u(1):m.get(e[1]))){var t=c.get(o.id||o.name);o.id&&t?t.focus():a.setTimeout(function(){s.webkit||window.focus(),o.focus()},10),n.preventDefault()}function u(e){function t(e){return/INPUT|TEXTAREA|BUTTON/.test(e.tagName)&&c.get(n.id)&&-1!==e.tabIndex&&function t(e){return"BODY"===e.nodeName||"hidden"!==e.type&&"none"!==e.style.display&&"hidden"!==e.style.visibility&&t(e.parentNode)}(e)}if(o=m.select(":input:enabled,*[tabindex]:not(iframe)"),y.each(o,function(e,t){if(e.id===r.id)return i=t,!1}),0<e){for(l=i+1;l<o.length;l++)if(t(o[l]))return o[l]}else for(l=i-1;0<=l;l--)if(t(o[l]))return o[l];return null}}r.on("init",function(){r.inline&&m.setAttrib(r.getBody(),"tabIndex",null),r.on("keyup",n),s.gecko?r.on("keypress keydown",e):r.on("keydown",e)})};e.add("tabfocus",function(e){i(e)}),function o(){}}();
|
1
api/js/tinymce/plugins/table/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/table/plugin.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
api/js/tinymce/plugins/template/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/template/plugin.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
api/js/tinymce/plugins/textcolor/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/textcolor/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("textcolor",function(){console.warn("Text color plugin is now built in to the core editor, please remove it from your editor configuration")}),function o(){}}();
|
1
api/js/tinymce/plugins/textpattern/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/textpattern/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";var r=function(t){var e=t,n=function(){return e};return{get:n,set:function(t){e=t},clone:function(){return r(n())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return{setPatterns:function(t){e.set(t)},getPatterns:function(){return e.get()}}},e=[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"},{start:"***",end:"***",format:["bold","italic"]},{start:"#",format:"h1"},{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:"1. ",cmd:"InsertOrderedList"},{start:"* ",cmd:"InsertUnorderedList"},{start:"- ",cmd:"InsertUnorderedList"}],a=function(t){return t.textpattern_patterns!==undefined?t.textpattern_patterns:e},o=tinymce.util.Tools.resolve("tinymce.util.Delay"),i=tinymce.util.Tools.resolve("tinymce.util.VK"),g=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),h=tinymce.util.Tools.resolve("tinymce.util.Tools"),m=function(t,e){for(var n=0;n<t.length;n++)if(0===e.indexOf(t[n].start)&&(!t[n].end||e.lastIndexOf(t[n].end)===e.length-t[n].end.length))return t[n]},c=function(t,e,n,r){var a,o,i,s,f,d,l=t.sort(function(t,e){return t.start.length>e.start.length?-1:t.start.length<e.start.length?1:0});for(o=0;o<l.length;o++)if((a=l[o]).end!==undefined&&(s=a,f=n,d=r,e.substr(f-s.end.length-d,s.end.length)===s.end)&&0<n-r-(i=a).end.length-i.start.length)return a},s=function(t,e,n){if(!1!==e.collapsed){var r=e.startContainer,a=r.data,o=!0===n?1:0;if(3===r.nodeType){var i=c(t,a,e.startOffset,o);if(i!==undefined){var s=a.lastIndexOf(i.end,e.startOffset-o),f=a.lastIndexOf(i.start,s-i.end.length);if(s=a.indexOf(i.end,f+i.start.length),-1!==f){var d=document.createRange();d.setStart(r,f),d.setEnd(r,s+i.end.length);var l=m(t,d.toString());if(!(i===undefined||l!==i||r.data.length<=i.start.length+i.end.length))return{pattern:i,startOffset:f,endOffset:s}}}}}},f=function(t,e,n){var r=t.selection.getRng(!0),a=s(e,r,n);if(a)return function(a,o,i,t){var s=h.isArray(i.pattern.format)?i.pattern.format:[i.pattern.format];if(0!==h.grep(s,function(t){var e=a.formatter.get(t);return e&&e[0].inline}).length)return a.undoManager.transact(function(){var t,e,n,r;t=o,e=i.pattern,n=i.endOffset,r=i.startOffset,(t=0<r?t.splitText(r):t).splitText(n-r+e.end.length),t.deleteData(0,e.start.length),t.deleteData(t.data.length-e.end.length,e.end.length),o=t,s.forEach(function(t){a.formatter.apply(t,{},o)})}),o}(t,r.startContainer,a)},d=function(t,e){return f(t,e,!0)},l=function(t,e){return f(t,e,!1)},u=function(t,e){var n,r,a,o,i,s,f,d,l,c,u;if(n=t.selection,r=t.dom,n.isCollapsed()&&(f=r.getParent(n.getStart(),"p"))){for(l=new g(f,f);i=l.next();)if(3===i.nodeType){o=i;break}if(o){if(!(d=m(e,o.data)))return;if(a=(c=n.getRng(!0)).startContainer,u=c.startOffset,o===a&&(u=Math.max(0,u-d.start.length)),h.trim(o.data).length===d.start.length)return;d.format&&(s=t.formatter.get(d.format))&&s[0].block&&(o.deleteData(0,d.start.length),t.formatter.apply(d.format,{},o),c.setStart(a,u),c.collapse(!0),n.setRng(c)),d.cmd&&t.undoManager.transact(function(){o.deleteData(0,d.start.length),t.execCommand(d.cmd)})}}},p=function(t,e,n){for(var r=0;r<t.length;r++)if(n(t[r],e))return!0},y={handleEnter:function C(t,e){var n,r;(n=l(t,e))&&((r=t.dom.createRng()).setStart(n,n.data.length),r.setEnd(n,n.data.length),t.selection.setRng(r)),u(t,e)},handleInlineKey:function x(t,e){var n,r,a,o,i;(n=d(t,e))&&(i=t.dom,r=n.data.slice(-1),/[\u00a0 ]/.test(r)&&(n.deleteData(n.data.length-1,1),a=i.doc.createTextNode(r),i.insertAfter(a,n.parentNode),(o=i.createRng()).setStart(a,1),o.setEnd(a,1),t.selection.setRng(o)))},checkCharCode:function(t,e){return p(t,e,function(t,e){return t.charCodeAt(0)===e.charCode})},checkKeyCode:function(t,e){return p(t,e,function(t,e){return t===e.keyCode&&!1===i.modifierPressed(e)})}},v=function(e,n){var r=[",",".",";",":","!","?"],a=[32];e.on("keydown",function(t){13!==t.keyCode||i.modifierPressed(t)||y.handleEnter(e,n.get())},!0),e.on("keyup",function(t){y.checkKeyCode(a,t)&&y.handleInlineKey(e,n.get())}),e.on("keypress",function(t){y.checkCharCode(r,t)&&o.setEditorTimeout(e,function(){y.handleInlineKey(e,n.get())})})};t.add("textpattern",function(t){var e=r(a(t.settings));return v(t,e),n(e)}),function O(){}}();
|
1
api/js/tinymce/plugins/toc/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/toc/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";var e,n,t=tinymce.util.Tools.resolve("tinymce.PluginManager"),s=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),f=tinymce.util.Tools.resolve("tinymce.util.I18n"),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=function(t){return t.getParam("toc_class","mce-toc")},m=function(t){var e=t.getParam("toc_header","h2");return/^h[1-6]$/.test(e)?e:"h2"},c=function(t){var e=parseInt(t.getParam("toc_depth","3"),10);return 1<=e&&e<=9?e:3},l=(e="mcetoc_",n=0,function(){var t=(new Date).getTime().toString(32);return e+t+(n++).toString(32)}),u=function u(t){var e,n=[];for(e=1;e<=t;e++)n.push("h"+e);return n.join(",")},v=function(n){var o=a(n),t=m(n),e=u(c(n)),r=n.$(e);return r.length&&/^h[1-9]$/i.test(t)&&(r=r.filter(function(t,e){return!n.dom.hasClass(e.parentNode,o)})),i.map(r,function(t){return{id:t.id?t.id:l(),level:parseInt(t.nodeName.replace(/^H/i,""),10),title:n.$.text(t),element:t}})},d=function(t){var e,n,o,r,i,c,a,l="",u=v(t),d=function(t){var e,n=9;for(e=0;e<t.length;e++)if(t[e].level<n&&(n=t[e].level),1===n)return n;return n}(u)-1;if(!u.length)return"";for(l+=(i=m(t),c=f.translate("Table of Contents"),a="</"+i+">","<"+i+' contenteditable="true">'+s.DOM.encode(c)+a),e=0;e<u.length;e++){if((o=u[e]).element.id=o.id,r=u[e+1]&&u[e+1].level,d===o.level)l+="<li>";else for(n=d;n<o.level;n++)l+="<ul><li>";if(l+='<a href="#'+o.id+'">'+o.title+"</a>",r!==o.level&&r)for(n=o.level;r<n;n--)l+="</li></ul><li>";else l+="</li>",r||(l+="</ul>");d=o.level}return l},g=function(t){var e=a(t),n=t.$("."+e);n.length&&t.undoManager.transact(function(){n.html(d(t))})},o={hasHeaders:function(t){return 0<v(t).length},insertToc:function(t){var e,n,o,r,i=a(t),c=t.$("."+i);o=t,!(r=c).length||0<o.dom.getParents(r[0],".mce-offscreen-selection").length?t.insertContent((n=d(e=t),'<div class="'+e.dom.encode(a(e))+'" contenteditable="false">'+n+"</div>")):g(t)},updateToc:g},r=function(t){t.addCommand("mceInsertToc",function(){o.insertToc(t)}),t.addCommand("mceUpdateToc",function(){o.updateToc(t)})},h=function(t){var n=t.$,o=a(t);t.on("PreProcess",function(t){var e=n("."+o,t.node);e.length&&(e.removeAttr("contentEditable"),e.find("[contenteditable]").removeAttr("contentEditable"))}),t.on("SetContent",function(){var t=n("."+o);t.length&&(t.attr("contentEditable",!1),t.children(":first-child").attr("contentEditable",!0))})},p=function(n){return function(t){var e=t.control;n.on("LoadContent SetContent change",function(){e.disabled(n.readonly||!o.hasHeaders(n))})}},T=function(t){var e;t.ui.registry.addButton("toc",{tooltip:"Table of Contents",onAction:function(){return t.execCommand("mceInsertToc")},icon:"toc",onPostRender:p(t)}),t.ui.registry.addButton("tocupdate",{tooltip:"Update",onAction:function(){return t.execCommand("mceUpdateToc")},icon:"reload"}),t.ui.registry.addMenuItem("toc",{text:"Table of Contents",onAction:function(){return t.execCommand("mceInsertToc")},icon:"toc",onPostRender:p(t)}),t.ui.registry.addContextToolbar("toc",{type:"contexttoolbar",items:["tocupdate"],predicate:(e=t,function(t){return t&&e.dom.is(t,"."+a(e))&&e.getBody().contains(t)}),position:"node"})};t.add("toc",function(t){r(t),T(t),h(t)}),function y(){}}();
|
154
api/js/tinymce/plugins/visualblocks/css/visualblocks.css
Normal file
154
api/js/tinymce/plugins/visualblocks/css/visualblocks.css
Normal file
@ -0,0 +1,154 @@
|
||||
.mce-visualblocks p {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks h1 {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks h2 {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks h3 {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks h4 {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks h5 {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks h6 {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks div:not([data-mce-bogus]) {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks section {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks article {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks blockquote {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks address {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks pre {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks figure {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks hgroup {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks aside {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks figcaption {
|
||||
border: 1px dashed #BBB;
|
||||
}
|
||||
|
||||
.mce-visualblocks ul {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks ol {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks dl {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
1
api/js/tinymce/plugins/visualblocks/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/visualblocks/plugin.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";var o=function(t){var e=t,n=function(){return e};return{get:n,set:function(t){e=t},clone:function(){return o(n())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),s=function(t,e){t.fire("VisualBlocks",{state:e})},i=function(t){return t.getParam("visualblocks_default_state",!1)},c=function(t){return t.settings.visualblocks_content_css},u=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),l=tinymce.util.Tools.resolve("tinymce.util.Tools"),r=u.DOM.uniqueId(),a=function(t,e){var n=l.toArray(t.getElementsByTagName("link"));if(0===l.grep(n,function(t){return t.id===r}).length){var o=u.DOM.create("link",{id:r,rel:"stylesheet",href:e});t.getElementsByTagName("head")[0].appendChild(o)}},f=function(t,e,n){var o=t.dom,i=c(t);a(t.getDoc(),i||e+"/css/visualblocks.css"),o.toggleClass(t.getBody(),"mce-visualblocks"),n.set(!n.get()),s(t,n.get())},m=function(t,e,n){t.addCommand("mceVisualBlocks",function(){f(t,e,n)})},g=function(e,t,n){e.on("PreviewFormats AfterPreviewFormats",function(t){n.get()&&e.dom.toggleClass(e.getBody(),"mce-visualblocks","afterpreviewformats"===t.type)}),e.on("init",function(){i(e)&&f(e,t,n)}),e.on("remove",function(){e.dom.removeClass(e.getBody(),"mce-visualblocks")})},n=function(n,t){return function(e){e.setActive(!1);var t=function(t){return e.setActive(t.state)};return n.on("VisualBlocks",t),function(){return n.off("VisualBlocks",t)}}},v=function(t,e){t.ui.registry.addToggleButton("visualblocks",{icon:"paragraph",tooltip:"Show blocks",onAction:function(){return t.execCommand("mceVisualBlocks")},onSetup:n(t)}),t.ui.registry.addToggleMenuItem("visualblocks",{text:"Show blocks",icon:"paragraph",onAction:function(){return t.execCommand("mceVisualBlocks")},onSetup:n(t),selectable:!0})};t.add("visualblocks",function(t,e){var n=o(!1);m(t,e,n),v(t,n),g(t,e,n)}),function e(){}}();
|
1
api/js/tinymce/plugins/visualchars/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/visualchars/plugin.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
api/js/tinymce/plugins/wordcount/plugin.min.js
vendored
Normal file
1
api/js/tinymce/plugins/wordcount/plugin.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
api/js/tinymce/skins/oxide/content.inline.min.css
vendored
Normal file
1
api/js/tinymce/skins/oxide/content.inline.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.word-wrap{word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.mce-content-body .mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:black;font-family:Arial;font-size:11px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;line-height:normal;font-weight:normal;text-align:left;-webkit-tap-highlight-color:transparent;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-object{border:1px dotted #3A3A3A;background:#D5D5D5 url(img/object.gif) no-repeat center}.mce-preview-object{display:inline-block;position:relative;margin:0 2px 0 2px;line-height:0;border:1px solid gray}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-preview-object .mce-shim{position:absolute;top:0;left:0;width:100%;height:100%;background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}figure.align-left{float:left}figure.align-right{float:right}figure.image.align-center{display:table;margin-left:auto;margin-right:auto}figure.image{display:inline-block;border:1px solid gray;margin:0 2px 0 1px;background:#f5f2f0}figure.image img{margin:8px 8px 0 8px}figure.image figcaption{margin:6px 8px 6px 8px;text-align:center}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0px}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-nbsp,.mce-shy{background:#AAA}.mce-shy::after{content:'-'}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid rgba(208,2,27,0.5);cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td[data-mce-selected],th[data-mce-selected]{background-color:#2276d2 !important}.mce-edit-focus{outline:1px dotted #333}.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false][data-mce-selected]{outline:2px solid #2276d2}.mce-content-body.mce-content-readonly *[contentEditable=true]:focus,.mce-content-body.mce-content-readonly *[contentEditable=true]:hover{outline:none}.mce-content-body *[data-mce-selected="inline-boundary"]{background:#bfe6ff}.mce-content-body .mce-item-anchor[data-mce-selected]{background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-content-body hr{cursor:default}.mce-content-body table{-webkit-nbsp-mode:normal}.ephox-snooker-resizer-bar{background-color:#2276d2;opacity:0}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:.2}.mce-content-body{line-height:1.3}.tox-toolbar-dock-fadeout{visibility:hidden;opacity:0}.tox-toolbar-dock-fadein{visibility:visible;opacity:1}.tox-toolbar-dock-transition{transition:visibility 0s linear .3s,opacity .3s ease}.tox-toolbar-dock-transition.tox-toolbar-dock-fadein{transition-delay:0s}
|
1
api/js/tinymce/skins/oxide/content.min.css
vendored
Normal file
1
api/js/tinymce/skins/oxide/content.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
body{background-color:#FFFFFF;color:#000000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:14px;line-height:1.3;scrollbar-3dlight-color:#F0F0EE;scrollbar-arrow-color:#676662;scrollbar-base-color:#F0F0EE;scrollbar-darkshadow-color:#DDDDDD;scrollbar-face-color:#E0E0DD;scrollbar-highlight-color:#F0F0EE;scrollbar-shadow-color:#F0F0EE;scrollbar-track-color:#F5F5F5}td,th{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:14px}.word-wrap{word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.mce-content-body .mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:black;font-family:Arial;font-size:11px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;line-height:normal;font-weight:normal;text-align:left;-webkit-tap-highlight-color:transparent;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-object{border:1px dotted #3A3A3A;background:#D5D5D5 url(img/object.gif) no-repeat center}.mce-preview-object{display:inline-block;position:relative;margin:0 2px 0 2px;line-height:0;border:1px solid gray}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-preview-object .mce-shim{position:absolute;top:0;left:0;width:100%;height:100%;background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}figure.align-left{float:left}figure.align-right{float:right}figure.image.align-center{display:table;margin-left:auto;margin-right:auto}figure.image{display:inline-block;border:1px solid gray;margin:0 2px 0 1px;background:#f5f2f0}figure.image img{margin:8px 8px 0 8px}figure.image figcaption{margin:6px 8px 6px 8px;text-align:center}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0px}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-nbsp,.mce-shy{background:#AAA}.mce-shy::after{content:'-'}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid rgba(208,2,27,0.5);cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td[data-mce-selected],th[data-mce-selected]{background-color:#2276d2 !important}.mce-edit-focus{outline:1px dotted #333}.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false][data-mce-selected]{outline:2px solid #2276d2}.mce-content-body.mce-content-readonly *[contentEditable=true]:focus,.mce-content-body.mce-content-readonly *[contentEditable=true]:hover{outline:none}.mce-content-body *[data-mce-selected="inline-boundary"]{background:#bfe6ff}.mce-content-body .mce-item-anchor[data-mce-selected]{background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-content-body hr{cursor:default}.mce-content-body table{-webkit-nbsp-mode:normal}.ephox-snooker-resizer-bar{background-color:#2276d2;opacity:0}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:.2}
|
1
api/js/tinymce/skins/oxide/content.mobile.min.css
vendored
Normal file
1
api/js/tinymce/skins/oxide/content.mobile.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection{position:absolute;display:inline-block;background-color:green;opacity:.5}body{-webkit-text-size-adjust:none}body img{max-width:96vw}body table img{max-width:95%}
|
BIN
api/js/tinymce/skins/oxide/img/anchor.gif
Normal file
BIN
api/js/tinymce/skins/oxide/img/anchor.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 53 B |
BIN
api/js/tinymce/skins/oxide/img/loader.gif
Normal file
BIN
api/js/tinymce/skins/oxide/img/loader.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
BIN
api/js/tinymce/skins/oxide/img/object.gif
Normal file
BIN
api/js/tinymce/skins/oxide/img/object.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 152 B |
BIN
api/js/tinymce/skins/oxide/img/trans.gif
Normal file
BIN
api/js/tinymce/skins/oxide/img/trans.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 43 B |
1
api/js/tinymce/skins/oxide/skin.min.css
vendored
Normal file
1
api/js/tinymce/skins/oxide/skin.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2
api/js/tinymce/skins/oxide/skin.mobile.min.css
vendored
Normal file
2
api/js/tinymce/skins/oxide/skin.mobile.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
api/js/tinymce/themes/silver/theme.min.js
vendored
Normal file
1
api/js/tinymce/themes/silver/theme.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
api/js/tinymce/tinymce.min.js
vendored
Normal file
2
api/js/tinymce/tinymce.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
85
api/src/Etemplate/Widget/CKEditor.php
Normal file
85
api/src/Etemplate/Widget/CKEditor.php
Normal file
@ -0,0 +1,85 @@
|
||||
<?php
|
||||
/**
|
||||
* EGroupware - eTemplate serverside ckeditor widget
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @package api
|
||||
* @subpackage etemplate
|
||||
* @link http://www.egroupware.org
|
||||
* @author Ralf Becker <RalfBecker@outdoor-training.de>
|
||||
* @copyright 2002-16 by RalfBecker@outdoor-training.de
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
namespace EGroupware\Api\Etemplate\Widget;
|
||||
|
||||
use EGroupware\Api\Etemplate;
|
||||
use EGroupware\Api;
|
||||
|
||||
/**
|
||||
* eTemplate ckeditor widget
|
||||
*/
|
||||
class CKEdiotr extends Etemplate\Widget
|
||||
{
|
||||
|
||||
protected $legacy_options = 'mode,height,width,expand_toolbar,base_href';
|
||||
|
||||
public $attrs = array(
|
||||
'height' => '400px',
|
||||
);
|
||||
|
||||
/**
|
||||
* Fill config options
|
||||
*
|
||||
* @param string $cname
|
||||
*/
|
||||
public function beforeSendToClient($cname)
|
||||
{
|
||||
$form_name = self::form_name($cname, $this->id);
|
||||
|
||||
$config = Api\Html\CkEditorConfig::get_ckeditor_config_array($this->attrs['mode'], $this->attrs['height'],
|
||||
$this->attrs['expand_toolbar'],$this->attrs['base_href']
|
||||
);
|
||||
// User preferences
|
||||
$font = $GLOBALS['egw_info']['user']['preferences']['common']['rte_font'];
|
||||
$font_size = Api\Html\CkEditorConfig::font_size_from_prefs();
|
||||
$font_span = '<span style="width: 100%; display: inline; '.
|
||||
($font?'font-family:'.$font.'; ':'').($font_size?'font-size:'.$font_size.'; ':'').
|
||||
'">​</span>';
|
||||
if (empty($font) && empty($font_size)) $font_span = '';
|
||||
if($font_span)
|
||||
{
|
||||
$config['preference_style'] = $font_span;
|
||||
}
|
||||
self::$request->modifications[$form_name]['config'] = $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate input
|
||||
*
|
||||
* Input is run throught HTMLpurifier, to make sure users can NOT enter javascript or other nasty stuff (XSS!).
|
||||
*
|
||||
* @param string $cname current namespace
|
||||
* @param array $expand values for keys 'c', 'row', 'c_', 'row_', 'cont'
|
||||
* @param array $content
|
||||
* @param array &$validated=array() validated content
|
||||
* @return boolean true if no validation error, false otherwise
|
||||
*/
|
||||
public function validate($cname, array $expand, array $content, &$validated=array())
|
||||
{
|
||||
$form_name = self::form_name($cname, $this->id, $expand);
|
||||
|
||||
if (!$this->is_readonly($cname, $form_name))
|
||||
{
|
||||
$value = self::get_array($content, $form_name);
|
||||
// only purify for html, mode "ascii" is NO html and content get lost!
|
||||
if ($this->attrs['mode'] != 'ascii')
|
||||
{
|
||||
$value = Api\Html\HtmLawed::purify($value, $this->attrs['validation_rules']);
|
||||
}
|
||||
$valid =& self::get_array($validated, $form_name, true);
|
||||
if (true) $valid = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
Etemplate\Widget::registerWidget(__NAMESPACE__.'\\CKEditor', 'ckeditor');
|
@ -17,43 +17,10 @@ use EGroupware\Api\Etemplate;
|
||||
use EGroupware\Api;
|
||||
|
||||
/**
|
||||
* eTemplate htmlarea widget
|
||||
* eTemplate htmleditor widget
|
||||
*/
|
||||
class HtmlArea extends Etemplate\Widget
|
||||
{
|
||||
|
||||
protected $legacy_options = 'mode,height,width,expand_toolbar,base_href';
|
||||
|
||||
public $attrs = array(
|
||||
'height' => '400px',
|
||||
);
|
||||
|
||||
/**
|
||||
* Fill config options
|
||||
*
|
||||
* @param string $cname
|
||||
*/
|
||||
public function beforeSendToClient($cname)
|
||||
{
|
||||
$form_name = self::form_name($cname, $this->id);
|
||||
|
||||
$config = Api\Html\CkEditorConfig::get_ckeditor_config_array($this->attrs['mode'], $this->attrs['height'],
|
||||
$this->attrs['expand_toolbar'],$this->attrs['base_href']
|
||||
);
|
||||
// User preferences
|
||||
$font = $GLOBALS['egw_info']['user']['preferences']['common']['rte_font'];
|
||||
$font_size = Api\Html\CkEditorConfig::font_size_from_prefs();
|
||||
$font_span = '<span style="width: 100%; display: inline; '.
|
||||
($font?'font-family:'.$font.'; ':'').($font_size?'font-size:'.$font_size.'; ':'').
|
||||
'">​</span>';
|
||||
if (empty($font) && empty($font_size)) $font_span = '';
|
||||
if($font_span)
|
||||
{
|
||||
$config['preference_style'] = $font_span;
|
||||
}
|
||||
self::$request->modifications[$form_name]['config'] = $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate input
|
||||
*
|
||||
@ -71,15 +38,35 @@ class HtmlArea extends Etemplate\Widget
|
||||
|
||||
if (!$this->is_readonly($cname, $form_name))
|
||||
{
|
||||
$value = self::get_array($content, $form_name);
|
||||
// only purify for html, mode "ascii" is NO html and content get lost!
|
||||
if ($this->attrs['mode'] != 'ascii')
|
||||
{
|
||||
$value = Api\Html\HtmLawed::purify($value, $this->attrs['validation_rules']);
|
||||
}
|
||||
$value = Api\Html\HtmLawed::purify(
|
||||
self::get_array($content, $form_name),
|
||||
$this->attrs['validation_rules']
|
||||
);
|
||||
$valid =& self::get_array($validated, $form_name, true);
|
||||
if (true) $valid = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get font size from preferences
|
||||
*
|
||||
* @param array $prefs =null default $GLOBALS['egw_info']['user']['preferences']
|
||||
* @param string &$size =null on return just size, without unit
|
||||
* @param string &$unit =null on return just unit
|
||||
* @return string font-size including unit
|
||||
*/
|
||||
public static function font_size_from_prefs(array $prefs=null, &$size=null, &$unit=null)
|
||||
{
|
||||
if (is_null($prefs)) $prefs = $GLOBALS['egw_info']['user']['preferences'];
|
||||
|
||||
$size = $prefs['common']['rte_font_size'];
|
||||
$unit = $prefs['common']['rte_font_unit'];
|
||||
if (substr($size, -2) == 'px')
|
||||
{
|
||||
$unit = 'px';
|
||||
$size = (string)(int)$size;
|
||||
}
|
||||
return $size.($size?$unit:'');
|
||||
}
|
||||
}
|
||||
Etemplate\Widget::registerWidget(__NAMESPACE__.'\\HtmlArea', 'htmlarea');
|
||||
|
@ -2891,6 +2891,7 @@ a.chzn-single.et2_country-select span.img {
|
||||
|
||||
}
|
||||
|
||||
.tox-tinymce {display: flex !important;}
|
||||
div.eml {
|
||||
position:absolute;
|
||||
height: 100%;
|
||||
|
@ -1130,10 +1130,10 @@ class mail_compose
|
||||
$disableRuler = true;
|
||||
}
|
||||
$font_span = $font_part = '';
|
||||
if($content['mimeType'] == 'html' /*&& trim($content['body'])==''*/) {
|
||||
if($content['mimeType'] == 'html') {
|
||||
// User preferences for style
|
||||
$font = $GLOBALS['egw_info']['user']['preferences']['common']['rte_font'];
|
||||
$font_size = Api\Html\CkEditorConfig::font_size_from_prefs();
|
||||
$font_size = Etemplate\Widget\HtmlArea::font_size_from_prefs();
|
||||
$font_part = '<span style="width:100%; display: inline; '.($font?'font-family:'.$font.'; ':'').($font_size?'font-size:'.$font_size.'; ':'').'">';
|
||||
$font_span = $font_part.'​</span>';
|
||||
if (empty($font) && empty($font_size)) $font_span = '';
|
||||
@ -1309,14 +1309,7 @@ class mail_compose
|
||||
$_htmlConfig = Mail::$htmLawed_config;
|
||||
Mail::$htmLawed_config['comment'] = 2;
|
||||
Mail::$htmLawed_config['transform_anchor'] = false;
|
||||
// it is intentional to use that simple-withimage configuration for the ckeditor
|
||||
// and not the eGroupware wide pref to prevent users from trying things that will potentially not work
|
||||
// or not work as expected, as a full featured editor that may be wanted in other apps
|
||||
// is way overloading the "normal" needs for composing mails
|
||||
$content['rtfEditorFeatures']='simple-withimage';//Api\Html\CkEditorConfig::get_ckeditor_config();
|
||||
//$content['rtfEditorFeatures']='advanced';//Api\Html\CkEditorConfig::get_ckeditor_config();
|
||||
$content['validation_rules']= json_encode(Mail::$htmLawed_config);
|
||||
$etpl->setElementAttribute('mail_htmltext','mode',$content['rtfEditorFeatures']);
|
||||
$etpl->setElementAttribute('mail_htmltext','validation_rules',$content['validation_rules']);
|
||||
Mail::$htmLawed_config = $_htmlConfig;
|
||||
}
|
||||
|
@ -266,14 +266,11 @@ app.classes.mail = AppJS.extend(
|
||||
that.compose_fieldExpander();
|
||||
}
|
||||
});
|
||||
/*Trigger compose_resizeHandler after the CKEditor is fully loaded*/
|
||||
/*Trigger compose_resizeHandler after the TinyMCE is fully loaded*/
|
||||
jQuery('#mail-compose').on ('load',function() {
|
||||
if (textAreaWidget && textAreaWidget.ckeditor)
|
||||
if (textAreaWidget && textAreaWidget.tinymce)
|
||||
{
|
||||
textAreaWidget.ckeditor.on('instanceReady', function(){
|
||||
that.compose_fieldExpander();
|
||||
if (egwIsMobile()) jQuery(jQuery('iframe.cke_wysiwyg_frame')[0].contentWindow.document.body).css({margin:'0'});
|
||||
});
|
||||
textAreaWidget.tinymce.then(()=>{that.compose_resizeHandler()});
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -310,11 +307,9 @@ app.classes.mail = AppJS.extend(
|
||||
// get the cursor to the top of the textarea
|
||||
if (typeof plainText.node.setSelectionRange !='undefined' && !jQuery(plainText.node).is(":hidden")) plainText.node.setSelectionRange(0,0);
|
||||
}
|
||||
else
|
||||
else if(textAreaWidget && textAreaWidget.tinymce)
|
||||
{
|
||||
textAreaWidget.ckeditor.on('instanceReady', function(e) {
|
||||
this.focus();
|
||||
});
|
||||
textAreaWidget.tinymce.then(()=>{textAreaWidget.editor.focus()});
|
||||
}
|
||||
}
|
||||
else if(to)
|
||||
@ -4364,7 +4359,7 @@ app.classes.mail = AppJS.extend(
|
||||
// Do not resize compose dialog if it's running on mobile device
|
||||
// in this case user would be able to edit mail body by scrolling down,
|
||||
// which is more convenient on small devices. Also resize mailbody with
|
||||
// ckeditor may causes performance regression, especially on devices with
|
||||
// tinyMCE may causes performance regression, especially on devices with
|
||||
// very limited resources and slow proccessor.
|
||||
if (egwIsMobile()) return false;
|
||||
|
||||
@ -4405,7 +4400,12 @@ app.classes.mail = AppJS.extend(
|
||||
}
|
||||
else if (typeof textArea != 'undefined' && textArea.id == 'mail_htmltext')
|
||||
{
|
||||
textArea.ckeditor.resize('100%', bodySize);
|
||||
if (textArea.editor)
|
||||
{
|
||||
jQuery(textArea.editor.editorContainer).height(bodySize);
|
||||
jQuery(textArea.editor.iframeElement).height(bodySize - (textArea.editor.editorContainer.getElementsByClassName('tox-toolbar')[0].clientHeight +
|
||||
textArea.editor.editorContainer.getElementsByClassName('tox-statusbar')[0].clientHeight));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -608,9 +608,6 @@ div.mailDisplayHeaders > span:first-child, div.mailPreviewHeaders > span:first-
|
||||
div.mailComposeHeaders > span:first-child {
|
||||
width: 8em;
|
||||
}
|
||||
div.mailDisplayHeaders > span:first-child, div.mailComposeHeaders > span:first-child, div.mailComposeBody, div.mailPreviewHeaders > * {
|
||||
margin-left: 3px;
|
||||
}
|
||||
div.mailDisplayHeaders div.mail_extraEmails
|
||||
{
|
||||
display: inline-block;
|
||||
@ -955,8 +952,8 @@ img.smime_cert_unknownemail {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.et2_vbox.et2_box_widget.mailComposeBodySection {
|
||||
margin-left: -3px;
|
||||
.et2_vbox.et2_box_widget.mailComposeBodySection .mailComposeHtmlContainer .tox.tox-tinymce{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#mail-compose_subject {
|
||||
|
@ -87,7 +87,7 @@
|
||||
</vbox>
|
||||
<vbox class="mailComposeBodySection" width="100%">
|
||||
<hbox disabled="@is_plain" class="mailComposeBody mailComposeHtmlContainer">
|
||||
<htmlarea span="all" name="mail_htmltext" id="mail_htmltext" imageUpload="link_to" expand_toolbar="true" height="478px" width="100%" resize_ratio="0"/>
|
||||
<htmlarea name="mail_htmltext" id="mail_htmltext" imageUpload="link_to" expand_toolbar="true" height="478px" width="100%" resize_ratio="0"/>
|
||||
</hbox>
|
||||
<hbox disabled="@is_html" class="mailComposeBody mailComposeTextContainer">
|
||||
<textbox multiline="true" rows="40" cols="120" width="100%" span="all" no_lang="1" name="mail_plaintext" id="mail_plaintext" resize_ratio="0"/>
|
||||
|
@ -621,12 +621,6 @@ div.mailPreviewHeaders > span:first-child {
|
||||
div.mailComposeHeaders > span:first-child {
|
||||
width: 8em;
|
||||
}
|
||||
div.mailDisplayHeaders > span:first-child,
|
||||
div.mailComposeHeaders > span:first-child,
|
||||
div.mailComposeBody,
|
||||
div.mailPreviewHeaders > * {
|
||||
margin-left: 3px;
|
||||
}
|
||||
div.mailDisplayHeaders div.mail_extraEmails {
|
||||
display: inline-block;
|
||||
max-height: 1.3em;
|
||||
@ -943,8 +937,8 @@ img.smime_cert_unknownemail {
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
.et2_vbox.et2_box_widget.mailComposeBodySection {
|
||||
margin-left: -3px;
|
||||
.et2_vbox.et2_box_widget.mailComposeBodySection .mailComposeHtmlContainer .tox.tox-tinymce {
|
||||
width: 100%;
|
||||
}
|
||||
#mail-compose_subject {
|
||||
padding: 10px 0 10px 0;
|
||||
@ -2437,12 +2431,6 @@ div.mailPreviewHeaders > span:first-child {
|
||||
div.mailComposeHeaders > span:first-child {
|
||||
width: 8em;
|
||||
}
|
||||
div.mailDisplayHeaders > span:first-child,
|
||||
div.mailComposeHeaders > span:first-child,
|
||||
div.mailComposeBody,
|
||||
div.mailPreviewHeaders > * {
|
||||
margin-left: 3px;
|
||||
}
|
||||
div.mailDisplayHeaders div.mail_extraEmails {
|
||||
display: inline-block;
|
||||
max-height: 1.3em;
|
||||
|
@ -609,12 +609,6 @@ div.mailPreviewHeaders > span:first-child {
|
||||
div.mailComposeHeaders > span:first-child {
|
||||
width: 8em;
|
||||
}
|
||||
div.mailDisplayHeaders > span:first-child,
|
||||
div.mailComposeHeaders > span:first-child,
|
||||
div.mailComposeBody,
|
||||
div.mailPreviewHeaders > * {
|
||||
margin-left: 3px;
|
||||
}
|
||||
div.mailDisplayHeaders div.mail_extraEmails {
|
||||
display: inline-block;
|
||||
max-height: 1.3em;
|
||||
@ -931,8 +925,8 @@ img.smime_cert_unknownemail {
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
.et2_vbox.et2_box_widget.mailComposeBodySection {
|
||||
margin-left: -3px;
|
||||
.et2_vbox.et2_box_widget.mailComposeBodySection .mailComposeHtmlContainer .tox.tox-tinymce {
|
||||
width: 100%;
|
||||
}
|
||||
#mail-compose_subject {
|
||||
padding: 10px 0 10px 0;
|
||||
@ -2425,12 +2419,6 @@ div.mailPreviewHeaders > span:first-child {
|
||||
div.mailComposeHeaders > span:first-child {
|
||||
width: 8em;
|
||||
}
|
||||
div.mailDisplayHeaders > span:first-child,
|
||||
div.mailComposeHeaders > span:first-child,
|
||||
div.mailComposeBody,
|
||||
div.mailPreviewHeaders > * {
|
||||
margin-left: 3px;
|
||||
}
|
||||
div.mailDisplayHeaders div.mail_extraEmails {
|
||||
display: inline-block;
|
||||
max-height: 1.3em;
|
||||
|
@ -1294,9 +1294,7 @@ div.mailDisplayHeaders > span:first-child, div.mailComposeHeaders > span:first-c
|
||||
div.mailComposeHeaders > span:first-child {
|
||||
width: 8em;
|
||||
}
|
||||
div.mailDisplayHeaders > span:first-child, div.mailComposeHeaders > span:first-child, div.mailComposeBody, div.mailPreviewHeaders > * {
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
div.mailDisplayHeaders div.mail_extraEmails {
|
||||
display: inline-block;
|
||||
max-height: 1.3em;
|
||||
|
Loading…
Reference in New Issue
Block a user