Skip to content

Where do we set the path to a local library? #474

Answered by Lorrainbow
idavillc asked this question in Q&A
Discussion options

You must be logged in to vote

I'm two years too late, but in case anyone else stumbles across this question, here's the answer from a django point of view.

I took this code from index.html and put it in my django template page. You need to reference the css file as well but here's the editor.js edited and what they were looking for: setting the img_path to your path, in my case my django static path

<script type="module">        
import Editor from '{% static "svgedit/Editor.js" %}'
        
const svgEditor = new Editor(document.getElementById('container'))
svgEditor.init()
svgEditor.setConfig({
          dimensions: [320,240],
          canvas_expansion:5,
//ANSWER HERE 
          imgPath: '{% static "svgedit/images/…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jfhenon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants