Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
ckeditor
Commits
bd0cfeca3507
Commit
6e7a6344
authored
Mar 15, 2016
by
Samuel Trégouët
Browse files
rename variables
fck -> ck
parent
df7eb5ac23b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
__init__.py
View file @
bd0cfeca
...
...
@@ -12,12 +12,12 @@ from cubicweb.web.request import _CubicWebRequestBase
@
monkeypatch
(
_CubicWebRequestBase
)
@
cached
# so it's writed only once
def
fckeditor_config
(
self
):
f
ckeditor_url
=
'//cdn.ckeditor.com/4.5.7/standard/ckeditor.js'
self
.
add_js
(
f
ckeditor_url
,
localfile
=
False
)
ckeditor_url
=
'//cdn.ckeditor.com/4.5.7/standard/ckeditor.js'
self
.
add_js
(
ckeditor_url
,
localfile
=
False
)
self
.
add_js
(
'initwysiwyg.js'
)
self
.
add_onload
(
'buildWysiwygEditors()'
)
self
.
html_headers
.
define_var
(
'
f
cklang'
,
self
.
lang
)
self
.
html_headers
.
define_var
(
'
f
ckconfigpath'
,
self
.
html_headers
.
define_var
(
'cklang'
,
self
.
lang
)
self
.
html_headers
.
define_var
(
'ckconfigpath'
,
self
.
data_url
(
'ckeditor-config.js'
))
@
monkeypatch
(
WebConfiguration
)
...
...
data/initwysiwyg.js
View file @
bd0cfeca
...
...
@@ -7,8 +7,8 @@ function buildWysiwygEditors(parent) {
this
.
setAttribute
(
'
cubicweb:type
'
,
'
ckeditor
'
);
if
(
typeof
CKEDITOR
!=
"
undefined
"
)
{
var
fck
=
CKEDITOR
.
replace
(
this
.
id
,
{
customConfig
:
f
ckconfigpath
,
defaultLangguage
:
f
cklang
customConfig
:
ckconfigpath
,
defaultLangguage
:
cklang
});
}
else
{
cw
.
log
(
'
fckeditor could not be found.
'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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