Skip to content

Instantly share code, notes, and snippets.

@chriwo
Last active June 28, 2017 05:20
Show Gist options
  • Save chriwo/88202e44355a7f17b0a4fbbea50ce8b1 to your computer and use it in GitHub Desktop.
Save chriwo/88202e44355a7f17b0a4fbbea50ce8b1 to your computer and use it in GitHub Desktop.
CSS classes in RTE with tables, e.g for Bootstrap. For more details read this german blog post http://blog.chriwo.de/post/162161526488/bootstrap-tabellen-klassen-im-rte
RTE.default {
contentCSS = your-path/rte.css
buttons {
blockstyle {
tags.table.allowedClasses := addToList(striped,bordered,hover,condensed)
}
}
proc {
allowedClasses := addTolist(striped,bordered,hover,condensed)
}
}
table.hover {background-color:transparent;}
table.bordered {border: 1px solid #ddd;}
table.striped {background-color:transparent;}
table.condensed tr td,
table.condensed tr th {padding: 5px;}
lib.parseFunc_RTE.externalBlocks {
table {
stdWrap {
HTMLparser.tags.table.fixAttrib.class {
list := addToList(hover,striped,bordered,condensed)
always = 1
prefixRelPathWith = table table-
}
wrap = <div class="table-responsive">|</div>
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment