|
@@ -122,7 +122,9 @@ $(document).ready(function() {
|
|
|
.then(() => loadAsync(serverPath + '/contenu.html', 'text'))
|
|
.then(() => loadAsync(serverPath + '/contenu.html', 'text'))
|
|
|
.then(html => {
|
|
.then(html => {
|
|
|
$editorHtml.html(html);
|
|
$editorHtml.html(html);
|
|
|
- setHtmlContent(html);
|
|
|
|
|
|
|
+ // setHtmlContent(html);
|
|
|
|
|
+ $('iframe.panel-right')
|
|
|
|
|
+ .prop('src', '/examples/' + exampleSlug)
|
|
|
setActiveTab('html');
|
|
setActiveTab('html');
|
|
|
setCurrentHash(exampleSlug);
|
|
setCurrentHash(exampleSlug);
|
|
|
var sources = {
|
|
var sources = {
|
|
@@ -130,7 +132,7 @@ $(document).ready(function() {
|
|
|
javascript: $editorJs.html()
|
|
javascript: $editorJs.html()
|
|
|
};
|
|
};
|
|
|
editorStorage.init(exampleSlug, sources);
|
|
editorStorage.init(exampleSlug, sources);
|
|
|
- loadJS(serverPath + 'script.js');
|
|
|
|
|
|
|
+ // loadJS(serverPath + 'script.js');
|
|
|
})
|
|
})
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
var item = _.find(exampleList, { slug: exampleSlug });
|
|
var item = _.find(exampleList, { slug: exampleSlug });
|
|
@@ -167,9 +169,12 @@ $(document).ready(function() {
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
$editorHtml.html(restoredDraft.sources.html);
|
|
$editorHtml.html(restoredDraft.sources.html);
|
|
|
- setHtmlContent(restoredDraft.sources.html);
|
|
|
|
|
|
|
+ // setHtmlContent(restoredDraft.sources.html);
|
|
|
$editorJs.html(restoredDraft.sources.javascript);
|
|
$editorJs.html(restoredDraft.sources.javascript);
|
|
|
- loadJS('exemples/' + item.slug + '/script.js');
|
|
|
|
|
|
|
+ $('iframe.panel-right')
|
|
|
|
|
+ .prop('src', '/examples/' + item.slug)
|
|
|
|
|
+
|
|
|
|
|
+ // loadJS('exemples/' + item.slug + '/script.js');
|
|
|
// if(item.test) {
|
|
// if(item.test) {
|
|
|
// loadJS('exemples/' + item.slug + '/test.js', function() {
|
|
// loadJS('exemples/' + item.slug + '/test.js', function() {
|
|
|
// $('#tests').show();
|
|
// $('#tests').show();
|