DmitrMakeev commited on
Commit
22fcc62
·
verified ·
1 Parent(s): 712a271

Update builder2.html

Browse files
Files changed (1) hide show
  1. builder2.html +0 -4
builder2.html CHANGED
@@ -171,7 +171,6 @@
171
  ]
172
  }
173
  });
174
-
175
  const pn = editor.Panels;
176
  const panelViews = pn.addPanel({
177
  id: "views",
@@ -187,12 +186,10 @@
187
  id: "open-code",
188
  },
189
  ]);
190
-
191
  document.querySelector("#save-button").onclick = () => {
192
  var reg = /\<body[^>]*\>([^]*)\<\/body/m;
193
  var htmlWithCss = editor.runCommand('gjs-get-inlined-html');
194
  let withoutBodyTag = htmlWithCss.match(reg)[1];
195
-
196
  // Создаем временный элемент для скачивания файла
197
  const blob = new Blob([withoutBodyTag], { type: 'text/html' });
198
  const url = URL.createObjectURL(blob);
@@ -204,7 +201,6 @@
204
  document.body.removeChild(a);
205
  URL.revokeObjectURL(url);
206
  };
207
-
208
  window.onload = () => {
209
  editor.setComponents("<p>asdasd</p>");
210
  };
 
171
  ]
172
  }
173
  });
 
174
  const pn = editor.Panels;
175
  const panelViews = pn.addPanel({
176
  id: "views",
 
186
  id: "open-code",
187
  },
188
  ]);
 
189
  document.querySelector("#save-button").onclick = () => {
190
  var reg = /\<body[^>]*\>([^]*)\<\/body/m;
191
  var htmlWithCss = editor.runCommand('gjs-get-inlined-html');
192
  let withoutBodyTag = htmlWithCss.match(reg)[1];
 
193
  // Создаем временный элемент для скачивания файла
194
  const blob = new Blob([withoutBodyTag], { type: 'text/html' });
195
  const url = URL.createObjectURL(blob);
 
201
  document.body.removeChild(a);
202
  URL.revokeObjectURL(url);
203
  };
 
204
  window.onload = () => {
205
  editor.setComponents("<p>asdasd</p>");
206
  };