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
13dbf819
Commit
13dbf819
authored
Dec 17, 2018
by
JULIEN DE NAS DE TOURRIS
Browse files
Initial commit.
parents
Changes
4
Hide whitespace changes
Inline
Side-by-side
README.md
0 → 100644
View file @
13dbf819
CKEditor Advanced Tab for Dialogs
====================
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.
REQUIREMENTS
------------
*
CKEditor Module (Core)
INSTALLATION
------------
### Install via Composer (recommended)
If you use Composer to manage dependencies, edit composer.json as follows.
*
Run
`composer require --prefer-dist composer/installers`
to ensure you have
the composer/installers package. This facilitates installation into directories
other than vendor using Composer.
*
In composer.json, make sure the "installer-paths" section in "extras" has an
entry for
`type:drupal-library`
. For example:
```
json
{
"libraries/{$name}"
:
[
"type:drupal-library"
]
}
```
*
Add the following to the "repositories" section of composer.json:
```
json
{
"type"
:
"package"
,
"package"
:
{
"name"
:
"ckeditor/dialogadvtab"
,
"version"
:
"4.8.0"
,
"type"
:
"drupal-library"
,
"extra"
:
{
"installer-name"
:
"ckeditor/plugins/dialogadvtab"
},
"dist"
:
{
"url"
:
"https://download.ckeditor.com/dialogadvtab/releases/dialogadvtab_4.8.0.zip"
,
"type"
:
"zip"
}
}
}
```
*
Run
`composer require 'ckeditor/dialogadvtab:4.8.0'`
to download the plugin.
*
Run
`composer require 'drupal/ckeditor_advanced_tab:^1.0.0'`
to download the
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
*
Download the
[
dialogadvtab
](
https://ckeditor.com/cke4/addon/dialogadvtab
)
CKEditor plugin.
*
Extract and place the plugin contents in the following directory:
`/libraries/ckeditor/plugins/dialogadvtab/`
.
*
Install the CKEditor Advanced Tab module
[
as per usual
](
https://www.drupal.org/docs/8/extending-drupal-8/installing-drupal-8-modules
)
.
MAINTAINERS
-----------
Current maintainers:
*
Julien de Nas de Tourris (
[
julien
](
https://www.drupal.org/u/julien
)
)
ckeditor_advanced_tab.info.yml
0 → 100644
View file @
13dbf819
name
:
CKEditor Advanced Tab
type
:
module
description
:
'
Adds
the
Advanced
tab
to
dialog
plugin
to
CKEditor.'
core
:
8.x
package
:
CKEditor
dependencies
:
-
drupal:ckeditor
ckeditor_advanced_tab.install
0 → 100644
View file @
13dbf819
<?php
/**
* @file
* Install, update, and uninstall functions for CKEditor Advanced Tab.
*/
/**
* 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'
);
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
;
}
src/Plugin/CKEditorPlugin/CKEditorAdvancedTab.php
0 → 100644
View file @
13dbf819
<?php
namespace
Drupal\ckeditor_advanced_tab\Plugin\CKEditorPlugin
;
use
Drupal\ckeditor\CKEditorPluginBase
;
use
Drupal\editor\Entity\Editor
;
/**
* Defines the "Advanced Tab" plugin.
*
* @CKEditorPlugin(
* id = "dialogadvtab",
* label = @Translation("Advanced Tab Dialog")
* )
*/
class
CKEditorAdvancedTab
extends
CKEditorPluginBase
{
/**
* {@inheritdoc}
*/
public
function
getFile
()
{
return
'libraries/ckeditor/plugins/dialogadvtab/plugin.js'
;
}
/**
* {@inheritdoc}
*/
public
function
getButtons
()
{
return
[
'CreateDiv'
=>
[
'label'
=>
t
(
'Advanced Tab'
),
'image'
=>
'libraries/ckeditor/plugins/dialogadvtab/icons/table.png'
,
],
];
}
/**
* {@inheritdoc}
*/
public
function
getConfig
(
Editor
$editor
)
{
return
[];
}
}
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