How to let content editors use pre-defined block-like content?

In wordpress (gutenberg), content editors can choose some kind of pre-defined blocks to their content. If I have content editors, that can create new nodes, I want them to be able to add such blocks into their content, but in a more drupal like way.

Let’s say, the editor wants to create an article and wants to add a quote, a picture with a description or a Video with a description. I would assume, that I could create custom block types for these, to have the required fields and to create a design for these blocks.

But:

  • The editor should be able to create one or more of these blocks, preferrably on the page that they’re editing.
  • And they should be able to place these peaces of content anywhere in their content.

An example would be an outstanding quote, that could be placed anywhere in the text, but not by creating/designing it at that place in the text, where it makes sense content-wise, but without having to design it, using the text editor itself.

Best case: They could even be able to chose whether they place it within the text in a big version or in a sidebar in a smaller version.

My problem:

  • If it’s a custom block type, how can I assign only a defined set of these to a certain content type? This only works with fields, does it?
  • How can I add them to the editor form without cluttering it with forms for all possible types?

Should “Enter” create a large or small line spacing on text editors?

On some popular rich text editors like CKEditor, the default behaviour for pressing “Enter” is to create a new paragraph (a <p> tag), while on the others, like the textarea here on Stackexchange, pressing “enter” would mean a line break <br>.

Things get complicated when users are copying from one editor to another editor. For example, if a user write his/her work on Microsoft Word, where the user need to press “enter” several times to create enough space for a paragraph, copy and pasting it to CKEditor would create unintentionally and ugly large gaps between paragraphs. It seems that I can configure CKEditor to make it Enter as <br>, instead of Enter as <p>, but is it really better if the editor on my site is intended for writing long passages with multiple paragraphs?

How to scan a file with several antiviruses without sharing the file with antiviruses editors?

At the moment, is it possible to scan a file with several antivirus on a website without sharing this file with antivirus ? It seems that the privacy argument is not considered by the courts : https://thehackernews.com/2018/09/scan4you-malware-scanner.html

The only solution I have in mind is to have one virtual machine by antivirus, up do date and configured to not share programs. What do you recommend ?

Adding menu item to WordPress admin bar for editors to edit one plugin’s settings

I installed the Siteimprove plugin to my client’s WordPress website and I need to provide editor access to the plugin. Editors by default do not have any access to plugins. I tried to add the following to my functions.php:

if (!current_user_can('manage_options')) {   add_menu_page(         'Siteimprove Plugin',         'Siteimprove',         'manage_options',         'siteimprove',         'siteimprove_settings_form'     ); } 

This is the code from the Siteimprove plugin that adds it to the menu:

/**  * Register menu for settings form page.  */ public function register_menu() {     // Add top level menu page.     add_menu_page(         __('Siteimprove Plugin'),         __('Siteimprove'),         'manage_options',         'siteimprove',         'Siteimprove_Admin_Settings::siteimprove_settings_form'     ); } 

I created a test editor account and this is not working. Am I missing something to get this working? Thanks for your help!