国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

秀米編輯器(xiumi)+百度編輯器(Ueditor) 集成 :解決集成問題,秀米編輯器導(dǎo)出到百度編輯器格式問題,圖片保存到自己的服務(wù)器(阿里云OSS)

這篇具有很好參考價(jià)值的文章主要介紹了秀米編輯器(xiumi)+百度編輯器(Ueditor) 集成 :解決集成問題,秀米編輯器導(dǎo)出到百度編輯器格式問題,圖片保存到自己的服務(wù)器(阿里云OSS)。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

1.集成前提條件:

????????1. 需要集成百度編輯器到環(huán)境中

????????2.https環(huán)境下才可以導(dǎo)出數(shù)據(jù)到百度編輯器,如果不是https環(huán)境,會(huì)出現(xiàn)錯(cuò)誤

秀米編輯器(xiumi)+百度編輯器(Ueditor) 集成 :解決集成問題,秀米編輯器導(dǎo)出到百度編輯器格式問題,圖片保存到自己的服務(wù)器(阿里云OSS)

????????

然后我們開始講解如何集成:

2.引入資源:


//百度編輯器需要修改的文件(配置與原始的配置不一樣,后面會(huì)詳細(xì)講)
<script type="text/javascript" src="/static/lib/ueditor1_4_3_3-utf8-php/utf8-php-xiumi/ueditor.config.js?t=1"></script>
<script type="text/javascript" src="/static/lib/ueditor1_4_3_3-utf8-php/utf8-php-xiumi/ueditor.all.min.js"></script>
//秀米編輯器的JS,這個(gè)需要下載(下載可以去xiumi.us下載,也可以參考博主提供的相關(guān)代碼)
<script type="text/javascript" src="/static/lib/ueditor1_4_3_3-utf8-php/utf8-php-xiumi/xiumi-ue-dialog-v5.js"></script>

3.初始化百度編輯器:


<script>
?? ?var ue = UE.getEditor('editor');
</script>

//xiumi-ue-dialog-v5.js可以去官網(wǎng)下載,也可以直接使用博主提供的相關(guān)代碼
UE.registerUI('dialog', function (editor, uiName) {
? ? var btn = new UE.ui.Button({
? ? ? ? name ? : 'xiumi-connect',
? ? ? ? title ?: '秀米',
? ? ? ? onclick: function () {
? ? ? ? ? ? var dialog = new UE.ui.Dialog({
? ? ? ? ? ? ? ? iframeUrl: '相對(duì)地址/XIUMI connect.html',//這個(gè)參數(shù)中的html需要下載或者使用博主提供的代碼(后面會(huì)貼出代碼)
? ? ? ? ? ? ? ? editor ? : editor,
? ? ? ? ? ? ? ? name ? ? : 'xiumi-connect',//打開頁面指定名字
? ? ? ? ? ? ? ? title ? ?: "秀米編輯器",//打開頁面指定標(biāo)題
? ? ? ? ? ? ? ? cssRules : "width: " + (window.innerWidth - 60) + "px;" + "height: " + (window.innerHeight - 60) + "px;",//打開頁面大小配置
? ? ? ? ? ? });
? ? ? ? ? ? dialog.render();
? ? ? ? ? ? dialog.open();
? ? ? ? }
? ? });

? ? return btn;
});


