codelight-eu/acf-simple-wysiwyg

There is no license information available for the latest version (2.1) of this package.

WordPress plugin which creates a new ACF Wysiwyg field type with very limited controls.

Installs: 233

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 1

Open Issues: 0

Language:JavaScript

Type:wordpress-plugin

2.1 2021-04-27 08:39 UTC

This package is auto-updated.

Last update: 2024-04-27 15:15:20 UTC


README

WordPress plugin that creates a new ACF Wysiwyg field type with very limited controls - bold, italic, link and colors. Perfect for headings.

How it looks like

Screenshot 1

Why?

Sometimes you need a page heading with a fixed h1 tag, but with some styling - for example, a word that's bold or underlined or even a link. This field type allows doing that, but doesn't add paragraph tags and removes all unnecessary controls so your clients won't accidentally screw up the layout.

Shortcodes will still work, though.

Installation

composer require codelight-eu/acf-simple-wysiwyg

Where can I find the new field type

Screenshot 1

Can I change the tinyMCE controls?

Sure. Use the following filter: acf/fields/simple-wysiwyg/toolbars Looks like this in the code:

<?php
$toolbars = apply_filters('acf/fields/simple-wysiwyg/toolbars', [
    'Full' => [
        1 => apply_filters('mce_buttons', [
            'bold',
            'italic',
            'underline',
            'link',
            'unlink',
            'forecolor',
            'forecolorpicker',
            'pastetext',
            'removeformat',
        ], 'acf_content'),
    ]
]);