Project

General

Profile

Actions

Bug #85038

closed

allowTagsOutside not working in rte_ckeditor

Added by Loon Buster over 6 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2018-05-17
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

hello

processing:
   allowTagsOutside: [div, a, img, hr, span, table]

NOT working!

.loon


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #92301: Elements getting wrapped with p tags, even if allowed outside paragraphClosed2020-09-13

Actions
Actions #1

Updated by Patrick Gaumond over 6 years ago

  • Category set to Linkvalidator
Actions #2

Updated by Wouter Wolters over 6 years ago

  • Subject changed from ext:rte_ckeditor to allowTagsOutside not working in rte_ckeditor
  • Category changed from Linkvalidator to RTE (rtehtmlarea + ckeditor)
  • Priority changed from Must have to Could have
  • Target version deleted (8.7.13)
Actions #3

Updated by Benni Mack over 6 years ago

  • Status changed from New to Needs Feedback

What do you expect to set this option?

Actions #4

Updated by Riccardo De Contardi over 6 years ago

I can guess (correct me if I am wrong) that the goal is avoiding that some tags becomes surrounded by <p>

e.g.

<p> lorem </p>
<span>ipsum</span> 
<p>dolor sit amet</p>

should not become

<p> lorem </p>
<p><span>ipsum</span></p> 
<p>dolor sit amet</p>

I add here some considerations after tests made with TYPO3 9.4 and the following CKEditor configuration (an enriched clone of minimal.yaml configuration):

# Load default processing options
imports:
    - { resource: "EXT:rte_ckeditor/Configuration/RTE/Processing.yaml" }
    - { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Base.yaml" }

# Minimal configuration for the editor
editor:
  config:
    toolbarGroups:
      - { name: basicstyles, groups: [ basicstyles] }
      - { name: clipboard, groups: [clipboard, undo] }
      - { name: insert}
      - { name: mode}      
    removeButtons:
      - Anchor
      - Superscript
      - Subscript
      - Underline
      - Strike

The tests always imply to write the code directly in the "source code" mode and then switching back to the standard mode.

1) even without the code written in the description, table and hr are placed in the editor area without a surrounding <p>

1.1) Please note that "table" is not mentioned in the processing.allowTagsOutside shipped by default with TYPO3 (Processing.yaml file)

2) using the source button to add a <div> in the text, it is converted to a <p> just switching to the standard editor view

2.1) using

  config:
    extraAllowedContent:
      - div

things go better: now the <div> is kept, but with a <p> inside after saving the content element

from

<div>lorem ipsum</div>

to

<div>
  <p>lorem ipsum</p>
</div>

3) about img, a, span I guess that they become wrapped with <p> because CKEditor considers them inline elements, thus they are not allowed to live outside <p>

Actions #5

Updated by Loon Buster over 6 years ago

Benni Mack wrote:

What do you expect to set this option?

counterquestion: why is this option removed?

..i mean: how can somebody change a module without knowing/set-up the functions of the old module? its like to build a new car without brake and to ask "what do you expect to set this option?"

.loon

Actions #6

Updated by Susanne Moog about 6 years ago

  • Sprint Focus set to On Location Sprint
Actions #7

Updated by Benni Mack about 6 years ago

Hi Loon!

Loon Buster wrote:

Benni Mack wrote:

What do you expect to set this option?

counterquestion: why is this option removed?

This option is not removed... don't know where you got this information, so I do not really understand your counterquestion.

I would also love to get an answer to my question.

..i mean: how can somebody change a module without knowing/set-up the functions of the old module? its like to build a new car without brake and to ask "what do you expect to set this option?"

Sorry, but this comes up to be a bit rude. I actually spent several months working on parsing RTE better and simpler, and I haven't found anyone in TYPO3 community to actually understand all variations of all options (yes, I had to look at the initial SVN commit from 2003 and call up Kasper). It feels like you do know lot about RTE processing, so I'm very eager to learn from your knowledge, maybe you can support me/us to document this behaviour better, and especially provide examples when to use this option in v8 and v9 and when to extend it.

Thanks a lot in advance, feel free to contact me for further work together, give me a call, write me on slack or email, or answer here directly!

Benni.

Actions #8

Updated by taywa gmbh about 6 years ago

  • Priority changed from Could have to Should have
  • TYPO3 Version changed from 8 to 9

I am missing this option too. I would like to use this get to get rid of the sourounding p tags, as Ricardo writes above.

I would like to use it for a RTE content with mixed hand written html code.

See here: https://www.aarenet.com/de/meta/kontakt/ "Hauptnummer" now has p tag with a class. But I would like to use span. Then no css is needed.

And its in the documentation https://docs.typo3.org/typo3cms/TSconfigReference/PageTsconfig/Rte.html. Not explicitly for ckeditor, but thats what people think. (As I did)

If you decide not to fix it, please remove it from the docs.

Actions #9

Updated by Susanne Moog almost 5 years ago

  • Sprint Focus deleted (On Location Sprint)
Actions #10

Updated by Tobias Ulber about 4 years ago

  • Related to Bug #92301: Elements getting wrapped with p tags, even if allowed outside paragraph added
Actions #11

Updated by Gerrit Code Review about 3 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65734

Actions #12

Updated by Gerrit Code Review about 3 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65734

Actions #13

Updated by Gerrit Code Review about 3 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65734

Actions #14

Updated by Gerrit Code Review about 3 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65734

Actions #15

Updated by Gerrit Code Review almost 3 years ago

Patch set 10 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65734

Actions #16

Updated by Gerrit Code Review almost 3 years ago

Patch set 11 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65734

Actions #17

Updated by Gerrit Code Review almost 3 years ago

Patch set 12 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65734

Actions #18

Updated by Gerrit Code Review almost 3 years ago

Patch set 13 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65734

Actions #19

Updated by Gerrit Code Review almost 3 years ago

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72424

Actions #20

Updated by Anonymous almost 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #21

Updated by Benni Mack about 2 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF