小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

TinyMCE使用說(shuō)明[原]

 zjxnew 2007-04-29

TinyMCE使用說(shuō)明[原]

,

TinyMCE是一款開源的所見即所得的可視化在線編輯器
官方網(wǎng)站
現(xiàn)在的最新版本是:2.0.6.1
advanced模式
simple模式
下載 這個(gè)里面我把簡(jiǎn)體中文GB2312和UTF8兩種語(yǔ)言都加進(jìn)去了的,配置后直接使用就可以了。
+-docs 幫助文檔
+-examples 幾個(gè)例子(多看看別人的例子可以學(xué)到很多東東)
+-jscripts 使用的時(shí)候只需要這一部分,程序主體
+-+-tiny_mce
+-+-+-langs 語(yǔ)言
+-+-+-plugins 插件
+-+-+-themes 主題
+-+-+-utils 組件

文件里的_src都是源文件,因?yàn)樗氖褂玫奈募及阎虚g的空格刪掉了,看起來(lái)頭大,這些文件都不是必須的。

使用方法:
<script language="javascript" type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
theme : "simple",
mode : "exact",
elements : "a",
language : "zh_cn_utf8"
});
</script>
....
<div id="a"></div>
這樣就可以把ID為a的div替換成編輯器,這里有個(gè)注意的就是最后一個(gè)參數(shù)后面不要加","

幾個(gè)常用的參數(shù)說(shuō)明:(在壓縮包的docs里有詳細(xì)的介紹)
mode: textareas/specific_textareas/exact
textareas: 替換當(dāng)前頁(yè)的所有textarea為編輯器
specific_textareas: 不是很明白(特定的textarea??),要配合 textarea_trigger使用
exact: 替換指定ID的div或者textarea為編輯器,要配合elements使用。如例子里說(shuō)的。

theme: advanced/simple
advanced: 高級(jí)模式,功能比較多一點(diǎn)。(默認(rèn))
simple: 基本模式,只有基本的功能。

plugins: advhr/advimage/advlink/contextmenu/emotions/flash/autosave/style/layer/iespell/insertdatetime/paste/preview/print/save/noneditable/spellchecker/searchreplace/table/zoom/directionality/fullscreen/fullpage/inlinepopups/fullpage
這些是自帶的一些插件,看名字基本上都能明白它的功能。在網(wǎng)站上還有一些其它功能的插件,可以自己去下,放在插件目錄下就可以了。
("-"加上可以讓MCE不試圖從插件目錄加載這個(gè)插件,如plugins : "table,contextmenu,paste,-externalplugin")

language: en/zh_cn/zh_cn_utf8……
設(shè)置使用的語(yǔ)言,網(wǎng)站上也有的下,需要注意的是中文簡(jiǎn)體和繁體都有兩種uft8的,要確定你使用的頁(yè)面的編碼。
(eg:language : "en")

width:
height:
設(shè)置編輯器的寬度和高度

relative_urls: false/true,(默認(rèn):true)
remove_script_host: false/true,(默認(rèn):true)
(eg:relative_urls: false,
remove_script_host: false
這樣內(nèi)容會(huì)使用絕對(duì)路徑,也就是會(huì)加上域名。)

theme_advanced_toolbar_location: top/bottom(默認(rèn):bottom)
theme_advanced_toolbar_align: left/center/right(默認(rèn):center)
theme_advanced_buttons<1-n>
theme_advanced_buttons<1-n>_add
theme_advanced_buttons<1-n>_add_before
這里是advanced主題下的幾個(gè)設(shè)置
theme_advanced_toolbar_location,theme_advanced_toolbar_align,theme_advanced_statusbar_location 分別設(shè)置工具欄的位置,對(duì)齊方式,狀態(tài)欄的位置
theme_advanced_buttons<1-n>設(shè)置第N排的按鈕
theme_advanced_buttons<1-n>_add 添加一個(gè)按鈕到第N排的后面
theme_advanced_buttons<1-n>_add_before 添加一個(gè)按鈕到第N排的前面
(eg:theme_advanced_buttons3 : ‘‘,
theme_advanced_buttons2_add : "insertdate,inserttime",
theme_advanced_buttons2_add_before : "zoom"
這樣就是第三排為空,也就是不顯示,在第二排后面加入了插入日期和時(shí)間,第二排開始插入縮放 )

這是一些基礎(chǔ)的東西,可以設(shè)置的還有一大篇,有興趣可以看看它的文檔,還有就是例子。

    本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶 評(píng)論公約

    類似文章 更多