Though the editor is disabled with restricted_html, it is activated on the edit form. If I create my own text format similar to restricted_html, it works.

The reason seems to be that "editor" is still a requirement for this text format, but it is deactivated as you can see in the configuration:

...
langcode: de
status: true
dependencies:
  module:
    - editor
...
  editor_file_reference:
    id: editor_file_reference
    provider: editor
    status: false
    weight: -45
    settings: {  }
...

Thus the input is polluted with p-tags!

Comments

Pepe Roni created an issue. See original summary.

tim.plunkett’s picture

Version: 8.0.0 » 8.0.x-dev
Component: forms system » editor.module
swentel’s picture

Status: Active » Postponed (maintainer needs more info)

How do we reproduce this ? Standard install doesn't even have an editor on the restricted format ..

Wim Leers’s picture

Category: Bug report » Support request

I'm sorry, but none of this makes any sense.

Though the editor is disabled with restricted_html, it is activated on the edit form.

This is untrue. I created an article with the restricted_html text format, saved it, then edited it and still no text editor.

If I create my own text format similar to restricted_html, it works.

What works?

The reason seems to be that "editor" is still a requirement for this text format, but it is deactivated as you can see in the configuration:

This is not what the restricted_html text format config entity looks like by default. It looks like this:

uuid: aee4916f-2bbc-4759-9300-0e7092ce5f80
langcode: en
status: true
dependencies: {  }
name: 'Restricted HTML'
format: restricted_html
weight: 0
filters:
  filter_html:
    id: filter_html
    provider: filter
    status: true
    weight: -10
    settings:
      allowed_html: '<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>'
      filter_html_help: true
      filter_html_nofollow: false
  filter_autop:
    id: filter_autop
    provider: filter
    status: true
    weight: 0
    settings: {  }
  filter_url:
    id: filter_url
    provider: filter
    status: true
    weight: 0
    settings:
      filter_url_length: 72

No dependency on the editor module.

Thus the input is polluted with p-tags!

Huh? Yes, of course, that's how it is configured: to automatically create <p>-tags, and not rely on the text editor to create them. If you associate a text editor with the restricted_html text format, you must manually remove the filter that automatically creates <p> tags.

Pepe Roni’s picture

Version: 8.0.x-dev » 8.0.1
Category: Support request » Bug report
Status: Postponed (maintainer needs more info) » Closed (fixed)

@ #4: as you can see in the history, my bug report was for 8.0.0 and not 8.0.x-dev. And in 8.0.0 this bug was present, but in current 8.0.1 it is not. So blaming me a liar is unrewarding.

I closed this bug report as fixed in 8.0.1.