Notifications
Clear all

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

12 Posts
4 Users
6 Likes
667 Views
Supporto
Posts: 8
Topic starter
(@supporto)
Active Member
Joined: 2 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: 1872
Moderator
(@alvina)
Member
Joined: 3 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
(@supporto)
Joined: 2 years ago

Active Member
Posts: 8

@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: 7 years ago

Support Team
Posts: 9715

@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
(@supporto)
Joined: 2 years ago

Active Member
Posts: 8

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

Martin
Moderator
(@martin)
Joined: 6 years ago

Support Team
Posts: 867

@supporto,

So, is it fixed?

Supporto
(@supporto)
Joined: 2 years ago

Active Member
Posts: 8

@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: 7 years ago

Support Team
Posts: 9715

@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
(@supporto)
Joined: 2 years ago

Active Member
Posts: 8

@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
(@supporto)
Joined: 2 years ago

Active Member
Posts: 8

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

Martin
Moderator
(@martin)
Joined: 6 years ago

Support Team
Posts: 867

@supporto,

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

Supporto
(@supporto)
Joined: 2 years ago

Active Member
Posts: 8

@martin That's great, thanks

Share: