aitor
January 30, 2015, 10:25am
1
Hi, I’m trying it, as can be seen in the codex , adding this line to functions.php:
add_editor_style( 'assets/css/txt-styles.css' );
And adding a css file with my own classes:
assets/css/txt-styles.css
But, nothing happens! TinyMCE editor seems do not changed. What I’m doing wrong? There is an specific way to do it in roots?
Thank you.
aitor
January 30, 2015, 5:07pm
2
I found another way to add styles. It works:
So, forget this thread, please.
cfx
January 30, 2015, 5:34pm
3
3 Likes
aitor
February 1, 2015, 9:19am
4
How should I use it? I have one style in /assets/css/editor-style.css
Something like this:
/** These styles are used in your backend editor. **/
.style {
background-color: black;
}
But nothing happens (there is no new dropdown menu in TinyMCE editor).
I have seen that editor-style.css is originally located at root theme dir. I dont know why, since init.php point to /assets/css/ .
cfx
February 1, 2015, 3:48pm
5
Your original post was not clear… I thought you simply wanted to style certain text/tags within the editor.
If you want to add custom style options as dropdown items within the TinyMCE editor then see this Codex article: http://codex.wordpress.org/TinyMCE_Custom_Styles .
2 Likes
aitor
February 2, 2015, 6:46pm
6
I’m sorry. My english is very low level!
I can see that your link to codex show the same solution I found (post it in second message of this thread). This tells me that is the correct way to do it!
Thank you very much.