CKEditor Letter Spacing

This module adds a "tracking" dropdown to WYSIWYG that allows users to apply the letter-spacing CSS property to text.

INSTALLATION

Manual library download:

  1. Download the plugin from http://ckeditor.com/addon/letterspacing.
  2. Place the plugin in the root libraries folder (/libraries). Result path to plugin.js should be /libraries/letterspacing/plugin.js.
  3. Enable CKEditor Letter Spacing in the Drupal admin.
  4. Configure your WYSIWYG toolbar to include the buttons.

Installation with composer

  1. Add letterspacing to repositories section in composer.json:
        "repositories": [
            {
                "type": "package",
                "package": {
                    "name": "ckeditor/letterspacing",
                    "type": "drupal-library",
                    "version": "0.1.2",
                    "dist": {
                        "type": "zip",
                        "url": "https://download.ckeditor.com/letterspacing/releases/letterspacing_0.1.2.zip",
                        "reference": "master"
                    }
                }
            }
        ],
    
  2. Check that you have configured installer-paths for libraries. Example:
        "extra": {
            "installer-paths": {
                "web/core": ["type:drupal-core"],
                "web/libraries/{$name}": ["type:drupal-library"],
                "web/modules/contrib/{$name}": ["type:drupal-module"],
                "web/profiles/contrib/{$name}": ["type:drupal-profile"],
                "web/themes/contrib/{$name}": ["type:drupal-theme"],
                "drush/contrib/{$name}": ["type:drupal-drush"]
            }
        }
    
  3. Run composer require ckeditor/letterspacing
  4. Enable CKEditor Letter Spacing in the Drupal admin.
  5. Configure your WYSIWYG toolbar to include the buttons.

Troubleshooting

In case if Letter Spacing not apply to the text - try to disable Limit allowed HTML tags and correct faulty HTML filter, which calls to Drupal\Component\Utility\Xss::filter() (this function ALWAYS stripes the style attribute, no matter the configuration that you passed, is hardcoded)

Requirements

  • CKEditor Module (Core)
  • CKEditor Letter Spacing plugin (ckeditor.com)
Supporting organizations: 
Development

Project information

Releases