💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
~~~ {load href="/static/admin/plugins/ueditor/ueditor.config.js"/} {load href="/static/admin/plugins/ueditor/ueditor.all.min.js"/} <script> $(function() { var ue = UE.getEditor('content'), uploadEditor = UE.getEditor('upload-photo-btn'), photoListItem, uploadImage; uploadEditor.ready(function () { uploadEditor.setDisabled(); uploadEditor.hide(); uploadEditor.addListener('beforeInsertImage', function (t, arg) { $.each(arg, function (index, item) { photoListItem = '<div class="photo-list"><input type="text" name="photo[]" value="' + item.src + '" class="layui-input layui-input-inline">'; photoListItem += '<button type="button" class="layui-btn layui-btn-danger remove-photo-btn">移除</button></div>'; $('#photo-container').append(photoListItem).on('click', '.remove-photo-btn', function () { $(this).parent('.photo-list').remove(); }); }); }); }); $('#upload-photo-btn').on('click', function () { uploadImage = uploadEditor.getDialog("insertimage"); uploadImage.open(); }); }); </script> ~~~