//XIUMI connect.html可以去官網(wǎng)下載,也可以直接使用博主提供的相關(guān)代碼
<!DOCTYPE html>
<html>
<head>
? ? <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
? ? <title>XIUMI connect</title>
? ? <style>
? ? ? ? html, body {padding: 0;margin: 0;}
? ? ? ? #xiumi {position: absolute;width: 100%;height: 100%;border: none;box-sizing: border-box;}
? ? </style>
</head>
<body>
<!--引入秀米頁面-->
<iframe id="xiumi" src="http://xiumi.us/studio/v5#/paper"></iframe>
<!--引入秀米頁面-->
<script type="text/javascript" src="./internal.js"></script>
<script>
? ? var xiumi = document.getElementById('xiumi');
? ? var xiumi_url = window.location.protocol + "http://xiumi.us";
? ? xiumi.onload = function () {xiumi.contentWindow.postMessage('ready', xiumi_url);};
? ? document.addEventListener("mousewheel", function (event) {event.preventDefault();event.stopPropagation();});
? ? window.addEventListener('message', function (event) {
? ? ? ? if (event.origin == xiumi_url) {
? ? ? ? ? ? editor.execCommand('insertHtml', event.data);
? ? ? ? ? ? editor.fireEvent("catchRemoteImage");//這個(gè)配置一定寫,catchRemoteImage表示自定義上傳方法名(注意:秀米編輯器導(dǎo)入百度編輯器的時(shí)候,圖片文件不會(huì)自動(dòng)上傳到我們自己設(shè)置服務(wù)器,所以這一點(diǎn)一定要寫上)
? ? ? ? ? ? dialog.close();
? ? ? ? }
? ? }, false);
</script>
</body>
</html>

4.ueditor.config.js配置修改:

????????//開啟配置(去掉注釋),開啟這個(gè)配置的作用:秀米編輯器數(shù)據(jù)導(dǎo)入百度編輯器圖片樣式會(huì)錯(cuò)亂,所以需要配置:iframeCssUrl: URL + '/themes/iframe.css'


????????//開啟配置(去掉注釋),開啟這個(gè)配置的作用:設(shè)置是否抓取遠(yuǎn)程圖片(Ctrl+c和Ctrl+v會(huì)觸發(fā)遠(yuǎn)程獲取圖片并上傳到自己服務(wù)器事件):catchRemoteImageEnable: true?


????????//修改配置:section[] 修改為 section:['class', 'style'],(作用是過濾器:秀米編輯器導(dǎo)入百度編輯器的過程中,class和style不被過濾,各種樣式得以保存)
section:['class', 'style'],

????????//iframe.css:添加自己自定義樣式(存放相對(duì)地址:ueditor/themes/iframe.css),這個(gè)需要自己重寫,代碼參考博主提供的demo


img {
? ? max-width: 100%;
}
body {
? ? overflow-y: scroll !important;
}
.view {
? ? word-break: break-all;
}
.vote_area {
? ? display: block;
}
.vote_iframe {
? ? background-color: transparent;
? ? border: 0 none;
? ? height: 100%;
}
#edui1_imagescale{display:none !important;}

//傳到自己服務(wù)器的上傳方法(PHP版),主要由兩個(gè)文件(存儲(chǔ)地址:ueditor/php):Uploader.class.php ?和 ?config.json

????????//先講Uploader.class.php文件(主要是引入OSS上傳方法,集成OSS方法就不贅述了,可以參考阿里云

<?php

//阿里云OSS上傳自動(dòng)加載文件(注意相對(duì)地址
require_once realpath(dirname(__FILE__).'/../../../../../applicaction/libraries/aliyun-oss/autoload.php');
use OSS\OssClient;
use OSS\Core\OssException;

