Skip to content

Commit

Permalink
feature: color-styled tables in tinymce editor
Browse files Browse the repository at this point in the history
  • Loading branch information
slawkens committed Dec 12, 2023
1 parent 2b86ba9 commit 687c9a6
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
7 changes: 6 additions & 1 deletion admin/template/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,9 @@

.sidebar-mini.sidebar-collapse .menu-text {
display: none;
}
}

.myaac-table tbody tr:nth-child(even) {background: #FFF} /* light border */
.myaac-table tbody tr:nth-child(odd) {background: #CCC} /* dark border */
.myaac-table thead td {background: #000000; color: #ffffff !important;} /* vdark border */
.myaac-table tfoot td {background: #000000; color: #ffffff !important;} /* vdark border */
6 changes: 6 additions & 0 deletions system/templates/tinymce.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
function tinymceInit() {
tinymce.init({
selector: "#editor",
content_css: '{{ constant('ADMIN_URL') }}template/style.css',
theme: "silver",
plugins: 'preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount help code emoticons',
toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor | emoticons link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat code',
Expand All @@ -17,6 +18,11 @@
relative_urls: true,
document_base_url: "{{ constant('BASE_URL') }}",
table_class_list: [
{title: 'None', value: ''},
{title: 'Colored Table', value: 'myaac-table'},
],
setup: function (ed) {
ed.on('NodeChange', function (e) {
if (ed.getContent() !== lastContent) {
Expand Down
5 changes: 5 additions & 0 deletions templates/kathrine/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ body
color: #373737;
}

.myaac-table tbody tr:nth-child(even) {background: #e5e3d7} /* light border */
.myaac-table tbody tr:nth-child(odd) {background: #d0cdb4} /* dark border */
.myaac-table thead td {background: #afab89; color: #ffffff !important;} /* vdark border */
.myaac-table tfoot td {background: #afab89; color: #ffffff !important;} /* vdark border */

#page
{
width: 780px;
Expand Down
5 changes: 5 additions & 0 deletions templates/tibiacom/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ img {
border: none;
}

.myaac-table tbody tr:nth-child(even) {background: #F1E0C6} /* light border */
.myaac-table tbody tr:nth-child(odd) {background: #D4C0A1} /* dark border */
.myaac-table thead td {background: #505050; color: #ffffff !important;} /* vdark border */
.myaac-table tfoot td {background: #505050; color: #ffffff !important;} /* vdark border */

#ArtworkHelper {
text-align: center;
background-position: top center;
Expand Down

0 comments on commit 687c9a6

Please sign in to comment.