redherring917
Posts: 21
Joined: Tue Sep 10, 2024 8:32 pm

HTML component - edit mode (saving as textarea)

Hi there. I have an HTML type component and in edit mode I'd like to allow just that component's title and the contents of a text element to be saved. What I have now is properly saving any changes to the title, but it's not saving changes made to the text element.

I'm still hacking my way through becoming familiar with Highcharts, so apologies in advance if I'm trying to do something silly.

Please find attached a snapshot of the UI implementation and of the associated code.

Thanks!
Attachments
2024-09-17_13-26-19.png
2024-09-17_13-26-19.png (64.44 KiB) Viewed 1032 times
2024-09-17_13-27-31.png
2024-09-17_13-27-31.png (29.79 KiB) Viewed 1032 times
User avatar
dawid.d
Site Moderator
Posts: 1119
Joined: Thu Oct 06, 2022 11:31 am

Re: HTML component - edit mode (saving as textarea)

Hello,

Thanks for the question!

Don't worry, that's what we're here for. :D The correct path should also include array indexes. See the demo below.

Demo: https://jsfiddle.net/BlackLabel/3ye04bhv/

Your input, however, caused me to observe a bug that that the initial value is not taken, so the textarea is initially empty, which is also associated with the canceling error. We did not test paths with arrays before, hence it may result from.

I reported it here: https://github.com/highcharts/highcharts/issues/21862

As a workaround, you can use this: https://jsfiddle.net/BlackLabel/jko8wqx7/

In case of any other questions, don't hesitate to ask!
Best regards
Dawid Draguła
Highcharts Developer

Return to “Highcharts Dashboards”