Angularjs - Можно ли сохранить целые переменные HTML и CSS в консоли?
var app = angular.module('CompanyProfile', []);
app.controller('ProfileCompanyCtrl', function () {
function init() {
//var blkStyle = '.blk-row::after{ content: ""; clear: both; display: block;} .blk-row{padding: 10px;}';
var editor = grapesjs.init({
allowScripts: 1,
showOffsets: 1,
autorender: 0,
noticeOnUnload: 0,
container: "#gjs",
height: "700px",
fromElement: true,
clearOnRender: 0,
storageManager: {
autosave: false,
setStepsBeforeSave: 1,
type: 'remote',
autoload: 0
},
//---------------Navbar--------------
commands: {
defaults: [{
id: "undo",
run: function (editor, sender) {
sender.set("active", false);
editor.UndoManager.undo(1);
}
},
{
id: "redo",
run: function (editor, sender) {
sender.set("active", false);
editor.UndoManager.redo(1);
}
},
{
id: "clean-all",
run: function (editor, sender) {
sender.set("active", false);
if (confirm("Are you sure to clean the canvas?")) {
var comps = editor.DomComponents.clear();
}
}
},
{
id: "save",
run: function (editor, senderBtn) {
sender.set("active", false);
saveHtmlToList(editor);
},
stop: function (editor, senderBtn) { }
}
]
},
assetManager: {
upload: "https://test.page",
params: {
_token: "pCYrSwjuiV0t5NVtZpQDY41Gn5lNUwo3it1FIkAj"
},
},
blockManager: {
blocks: []
},
});