Redacted Text
Theme

Redacted Text en

Salvatos 9 6

This simple theme renders a segment of text "invisible" (black on black) and adds a "REDACTED" mention on top of it. It is designed to adapt gracefully to various sizes and lengths of text.

How to use

To activate this plugin, you will need to use the code view of the entity editor to add the "salv-redacted" class to an element such as a span (p and div are also suitable options). Example:

<p>This text is visible <span class="salv-redacted">but this is not</span>.</p>

You can leave the element empty to occupy only the space needed by the replacement text, or add as much text as you want to control the length of the redacted segment. Note that your text can still be copy-pasted and seen through various means – it is not removed from the page, so be mindful of what you type there :)

This plugin supports the Marketplace Toolbar for Summernote! You can install this user script with a browser extension to insert the necessary HTML in your entities without memorizing or referencing this page.

Tip: If you want to hide only part of a sentence/paragraph, you will need that segment to be delimited by a span element, like in the example above. An easy way to do so without switching to code view is to use the toolbar to set the text’s background colour to black, which will enclose it in a span without interfering with the plugin.

Customization

You can change the text of the "redacted" mention, as well as its styling, by using the following rule in your campaign CSS and adding other styling options as desired:

.salv-redacted::before {
    content: "[REDACTED]";
}

Hat tip to Ornstein for the inspiration. Check out his Redacted mention plugin.


Latest version: 1.3 View Content
Released 2 months ago Added support for the HTML Inserter.