Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Klaus Wölfel
erp5
Commits
8f6b4425
Commit
8f6b4425
authored
May 22, 2017
by
Xiaowu Zhang
Committed by
Klaus Wölfel
Jul 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: can configure ckeditor
parent
a9ca57b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
0 deletions
+59
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_ckeditor_js.js
...js/PathTemplateItem/web_page_module/gadget_ckeditor_js.js
+59
-0
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_ckeditor_js.js
0 → 100644
View file @
8f6b4425
/*global window, rJS, CKEDITOR*/
/*jslint nomen: true, maxlen:80, indent:2*/
(
function
(
rJS
,
CKEDITOR
)
{
"
use strict
"
;
rJS
(
window
)
.
ready
(
function
(
g
)
{
g
.
props
=
{};
})
.
ready
(
function
(
g
)
{
return
g
.
getElement
()
.
push
(
function
(
element
)
{
g
.
props
.
element
=
element
;
});
})
.
declareAcquiredMethod
(
"
submitContent
"
,
"
triggerSubmit
"
)
.
declareMethod
(
'
render
'
,
function
(
options
)
{
var
config
=
options
.
config
||
{
removeButtons
:
'
NewPage,Preview,Cut,Paste,Copy,PasteText,
'
+
'
PasteFromWord,Flash,Iframe,Form,Checkbox,Radio,TextField,
'
+
'
Textarea,Select,Button,ImageButton,HiddenField,Maximize
'
,
removePlugins
:
''
,
disableNativeSpellChecker
:
false
,
extraAllowedContent
:
"
details section article
"
},
textarea
=
this
.
props
.
element
.
querySelector
(
'
textarea
'
);
this
.
props
.
ckeditor
=
CKEDITOR
.
replace
(
textarea
,
config
);
this
.
props
.
ckeditor
.
addCommand
(
'
saveRJS
'
,
{
readOnly
:
1
,
exec
:
function
()
{
return
g
.
submitContent
();
}
});
this
.
props
.
ckeditor
.
ui
.
addButton
(
'
Save
'
,
{
label
:
"
Save
"
,
command
:
'
saveRJS
'
,
toolbar
:
'
document,1
'
});
this
.
props
.
ckeditor
.
on
(
'
instanceReady
'
,
function
(
event
)
{
event
.
editor
.
execCommand
(
'
maximize
'
);
});
this
.
props
.
key
=
options
.
key
||
"
text_content
"
;
this
.
props
.
ckeditor
.
setData
(
options
.
value
||
""
);
return
{};
})
.
declareMethod
(
'
getContent
'
,
function
()
{
var
result
=
{};
result
[
this
.
props
.
key
]
=
this
.
props
.
ckeditor
.
getData
();
return
result
;
});
}(
rJS
,
CKEDITOR
));
\ No newline at end of file
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