Home Forums Backend Issues (wp-admin) Using color picker with WYSIWYG editor


Using color picker with WYSIWYG editor

  • I’m using the color picker to allow my client to change the text color for different posts. I’m using the repeater field, it works great everywhere except for the WYSIWYG editor. As I’m trying to make it simple to use, is there any way I can change the starting text color of the editor to the color picker used for the rest of the post?

    This is what I’ve tried, but it doesn’t work
    <p style="color:<?php the_field('segment_text_color'); ?>"><?php the_field('segment_content'); ?></p>

    Inline styling works for all the other sections but not the editor. I know it has something to do with the editor adding it’s own tags, but I’m not sure how to get it to work.

  • Hi @emanahan,

    Thanks for the post.

    Since the WYSIWYG editor already contains a color palette to choose font colors, it is best advised to make use of this functionality which is accessible from the toolbar.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Using color picker with WYSIWYG editor’ is closed to new replies.