improve preview function
This commit is contained in:
parent
0337402acd
commit
134ac64e07
@ -533,7 +533,8 @@ $(document).ready(function() {
|
||||
var content = editorGetContent();
|
||||
var ajax = new bluditAjax();
|
||||
bluditAjax.saveAsDraft(uuid, title, content).then(function(data) {
|
||||
window.open("<?php echo DOMAIN_PAGES.'autosave-'.$page->uuid().'?preview='.md5('autosave-'.$page->uuid()) ?>", "_blank");
|
||||
var preview = window.open("<?php echo DOMAIN_PAGES.'autosave-'.$page->uuid().'?preview='.md5('autosave-'.$page->uuid()) ?>", "bludit-preview");
|
||||
preview.focus();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -452,7 +452,8 @@ $(document).ready(function() {
|
||||
var title = $("#jstitle").val();
|
||||
var content = editorGetContent();
|
||||
bluditAjax.saveAsDraft(uuid, title, content).then(function(data) {
|
||||
window.open("<?php echo DOMAIN_PAGES.'autosave-'.$uuid.'?preview='.md5('autosave-'.$uuid) ?>", "_blank");
|
||||
var preview = window.open("<?php echo DOMAIN_PAGES.'autosave-'.$uuid.'?preview='.md5('autosave-'.$uuid) ?>", "bludit-preview");
|
||||
preview.focus();
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user