feature: color-styled tables in tinymce editor

This commit is contained in:
slawkens 2023-12-12 17:58:17 +01:00
parent 2b86ba94fe
commit 687c9a6690
4 changed files with 22 additions and 1 deletions

View File

@ -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 */

View File

@ -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',
@ -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) {

View File

@ -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;

View File

@ -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;