2

I want to have a PropertyPaneTextField in my web part where I can enter format text like bold etc.. I couldn't find any properties for the PropertyPaneTextField where I can switch between richt text and text. I was looking in different forums but I found only old entries about this.

Is there any update or solution?

1 Answer 1

2

I just came up to this workaround - you can use Property Pane collection data control (https://pnp.github.io/sp-dev-fx-property-controls/controls/PropertyFieldCollectionData/) with RichText control (https://pnp.github.io/sp-dev-fx-controls-react/controls/RichText/).

Sample How to: https://gautamdsheth.wordpress.com/2020/04/07/integrate-pnp-spfx-react-controls-with-property-pane-collection-data-control/

Just wondering - What is your use case to have RichText editor in property pane?

4
  • I would like to have a web part to create a text box with different configurations like background color etc. But the text should be to format as well like a paragraphs etc. The standard text web part offer not so much configurations.
    – cvb
    Commented Jan 18, 2021 at 13:57
  • And why you need richtext editor in property pane?
    – Matej
    Commented Jan 18, 2021 at 15:16
  • I yes now undestand what you mean. At the moment I take the HelloWorld Web Part as the basic for my web part and it can be configured an fill with content by using the property pane defined fields. But you are right, when I create a text edit box in the content area then maybe I can configure it as an rich text field.
    – cvb
    Commented Jan 19, 2021 at 14:07
  • You can add rich text editor in content area - pnp.github.io/sp-dev-fx-controls-react/controls/RichText
    – Matej
    Commented Jan 19, 2021 at 17:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.