Commit f95594a8 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge remote-tracking branch 'origin/tinymce' into crose_work

parents 44e04fa1 43773d46
......@@ -249,21 +249,12 @@ module.exports = function (grunt) {
{
cwd: 'bower_components/tinymce/',
src: [
'themes/*/theme.min.js'
],
dest: typo3_js,
expand: true,
// Tiny MCE expects the theme js files in ./themes.
flatten: false
},
{
cwd: 'bower_components/tinymce/',
src: [
'themes/*/theme.min.js',
'plugins/*/plugin.min.js',
'skins/**'
],
dest: typo3_js,
expand: true,
// Tiny MCE expects the theme js files in ./themes.
flatten: false
}
]
......@@ -282,21 +273,12 @@ module.exports = function (grunt) {
{
cwd: 'bower_components/tinymce/',
src: [
'themes/*/theme.min.js'
],
dest: 'js/',
expand: true,
// Tiny MCE expects the theme js files in ./themes.
flatten: false
},
{
cwd: 'bower_components/tinymce/',
src: [
'themes/*/theme.min.js',
'plugins/*/plugin.min.js',
'skins/**'
],
dest: 'js/',
expand: true,
// Tiny MCE expects the theme js files in ./themes.
flatten: false
}
]
......
......@@ -43,19 +43,18 @@ QfqNS.Helper = QfqNS.Helper || {};
var configData = $this.data('config');
if (configData) {
try {
config = JSON.parse(configData);
} catch (e) {
QfqNS.Log("Exception while parsing JSON: " + configData);
QfqNS.Log(e);
return;
if (configData instanceof Object) {
// jQuery takes care of decoding data-config to JavaScript object.
config = configData;
} else {
QfqNS.Log.warning("'data-config' is invalid: " + configData);
}
}
config.selector = "#" + tinyMCEId;
config.setup = function (editor) {
editor.on('Change', function (e) {
console.log('Editor was changed');
QfqNS.Log.debug('Editor was changed');
var eventTarget = e.target;
var $parentForm = $(eventTarget.formElement);
$parentForm.trigger("change");
......
......@@ -73,7 +73,8 @@
</div>
<div class="col-md-6">
<textarea id="text2" class="qfq-tinymce" name="rte">Input
<textarea id="text2" class="qfq-tinymce" name="rte"
data-config="{ &quot;plugins&quot;: &quot;advlist autolink link image lists charmap print preview&quot;}">Input
</textarea>
</div>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment