Issue #387💬 AnsweredOpened October 6, 2017by mekamleshk0 reactions

Want to save template name

Quick answerby daniel-farina

Since you are already loading php in this file why don't you pass that as a url parameter: I would advise to have all this running under a user's session with tokens, etc but for now that should do the trick.

Read full answer below ↓

Question

Hi @artf @sonnylloyd @arthuralmeidap @cmcintosh I am trying to store template name, but not sure how to pass the template name along with template data. I mean I want to store template name and template data with the help of one single submit button. Below is my code :

Answers (3)

daniel-farinaOctober 6, 2017

Since you are already loading php in this file why don't you pass that as a url parameter: I would advise to have all this running under a user's session with tokens, etc but for now that should do the trick.

mekamleshkOctober 6, 2017

@daniel-farina I am trying to save the template name from a input text box and not the templateId

artfOctober 6, 2017

Well, there is always an option to use your custom ajax call where you might just add getHtml and getCss to your data. If the use of editor.store() is necessary you can add/update params (which will be passed with any request) on RemoteStorage instance

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.