refactor(editor): 重构编辑器组件及样式,优化功能实现
重构编辑器工具栏样式及功能,使用wangEditor替换原有实现 优化图片和视频上传逻辑,增加自定义校验和上传处理 调整编辑器样式,修复对齐功能及段落标题样式 更新表情选择器位置逻辑,支持上下方向显示 统一组件导入方式,添加版本控制参数防止缓存
This commit is contained in:
16
js/public.js
16
js/public.js
@@ -2,6 +2,8 @@ const forumBaseURL = "https://api.gter.net";
|
||||
axios.defaults.withCredentials = true;
|
||||
axios.defaults.emulateJSON = true;
|
||||
|
||||
const withVer = (p) => `${p}?v=${window.__ASSET_VERSION__}`;
|
||||
|
||||
// 导出ajax函数
|
||||
const ajax = (url, data) => {
|
||||
axios.defaults.withCredentials = true;
|
||||
@@ -402,3 +404,17 @@ const go_ajax_Login = () => {
|
||||
if (typeof ajax_login === "function") ajax_login();
|
||||
else window.open("https://passport.gter.net/?referer=" + escape(location.href), "_self");
|
||||
};
|
||||
|
||||
// const loadJsFile = (url) => {
|
||||
// var xhr = new XMLHttpRequest();
|
||||
// xhr.open("GET", url, true);
|
||||
// xhr.onreadystatechange = function () {
|
||||
// if (xhr.readyState === 4 && xhr.status === 200) {
|
||||
// var scriptCode = xhr.responseText;
|
||||
// var script = document.createElement("script");
|
||||
// script.innerHTML = scriptCode;
|
||||
// document.head.appendChild(script);
|
||||
// }
|
||||
// };
|
||||
// xhr.send();
|
||||
// };
|
||||
|
||||
Reference in New Issue
Block a user