KendoReact Editor ForeColor Swatch

3 posts, 1 answers
  1. Dennis
    Dennis avatar
    4 posts
    Member since:
    Aug 2016

    Posted 20 Jul 2020 Link to this post

     The new ForeColor EditorTool is a great addition to the Editor. How can we set the swatch colors? I tried passing ForeColorProps {} to the component that contained colorPickerProps {}, but just couldn't figure out how to make it work.

    Can you please provide an example? I am trying to get a red swatch cell into the swatch. Or, choose another swatch, maybe?

     

  2. Answer
    Nikolay
    Admin
    Nikolay avatar
    104 posts

    Posted 21 Jul 2020 Link to this post

    Hi,

    You need to wrap the ForeColor/BackColor tool into another component and pass the new props along with the default props.

    Here is an example - https://stackblitz.com/edit/react-bqrpxv?file=app/main.jsx.

    Regards,
    Nikolay
    Progress Telerik

  3. Dennis
    Dennis avatar
    4 posts
    Member since:
    Aug 2016

    Posted 21 Jul 2020 in reply to Nikolay Link to this post

    Perfect, Nikolay! Your example makes so much sense! Thanks!!
Back to Top