?? ui.js
字號:
?/*
//Get a SELECT's OPTIONS's JSON data
for(var i=0;i<sel.options.length;i++)
{
var option = sel.options[i];
var options_JSON = "{";
options_JSON += "text:\""+option.innerText+"\",";
options_JSON += "value:\""+option.value+"\",";
options_JSON += "cssText:\""+option.style.cssText+"\",";
options_JSON += "selected:"+option.selected;
options_JSON += "}";
if(i<sel.options.length -1)
options_JSON +=",";
document.write("<br>"+options_JSON);
}
*/
var UI = {};
UI.editor = {
};
UI.footBar = {
Seperater:"separator.gif",
Buttons:{
Mod:"<input type=\"button\" value=\"HTML\">"
}
};
UI.toolBar ={
Selects:{
FontName:{
options:[
{text:"字體",value:"",cssText:"",selected:true},
{text:"",value:"Arial",cssText:"",selected:true},
{text:"",value:"Courier New",cssText:"",selected:true},
{text:"",value:"Garamond",cssText:"",selected:true},
{text:"",value:"Georgia",cssText:"",selected:true},
{text:"",value:"Tahoma",cssText:"",selected:true},
{text:"",value:"Times New Roman",cssText:"",selected:true},
{text:"",value:"Verdana",cssText:"",selected:true},
{text:"",value:"宋體",cssText:"",selected:true},
{text:"",value:"幼圓",cssText:"",selected:true},
{text:"",value:"楷體_GB2312",cssText:"",selected:true},
{text:"",value:"仿宋_GB2312",cssText:"",selected:true},
{text:"",value:"黑體",cssText:"",selected:true},
{text:"",value:"隸書",cssText:"",selected:true}
],
cssText:""
},
FontSize:{
options:[
{text:"字號",value:"",cssText:"",selected:true},
{text:"",value:"1",cssText:"",selected:true},
{text:"",value:"2",cssText:"",selected:true},
{text:"",value:"3",cssText:"",selected:true},
{text:"",value:"4",cssText:"",selected:true},
{text:"",value:"5",cssText:"",selected:true},
{text:"",value:"6",cssText:"",selected:true}
],
cssText:""
},
ForeColor:{
options:[
{text:"字體顏色",value:"",cssText:"",selected:true},
{text:"黑色",value:"#000000",cssText:"COLOR: #ffffff; BACKGROUND-COLOR: black",selected:false},
{text:"灰色",value:"#808080",cssText:"BACKGROUND-COLOR: gray",selected:false},
{text:"深灰色",value:"#A9A9A9",cssText:"BACKGROUND-COLOR: darkgray",selected:false},
{text:"淺灰色",value:"#D3D3D3",cssText:"BACKGROUND-COLOR: lightgrey",selected:false},
{text:"白色",value:"#FFFFFF",cssText:"BACKGROUND-COLOR: white",selected:false},
{text:"碧綠色",value:"#7FFFD4",cssText:"BACKGROUND-COLOR: aquamarine",selected:false},
{text:"藍色",value:"#0000FF",cssText:"BACKGROUND-COLOR: blue",selected:false},
{text:"海軍藍",value:"#000080",cssText:"COLOR: #ffffff; BACKGROUND-COLOR: navy",selected:false},
{text:"紫色",value:"#800080",cssText:"COLOR: #ffffff; BACKGROUND-COLOR: purple",selected:false},
{text:"紫紅色",value:"#FF1493",cssText:"BACKGROUND-COLOR: deeppink",selected:false},
{text:"紫羅蘭色",value:"#EE82EE",cssText:"BACKGROUND-COLOR: violet",selected:false},
{text:"粉紅色",value:"#FFC0CB",cssText:"BACKGROUND-COLOR: pink",selected:false},
{text:"深綠色",value:"#006400",cssText:"COLOR: #ffffff; BACKGROUND-COLOR: darkgreen",selected:false},
{text:"綠色",value:"#008000",cssText:"COLOR: #ffffff; BACKGROUND-COLOR: green",selected:false},
{text:"草綠色",value:"#9ACD32",cssText:"BACKGROUND-COLOR: yellowgreen",selected:false},
{text:"黃色",value:"#FFFF00",cssText:"BACKGROUND-COLOR: yellow",selected:false},
{text:"橙色",value:"#FFA500",cssText:"BACKGROUND-COLOR: orange",selected:false},
{text:"紅色",value:"#FF0000",cssText:"BACKGROUND-COLOR: red",selected:false},
{text:"紅棕色",value:"1",cssText:"BACKGROUND-COLOR: brown",selected:false},
{text:"棕色",value:"#DEB887",cssText:"BACKGROUND-COLOR: burlywood",selected:false},
{text:"淺褐色",value:"#F5F5DC",cssText:"BACKGROUND-COLOR: beige",selected:false}
],
cssText:""
},
BackColor:{
options:[
{text:"背景顏色",value:"",cssText:"",selected:true},
{text:"黑色",value:"#000000",cssText:"COLOR: #ffffff; BACKGROUND-COLOR: black",selected:false},
{text:"灰色",value:"#808080",cssText:"BACKGROUND-COLOR: gray",selected:false},
{text:"深灰色",value:"#A9A9A9",cssText:"BACKGROUND-COLOR: darkgray",selected:false},
{text:"淺灰色",value:"#D3D3D3",cssText:"BACKGROUND-COLOR: lightgrey",selected:false},
{text:"白色",value:"#FFFFFF",cssText:"BACKGROUND-COLOR: white",selected:false},
{text:"碧綠色",value:"#7FFFD4",cssText:"BACKGROUND-COLOR: aquamarine",selected:false},
{text:"藍色",value:"#0000FF",cssText:"BACKGROUND-COLOR: blue",selected:false},
{text:"海軍藍",value:"#000080",cssText:"COLOR: #ffffff; BACKGROUND-COLOR: navy",selected:false},
{text:"紫色",value:"#800080",cssText:"COLOR: #ffffff; BACKGROUND-COLOR: purple",selected:false},
{text:"紫紅色",value:"#FF1493",cssText:"BACKGROUND-COLOR: deeppink",selected:false},
{text:"紫羅蘭色",value:"#EE82EE",cssText:"BACKGROUND-COLOR: violet",selected:false},
{text:"粉紅色",value:"#FFC0CB",cssText:"BACKGROUND-COLOR: pink",selected:false},
{text:"深綠色",value:"#006400",cssText:"COLOR: #ffffff; BACKGROUND-COLOR: darkgreen",selected:false},
{text:"綠色",value:"#008000",cssText:"COLOR: #ffffff; BACKGROUND-COLOR: green",selected:false},
{text:"草綠色",value:"#9ACD32",cssText:"BACKGROUND-COLOR: yellowgreen",selected:false},
{text:"黃色",value:"#FFFF00",cssText:"BACKGROUND-COLOR: yellow",selected:false},
{text:"橙色",value:"#FFA500",cssText:"BACKGROUND-COLOR: orange",selected:false},
{text:"紅色",value:"#FF0000",cssText:"BACKGROUND-COLOR: red",selected:false},
{text:"紅棕色",value:"1",cssText:"BACKGROUND-COLOR: brown",selected:false},
{text:"棕色",value:"#DEB887",cssText:"BACKGROUND-COLOR: burlywood",selected:false},
{text:"淺褐色",value:"#F5F5DC",cssText:"BACKGROUND-COLOR: beige",selected:false}
],
cssText:""
},
Paragraph:{
options:[
{text:"段落樣式",value:"",cssText:"",selected:true},
{text:"正文",value:"<body>",cssText:"",selected:true},
{text:"標題 1",value:"<h1>",cssText:"",selected:true},
{text:"標題 2",value:"<h2>",cssText:"",selected:true},
{text:"標題 3",value:"<h3>",cssText:"",selected:true},
{text:"標題 4",value:"<h4>",cssText:"",selected:true},
{text:"標題 5",value:"<h5>",cssText:"",selected:true},
{text:"標題 6",value:"<h6>",cssText:"",selected:true},
{text:"帶格式的",value:"<pre>",cssText:"",selected:true},
{text:"地址",value:"<address>",cssText:"",selected:true}
],
cssText:""
}
},
Seperater:"separator.gif",
Buttons:{
ForeColor:["fontforecolorpicker.gif","ForeColor"],
BackColor:["fontbackcolorpicker.gif","BackColor"],
ZoomIn:["inserttime.gif","ZoomIn"],
ZoomOut:["inserttime.gif","ZoomOut"],
Bold:["bold.gif","bold"],
Italic:["italic.gif","italic"],
Underline:["underline.gif","underline"],
Strikethrough:["strikethrough.gif","strikethrough"],
Subscript:["subscript.gif","subscript"],
Superscript:["superscript.gif","superscript"],
Undo:["undo.gif","undo"],
Redo:["redo.gif","redo"],
Print:["print.gif","print"],
Insertimagefromgallery:["insertimagefromgallery.gif","insertimagefromgallery"],
Createlink:["createlink.gif","createlink"],
Unlink:["unlink.gif","unlink"],
Removeformat:["removeformat.gif","removeformat"],
Inserttime:["inserttime.gif","inserttime"],
Insertdate:["insertdate.gif","insertdate"],
Wordcount:["wordcount.gif","wordcount"],
Justifyright:["justifyright.gif","justifyright"],
Justifyleft:["justifyleft.gif","justifyleft"],
Justifycenter:["justifycenter.gif","justifycenter"],
Justifyfull:["justifyfull.gif","justifyfull"],
Bullets:["bullets.gif","bullets"],
Numberedlist:["numberedlist.gif","numberedlist"],
Indent:["indent.gif","indent"],
Outdent:["outdent.gif","outdent"]
}
};
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -