The configuration of the RTE changes with each (big) version. Now I have my first 7.6 installation where I need to configure the RTE so editors can have special classes for paragraphs, spans or tables.
e.g. the editor should be able to select the default styles of bootstrap for tables: table-striped, table-bordered
I don't use an old configuration from a 6.2 installtion but created it anew from documentation.
I use a site extension and include the TSconfig in ext_localconf.php
with
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'<INCLUDE_TYPOSCRIPT: source="FILE:EXT:site_abc/Configuration/TSconfig/Page.txt">'
);
in that Page.txt
I use
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:site_abc/Configuration/TSconfig/rte.ts">
to include my special rte configuration.
AS the configuration of the shown buttons is working (also the css-file is used) I wonder why the configuration of the available classes is missing.
my rte.ts
:
RTE {
default {
contentCSS.rte = EXT:site_abc/Resources/Public/Css/rte.css
proc {
allowTags = a, abbr, article, b, bdo, big, blockquote, br,
caption, center, cite, code, div, em, footer, header,
h2, h3, h4, h5, h6, hr, i, li, link, nav, ol, p, pre,
section, small, span, strike, strong, sub, sup, table,
thead, tbody, tfoot, td, th, tr, u, ul
allowedClasses := addToList(table-striped,table-bordered,table-condensed)
allowedClasses := addToList(abc-red,abc-green)
}
showButtons (
blockstylelabel, blockstyle, textstylelabel, textstyle, fontstyle, fontsize,
formatblock, blockquote, left, center, right, justifyfull, orderedlist, unorderedlist,
definitionlist, definitionitem, outdent, indent, formattext, bidioverride, big,
bold, italic, subscript, superscript, underline, textcolor, bgcolor, textindicator,
insertcharacter, insertsofthyphen, line, link, unlink, image, table, findreplace,
spellcheck, chMode, inserttag, removeformat, copy, cut, paste, pastetoggle, pastebehaviour,
undo, redo, about, toggleborders, tableproperties, tablerestyle, rowproperties,
rowinsertabove, rowinsertunder, rowdelete, rowsplit, columnproperties,
columninsertbefore, columninsertafter, columndelete, columnsplit, cellproperties,
cellinsertbefore, cellinsertafter, celldelete, cellsplit, cellmerge
)
toolbarOrder (
copy, cut, paste, pastetoggle, pastebehaviour, bar,
undo, redo, bar, chMode, removeformat, bar,
findreplace, spellcheck, bar,
textcolor, bgcolor, textindicator, bar,
editelement, insertcharacter, insertsofthyphen, line, image, abbreviation, bar,
link, unlink, bold, italic, subscript, superscript, underline, bar, linebreak,
blockstylelabel, blockstyle, space, formatblock, bar,
orderedlist, unorderedlist, outdent, indent, bar,
textstylelabel, textstyle, space, formattext, space, fontstyle, space, fontsize, bar,
left, center, right, justifyfull, bar, linebreak,
table, toggleborders, bar,
tableproperties, tablerestyle, bar,
rowproperties, rowinsertabove, rowinsertunder, rowdelete, rowsplit, bar,
columnproperties, columninsertbefore, columninsertafter, columndelete, columnsplit, bar,
cellproperties, cellinsertbefore, cellinsertafter, celldelete, cellsplit, cellmerge
)
}
buttons {
blockstyle {
tags {
all.allowedClasses := addToList(table-striped,table-bordered)
table.allowedClasses := addToList(table-striped,table-bordered)
}
showTagFreeClasses = 1
}
textstyle {
tags.all.allowedClasses := addToList(abc-red,abc-green)
tags.span.allowedClasses = abc-red, abc-green
showTagFreeClasses = 1
}
}
classes {
test1 {
name = test1
value = background-color:red;
}
table-striped {
name = striped table
value = background-color:#eeffee;
}
table-bordered {
name = bordered table
value = background-color:#ffeeee;
}
abc-red {
name = red
value = #CC1111
}
abc-green {
name = green
value = #11cc11
}
}
colors {
abc-red {
name = red
value = #CC1111
}
abc-green {
name = green
value = #11cc11
}
}
default.colors < .colors
default.classes < .classes
}
and the rte.css
:
table.table-striped { border:1px solid red; }
table.table-bordered { border: 1px dashed cyan; }
table.table-condensed { border: 1px dotted greenyellow; }
span.abc-red { color:#cc1111; }
span.abc-green { color:#11cc11; }
.table-striped { border:1px solid red; }
.table-bordered { border: 1px dashed cyan; }
.table-condensed { border: 1px dotted greenyellow; }
.abc-red { color:#cc1111; }
.abc-green { color:#11CC11; }