mjawad096 / laravel-grapesjs

This package provide an esay way to integrate GrapesJS into your laravel proejct.
MIT License
107 stars 54 forks source link

how to add js to plugin options #56

Closed joukhar closed 1 year ago

joukhar commented 1 year ago

exemple

               'enabled' => true,
                'name' => 'my-plugin',
                'options' => [
                    // 'root' => [
                    //     'css' => [
                    //         // others
                    //         'style.css' => '(editor) => editor.getCss()',
                    //     ],
                    //     'index.html' => '<script language=\'javascript\'>
                    //     (editor) =>
                    //         `<!doctype html>
                    //         <html lang="en">
                    //         <head>
                    //             <meta charset="utf-8">
                    //             <link rel="stylesheet" href="./css/style.css">
                    //         </head>
                    //         ${editor.getHtml()}
                    //         </html>`
                    //     </script>',
                    // ],
                ],
                'scripts' => [
                    'url',
                ],
ghost commented 1 year ago

@joukhar did not get what you want to achieve, Why do you need to add the js in the plugin options?

joukhar commented 1 year ago

it done sir ,i created a custom plugin for that thanks