Hi,

How complicated do you want this? If there are only a few possible texts you 
can simply have all of the possible texts in text elements and turn them on and 
off using the display attribate. If you're expecting the user to type in and 
edit things with possibly long entries, with automaticly arranging it into 
lines as text is added or deleted and with a scroll bar, things get a lot more 
complicated. If each box has a single word but there are a large number of 
possible words (e.g. a genus field for searching a biological database), then 
the complexity falls somewhere in between - you want to change the text element 
from user input or the database but don't have to worry about lines and 
scrolling.

Richard Pearman       http://www.pixelpalaces.com/
The next stage in the evolution of web comics: http://www.pixelpalaces.com/dk/
South Alberta Cactus and succulent society: 
http://www.facebook.com/group.php?gid=20360241008

----- Original Message ----- 
  From: [email protected] 
  To: [email protected] 
  Sent: Sunday, September 08, 2013 11:17 AM
  Subject: [svg-developers] How to update texts of a svg element with textboxes 
?


    
  I have created a shape with different paths, and added texts to each path, 
but now i want to get these texts in textboxes and update them , can anyone 
help me , how to do this plz ?


  here is the code:


  <svg width="640" height="480" xmlns="http://www.w3.org/2000/svg";>
   <!-- Created with SVG-edit - http://svg-edit.googlecode.com/ -->


   <g>
    <title>Layer 1</title>
    <g id="svg_1">
     <path fill="#FFFFFF" stroke="#000000" stroke-width="5" 
stroke-dasharray="null" stroke-linejoin="null" stroke-linecap="null" 
d="m163.29622,116.65482l174.433,0l0,54.00005l-174.433,0l0,-54.00005z" 
id="svg_12"/>
     <path fill="#FFFFFF" stroke="#000000" stroke-width="5" 
stroke-dasharray="null" stroke-linejoin="null" stroke-linecap="null" 
d="m163.78255,171.49857l174.433,0l0,54.00006l-174.433,0l0,-54.00006z" 
id="svg_15"/>
     <path fill="#FFFFFF" stroke="#000000" stroke-width="5" 
stroke-dasharray="null" stroke-linejoin="null" stroke-linecap="null" 
d="m163.78255,226.49857l174.433,0l0,54.00006l-174.433,0l0,-54.00006z" 
id="svg_16"/>
     <text fill="#000000" stroke="#000000" stroke-width="0" 
stroke-dasharray="null" stroke-linejoin="null" stroke-linecap="null" x="239" 
y="151" id="svg_17" font-size="24" font-family="serif" text-anchor="middle" 
xml:space="preserve">Class</text>
     <text fill="#000000" stroke="#000000" stroke-width="0" 
stroke-dasharray="null" stroke-linejoin="null" stroke-linecap="null" 
x="243.98828" y="205.5" font-size="24" font-family="serif" text-anchor="middle" 
xml:space="preserve" id="svg_18">Attr</text>
     <text fill="#000000" stroke="#000000" stroke-width="0" 
stroke-dasharray="null" stroke-linejoin="null" stroke-linecap="null" 
x="242.98828" y="261.5" font-size="24" font-family="serif" text-anchor="middle" 
xml:space="preserve" id="svg_19">func</text>
    </g>
   </g>
  </svg>

  

Reply via email to