Closed blackbirdzzz closed 7 years ago
Well, usually variables inside newsletter templates are replaced by the server, but if you want to replace something before submitting it, you might want to create just come custom function
<div id="sbm">Submit<div>
<script>
...
$('sbm').on('click', function() {
var finalHtml = editor.getHtml();
finalHtml = finalHtml.replace('{{ VAR }}', 'value');
$.ajax({
...
data: {html: finalHtml}
})
})
</script>
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Hi i wanted to know how in the API grapejs can i change some variable in my builder space exemple i place 3 text with some different name like : VAR1 VAR2 VAR3 and i wanted to change those var by the value i submit in my modal : (see picture) how to it on code it is possible to get some (sample of code) or the best idea to do IT thanks again !
https://www.noelshack.com/2017-33-3-1502874762-capture-d-ecran-2017-08-16-a-11-12-22.png https://www.noelshack.com/2017-33-3-1502874771-capture-d-ecran-2017-08-16-a-11-08-21.png https://www.noelshack.com/2017-33-3-1502874783-capture-d-ecran-2017-08-16-a-11-08-35.png