JavaScript API: Manipulate elements of a PlasmaSvg

Marco Martin notmart at gmail.com
Wed Feb 24 15:36:41 CET 2010


On Wed, Feb 24, 2010 at 2:35 PM, Liebe Markus (RtP2/TEF72)
<Markus.Liebe at de.bosch.com> wrote:
> Hi there,
>
> Is it possible to manipulate text items of a SVG image?
>
> In the main.js of the plasmoid I did:
> svg = new PlasmaSvg('foo');  // loading foo.svg
>
> In the svg file there is a text element:
> <text id="textitem"  ... >mytext</text>
>
> Is it somehow possible to access this textitem and set/change its value using the Plasma Javascript API?
>
> The only other way I can think of is to open the svg file and parse the xml, change the value there, save it back and load it again.
> Which seems to be rather complicated.

There is no access to the Svg dom trough QtSvg, not even in C++


More information about the Plasma-devel mailing list