Currently utilizing d3.js to create a layout graph akin to the one found here: https://bl.ocks.org/mbostock/950642
However, I've encountered a challenge when attempting to copy and paste the node labels. When referring to the provided link, it's cumbersome to select text as desired. Only by double-clicking on the label can I pinpoint a specific sequence of characters.
When trying to select text with special characters like Mlle.Vaubois
, only portions such as Mlle
or Vaubois
are selectable. The entire string is unable to be highlighted (Refer to the image below).
https://i.sstatic.net/E67VV.png
In addition, it's not possible to select arbitrary character sequences within a given string. For example, selecting the two middle letters 'll' from 'Mlle.Vaubois' is problematic; highlighting stops after the first 'l' (View screenshot below).
https://i.sstatic.net/TsW4t.png
The objective is to have the capability to freely select any sequence similar to that in a standard browser. For instance, being able to choose 'rce La' from the HTML text 'Labeled Force Layout' enables smooth Ctrl + C and Ctrl + V functionality (Shown in the image below).
https://i.sstatic.net/yoaA0.png
This issue extends beyond d3.js, as evident in another SVG-based example demonstrated here: http://jsfiddle.net/wPYvS/
https://i.sstatic.net/QI6iw.png
The discrepancy in how SVG handles text selection compared to standard HTML text in browsers or common text editors raises questions. Is there a feasible solution to rectify this? Your insights are appreciated. Thank you.