shel/neos-hyphens

Last activity 10 days ago
  • 17
  • 1
  • 12219
composer require shel/neos-hyphens

A plugin for Neos CMS which provides hyphens for the inline editor

1.1.0

A plugin for Neos CMS which provides hyphens for the inline editor

Version
1.1.0
Type
neos-plugin
Release Date
23.02.2021 12:55:45
Source
git
Distribution
zip
Requires
Requires (dev)
None
Suggest
None
Provides
None
Conflicts
None
Replaces
None
GPL-3.0
  • #flow
  • #editor
  • #ckeditor
  • #neos
  • #neoscms
  • #hyphens
e47e0eed120d660742ecb03657638ce3300490c4

Hyphens CKEditor5 plugin for Neos CMS

Latest Stable Version Total Downloads License

Introduction

This package provides a button to insert soft hyphens for the inline editor in Neos CMS.

Many browser support some kind of hyphenation via CSS but it doesnt work reliably on all systems and not with all languages. See the CanIuse table for details.

Therefore this package provides a manual way to insert them. You should be careful with using the CSS based hyphenation in combination with the manual hyphens as the result can be unexpected.

It's compatible with Neos CMS 4.3, 5 and 7.

Example

In the backend this plugin will add the option to add soft hyphens. They will look like this while editing:

Visible hyphens while editing

And in the frontend will convert this:

Unwanted hyphenation without soft hyphens

Into this:

Expected hyphenation

And in action:

Expected hyphenation

Advantages

  • Your editors gain control over word breaks.
  • Stores the hyphens in the database with their UTF8 representation which the browser interprets as ­.
  • You don't need other characters which you replace with hyphens in the Frontend.
  • Should work fine with Elasticsearch and other search engines.

Planned features

See enhancement issue list.

Installation

Run this in your site package

composer require --no-update shel/neos-hyphens

Then run composer update in your project directory.

How to use

Enable it for a node with editable text like this:

'Neos.NodeTypes:Text':
  properties:
    text:
      ui:
        inline:
          editorOptions:
            hyphens: true

This will add a new button to insert a soft hyphen. As an alternative, you can use the shortcut Ctrl + Shift + - to add a new soft hyphen. To change the keys of the shortcut, have a look at the Settings.yaml file.

Customization

Hyphen styling in the backend

You can provide your own styling by referencing your own stylesheet. See the file Override.Page.fusion on how the default styling is included.

You can either override the configuration from your own package and just use your stylesheet or you can add yours and use both.

Contributions

Contributions are very welcome!

Please create detailed issues and PRs.

If you use this package and want to support or speed up it's development, get in touch with me.

Or you can also support me directly via patreon.

License

See License

The content of the readme is provided by Github
The same vendor provides 18 package(s).