Replies: 3 comments 6 replies
-
Some initialization can be required when not using the SVG Editor. (You'd have to look through Investigating a little bit, the If you add a text input element (in the editor we use an invisible element): <input id="text" size="35" hidden="true" /> ...you can then pass the DOM of this in before calling canvas.textActions.setInputElem($('#text')[0]); (We could probably avoid the need for this by adding the input element automatically since it is hidden.) However, this is as far as I got, as though the error disappears, and the control shows up within the canvas, the text is only present in our (hidden) input--it doesn't show up within the canvas for whatever reason. You'd have to investigate this further. I'll close this, but it should be nice to have a more generic issue to fully document the canvas dependencies if you wanted to file such an issue (in case anyone might help). |
Beta Was this translation helpful? Give feedback.
-
In order to make the text appear on the SVG, I think you have to add the following lines at the same place you call the setInputElem method :
|
Beta Was this translation helpful? Give feedback.
-
I have another change to propose. (to fix a bug in the mouse wheel event).
I will continue to use svgEdit for my professionnal project in the next
month. So, It would be nice to add me as a maintainer.
Regards
CG
Le dim. 21 nov. 2021 à 10:51, JFH ***@***.***> a écrit :
Hello, if you intend to create PR regularly, I can add you as a maintainer
to the project. If not, you can clone the projet in your own repository,
make the changes and then propose a PR back to the SVGEDit repository.
Thanks.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#530 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVRYTJICCRHHXIYHD6373XLUNC6JVANCNFSM5IBYM7NA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
--
Cedric Godefroy
CTO & Co-funder
<https://www.linkedin.com/in/c%C3%A9dric-godefroy-6909b2a2/>
|
Beta Was this translation helpful? Give feedback.
-
Hello
I'm trying to use SvgCanvas, I used the template (demo/canvas.html), I added a button like this :
<button onclick="canvas.setMode('text')">Text</button>
but when i'm using it by clicking on the canvas zone, that doesn't works.To Reproduce
Steps to reproduce the behavior:
<button onclick="canvas.setMode('text')">Text</button>
under the 'line' oneExpected behavior
I just expect that i can write some text in the textarea created
SVG-Edit environment
svgcanvas.js
andcanvas.html
Desktop:
Thanks for your answers, have a nice day !
-Ohw
Beta Was this translation helpful? Give feedback.
All reactions