Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

137
Views
grapejs add internal script as well as external script to canvas

As of now I have

const editor = grapesjs.init({
            // Indicate where to init the editor. You can also pass an HTMLElement
            container: '#gjs',
            canvas: {
                scripts: ['https://somelink.js', 'https://anotherlink.js]
            },
});

I would like to have this link as well as some scripts which are internally added, say

function alertMe() { alert('Ninja') }

I am unable to add the above function block into the canvas scripts. Anybody have an idea?

Note: It is not possible to create separate file for these script because these are extracted during run time

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!