class Uploader
{
? ? private $fileField; //文件域名
? ? private $file; //文件上傳對(duì)象
? ? private $base64; //文件上傳對(duì)象
? ? private $config; //配置信息
? ? private $oriName; //原始文件名
? ? private $fileName; //新文件名
? ? private $fullName; //完整文件名,即從當(dāng)前配置目錄開始的URL
? ? private $filePath; //完整文件名,即從當(dāng)前配置目錄開始的URL
? ? private $fileSize; //文件大小
? ? private $fileType; //文件類型
? ? private $stateInfo; //上傳狀態(tài)信息,
? ? private $stateMap = array( //上傳狀態(tài)映射表,國際化用戶需考慮此處數(shù)據(jù)的國際化
? ? ? ? "SUCCESS",
? ? ? ? "文件大小超出 upload_max_filesize 限制",
? ? ? ? "文件大小超出 MAX_FILE_SIZE 限制",
? ? ? ? "文件未被完整上傳",
? ? ? ? "沒有文件被上傳",
? ? ? ? "上傳文件為空",
? ? ? ? "ERROR_TMP_FILE" => "臨時(shí)文件錯(cuò)誤",
? ? ? ? "ERROR_TMP_FILE_NOT_FOUND" => "找不到臨時(shí)文件",
? ? ? ? "ERROR_SIZE_EXCEED" => "文件大小超出網(wǎng)站限制",
? ? ? ? "ERROR_TYPE_NOT_ALLOWED" => "文件類型不允許",
? ? ? ? "ERROR_CREATE_DIR" => "目錄創(chuàng)建失敗",
? ? ? ? "ERROR_DIR_NOT_WRITEABLE" => "目錄沒有寫權(quán)限",
? ? ? ? "ERROR_FILE_MOVE" => "文件保存時(shí)出錯(cuò)",
? ? ? ? "ERROR_FILE_NOT_FOUND" => "找不到上傳文件",
? ? ? ? "ERROR_WRITE_CONTENT" => "寫入文件內(nèi)容錯(cuò)誤",
? ? ? ? "ERROR_UNKNOWN" => "未知錯(cuò)誤",
? ? ? ? "ERROR_DEAD_LINK" => "鏈接不可用",
? ? ? ? "ERROR_HTTP_LINK" => "鏈接不是http鏈接",
? ? ? ? "ERROR_HTTP_CONTENTTYPE" => "鏈接contentType不正確",
? ? ? ? "INVALID_URL" => "非法 URL",
? ? ? ? "INVALID_IP" => "非法 IP"
? ? );

? ? /**
? ? ?* 構(gòu)造函數(shù)
? ? ?*/
? ? public function __construct($fileField, $config, $type = "upload")
? ? {
? ? ? ? $this->fileField = $fileField;
? ? ? ? $this->config = $config;
? ? ? ? $this->type = $type;
? ? ? ? if ($type == "remote") {
? ? ? ? ? ? $this->saveRemote();
? ? ? ? } else if($type == "base64") {
? ? ? ? ? ? $this->upBase64();
? ? ? ? } else {
? ? ? ? ? ? $this->upFile();
? ? ? ? }

? ? ? ? $this->stateMap['ERROR_TYPE_NOT_ALLOWED'] = iconv('unicode', 'utf-8', $this->stateMap['ERROR_TYPE_NOT_ALLOWED']);
?? ??? ??? ??? ?
?? ??? ??? ??? ?//The AccessKeyId from OSS or STS
?? ??? ??? ??? ?$this->accessKeyId="";
?? ??? ??? ??? ?//The AccessKeySecret from OSS or STS
?? ??? ??? ??? ?$this->accessKeySecret="";
?? ??? ??? ??? ?//The domain name of the datacenter,For example: oss-cn-hangzhou.aliyuncs.com
?? ??? ??? ??? ?$this->endpoint="";
? ? }

? ? /**
? ? ?* 上傳文件的主處理方法(這個(gè)需要替換原有的方法)
? ? ?*/
? ? private function upFile()
? ? {
? ? ? ? $file = $this->file = $_FILES[$this->fileField];
? ? ? ? if (!$file) {
? ? ? ? ? ? $this->stateInfo = $this->getStateInfo("ERROR_FILE_NOT_FOUND");
? ? ? ? ? ? return;
? ? ? ? }
? ? ? ? if ($this->file['error']) {
? ? ? ? ? ? $this->stateInfo = $this->getStateInfo($file['error']);
? ? ? ? ? ? return;
? ? ? ? } else if (!file_exists($file['tmp_name'])) {
? ? ? ? ? ? $this->stateInfo = $this->getStateInfo("ERROR_TMP_FILE_NOT_FOUND");
? ? ? ? ? ? return;
? ? ? ? } else if (!is_uploaded_file($file['tmp_name'])) {
? ? ? ? ? ? $this->stateInfo = $this->getStateInfo("ERROR_TMPFILE");
? ? ? ? ? ? return;
? ? ? ? }
? ? ? ? //修改:上傳阿里云OSS(file:表示存儲(chǔ)地址)
? ? ? ? $ossClient=new OssClient($this->accessKeyId,$this->accessKeySecret,$this->endpoint);
? ? ? ? $ossClient->uploadFile('ine', 'file/'.date ('Ym') .'/'.$file['name'], $file['tmp_name']);
? ? ? ? $this->oriName = $file['name'];
? ? ? ? $this->fileSize = $file['size'];
? ? ? ? $this->fileType = $this->getFileExt();
? ? ? ? $this->fullName = $this->getFullName();
? ? ? ? $this->filePath = $this->getFilePath();
? ? ? ? $this->fileName = $this->getFileName();
? ? ? ? $dirname = dirname($this->filePath);

? ? ? ? //檢查文件大小是否超出限制
? ? ? ? if (!$this->checkSize()) {
? ? ? ? ? ? $this->stateInfo = $this->getStateInfo("ERROR_SIZE_EXCEED");
? ? ? ? ? ? return;
? ? ? ? }

? ? ? ? //檢查是否不允許的文件格式
? ? ? ? if (!$this->checkType()) {
? ? ? ? ? ? $this->stateInfo = $this->getStateInfo("ERROR_TYPE_NOT_ALLOWED");
? ? ? ? ? ? return;
? ? ? ? }

? ? ? ? $this->stateInfo = $this->stateMap[0];
? ? }
?
? ? /**
? ? ?* 拉取遠(yuǎn)程圖片(這個(gè)需要替換原有的方法)
? ? ?*/
? ? private function saveRemote()
? ? {
? ? ? ? $imgUrl = htmlspecialchars($this->fileField);
? ? ? ? $imgUrl = str_replace("&amp;", "&", $imgUrl);

? ? ? ? //本段代碼解決的問題:官方圖片資料不能上傳到自己的服務(wù)器

? ? ? ?$pos = strpos($imgUrl, '?'); // 如果找到了問號(hào),使用 substr() 函數(shù)刪除問號(hào)及其后面的所有內(nèi)容

? ? ? ?if ($pos !== false) {

? ? ? ? ? ? ? $imgUrl = substr($imgUrl, 0, $pos);

? ? ? ? }

? ? ? ? //http開頭驗(yàn)證
? ? ? ? if (strpos($imgUrl, "http") !== 0) {
? ? ? ? ? ? $this->stateInfo = $this->getStateInfo("ERROR_HTTP_LINK");
? ? ? ? ? ? return;
? ? ? ? }

? ? ? ? preg_match('/(^https*:\/\/[^:\/]+)/', $imgUrl, $matches);
? ? ? ? $host_with_protocol = count($matches) > 1 ? $matches[1] : '';

? ? ? ? // 判斷是否是合法 url
? ? ? ? if (!filter_var($host_with_protocol, FILTER_VALIDATE_URL)) {
? ? ? ? ? ? $this->stateInfo = $this->getStateInfo("INVALID_URL");
? ? ? ? ? ? return;
? ? ? ? }

? ? ? ? preg_match('/^https*:\/\/(.+)/', $host_with_protocol, $matches);
? ? ? ? $host_without_protocol = count($matches) > 1 ? $matches[1] : '';

? ? ? ? // 此時(shí)提取出來的可能是 ip 也有可能是域名,先獲取 ip
? ? ? ? $ip = gethostbyname($host_without_protocol);
? ? ? ? // 判斷是否是私有 ip
? ? ? ? if(!filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE)) {
? ? ? ? ? ? $this->stateInfo = $this->getStateInfo("INVALID_IP");
? ? ? ? ? ? return;
? ? ? ? }

? ? ? ? //獲取請(qǐng)求頭并檢測死鏈
? ? ? ? $heads = get_headers($imgUrl, 1);
? ? ? ? if (!(stristr($heads[0], "200") && stristr($heads[0], "OK"))) {
? ? ? ? ? ? $this->stateInfo = $this->getStateInfo("ERROR_DEAD_LINK");
? ? ? ? ? ? return;
? ? ? ? }
? ? ? ? //格式驗(yàn)證(擴(kuò)展名驗(yàn)證和Content-Type驗(yàn)證)
? ? ? ? $fileType = strtolower(strrchr($imgUrl, '.'));
? ? ? ? if (!in_array($fileType, $this->config['allowFiles']) || !isset($heads['Content-Type']) || !stristr($heads['Content-Type'], "image")) {
? ? ? ? ? ? $this->stateInfo = $this->getStateInfo("ERROR_HTTP_CONTENTTYPE");
? ? ? ? ? ? return;
? ? ? ? }

? ? ? ? //打開輸出緩沖區(qū)并獲取遠(yuǎn)程圖片
? ? ? ? ob_start();
? ? ? ? $context = stream_context_create(
? ? ? ? ? ? array('http' => array('follow_location' => false))
? ? ? ? );
? ? ? ? readfile($imgUrl, false, $context);
? ? ? ? $img = ob_get_contents();
? ? ? ? ob_end_clean();
? ? ? ? preg_match("/[\/]([^\/]*)[\.]?[^\.\/]*$/", $imgUrl, $m);
? ? ? ? $this->oriName = $m ? $m[1]:"";
? ? ? ? $this->fileSize = strlen($img);
? ? ? ? $this->fileType = $this->getFileExt();
? ? ? ? $this->fullName = $this->getFullName();
? ? ? ? $this->filePath = $this->getFilePath();
? ? ? ? $this->fileName = $this->getFileName();
? ? ? ? $dirname = dirname($this->filePath);

? ? ? ? //檢查文件大小是否超出限制
? ? ? ? if (!$this->checkSize()) {
? ? ? ? ? ? $this->stateInfo = $this->getStateInfo("ERROR_SIZE_EXCEED");
? ? ? ? ? ? return;
? ? ? ? }
? ? ? ? $this->stateInfo = $this->stateMap[0];
? ? }

