Skip to content

TinyMCE + DaisyUi #2758

Closed Answered by saadeghi
Rodolphe-dev asked this question in Q&A
Discussion options

You must be logged in to vote

TinyMCE has its own styles, from browser devtools you can find how colors are applied and then you can set daisyUI colors for those selectors in your CSS.
For example, I see there's a selector like

.tox .tox-toolbar__primary {
  background-color: #fff;
}

You can change it to daisyUI color base-100 like this:

.tox .tox-toolbar__primary {
  background-color: oklch(var(--b1));
}

Or for icons in toolbar, you can set daisyUI color base-content

.tox .tox-tbtn svg {
  fill: #222f3e;
}
.tox .tox-tbtn svg {
  fill: oklch(var(--bc));
}

Same method for other colors…

Let me know if you have a question.

This way, TinyMCE components can use daisyUI colors and it will change color based on your daisyUI …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by saadeghi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants