Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC Document changes required to upgrade build stack #137

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions en/04_Changelogs/5.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ title: 5.0.0 (unreleased)
- [Breaking changes in _our_ javascript components or API](#js-api)
- [Other Breaking Changes](#other-breaking-changes)
- [URLs generated by Silverstripe CMS don't include a trailing slash by default](#trailing-slash)
- [CWP Agency Extensions](#cwp-agency-extensions)
- [Features and enhancements](#features-and-enhancements)
- [Other features](#other-features)
- [Bugfixes](#bugfixes)
Expand Down Expand Up @@ -503,6 +504,36 @@ SilverStripe\Core\Injector\Injector:

[/info]

### CWP Agency Extensions

The [cwp/agency-extensions](https://github.com/silverstripe/cwp-agencyextensions) module used to provide a Font Awesome v4 plugin for TinyMCE 4. This plugin is not compatible with TinyMCE 6 and we couldn't see an appropriate alternative plugin to use instead. The fact that such a replacement doesn't seem to exist in the wild suggests to us that the use-case is very narrow, so we have opted to remove this plugin without replacing it.

If your project has no content which used the Font Awesome plugin provided by this module, you don't need to make any changes - though you can remove the `CWP_AGENCY_DISABLE_FONTAWESOME_PLUGIN` environment variable from your `.env` file if it was set.

If your project does have some content which contains Font Awesome icons from that plugin, you will need to set `CWP_AGENCY_ENABLE_FONTAWESOME_STYLES` to true in your environment variables. This will allow you to see the existing icons in the TinyMCE field in the CMS, as well as ensuring that they will not be removed when you save content. The front-end will not be impacted, as you already had to inject an appropriate stylesheet into the front-end for the icons to appear there.

If you cannot set environment variables in your project, you can set the following configuration manually in your project:

**_config.php**
```php
use SilverStripe\Forms\HTMLEditor\TinyMCEConfig;

TinyMCEConfig::get('cwp')->setOption(
'extended_valid_elements',
$cwpEditor->getOption('extended_valid_elements')
. ',span[class|align|style|aria-hidden]'
);
```

**_config/font-awesome.yml**
```yml
SilverStripe\Forms\HTMLEditor\TinyMCEConfig:
editor_css:
- "https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
```

If you need the ability to add icons in your content, a suitable alternative may be the [emoticons plugin for TinyMCE 6](https://www.tiny.cloud/docs/plugins/opensource/emoticons/). You can compare the icons provided by that plugin with the [icons in Font Awesome v4](https://fontawesome.com/v4/icons/) to see if it would be a suitable replacement for your project.

## Features and enhancements {#features-and-enhancements}

### Extension changes
Expand Down