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
alecs_myu
erp5
Commits
0523a1f6
Commit
0523a1f6
authored
May 22, 2017
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: can configure ckeditor
parent
98076a1b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
28 deletions
+32
-28
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_ckeditor_js.js
...js/PathTemplateItem/web_page_module/gadget_ckeditor_js.js
+30
-26
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_ckeditor_js.xml
...s/PathTemplateItem/web_page_module/gadget_ckeditor_js.xml
+2
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_ckeditor_js.js
View file @
0523a1f6
...
...
@@ -10,37 +10,41 @@
.
ready
(
function
(
g
)
{
return
g
.
getElement
()
.
push
(
function
(
element
)
{
var
textarea
=
element
.
querySelector
(
'
textarea
'
);
g
.
props
.
element
=
element
;
g
.
props
.
ckeditor
=
CKEDITOR
.
replace
(
textarea
,
{
});
})
.
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
);
g
.
props
.
ckeditor
.
addCommand
(
'
saveRJS
'
,
{
this
.
props
.
ckeditor
.
addCommand
(
'
saveRJS
'
,
{
readOnly
:
1
,
exec
:
function
()
{
return
g
.
submitContent
();
}
});
g
.
props
.
ckeditor
.
ui
.
addButton
(
'
Save
'
,
{
this
.
props
.
ckeditor
.
ui
.
addButton
(
'
Save
'
,
{
label
:
"
Save
"
,
command
:
'
saveRJS
'
,
toolbar
:
'
document,1
'
});
g
.
props
.
ckeditor
.
on
(
'
instanceReady
'
,
function
(
event
)
{
this
.
props
.
ckeditor
.
on
(
'
instanceReady
'
,
function
(
event
)
{
event
.
editor
.
execCommand
(
'
maximize
'
);
});
});
})
.
declareAcquiredMethod
(
"
submitContent
"
,
"
triggerSubmit
"
)
.
declareMethod
(
'
render
'
,
function
(
options
)
{
this
.
props
.
key
=
options
.
key
||
"
text_content
"
;
this
.
props
.
ckeditor
.
setData
(
options
.
value
||
""
);
return
{};
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_ckeditor_js.xml
View file @
0523a1f6
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
4.4005.3918.1674
2
</string>
</value>
<value>
<string>
95
9.34902.60336.5985
2
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
14
74449146.05
</float>
<float>
14
95445241.18
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
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