Does wixWidget API setProps() have a character limit?

Question:
I am encountering a character limit error when attempting to update a large string through the text field in the Wix Blocks widget panel, after installing the test build. It seems that the setProps() function has a maximum limit of 2000 characters, and this restriction applies to the entire prop collection rather than individual values.

Product:
Wix Blocks

What are you trying to achieve:
My goal is to update a prop with a large string using the widget panel. However, the current limitation of 2000 characters in the setProps() function impedes my ability to update larger content, thereby restricting the application’s functionality.

What have you already tried:
I have tried breaking down the large string into smaller chunks (approximately 200 characters each) and storing them in new props (e.g., myStringChunk1, myStringChunk2, etc.). However, I realized that the 2000-character limit applies to the entire prop collection, preventing me from storing more than 2000 characters in total.

Additional information:
To replicate the issue:

  1. Create a widget with two text elements.
  2. Establish props to store text values, ensuring a character limit of around 1500.
  3. Add two text fields in the panel, also with a character limit of approximately 1500.
  4. Bind onChange events to the text fields, updating props using the Wix Widget API’s setProps() function.
  5. In the design code, monitor prop changes and update text elements using the received props.
  6. After installing the Wix Block app for your website, attempt to update the text fields with long strings.

I appreciate any assistance in modifying my approach or finding a workaround for this character limit issue.

5 Likes

Thanks for sharing. Will forward this on to the appropriate team!

1 Like

You can request that this limit be raised on the product roadmap: Product Roadmap