?
? ? /**
? ? ?* 獲取文件完整路徑(這個(gè)需要替換原有的方法)
? ? ?*/
? ? private function getFilePath()
? ? {
? ? ? ? $fullname = $this->fullName;
? ? ? ? return $fullname;
? ? }
}
?

5.config.json配置修改: ?? ??? ?

? ? /* 上傳圖片配置項(xiàng) */
? ? "imageActionName": "uploadimage", /* 執(zhí)行上傳圖片的action名稱 */
? ? "imageFieldName": "upfile", /* 提交的圖片表單名稱 */
? ? "imageMaxSize": 2048000, /* 上傳大小限制,單位B */
? ? "imageAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 上傳圖片格式顯示 */
? ? "imageCompressEnable": true, /* 是否壓縮圖片,默認(rèn)是true */
? ? "imageCompressBorder": 1600, /* 圖片壓縮最長邊限制 */
? ? "imageInsertAlign": "none", /* 插入的圖片浮動(dòng)方式 */
? ? "imageUrlPrefix": "https://oss-cn-shanghai.aliyuncs.com", /* 這個(gè)需要自己替換 */
? ? "imagePathFormat": "/file/{yyyy}{mm}/{filename}", /* 上傳保存路徑*/
?? ??? ?
?? ??? ?
? ? "catcherLocalDomain": ["127.0.0.1", "localhost", "img.baidu.com"],
? ? "catcherActionName": "catchimage", /* 執(zhí)行抓取遠(yuǎn)程圖片的action名稱 */
? ? "catcherFieldName": "source", /* 提交的圖片列表表單名稱 */
? ? "catcherPathFormat": "/file/{yyyy}{mm}/{filename}", /* 上傳保存路徑 */
? ? "catcherUrlPrefix": "https://oss-cn-shanghai.aliyuncs.com", /* 這個(gè)需要自己替換 */
? ? "catcherMaxSize": 2048000, /* 上傳大小限制,單位B */
? ? "catcherAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 抓取圖片格式顯示 */

到此為止,前面所提的集成問題和圖片上傳問題就解決完成了


????????秀米編輯器(xiumi)+百度編輯器(Ueditor) 集成 已經(jīng)完成:

????????秀米編輯器導(dǎo)出到百度編輯器格式問題,圖片保存到自己的服務(wù)器(阿里云OSS)

示例截圖

秀米編輯器(xiumi)+百度編輯器(Ueditor) 集成 :解決集成問題,秀米編輯器導(dǎo)出到百度編輯器格式問題,圖片保存到自己的服務(wù)器(阿里云OSS)

秀米編輯器(xiumi)+百度編輯器(Ueditor) 集成 :解決集成問題,秀米編輯器導(dǎo)出到百度編輯器格式問題,圖片保存到自己的服務(wù)器(阿里云OSS)

?秀米編輯器(xiumi)+百度編輯器(Ueditor) 集成 :解決集成問題,秀米編輯器導(dǎo)出到百度編輯器格式問題,圖片保存到自己的服務(wù)器(阿里云OSS)

?秀米編輯器(xiumi)+百度編輯器(Ueditor) 集成 :解決集成問題,秀米編輯器導(dǎo)出到百度編輯器格式問題,圖片保存到自己的服務(wù)器(阿里云OSS)?文章來源地址http://www.zghlxwxcb.cn/news/detail-493351.html

