Commit 043779fe authored by Vladimir Roudakov's avatar Vladimir Roudakov Committed by Kevin Wenger
Browse files

Issue #3277174 by mmiramont, VladimirAus, MacSim, Artusamak, John Pitcairn,...

Issue #3277174 by mmiramont, VladimirAus, MacSim, Artusamak, John Pitcairn, wengerk, PhilY: CKEditor 5 compatibility
parent ac96fdb3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -15,3 +15,5 @@ composer.lock

# Ignore files generated by PhpStorm
.idea

js/node_modules
+5 −0
Original line number Diff line number Diff line
@@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- add support for CKEditor 5 - Issue #3277174 by mmiramont, VladimirAus, MacSim: CKEditor 5 compatibility

### Changed
- change generated markup from <span class="nbsp"> to own markup <nbsp> - Issue #3066349 by John Pitcairn, wengerk, PhilY, Artusamak: Using span is problematic due to Drupal's permissive html filters

## [2.1.0] - 2022-10-21
### Added
+6 −6
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ First of all, you will need to have the following tools installed
globally on your environment:

  * drush
  * Latest dev release of Drupal 8.x.
  * Latest dev release of Drupal 8.x|9.x.
  * docker
  * docker-compose

@@ -85,13 +85,13 @@ violations.
PHP_CodeSniffer is an essential development tool that ensures your code remains clean and consistent.

  ```
  $ docker-compose exec drupal ./vendor/bin/phpcs ./web/modules/contrib/loco_translate/
  $ docker-compose exec drupal ./vendor/bin/phpcs ./web/modules/contrib/nbsp/
  ```

Automatically fix coding standards

  ```
  $ docker-compose exec drupal ./vendor/bin/phpcbf ./web/modules/contrib/loco_translate/
  $ docker-compose exec drupal ./vendor/bin/phpcbf ./web/modules/contrib/nbsp/
  ```

#### Running PHP Mess Detector
@@ -101,7 +101,7 @@ https://github.com/phpmd/phpmd
Detect overcomplicated expressions & Unused parameters, methods, properties.

  ```
  $ docker-compose exec drupal phpmd ./web/modules/contrib/loco_translate/ text ./phpmd.xml \
  $ docker-compose exec drupal phpmd ./web/modules/contrib/nbsp/ text ./phpmd.xml \
  --suffixes php,module,inc,install,test,profile,theme,css,info,txt --exclude *Test.php,*vendor/*,*node_modules/*
  ```

@@ -112,7 +112,7 @@ https://github.com/sebastianbergmann/phpcpd
`phpcpd` is a Copy/Paste Detector (CPD) for PHP code.

  ```
  $ docker-compose exec drupal phpcpd ./web/modules/contrib/loco_translate/src --suffix .php --suffix .module --suffix .inc --suffix .install --suffix .test --suffix .profile --suffix .theme --suffix .css --suffix .info --suffix .txt --exclude *.md --exclude *.info.yml --exclude tests --exclude vendor/ --exclude node_modules/
  $ docker-compose exec drupal phpcpd ./web/modules/contrib/nbsp/src --suffix .php --suffix .module --suffix .inc --suffix .install --suffix .test --suffix .profile --suffix .theme --suffix .css --suffix .info --suffix .txt --exclude *.md --exclude *.info.yml --exclude tests --exclude vendor/ --exclude node_modules/
  ```

#### Running PhpDeprecationDetector
@@ -122,7 +122,7 @@ https://github.com/wapmorgan/PhpDeprecationDetector
A scanner that checks compatibility of your code with PHP interpreter versions.

  ```
  $ docker-compose exec drupal phpdd ./web/modules/contrib/loco_translate/ \
  $ docker-compose exec drupal phpdd ./web/modules/contrib/nbsp/ \
    --file-extensions php,module,inc,install,test,profile,theme,info --exclude vendor --exclude node_modules
  ```

+1 −2
Original line number Diff line number Diff line
@@ -31,8 +31,7 @@ where you want to use NBSP, do the following:
* Enable filter "Cleanup NBSP markup".
* if the "Limit allowed HTML tags and correct faulty HTML" filter is disabled
you dont have anything to do with this text format.
Otherwise, add the `class` attribute to `<span>` in the "allowed HTML tags"
field (Eg. `<span class>`).
Otherwise, add `<nbsp>` in the "allowed HTML tags" field.

## NBSP versions

css/ckeditor.nbsp.css

0 → 100644
+13 −0
Original line number Diff line number Diff line
nbsp {
  border: 2px solid rgba(0, 123, 198, 1);
  background-color: rgba(0, 123, 198, 0.4);
  display: inline-block;
}

/**
 * The previous tag (span.nbsp) is still on the filter to keep compatibility with previous content created.
 */
span.nbsp {
  border: 1px solid rgba(0, 123, 198, 1);
  background-color: rgba(0, 123, 198, 0.4);
}
Loading