Notifications
Clear all

wpForo 1.x.x [Solved] Wpforo tinymce blockquote background color

12 Posts
4 Users
6 Reactions
1,348 Views
Posts: 7
Topic starter
(@supporto)
Active Member
Joined: 4 years ago

In the thread linked below, Robert provided hooks to change the wpforo tinymce background color. This is the only solution that has worked for me out of many attempts to change it with CSS. I've changed all the other parts of the tinymce editor except for one. The last one in question is the background color of the "blockquote". Currently it is white against the black background of the rest of the editor, and the pale text is unreadable against it.

What hook/filter could I put in the theme functions to change this blockquote background style for wpforo? Thanks

 

https://wpforo.com/community/how-to-and-troubleshooting-2/comment-box-background-on-threads/

11 Replies
Alvina
Posts: 1863
Moderator
(@alvina)
Member
Joined: 5 years ago

Hi @supporto,

Please register some new testing user and leave the user's login details with your forum URL here. 

As far as the topic is private, the login details can be left without any worries.

10 Replies
(@supporto)
Joined: 4 years ago

Active Member
Posts: 7

@alvina That would be great, though I would prefer if this thread could be deleted once the matter is resolved if possible just to be certain!

[deleted]

Thanks

 

Robert
Admin
(@robert)
Joined: 9 years ago

Support Team
Posts: 10587

@supporto,

You should add CSS for blockquote in the CSS part ($settings['tinymce']['content_style']) of the code I provided before:

 blockquote { background: #3C3C3C !important; color:#dddddd !important; }

 

So you can remove the code for background and put this one, the final code should look like this:

function wpforo_custom_editor_css( $settings ){
if( isset($settings['tinymce']['content_style']) ){
$settings['tinymce']['content_style'] .= ' body{background-color: #000000!important; color: #fff3ca!important;} blockquote { background: #3C3C3C !important; color:#dddddd !important; }';
}
return $settings;
}
add_filter('wpforo_editor_settings', 'wpforo_custom_editor_css', 12);
(@supporto)
Joined: 4 years ago

Active Member
Posts: 7

@robert Hi Robert, thanks for this - I tried doing this before, and strangely it causes the tinymce form to start load eternally so it becomes impossible to reply. When I copy your new code, the same happens. Seems like it should work logically yet it breaks the editor (the editor works perfectly with just the background code).

If I replace "body" in the original code with "blockquote" it works perfectly for the blockquote, but getting both to work either crashes tinymce or does nothing for the second parameter.

Moderator
(@martin)
Joined: 8 years ago

Support Team
Posts: 993

@supporto,

So, is it fixed?

(@supporto)
Joined: 4 years ago

Active Member
Posts: 7

@martin Unfortunately not, I can't get both the background and the blockquote color changes to work simultaneously without it breaking the tinymce form.

Robert
Admin
(@robert)
Joined: 9 years ago

Support Team
Posts: 10587

@supporto,

Please copy again the code and replace with the code you have. Save it in the functions.php file of your WordPress theme, then delete all caches and check it.

Also, I want to see a screenshot of the code in your functions.php editor. And other codes in that file.

(@supporto)
Joined: 4 years ago

Active Member
Posts: 7

@robert Hi Robert, I've just tried again - Clearing all caches including my Cloudflare cache has fixed the issue, and your code works perfectly now. Much appreciated!

(@supporto)
Joined: 4 years ago

Active Member
Posts: 7

@robert Also, while I'm on this topic - A forum-wide dark mode setting would be incredible for wpforo 2.0!

Moderator
(@martin)
Joined: 8 years ago

Support Team
Posts: 993

@supporto,

Yes, it's a good idea. We'll probably discuss this.

(@supporto)
Joined: 4 years ago

Active Member
Posts: 7

@martin That's great, thanks