Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
36003586
Commit
36003586
authored
Sep 29, 2016
by
Rafael Ostertag
Browse files
tinyMCE.js: Fixed handling of JavaScript/JSON data in `data-config` attribute.
Gruntfile.js: Copy tinyMCE plugins.
parent
6f241f2d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Gruntfile.js
View file @
36003586
...
...
@@ -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
}
]
...
...
javascript/src/Helper/tinyMCE.js
View file @
36003586
...
...
@@ -43,12 +43,11 @@ QfqNS.Helper = QfqNS.Helper || {};
var
configData
=
$this
.
data
(
'
config
'
);
if
(
configData
)
{
try
{
config
=
JSON
.
parse
(
configData
);
}
catch
(
e
)
{
QfqNS
.
Log
.
error
(
"
Exception while parsing JSON:
"
+
configData
);
QfqNS
.
Log
.
error
(
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
);
}
}
...
...
mockup/richtexteditor.html
View file @
36003586
...
...
@@ -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=
"{ "plugins": "advlist autolink link image lists charmap print preview"}"
>
Input
</textarea>
</div>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment