Reputation: 2679
I got the newest Typo3 LTS version. Now i need to have some custom textstyles.
I can`t find anything useful on Google which works with version 7.6.2
The last configuration i tried is following:
RTE.default {
contentCSS = fileadmin/templates/css/typo3-RTE.css
}
RTE.default.proc.allowedClasses := addToList(tel, fax)
RTE.default.buttons {
textstyle.tags.span.allowedClasses := addToList(tel,fax)
}
RTE.default.proc.allowedClasses := removeFromList(csc-frame-frame1, csc-frame-frame2, important, name-of-person, detail)
RTE.classes := removeFromList(csc-frame-frame1, csc-frame-frame2, important, name-of-person, detail)
RTE.classes.tel {
name = Telefonnummer
class = tel
}
RTE.classes.fax {
name = Fax
class = fax
}
I wanted to have the textstyles "Telefonnummer" and "Fax". As you can already guess, it does not work.
Beside of that none of the codes i found are working. Is there anyone having a solution for the newest LTS version of Typo3 and the RTE?
Upvotes: 0
Views: 2233
Reputation: 33
My working example (Typo3 8.5.1):
Page TsConfig
RTE.classes {
custom-class {
name = custom-class
value = color: #186900;
}
}
## Default RTE configuration
RTE.default {
proc.allowedClasses := addToList(custom-class)
buttons.textstyle.tags.span.allowedClasses = custom-class
buttons.textstyle.showTagFreeClasses = 1
contentCSS = fileadmin/templates/css/rte.css
ignoreMainStyleOverride = 1
useCSS = 1
}
## Use same processing as on entry to database to clean content pasted into the editor
RTE.default.enableWordClean.HTMLparser < RTE.default.proc.entryHTMLparser_db
## front end RTE configuration
RTE.default.FE < RTE.default
RTE.default.FE.FE >
RTE.default.FE.userElements >
The rte.css file looks like this:
span.custom-class{
color: #186900;
}
Upvotes: 1