Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
ckeditor_advanced_tab
Commits
7e34b4ff
Commit
7e34b4ff
authored
Dec 29, 2019
by
Julien de Nas de Tourris
Browse files
Reindent ckeditor_advanced_tab.install, update README.md, add icon
parent
68c406c8
Changes
4
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
7e34b4ff
CKE
ditor Advanced Tab for Dialogs
CKE
DITOR ADVANCED TAB FOR DIALOGS
====================
INTRODUCTION
...
...
@@ -7,8 +7,10 @@ INTRODUCTION
This module integrates the
[
dialogadvtab
](
https://ckeditor.com/cke4/addon/dialogadvtab
)
CKEditor plugin for Drupal 8.
This plugin provides the Advanced dialog window tab to extend some editor dialog windows.
Thanks to this other plugins do not need to implement the same features for their dialog windows.
This plugin provides the Advanced dialog window tab to extend
some editor dialog windows.
Thanks to this other plugins do not need to implement
the same features for their dialog windows.
Among the plugins that implement the Advanced tab are:
*
The
[
Link
](
https://ckeditor.com/cke4/addon/link
)
plugin
...
...
@@ -70,8 +72,7 @@ entry for `type:drupal-library`. For example:
CKEditor Advanced Tab module, and enable it
[
as per usual
](
https://www.drupal.org/docs/8/extending-drupal-8/installing-drupal-8-modules
)
.
### Install Manually
Install Manually
*
Download the
[
dialogadvtab
](
https://ckeditor.com/cke4/addon/dialogadvtab
)
CKEditor plugin.
...
...
@@ -82,6 +83,14 @@ CKEditor plugin.
*
Install the CKEditor Advanced Tab module
[
as per usual
](
https://www.drupal.org/docs/8/extending-drupal-8/installing-drupal-8-modules
)
.
CONFIGURATION
-------------
*
Configure the WYSIWYG buttons in
Administration » Configuration » Content authoring » Text formats and editors:
-
Drag the advanced icon button to your toolbar and save
MAINTAINERS
-----------
Current maintainers:
...
...
ckeditor_advanced_tab.install
View file @
7e34b4ff
...
...
@@ -9,33 +9,34 @@
* Implements hook_requirements().
*/
function
ckeditor_advanced_tab_requirements
(
$phase
)
{
$requirements
=
[];
if
(
$phase
==
'install'
||
$phase
==
'runtime'
)
{
$path
=
'/libraries/ckeditor/plugins/dialogadvtab/'
;
$plugin_detected
=
file_exists
(
DRUPAL_ROOT
.
$path
.
'plugin.js'
);
$requirements
=
[];
if
(
$plugin_detected
)
{
$requirements
[
'dialogadvtab'
]
=
[
'title'
=>
t
(
'CKEditor Advanced Tab'
),
'value'
=>
t
(
'Plugin detected'
),
'severity'
=>
REQUIREMENT_OK
,
];
}
else
{
$requirements
[
'dialogadvtab'
]
=
[
'title'
=>
t
(
'CKEditor Advanced Tab'
),
'value'
=>
t
(
'Plugin not detected'
),
'severity'
=>
REQUIREMENT_ERROR
,
'description'
=>
t
(
'The CKEditor plugin <b>Dialog Advanced Tab</b> is
required. Download <a href=":url">here</a> and copy to
<code>:path</code>.'
,
[
':url'
=>
'https://ckeditor.com/cke4/addon/dialogadvtab'
,
':path'
=>
$path
,
]),
];
}
if
(
$phase
==
'install'
||
$phase
==
'runtime'
)
{
$path
=
'/libraries/ckeditor/plugins/dialogadvtab/'
;
$plugin_detected
=
file_exists
(
DRUPAL_ROOT
.
$path
.
'plugin.js'
);
if
(
$plugin_detected
)
{
$requirements
[
'dialogadvtab'
]
=
[
'title'
=>
t
(
'CKEditor Advanced Tab'
),
'value'
=>
t
(
'Plugin detected'
),
'severity'
=>
REQUIREMENT_OK
,
];
}
else
{
$requirements
[
'dialogadvtab'
]
=
[
'title'
=>
t
(
'CKEditor Advanced Tab'
),
'value'
=>
t
(
'Plugin not detected'
),
'severity'
=>
REQUIREMENT_ERROR
,
'description'
=>
t
(
'The CKEditor plugin <b>Dialog Advanced Tab</b> is
required. Download <a href=":url">here</a> and copy to
<code>:path</code>.'
,
[
':url'
=>
'https://ckeditor.com/cke4/addon/dialogadvtab'
,
':path'
=>
$path
,
]),
];
}
}
return
$requirements
;
return
$requirements
;
}
icons/link.png
0 → 100644
View file @
7e34b4ff
533 Bytes
src/Plugin/CKEditorPlugin/CKEditorAdvancedTab.php
View file @
7e34b4ff
...
...
@@ -19,17 +19,27 @@ class CKEditorAdvancedTab extends CKEditorPluginBase {
* {@inheritdoc}
*/
public
function
getFile
()
{
return
'libraries/ckeditor/plugins/dialogadvtab/plugin.js'
;
$path
=
'libraries/ckeditor/plugins/dialogadvtab/plugin.js'
;
if
(
file_exists
(
$path
))
{
return
'libraries/ckeditor/plugins/dialogadvtab/plugin.js'
;
}
else
{
drupal_set_message
(
t
(
"The plugin.js file can't be found in libraries/ckeditor/plugins/dialogadvtab. Please check README for installation."
),
'error'
);
}
}
/**
* {@inheritdoc}
*/
public
function
getButtons
()
{
$path
=
drupal_get_path
(
'module'
,
'ckeditor_advanced_tab'
)
.
'/icons'
;
return
[
'
CreateDiv
'
=>
[
'
AdvancedTab
'
=>
[
'label'
=>
t
(
'Advanced Tab'
),
'image'
=>
'libraries/ckeditor/plugins/dialogadvtab/icons/table
.png'
,
'image'
=>
$path
.
'/link
.png'
,
],
];
}
...
...
Write
Preview
Supports
Markdown
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