Bug #36316
closedRTE: Importing google webfonts breaks style sheet parsing
100%
Description
The rte does not show any custom classes, if your rte.css imports google webfonts:
rte.css
@charset "UTF-8"; @import "http://fonts.googleapis.com/css?family=Quattrocento+Sans:400,700,400italic,700italic"; p.teaser { font-weight:bold; }
pageTS is configured with this teaser class, but the class does not show up in the style drop down.
Removing the @import solves this issue (the class shows up correctly).
Digging into the code, I found the bug in sysext/rtehtmlarea/htmlarea/htmlarea.js:
When parsing the rules, it only checks if it is an import rule and uses the cssRules of that stylesheet:
Line 3761:
if (cssRules[rule].styleSheet) { this.parseRules(cssRules[rule].styleSheet.cssRules); }
The correct check would be:
if (cssRules[rule].styleSheet && cssRules[rule].styleSheet.cssRules) { this.parseRules(cssRules[rule].styleSheet.cssRules); }
In the case of the google web fonts cssRules is null and the check for cssRules.length fails.
Updated by Stanislas Rolland about 12 years ago
- Subject changed from htmlarea: Custom classes not working when importing google webfonts to RTE: Importing google webfonts breaks style sheet parsing
- Assignee set to Stanislas Rolland
- Target version set to 4.5.18
Updated by Gerrit Code Review about 12 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12646
Updated by Gerrit Code Review about 12 years ago
Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/12681
Updated by Stanislas Rolland about 12 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 277ea8130caadd9d539e6f6511dfa06ee02fd5c5.
Updated by Gerrit Code Review about 12 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/12682
Updated by Gerrit Code Review about 12 years ago
Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/12683
Updated by Stanislas Rolland about 12 years ago
- Status changed from Under Review to Resolved
Applied in changeset 83672e85e4cdda49f1b52ddd4348cc3931677037.
Updated by Gerrit Code Review about 12 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/13194
Updated by Gerrit Code Review about 12 years ago
Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/13298
Updated by Stanislas Rolland almost 12 years ago
Gerrit Code Review wrote:
Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/13298
This patch set does not exist.
Updated by Stanislas Rolland almost 12 years ago
Gerrit Code Review wrote:
Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/13298
This patch set does not exist.
Updated by Stanislas Rolland almost 12 years ago
Gerrit Code Review wrote:
Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/13194
This patch set does not exist.
Updated by Stanislas Rolland almost 12 years ago
Gerrit Code Review wrote:
Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/13298
This patch set does not exist.
Updated by Stanislas Rolland almost 12 years ago
Gerrit Code Review wrote:
Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/13194
This patch set does not exist.
Updated by Stanislas Rolland almost 12 years ago
- Status changed from Under Review to Resolved
Updated by Riccardo De Contardi almost 7 years ago
- Status changed from Resolved to Closed