# Text update not work for me with svg-grafics node

**URL:** https://discourse.nodered.org/t/text-update-not-work-for-me-with-svg-grafics-node/24033
**Category:** Dashboard
**Created:** [1 April 2020 14:12 UTC](https://discourse.nodered.org/t/text-update-not-work-for-me-with-svg-grafics-node/24033 "2020-04-01T14:12:23Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![d0d04m3](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/d0d04m3/32/19965_2.png) [@d0d04m3](https://discourse.nodered.org/u/d0d04m3)
#### Post date: [1 April 2020 14:12 UTC](https://discourse.nodered.org/t/text-update-not-work-for-me-with-svg-grafics-node/24033/1 "2020-04-01T14:12:23Z")

</div>

hi  
please help me  
i design dashboard with svg editor  
[![hmi2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/5/95e1bc560e58ed6ad4a3c4bde65dbe0efa818394.png)](https://user-images.githubusercontent.com/63002469/78146351-f6201400-7429-11ea-94b8-5f2a757167c2.png)  
but i cant updated or changed any text  
with both way exp:  
`{ "command": "update_text", "selector": "#e1_texte", "textContent": "test" }`  
and with inject msg {"title": "text "} with input bind same not working  
and if changed any attrinute exp fill or visibility its worked  
and if use another svg with one text or tow its worked  
what probleme this lib its limited for line code or not support more texte !!!!

---

<div class="post-metadata">

### Author: ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)
#### Post date: [1 April 2020 14:31 UTC](https://discourse.nodered.org/t/text-update-not-work-for-me-with-svg-grafics-node/24033/2 "2020-04-01T14:31:17Z")

</div>

For future readers: this same question has also been asked on the node-red-contrib-ui-svg repository. [https://github.com/bartbutenaers/node-red-contrib-ui-svg/issues/53](https://github.com/bartbutenaers/node-red-contrib-ui-svg/issues/53)  
It hasn't been answered there yet at the time of writing this response.

---

<div class="post-metadata">

### Author: ![d0d04m3](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/d0d04m3/32/19965_2.png) [@d0d04m3](https://discourse.nodered.org/u/d0d04m3)
#### Post date: [1 April 2020 14:33 UTC](https://discourse.nodered.org/t/text-update-not-work-for-me-with-svg-grafics-node/24033/3 "2020-04-01T14:33:30Z")

</div>

thanks to replay  
this post for me

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [1 April 2020 18:21 UTC](https://discourse.nodered.org/t/text-update-not-work-for-me-with-svg-grafics-node/24033/4 "2020-04-01T18:21:48Z")

</div>

Hi Lena,  
Thanks for providing the Github issue link.  
I will follow up this issue on Github...

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [1 April 2020 21:03 UTC](https://discourse.nodered.org/t/text-update-not-work-for-me-with-svg-grafics-node/24033/5 "2020-04-01T21:03:43Z")

</div>

I managed to narrow the 1500 line long SVG to a short snippet that can be used to reproduce the error:

```auto
<svg xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0" y="0" height="100%" viewBox="-0.1964024156332016 -0.0687660425901413 1000.392822265625 350.1374816894531" width="100%" preserveAspectRatio="xMidYMid meet">
  <defs id="svgEditorDefs">
    <marker id="arrow10-8-right" markerHeight="8" markerUnits="strokeWidth" markerWidth="10" orient="auto" refX="-3" refY="0" viewBox="-15 -5 20 20">
      <path d="M -15 -5 L 0 0 L -15 5 z" fill="black"/>
    </marker>
  </defs>
  <g id="g_e1_svg" style="">
    <line id="e1_line" x1="831.3800242832729" y1="311.218994140625" x2="831.3800853184291" y2="326.8453369140625" style="stroke: red; fill: none; stroke-width: 2.97px; marker-mid: url(&quot;#arrow10-8-left&quot;);"/>
  </g>
</svg>

```

Which results in this:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/4/543a706dccc960f729ff539d8d0365d30c7e9230.png)

The problem is that the SVG string contains a lot of `&quot;` strings (probably by getting it from a third-party SVG editor)...

I assume that I have to remove those strings automatically, if available ...

---

<div class="post-metadata">

### Author: ![d0d04m3](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/d0d04m3/32/19965_2.png) [@d0d04m3](https://discourse.nodered.org/u/d0d04m3)
#### Post date: [1 April 2020 21:24 UTC](https://discourse.nodered.org/t/text-update-not-work-for-me-with-svg-grafics-node/24033/6 "2020-04-01T21:24:08Z")

</div>

yes thanks man  
am remove all string with notpad++  
and worked its solved

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [3 April 2020 22:39 UTC](https://discourse.nodered.org/t/text-update-not-work-for-me-with-svg-grafics-node/24033/7 "2020-04-03T22:39:03Z")

</div>

> [@BartButenaers](#):
>
> I assume that I have to remove those strings automatically, if available ...

This is so weird...

- When I use the above SVG string in a flow:

- When I remove the two `&quot;` strings _ **manually** _ in the SVG tabsheet, then the problem is solved.

- When I add the following statement to remove the `&quot;` strings _ **automatically** _ (in the [svg\_graphics.js](https://github.com/bartbutenaers/node-red-contrib-ui-svg/blob/master/svg_graphics.js#L107) file)

Must be something stupid ...

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [5 April 2020 11:54 UTC](https://discourse.nodered.org/t/text-update-not-work-for-me-with-svg-grafics-node/24033/8 "2020-04-05T11:54:40Z")

</div>

@d0d04m3,  
Joseph Liard has deployed a fix for your issue, in the Drawsvg cloud service. Could you please check whether the issue is solved, when you change and store your svg via Drawsvg? Thanks!

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [9 April 2020 19:38 UTC](https://discourse.nodered.org/t/text-update-not-work-for-me-with-svg-grafics-node/24033/9 "2020-04-09T19:38:07Z")

</div>

Hi @d0d04m3,  
You have not responded yet to my question. Joseph has been so kind to create a quick fix for you, so we should give him feedback whether it solved or not...

I think it is solved because I have done these tests:

1. I have imported your [not.worked.zip](https://github.com/bartbutenaers/node-red-contrib-ui-svg/files/4417655/not.worked.zip) from Github, which contains the `#quot;` strings.

2. Then I indeed see the error in the console log:

3. Now I have opened your drawing in the embedded DrawSvg editor, and clicked the save button:

4. When I arrive back in the config screen of the svg node, then the `#quot;` strings are indeed not anymore available in the SVG string tabsheet.

5. When I display the SVG again in the dashboard, then the parse error doesn't occur anymore.

6. Finally I inject the update\_text message, and the text in the SVG drawing is updated:

So please let me know if it is OK now (with the fixed DrawSvg cloud editor), and if solved close your [issue](https://github.com/bartbutenaers/node-red-contrib-ui-svg/issues/53) on Github.

---

<div class="post-metadata">

### Author: ![d0d04m3](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/d0d04m3/32/19965_2.png) [@d0d04m3](https://discourse.nodered.org/u/d0d04m3)
#### Post date: [9 April 2020 21:55 UTC](https://discourse.nodered.org/t/text-update-not-work-for-me-with-svg-grafics-node/24033/10 "2020-04-09T21:55:19Z")

</div>

hi thanks to solved  
I am very very to busy am sorry  
so i last think wen switched editor for remote to local  
am not see this issue any more

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [23 April 2020 21:55 UTC](https://discourse.nodered.org/t/text-update-not-work-for-me-with-svg-grafics-node/24033/11 "2020-04-23T21:55:21Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
