---
title: "style-attribut aus Blockquote entfernen"
url: "https://www.typo3.net/d/102752-style-attribut-aus-blockquote-entfernen"
source: "typo3.net"
tags: ["Backend","RTE & CKEditor","Frage","HTML & CSS"]
created: "2010-12-04"
last_reply: "2010-12-04"
replies: 3
solved: false
page: 1
pages: 1
lang: "de"
---

# style-attribut aus Blockquote entfernen

Backend › RTE & CKEditor · 3 Antworten · gestartet 2010-12-04

## Eröffnungsbeitrag

**Herbie01** · 2010-12-04 · [Beitrag #1](https://www.typo3.net/d/102752-style-attribut-aus-blockquote-entfernen/1)

Hallo,

kann mir mal jemand verraten wie ich das Attribut **style** bei der Ausgabe im FE entferne?

Mein Problem ist, dass ich im RTE einen Text als **blockquote** auszeichne ohne weitere Angaben. Im FE packt mir Typo3 bzw. der RTE (keine Ahnung wer von beiden das reinrendert)  die Angabe **style="margin-bottom:0;margin-top:0;"** mit hinein.
Das will ich aber nicht. Die Frage ist jetzt an welcher Schraube ich drehen muss damit das nicht mehr geschieht.

## Antworten

### [#2](https://www.typo3.net/d/102752-style-attribut-aus-blockquote-entfernen/2) · NilsBarenbrock · 2010-12-04

Du kannst sämtliche Attribute eines Tags, die du nicht haben willst unterbinden, indem du in der RTE Konfiguration die erlaubten Attribute angibst:

```typoscript
RTE.default {
  proc {
    entryHTMLparser_db = 1
    entryHTMLparser_db {
         tags {
              blockquote.allowedAttribs = id, title, dir, lang, xml:lang, class
              blockquote.fixAttrib.style.unset = 1
         }
    }

    exitHTMLparser_db = 1
    exitHTMLparser_db {
         keepNonMatchedTags = 1
         htmlSpecialChars = 0
    }
}
}
```

Mit dem codebeispiel oben wird beim Schreiben in die Datenbank festgelegt, dass nur "id, title, dir, lang, xml:lang, class" für blockquote erlaubt sind und die nächste Zeile entfernt ein eventuell vorhandenes stlye Attribut.

Das funktioniert in der Weise für alle html-Tags.

### [#3](https://www.typo3.net/d/102752-style-attribut-aus-blockquote-entfernen/3) · Herbie01 · 2010-12-04

Danke für den Tipp.
Hat aber leider nichts gebracht.

Habe gerade mal in der Datenbank nachgeschaut. Dort steht in der Tabelle tt_content blockquote ohne style-Attribut drin. Also muss das irgendwo beim Parsen fürs FE hinzugefügt werden. Nur habe ich keine Idee wo ich ansetzen kann um das Problem zu beheben.

### [#4](https://www.typo3.net/d/102752-style-attribut-aus-blockquote-entfernen/4) · Herbie01 · 2010-12-04

Habs inzwischen hinbekommen nachdem ich einen Blick in die Datei typo3/sysext/css_styled_content/static/setup.txt geworfen habe.

Dort steht nämlich (man beachte die letzte Zeile):

```typoscript
lib.parseFunc_RTE < lib.parseFunc
lib.parseFunc_RTE {
	//  makelinks >
	# Processing <table> and <blockquote> blocks separately
	externalBlocks = table, blockquote, ol,ul, div
	externalBlocks {
		# The blockquote content is passed into parseFunc again...
		blockquote.stripNL=1
		blockquote.callRecursive=1
		blockquote.callRecursive.tagStdWrap.HTMLparser = 1
		blockquote.callRecursive.tagStdWrap.HTMLparser.tags.blockquote.overrideAttribs = style="margin-bottom:0;margin-top:0;"
```

Also habe ich in meine Seitentemplate die folgende Zeile hinzugefügt:

```typoscript
lib.parseFunc_RTE.externalBlocks.blockquote.callRecursive.tagStdWrap.HTMLparser.tags.blockquote.overrideAttribs >
```

Und siehe da, es funktioniert.
Verstehe zwar momentan nur die Hälfte von dem was die Zeile ggenau bewirkt, aber das Ergebnis passt immerhin.

---

Quelle: „style-attribut aus Blockquote entfernen“, typo3.net, https://www.typo3.net/d/102752-style-attribut-aus-blockquote-entfernen
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
