Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CkEditor-Embed-Plugins
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Bolt Extensions
CkEditor-Embed-Plugins
Commits
d4603b8c
Commit
d4603b8c
authored
Apr 10, 2019
by
Simon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update ckeditor-plugins.js
parent
e4bd0139
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
18 deletions
+21
-18
ckeditor-plugins.js
web/js/ckeditor-plugins.js
+21
-18
No files found.
web/js/ckeditor-plugins.js
View file @
d4603b8c
...
...
@@ -4,30 +4,33 @@ if (typeof CKEDITOR !== 'undefined') {
jQuery
(
document
).
ready
(
function
(
$
)
{
var
CKEDITORPluginExtras
=
false
;
if
(
typeof
(
CKEDITOR
)
!=
'undefined'
)
{
console
.
log
(
ckeditorPlugins
);
for
(
const
plugin
of
ckeditorPlugins
)
{
CKEDITOR
.
plugins
.
addExternal
(
plugin
,
`
${
ckeditorPluginsPath
}
/
${
plugin
}
/`
,
'plugin.js'
);
}
CKEDITOR
.
on
(
'instanceReady'
,
function
(
event
,
instance
)
{
if
(
CKEDITORPluginExtras
)
{
return
;
if
(
typeof
ckeditorPluginsPath
!==
'undefined'
&&
typeof
ckeditorPlugins
!==
'undefined'
)
{
for
(
const
plugin
of
ckeditorPlugins
)
{
CKEDITOR
.
plugins
.
addExternal
(
plugin
,
`
${
ckeditorPluginsPath
}
/
${
plugin
}
/`
,
'plugin.js'
);
}
var
config
=
event
.
editor
.
config
,
name
;
CKEDITOR
.
on
(
'instanceReady'
,
function
(
event
,
instance
)
{
if
(
CKEDITORPluginExtras
)
{
return
;
}
var
config
=
event
.
editor
.
config
,
name
;
config
.
extraPlugins
+=
(
config
.
extraPlugins
?
','
:
''
)
+
ckeditorPlugins
.
join
(
','
);
config
.
extraPlugins
+=
(
config
.
extraPlugins
?
','
:
''
)
+
ckeditorPlugins
.
join
(
','
);
for
(
name
in
CKEDITOR
.
instances
)
{
if
(
CKEDITOR
.
instances
.
hasOwnProperty
(
name
))
{
CKEDITOR
.
instances
[
name
].
destroy
();
CKEDITOR
.
replace
(
name
,
config
);
for
(
name
in
CKEDITOR
.
instances
)
{
if
(
CKEDITOR
.
instances
.
hasOwnProperty
(
name
))
{
CKEDITOR
.
instances
[
name
].
destroy
();
CKEDITOR
.
replace
(
name
,
config
);
}
}
}
CKEDITORPluginExtras
=
true
;
});
CKEDITORPluginExtras
=
true
;
});
}
else
{
console
.
error
(
'Ckeditor-embed-plugin: Path or plugins not defined'
)
}
}
});
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