plotly / react-chart-editor

Customizable React-based editor panel for Plotly charts
https://plotly.github.io/react-chart-editor/
MIT License
499 stars 101 forks source link

React-Chart-Editor <TextEditor auto reseting to < br> after clicking outside and clicking in TextEditor again #1008

Open as4ashish opened 4 years ago

as4ashish commented 4 years ago

So i am using react chart editor with plotly. In < TextEditor box when i type for title in graph it renders normally but when i click outside it grey-out (Became placeholder) and again click in title texteditor it became < br> automatically. Everytime i click outside updateChartState action runs and made value inside texteditor a placeholder and next-time i click inside it automatically became < br>

I'm attaching code for TextEditor code ``

                <PlotlyFold name="Chart Title">
                    <TextEditor label="Title" attr="title.text" richTextOnly={true} />
                    <FontSelector attr="title.font.family" label="Typeface" />
                    <Numeric label='Font Size' attr="title.font.size" units="px" />
                    <ColorPicker label="Font Color" attr="title.font.color" />
                </PlotlyFold>
                <AxesFold name="Axis Titles">
                    <TextEditor attr="title.text" label="Label" richTextOnly={true} />
                    <FontSelector attr="title.font.family" label="Typeface"/>
                    <Numeric label='Font Size' attr="title.font.size" units="px" />
                    <ColorPicker label="Font Color" attr="title.font.color" />
                </AxesFold>
            </LayoutPanel>``

When i click in title textbox in renders normally image

But When i click outside and click again it became "< br>' automatically

image