Skip to content

Instantly share code, notes, and snippets.

@ollieRogers
Last active December 14, 2015 14:19
Show Gist options
  • Select an option

  • Save ollieRogers/5099996 to your computer and use it in GitHub Desktop.

Select an option

Save ollieRogers/5099996 to your computer and use it in GitHub Desktop.
Typoscript Config for custom classes in HTML area plugin. This need to be added to the sites root page "Page TSConfig" textarea under 'resources'
/*these rules will only be enforced in the rte*/
/*the RTE is very fussy about the css syntax so make sure you assign the class to a Dom element*/
span.intro, p.intro {
font-size: 2.4em;
line-height: 30px;
color: #999999;
}
### CUSTOM RTE CLASSES ###
# remove default classes from the RTE
RTE.default.contentCSS >
# Define classes
# classes defined here must appear in the css file specified below
RTE.classes{
# class name for CSS selector
highlight {
# name as it appears in RTE drop down
name = highlight
# color as it appears in the RTE
value = color:#0A8AD2;
}
}
# Typoscript Config
RTE.default{
ignoreMainStyleOverride = 1
useCSS = 1
contentCSS = fileadmin/template/css/rte.css
classesCharacter := addToList(highlight)
classesParagraph := addToList(highlight)
}
RTE.default.proc.allowedClasses := addToList( highlight)
### CUSTOM RTE CLASSES END ###
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment