Browse Source

富文本编辑器增加选择服务器图片

tags/6.1.2
tianya 2 years ago
parent
commit
c243c4de33
3 changed files with 1289 additions and 44 deletions
  1. +4
    -0
      src/admin/dialog/select_images.php
  2. +1
    -44
      src/static/ckeditor/plugins/image/dialogs/image.js
  3. +1284
    -0
      src/static/ckeditor/plugins/image/dialogs/image.source.js

+ 4
- 0
src/admin/dialog/select_images.php View File

@@ -100,6 +100,10 @@ a{text-decoration:none!important}
var fileUrl = reimg;
window.opener.CKEDITOR.tools.callFunction(funcNum, fileUrl);
}
if (window.opener.CKEDITOR.instances.<?php echo $f ?>) {
let addonHTML = `<img src='${reimg}'>`;
window.opener.CKEDITOR.instances["<?php echo $f ?>"].insertHtml(addonHTML);
}
if (window.opener.document.<?php echo $f ?> != null) {
window.opener.document.<?php echo $f ?>.value = reimg;
if (window.opener.document.getElementById('div<?php echo $v ?>')) {


+ 1
- 44
src/static/ckeditor/plugins/image/dialogs/image.js
File diff suppressed because it is too large
View File


+ 1284
- 0
src/static/ckeditor/plugins/image/dialogs/image.source.js
File diff suppressed because it is too large
View File


Loading…
Cancel
Save