forceclass false doesn't work
Question
Hi artf , thanks again for your answers since i started my project and thanks again for this beautifull project,
I told you that i wanted to stop the auto create class that delete my inline css, and you said : to forceclass set it on false , when i set forceclass false this doesn't work is it normal ? or i need to do something else ?
this is my index code :
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>TheKooples - Newsletter - BUILDER</title>
<link rel="stylesheet" href="css/pagebuilder.css">
<link rel="stylesheet" href="css/tools.css">
<link rel="stylesheet" href="css/gjs-koop-preset-webpage.css">
<link rel="stylesheet" href="css/gjs-koop-scroll.css">
<link rel="icon" href="http://cdn.thekooples.com/skin/frontend/base/default/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="http://cdn.thekooples.com/skin/frontend/base/default/favicon.ico" type="image/x-icon">
<script src="dist/sweetalert.min.js"></script>
<link rel="stylesheet" type="text/css" href="dist/sweetalert.css">
<link rel="stylesheet" href="css/tooltip.css">
<script src="./node_modules/jquery/dist/jquery.min.js"></script>
<script src="./node_modules/grapesjs/dist/grapes.min.js"></script>
<script src="./dist/grapesjs-preset-newsletter.min.js"></script>
</head>
<style>
body > .inner {
display: none;
}
body.pg-loaded > .inner {
display: block;
}
body,
html {
height: 100%;
margin: 0;
}
</style>
<body>
<div id="gjs" style="height:0px; overflow:hidden">
</div>
<style>
.hide { position:absolute; top:-1px; left:-1px; width:1px; height:1px; }
</style>
<iframe name="hiddenFrame" class="hide"></iframe>
<form onsubmit="return builderForm();" id="builder-form" class="builder-form" action="" style="display:none" target="hiddenFrame">
<div class="putsmail-c">
<p style="font-weight: bold;margin-top: 10px;margin-bottom:10px;text-transform: uppercase;text-align: center;font-size: 10px;">
Remplir tout les champs pour procéder à une traduction de la newsletter !</p>
</div>
<div class="gjs-sm-property" style="margin-bottom: 5px;">
<p style="margin-bottom:0px; padding: 4px;margin-top: 2px;color: #00acff;font-weight: bold;">Nom de la newsletter :</p>
<div class="gjs-field">
<span id="gjs-sm-input-holder">
<input type="text" id="nl_name" name="nl_name" placeholder="NL-001-FR-M-CATEGORY-Name" required>
</span>
</div>
</div>
<div class="gjs-sm-property" style="margin-bottom: 5px;">
<p style="margin-bottom:0px; padding: 4px;margin-top: 2px;color: #00acff;font-weight: bold;">Nom du sheets :</p>
<div class="gjs-field">
<span id="gjs-sm-input-holder">
<input type="text" id="nl_sheets" name="nl_sheets" placeholder="Sheets 1" required>
</span>
</div>
</div>
<div class="gjs-sm-property" style="margin-bottom: 5px;">
<p style="margin-bottom:0px; padding: 4px;margin-top: 2px;color: #00acff;font-weight: bold;">Nom de l'utm-compaign :</p>
<div class="gjs-field">
<span id="gjs-sm-input-holder">
<input type="text" id="nl_utm" name="nl_utm" placeholder="sale-collection-mixte-fr" required>
</span>
</div>
</div>
<div class="gjs-sm-property">
<p style="margin-bottom:0px; padding: 4px;margin-top: 2px;color: #00acff;font-weight: bold;">Pays de la newsletter:</p>
<div class="gjs-field">
<span id="gjs-sm-input-holder">
<select id="nl_lang">
<option value="french">France</option>
<option value="europe">Europe</option>
<option value="german">Allemagne</option>
<option value="england">United-Kingdom</option>
<option value="america">United-State</option>
<option value="suisse-fr">Suisse - France</option>
<option value="suisse-de">Suisse - Allemagne</option>
<option value="luxembourg">Luxembourg</option>
</select>
</span>
</div>
</div>
<input type="hidden" name="body">
<button class="gjs-btn-prim gjs-btn-import" style="width: 100%;margin-top: 0px;">ENREGISTRER</button>
</form>
<script type="text/javascript">
var editor = grapesjs.init({
allowScripts: 1,
showOffsets: 1,
forceClass: false,
noticeOnUnload: 0,
height: '100%',
storageManager: {
id: 'gjs-',
type: 'local',
autosave: false,
autoload: false,
storeComponents: 1,
storeStyles: 1,
},
assetManager: {
upload: 'https://test.page'
},
protectedCss: '',
container: '#gjs',
fromElement: true,
plugins: ['gjs-preset-newsletter'],
pluginsOpts: {
'gjs-preset-newsletter': {
modalLabelImport: "Copiez ici votre code pré-fait à fin de l'importer",
modalLabelExport: 'Rendu du code de la Newsletter',
importPlaceholder: '<table class="table"><tr><td class="cell">Importez votre code ici.</td></tr></table>',
}
}
});
function builderForm()
{
editor.nl_name = document.getElementById("nl_name").value;
editor.nl_sheets = document.getElementById("nl_sheets").value;
editor.nl_utm = document.getElementById("nl_utm").value;
editor.nl_lang = document.getElementById("nl_lang").value;
editor.trigger('builder_form');
}
</script>
</body>
</html>
Answers (0)
No answers yet.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #546
Inline css to class
@artf thanks for amazing project, it mad site editing much easier. by default editor convert inline css to class but is there setting not t...
Issue #1506
Css Media Query Issue
Hello @artf There is an issue on demo page as well as library in media query. Issue is that if user update style on mobile view first and t...
Issue #1816
Not allowing to upload same image on same the position after delete that image
Ajax call which is uploading image file in assests folder It's working fine to add an image from the local. But in another scenario, It's n...
Issue #1754
[Bug] problem of styling with ckeditor(4)
Hello @artf and all ! Thanks again for the amazing job ! I tried to implement ckeditor with grapesjs and it seems to work pretty much corre...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.