|
@@ -1064,12 +1064,12 @@
|
1064
|
1064
|
}
|
1065
|
1065
|
|
1066
|
1066
|
zss_editor.restorerange = function(){
|
1067
|
|
- var selection = window.getSelection();
|
1068
|
|
- selection.removeAllRanges();
|
1069
|
|
- var range = document.createRange();
|
1070
|
|
- range.setStart(zss_editor.currentSelection.startContainer, zss_editor.currentSelection.startOffset);
|
1071
|
|
- range.setEnd(zss_editor.currentSelection.endContainer, zss_editor.currentSelection.endOffset);
|
1072
|
|
- selection.addRange(range);
|
|
1067
|
+ // var selection = window.getSelection();
|
|
1068
|
+ // selection.removeAllRanges();
|
|
1069
|
+ // var range = document.createRange();
|
|
1070
|
+ // range.setStart(zss_editor.currentSelection.startContainer, zss_editor.currentSelection.startOffset);
|
|
1071
|
+ // range.setEnd(zss_editor.currentSelection.endContainer, zss_editor.currentSelection.endOffset);
|
|
1072
|
+ // selection.addRange(range);
|
1073
|
1073
|
}
|
1074
|
1074
|
|
1075
|
1075
|
zss_editor.getSelectedNode = function() {
|
|
@@ -1344,13 +1344,13 @@
|
1344
|
1344
|
}
|
1345
|
1345
|
|
1346
|
1346
|
zss_editor.prepareInsert = function() {
|
1347
|
|
- zss_editor.backuprange();
|
|
1347
|
+ // zss_editor.backuprange();
|
1348
|
1348
|
}
|
1349
|
1349
|
|
1350
|
|
- zss_editor.insertImage = function(attributes) {
|
|
1350
|
+ zss_editor.insertImage = function(url) {
|
1351
|
1351
|
zss_editor.restorerange();
|
1352
|
1352
|
var imageContainer = $('<div><img></div>');
|
1353
|
|
- imageContainer.find('img').attr(attributes);
|
|
1353
|
+ imageContainer.find('img').attr('src', url);
|
1354
|
1354
|
zss_editor.insertHTML('<br>' + imageContainer.html() + '<br>');
|
1355
|
1355
|
zss_editor.enabledEditingItems();
|
1356
|
1356
|
}
|