到了這里,關(guān)于秀米編輯器(xiumi)+百度編輯器(Ueditor) 集成 :解決集成問題,秀米編輯器導(dǎo)出到百度編輯器格式問題,圖片保存到自己的服務(wù)器(阿里云OSS)的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • Ueditor編輯器任意文件上傳漏洞

    Ueditor編輯器任意文件上傳漏洞

    UEditor是一款所見即所得的開源富文本編輯器,具有輕量、可定制、用戶體驗(yàn)優(yōu)秀等特點(diǎn),被廣大WEB應(yīng)用程序所使用。本次爆出的高危漏洞屬于.NET版本,其它的版本暫時(shí)不受影響。漏洞成因是在抓取遠(yuǎn)程數(shù)據(jù)源的時(shí)候未對(duì)文件后綴名做驗(yàn)證導(dǎo)致任意文件寫入漏洞,黑客利用此

    2024年01月21日
    瀏覽(102)
  • 實(shí)戰(zhàn)紀(jì)實(shí) | 編輯器漏洞之Ueditor-任意文件上傳漏洞 (老洞新談)

    實(shí)戰(zhàn)紀(jì)實(shí) | 編輯器漏洞之Ueditor-任意文件上傳漏洞 (老洞新談)

    前言 前段時(shí)間在做某政府單位的項(xiàng)目的時(shí)候發(fā)現(xiàn)存在該漏洞,雖然是一個(gè)老洞,但這也是容易被忽視,且能快速拿到shell的漏洞,在利用方式上有一些不一樣的心得,希望能幫助到一些還不太了解的小伙伴,故此寫了此篇文章。 1.1 漏洞描述 Ueditor是百度開發(fā)的一個(gè)網(wǎng)站編輯器

    2024年04月26日
    瀏覽(99)
  • Ueditor 富文本編輯器 插入 m3u8 和 mp4 視頻(PHP)

    Ueditor 富文本編輯器 插入 m3u8 和 mp4 視頻(PHP)

    當(dāng)前環(huán)境:PHP、Ueditor的版本是1.4.3 新的需求是,需要在Ueditor 富文本編輯器中,插入視頻播放,并且視頻格式有MP4,也有M3U8。 百度編輯器默認(rèn)的是embed,需要修改下配置。 ueditor.all.js 和 ueditor.config.js 這兩個(gè)文件要改一些東西,具體我這里就不展示了,網(wǎng)上有很多文章都有寫

    2024年02月11日
    瀏覽(38)
  • UEditor富文本編輯器上傳圖片打不開,提示“后端配置項(xiàng)沒有正常加載,上傳插件不能正常使用”

    UEditor富文本編輯器上傳圖片打不開,提示“后端配置項(xiàng)沒有正常加載,上傳插件不能正常使用”

    1、安裝 npm install?vue-ueditor-wrap 2、下載所需資源 這一步在解決報(bào)錯(cuò)的時(shí)候會(huì)用到 ?????????? UEditor資源下載鏈接 上面的打不開請(qǐng)從下面鏈接下載項(xiàng)目 ueditor-download: vue項(xiàng)目中集成ueditor的UE資源 3、下載完成后將文件夾放到public文件夾下 4、 配置ueditor.config.js,并且在main.j

    2024年02月13日
    瀏覽(97)
  • fast admin 使用百度富文本編輯器添加賦值

    fast admin 使用百度富文本編輯器添加賦值

    這篇文章為大家介紹一下fastadmin框架如何引入并使用百度富文本 文章目錄 前言 下載文件 編輯文件 配置 上傳圖片 添加代碼 總結(jié) 在學(xué)習(xí)fastadmin的時(shí)候需要使用到富文本編輯器,于是查閱了一下資料,實(shí)現(xiàn)后將我的經(jīng)驗(yàn)分享給大家 點(diǎn)擊下載文件 https://download.csdn.net/download/lh

    2024年02月09日
    瀏覽(20)
  • 集成tinyMCE編輯器以及踩的坑

    集成tinyMCE編輯器以及踩的坑

    一、tinyMCE編輯器沒有實(shí)時(shí)更新 場景是這樣的,在form表單中引用Tinymce富文本編輯組件,在多次重新打開不同form表單時(shí),form攜帶的數(shù)據(jù)沒有實(shí)時(shí)更新到Tinymce內(nèi),總是顯示上一個(gè)的form的數(shù)據(jù) 原因:Tinymce只渲染了一次,所以造成數(shù)據(jù)有點(diǎn)問題。所以解決的方法就是利用 v-if 的方

    2024年02月21日
    瀏覽(18)
  • VUE2.0集成 Markdown 編輯器

    VUE2.0集成 Markdown 編輯器

    Markdown編輯器的使用 這是一款基于Vue的markdown編輯器。既可以用來編輯Markdown語法,又可以用來解析 效果圖,mavonEditor實(shí)現(xiàn)了Markdown集成 Markdown是一種標(biāo)記語言,相較于word文檔更加清晰方便,適合進(jìn)行筆記等。將Markdown集成進(jìn)入自己項(xiàng)目之后,就可以在項(xiàng)目中使用的Markdown編輯器

    2024年02月10日
    瀏覽(30)
  • Vue項(xiàng)目集成Markdown標(biāo)記語言編輯器(MavonEditor)

    Vue項(xiàng)目集成Markdown標(biāo)記語言編輯器(MavonEditor)

    這是一款基于Vue的markdown編輯器。既可以用來編輯Markdown語法,又可以用來解析 效果圖,mavonEditor實(shí)現(xiàn)了Markdown集成 Markdown是一種標(biāo)記語言,相較于word文檔更加清晰方便,適合進(jìn)行筆記等。將Markdown集成進(jìn)入自己項(xiàng)目之后,就可以在項(xiàng)目中使用的Markdown編輯器了 mavon-editor:??2.1

    2024年02月07日
    瀏覽(22)
  • springboot集成Camunda,加前端bpmn頁面流程編輯器

    springboot集成Camunda,加前端bpmn頁面流程編輯器

    搭建流程引擎后端的時(shí)候,主要注意springboot版本和Camunda版本之間的兼容性。此次springboot版本2.6.4,Camunda版本7.18.0。pom文件內(nèi)容如下: pom文件配置好后,通過一般的注解入口@SpringBootApplication,即可啟動(dòng)Camunda流程引擎。 Camunda默認(rèn)使用的數(shù)據(jù)庫為自帶的h2內(nèi)存數(shù)據(jù)庫,此時(shí)一般

    2023年04月18日
    瀏覽(18)
  • 如何創(chuàng)建集成 LSP 支持多語言的 Web 代碼編輯器

    如何創(chuàng)建集成 LSP 支持多語言的 Web 代碼編輯器

    對(duì)于一個(gè)云開發(fā)平臺(tái)來說,一個(gè)好的 Web IDE 能很大程度地提高用戶的編碼體驗(yàn),而一個(gè) Web IDE 的一個(gè)重要組成部分就是代碼編輯器。 目前有著多款 web 上的代碼編輯器可供選擇,比如 Ace 、 CodeMirror 、 Monaco ,這三款編輯器的比較在這篇文章中有著詳細(xì)的介紹,在此就不作過多

    2024年02月09日
    瀏覽(25)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包