Ju99ernaut / grapesjs-template-manager

Template and page manager for grapesjs
MIT License
82 stars 36 forks source link

add additional values ​​on page edit #27

Closed vizardkill closed 2 years ago

vizardkill commented 2 years ago

Hi bro, it's me again.

I wanted to ask you if it is possible that in the editing part of the page you can add something like the title and description of the page?

image

is that I want to do something like this, to add SEO on the pages

image

I know that grapes stores the structure of the pages in the gjs-pages property, so how do we embed new properties within the selected page?

Ju99ernaut commented 2 years ago

It is possible, basically something like:

const sel = editor.Pages.getSelected();
// set value.
sel.set({ title: 'Title' });
// get value
sel.get('title');