UEditor經常使用設置函數記錄

 

在線文檔對UEditor說明不夠全面,收集了一些經常使用的方法和基本設置,以供參考。php

一、建立編輯器html

UE.getEditor('editor', {
        initialFrameWidth:"100%" //初始化選項
    })

精簡版web

  UE.getEditor('editor')

二、刪除編輯器編輯器

 UE.getEditor('editor').destroy();

三、設置焦點視頻

UE.getEditor('editor').focus();

四、獲取編輯器內容server

UE.getEditor('editor').getContent()

五、編輯器是否有內容htm

UE.getEditor('editor').hasContents()

六、獲取編輯器內容純文本格式接口

UE.getEditor('editor').getContentTxt()

七、獲取帶格式的純文本圖片

UE.getEditor('editor').getPlainTxt()

八、啓用編輯器文檔

UE.getEditor('editor').setEnabled();

九、禁止編輯

UE.getEditor('editor').setDisabled('fullscreen');

十、獲取整個html內容

UE.getEditor('editor').getAllHtml()

十一、經常使用設置

imageUrl:UEDITOR_HOME_URL + "../yunserver/yunImageUp.php",  //圖片上傳接口
    imagePath:"http://",

    scrawlUrl:UEDITOR_HOME_URL + "../yunserver/yunScrawlUp.php",//塗鴉接口
    scrawlPath:"http://",

    fileUrl:UEDITOR_HOME_URL + "../yunserver/yunFileUp.php",//文件上傳接口
    filePath:"http://",

    catcherUrl:UEDITOR_HOME_URL + "php/getRemoteImage.php",//獲取遠程圖片接口
    catcherPath:UEDITOR_HOME_URL + "php/",

    imageManagerUrl:UEDITOR_HOME_URL + "../yunserver/yunImgManage.php",//圖片管理接口
    imageManagerPath:"http://",

    snapscreenHost:'ueditor.baidu.com',
    snapscreenServerUrl:UEDITOR_HOME_URL + "../yunserver/yunSnapImgUp.php",//截圖接口
    snapscreenPath:"http://",

    wordImageUrl:UEDITOR_HOME_URL + "../yunserver/yunImageUp.php",//word圖片轉存接口
    wordImagePath:"http://", //

    getMovieUrl:UEDITOR_HOME_URL + "../yunserver/getMovie.php",//獲取視頻接口

    lang:/^zh/.test(navigator.language || navigator.browserLanguage || navigator.userLanguage) ? 'zh-cn' : 'en',
    langPath:UEDITOR_HOME_URL + "lang/",

    webAppKey:"9HrmGf2ul4mlyK8ktO2Ziayd",
    initialFrameWidth:860,    //初始化寬度
    initialFrameHeight:420,    //初始化高度
    focus:true    //是否焦點
相關文章
相關標籤/搜索