Merge branch 'master' into dev
This commit is contained in:
commit
99ed076d27
|
@ -0,0 +1,3 @@
|
|||
# Attachment
|
||||
|
||||
附加内容,和代码运行无关。
|
|
@ -0,0 +1,7 @@
|
|||
Open *demo.html* to see a list of all the glyphs in your font along with their codes/ligatures.
|
||||
|
||||
To use the generated font in desktop programs, you can install the TTF font. In order to copy the character associated with each icon, refer to the text box at the bottom right corner of each glyph in demo.html. The character inside this text box may be invisible; but it can still be copied. See this guide for more info: https://icomoon.io/#docs/local-fonts
|
||||
|
||||
You won't need any of the files located under the *demo-files* directory when including the generated font in your own projects.
|
||||
|
||||
You can import *selection.json* back to the IcoMoon app using the *Import Icons* button (or via Main Menu → Manage Projects) to retrieve your icon selection.
|
|
@ -0,0 +1,155 @@
|
|||
body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-family: sans-serif;
|
||||
font-size: 1em;
|
||||
line-height: 1.5;
|
||||
color: #555;
|
||||
background: #fff;
|
||||
}
|
||||
h1 {
|
||||
font-size: 1.5em;
|
||||
font-weight: normal;
|
||||
}
|
||||
small {
|
||||
font-size: .66666667em;
|
||||
}
|
||||
a {
|
||||
color: #e74c3c;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover, a:focus {
|
||||
box-shadow: 0 1px #e74c3c;
|
||||
}
|
||||
.bshadow0, input {
|
||||
box-shadow: inset 0 -2px #e7e7e7;
|
||||
}
|
||||
input:hover {
|
||||
box-shadow: inset 0 -2px #ccc;
|
||||
}
|
||||
input, fieldset {
|
||||
font-family: sans-serif;
|
||||
font-size: 1em;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
input {
|
||||
color: inherit;
|
||||
line-height: 1.5;
|
||||
height: 1.5em;
|
||||
padding: .25em 0;
|
||||
}
|
||||
input:focus {
|
||||
outline: none;
|
||||
box-shadow: inset 0 -2px #449fdb;
|
||||
}
|
||||
.glyph {
|
||||
font-size: 16px;
|
||||
width: 15em;
|
||||
padding-bottom: 1em;
|
||||
margin-right: 4em;
|
||||
margin-bottom: 1em;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
}
|
||||
.liga {
|
||||
width: 80%;
|
||||
width: calc(100% - 2.5em);
|
||||
}
|
||||
.talign-right {
|
||||
text-align: right;
|
||||
}
|
||||
.talign-center {
|
||||
text-align: center;
|
||||
}
|
||||
.bgc1 {
|
||||
background: #f1f1f1;
|
||||
}
|
||||
.fgc1 {
|
||||
color: #999;
|
||||
}
|
||||
.fgc0 {
|
||||
color: #000;
|
||||
}
|
||||
p {
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.mvm {
|
||||
margin-top: .75em;
|
||||
margin-bottom: .75em;
|
||||
}
|
||||
.mtn {
|
||||
margin-top: 0;
|
||||
}
|
||||
.mtl, .mal {
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
.mbl, .mal {
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
.mal, .mhl {
|
||||
margin-left: 1.5em;
|
||||
margin-right: 1.5em;
|
||||
}
|
||||
.mhmm {
|
||||
margin-left: 1em;
|
||||
margin-right: 1em;
|
||||
}
|
||||
.mls {
|
||||
margin-left: .25em;
|
||||
}
|
||||
.ptl {
|
||||
padding-top: 1.5em;
|
||||
}
|
||||
.pbs, .pvs {
|
||||
padding-bottom: .25em;
|
||||
}
|
||||
.pvs, .pts {
|
||||
padding-top: .25em;
|
||||
}
|
||||
.unit {
|
||||
float: left;
|
||||
}
|
||||
.unitRight {
|
||||
float: right;
|
||||
}
|
||||
.size1of2 {
|
||||
width: 50%;
|
||||
}
|
||||
.size1of1 {
|
||||
width: 100%;
|
||||
}
|
||||
.clearfix:before, .clearfix:after {
|
||||
content: " ";
|
||||
display: table;
|
||||
}
|
||||
.clearfix:after {
|
||||
clear: both;
|
||||
}
|
||||
.hidden-true {
|
||||
display: none;
|
||||
}
|
||||
.textbox0 {
|
||||
width: 3em;
|
||||
background: #f1f1f1;
|
||||
padding: .25em .5em;
|
||||
line-height: 1.5;
|
||||
height: 1.5em;
|
||||
}
|
||||
#testDrive {
|
||||
display: block;
|
||||
padding-top: 24px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.fs0 {
|
||||
font-size: 16px;
|
||||
}
|
||||
.fs1 {
|
||||
font-size: 16px;
|
||||
}
|
||||
.fs2 {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
if (!('boxShadow' in document.body.style)) {
|
||||
document.body.setAttribute('class', 'noBoxShadow')
|
||||
}
|
||||
|
||||
document.body.addEventListener('click', function (e) {
|
||||
var target = e.target
|
||||
if (target.tagName === 'INPUT' && target.getAttribute('class').indexOf('liga') === -1) {
|
||||
target.select()
|
||||
}
|
||||
})
|
||||
;(function () {
|
||||
var fontSize = document.getElementById('fontSize'),
|
||||
testDrive = document.getElementById('testDrive'),
|
||||
testText = document.getElementById('testText')
|
||||
function updateTest() {
|
||||
testDrive.innerHTML = testText.value || String.fromCharCode(160)
|
||||
if (window.icomoonLiga) {
|
||||
window.icomoonLiga(testDrive)
|
||||
}
|
||||
}
|
||||
function updateSize() {
|
||||
testDrive.style.fontSize = fontSize.value + 'px'
|
||||
}
|
||||
fontSize.addEventListener('change', updateSize, false)
|
||||
testText.addEventListener('input', updateTest, false)
|
||||
testText.addEventListener('change', updateTest, false)
|
||||
updateSize()
|
||||
})()
|
|
@ -0,0 +1,489 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>IcoMoon Demo</title>
|
||||
<meta name="description" content="An Icon Font Generated By IcoMoon.io">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="demo-files/demo.css">
|
||||
<link rel="stylesheet" href="style.css"></head>
|
||||
<body>
|
||||
<div class="bgc1 clearfix">
|
||||
<h1 class="mhmm mvm"><span class="fgc1">Font Name:</span> icomoon <small class="fgc1">(Glyphs: 30)</small></h1>
|
||||
</div>
|
||||
<div class="clearfix mhl ptl">
|
||||
<h1 class="mvm mtn fgc1">Grid Size: 16</h1>
|
||||
<div class="glyph fs1">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-pencil2"></span>
|
||||
<span class="mls"> icon-pencil2</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="e906" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="pencil2, write2" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs1">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-image"></span>
|
||||
<span class="mls"> icon-image</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="e90d" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="image, picture" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs1">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-play"></span>
|
||||
<span class="mls"> icon-play</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="e912" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="play, video" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs1">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-location"></span>
|
||||
<span class="mls"> icon-location</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="e947" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="location, map-marker" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs1">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-undo"></span>
|
||||
<span class="mls"> icon-undo</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="e965" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="undo, ccw" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs1">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-redo"></span>
|
||||
<span class="mls"> icon-redo</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="e966" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="redo, cw" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs1">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-quotes-left"></span>
|
||||
<span class="mls"> icon-quotes-left</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="e977" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="quotes-left, ldquo" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs1">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-list-numbered"></span>
|
||||
<span class="mls"> icon-list-numbered</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="e9b9" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="list-numbered, options" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs1">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-list2"></span>
|
||||
<span class="mls"> icon-list2</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="e9bb" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="list2, todo2" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs1">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-upload2"></span>
|
||||
<span class="mls"> icon-upload2</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="e9c6" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="upload2, load2" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs1">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-link"></span>
|
||||
<span class="mls"> icon-link</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="e9cb" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="link, chain" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs1">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-happy"></span>
|
||||
<span class="mls"> icon-happy</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="e9df" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="happy, emoticon" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs1">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-cancel-circle"></span>
|
||||
<span class="mls"> icon-cancel-circle</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="ea0d" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="cancel-circle, close" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs1">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-font"></span>
|
||||
<span class="mls"> icon-font</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="ea5c" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="font, typeface" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs1">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-text-height"></span>
|
||||
<span class="mls"> icon-text-height</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="ea5f" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="text-height, wysiwyg" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs1">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-bold"></span>
|
||||
<span class="mls"> icon-bold</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="ea62" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="bold, wysiwyg4" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs1">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-underline"></span>
|
||||
<span class="mls"> icon-underline</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="ea63" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="underline, wysiwyg5" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs1">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-italic"></span>
|
||||
<span class="mls"> icon-italic</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="ea64" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="italic, wysiwyg6" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs1">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-strikethrough"></span>
|
||||
<span class="mls"> icon-strikethrough</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="ea65" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="strikethrough, wysiwyg7" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs1">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-page-break"></span>
|
||||
<span class="mls"> icon-page-break</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="ea68" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="page-break, wysiwyg10" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs1">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-table2"></span>
|
||||
<span class="mls"> icon-table2</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="ea71" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="table2, wysiwyg19" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs1">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-paragraph-left"></span>
|
||||
<span class="mls"> icon-paragraph-left</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="ea77" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="paragraph-left, wysiwyg25" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs1">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-paragraph-center"></span>
|
||||
<span class="mls"> icon-paragraph-center</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="ea78" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="paragraph-center, wysiwyg26" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs1">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-paragraph-right"></span>
|
||||
<span class="mls"> icon-paragraph-right</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="ea79" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="paragraph-right, wysiwyg27" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs1">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-paint-format"></span>
|
||||
<span class="mls"> icon-paint-format</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="e90c" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="paint-format, format" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix mhl ptl">
|
||||
<h1 class="mvm mtn fgc1">Grid Size: 14</h1>
|
||||
<div class="glyph fs2">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-close"></span>
|
||||
<span class="mls"> icon-close</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="f00d" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs2">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-remove"></span>
|
||||
<span class="mls"> icon-remove</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="f00d" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs2">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-times"></span>
|
||||
<span class="mls"> icon-times</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="f00d" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs2">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-trash-o"></span>
|
||||
<span class="mls"> icon-trash-o</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="f014" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs2">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-terminal"></span>
|
||||
<span class="mls"> icon-terminal</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="f120" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs2">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-header"></span>
|
||||
<span class="mls"> icon-header</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="f1dc" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="glyph fs2">
|
||||
<div class="clearfix bshadow0 pbs">
|
||||
<span class="icon-paint-brush"></span>
|
||||
<span class="mls"> icon-paint-brush</span>
|
||||
</div>
|
||||
<fieldset class="fs0 size1of1 clearfix hidden-false">
|
||||
<input type="text" readonly value="f1fc" class="unit size1of2" />
|
||||
<input type="text" maxlength="1" readonly value="" class="unitRight size1of2 talign-right" />
|
||||
</fieldset>
|
||||
<div class="fs0 bshadow0 clearfix hidden-true">
|
||||
<span class="unit pvs fgc1">liga: </span>
|
||||
<input type="text" readonly value="" class="liga unitRight" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--[if gt IE 8]><!-->
|
||||
<div class="mhl clearfix mbl">
|
||||
<h1>Font Test Drive</h1>
|
||||
<label>
|
||||
Font Size: <input id="fontSize" type="number" class="textbox0 mbm"
|
||||
min="8" value="48" />
|
||||
px
|
||||
</label>
|
||||
<input id="testText" type="text" class="phl size1of1 mvl"
|
||||
placeholder="Type some text to test..." value=""/>
|
||||
<div id="testDrive" class="icon-" style="font-family: icomoon">
|
||||
</div>
|
||||
</div>
|
||||
<!--<![endif]-->
|
||||
<div class="bgc1 clearfix">
|
||||
<p class="mhl">Generated by <a href="https://icomoon.io/app">IcoMoon</a></p>
|
||||
</div>
|
||||
|
||||
<script src="demo-files/demo.js"></script>
|
||||
</body>
|
||||
</html>
|
Binary file not shown.
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Generated by IcoMoon</metadata>
|
||||
<defs>
|
||||
<font id="icomoon" horiz-adv-x="1024">
|
||||
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
||||
<missing-glyph horiz-adv-x="1024" />
|
||||
<glyph unicode=" " horiz-adv-x="512" d="" />
|
||||
<glyph unicode="" glyph-name="pencil2" d="M384 320l128 64 448 448-64 64-448-448-64-128zM289.3 92.902c-31.632 66.728-65.666 100.762-132.396 132.394l99.096 272.792 128 77.912 384 384h-192l-384-384-192-640 640 192 384 384v192l-384-384-77.912-128z" />
|
||||
<glyph unicode="" glyph-name="paint-format" d="M1024 384v384h-192v64c0 35.2-28.8 64-64 64h-704c-35.2 0-64-28.8-64-64v-192c0-35.2 28.8-64 64-64h704c35.2 0 64 28.8 64 64v64h128v-256h-576v-128h-32c-17.674 0-32-14.326-32-32v-320c0-17.674 14.326-32 32-32h128c17.674 0 32 14.326 32 32v320c0 17.674-14.326 32-32 32h-32v64h576zM768 768h-704v64h704v-64z" />
|
||||
<glyph unicode="" glyph-name="image" d="M959.884 832c0.040-0.034 0.082-0.076 0.116-0.116v-767.77c-0.034-0.040-0.076-0.082-0.116-0.116h-895.77c-0.040 0.034-0.082 0.076-0.114 0.116v767.772c0.034 0.040 0.076 0.082 0.114 0.114h895.77zM960 896h-896c-35.2 0-64-28.8-64-64v-768c0-35.2 28.8-64 64-64h896c35.2 0 64 28.8 64 64v768c0 35.2-28.8 64-64 64v0zM832 672c0-53.020-42.98-96-96-96s-96 42.98-96 96 42.98 96 96 96 96-42.98 96-96zM896 128h-768v128l224 384 256-320h64l224 192z" />
|
||||
<glyph unicode="" glyph-name="play" d="M981.188 799.892c-143.632 20.65-302.332 32.108-469.186 32.108-166.86 0-325.556-11.458-469.194-32.108-27.53-107.726-42.808-226.75-42.808-351.892 0-125.14 15.278-244.166 42.808-351.89 143.638-20.652 302.336-32.11 469.194-32.11 166.854 0 325.552 11.458 469.186 32.11 27.532 107.724 42.812 226.75 42.812 351.89 0 125.142-15.28 244.166-42.812 351.892zM384.002 256v384l320-192-320-192z" />
|
||||
<glyph unicode="" glyph-name="location" d="M512 960c-176.732 0-320-143.268-320-320 0-320 320-704 320-704s320 384 320 704c0 176.732-143.27 320-320 320zM512 448c-106.040 0-192 85.96-192 192s85.96 192 192 192 192-85.96 192-192-85.96-192-192-192z" />
|
||||
<glyph unicode="" glyph-name="undo" d="M512 896c-141.384 0-269.376-57.32-362.032-149.978l-149.968 149.978v-384h384l-143.532 143.522c69.496 69.492 165.492 112.478 271.532 112.478 212.068 0 384-171.924 384-384 0-114.696-50.292-217.636-130.018-288l84.666-96c106.302 93.816 173.352 231.076 173.352 384 0 282.77-229.23 512-512 512z" />
|
||||
<glyph unicode="" glyph-name="redo" d="M0 384c0-152.924 67.048-290.184 173.35-384l84.666 96c-79.726 70.364-130.016 173.304-130.016 288 0 212.076 171.93 384 384 384 106.042 0 202.038-42.986 271.53-112.478l-143.53-143.522h384v384l-149.97-149.978c-92.654 92.658-220.644 149.978-362.030 149.978-282.77 0-512-229.23-512-512z" />
|
||||
<glyph unicode="" glyph-name="quotes-left" d="M225 512c123.712 0 224-100.29 224-224 0-123.712-100.288-224-224-224s-224 100.288-224 224l-1 32c0 247.424 200.576 448 448 448v-128c-85.474 0-165.834-33.286-226.274-93.726-11.634-11.636-22.252-24.016-31.83-37.020 11.438 1.8 23.16 2.746 35.104 2.746zM801 512c123.71 0 224-100.29 224-224 0-123.712-100.29-224-224-224s-224 100.288-224 224l-1 32c0 247.424 200.576 448 448 448v-128c-85.474 0-165.834-33.286-226.274-93.726-11.636-11.636-22.254-24.016-31.832-37.020 11.44 1.8 23.16 2.746 35.106 2.746z" />
|
||||
<glyph unicode="" glyph-name="list-numbered" d="M384 128h640v-128h-640zM384 512h640v-128h-640zM384 896h640v-128h-640zM192 960v-256h-64v192h-64v64zM128 434v-50h128v-64h-192v146l128 60v50h-128v64h192v-146zM256 256v-320h-192v64h128v64h-128v64h128v64h-128v64z" />
|
||||
<glyph unicode="" glyph-name="list2" d="M384 896h640v-128h-640v128zM384 512h640v-128h-640v128zM384 128h640v-128h-640v128zM0 832c0 70.692 57.308 128 128 128s128-57.308 128-128c0-70.692-57.308-128-128-128s-128 57.308-128 128zM0 448c0 70.692 57.308 128 128 128s128-57.308 128-128c0-70.692-57.308-128-128-128s-128 57.308-128 128zM0 64c0 70.692 57.308 128 128 128s128-57.308 128-128c0-70.692-57.308-128-128-128s-128 57.308-128 128z" />
|
||||
<glyph unicode="" glyph-name="upload2" d="M0 64h1024v-64h-1024zM1024 192v-64h-1024v64l128 256h256v-128h256v128h256zM224 640l288 288 288-288h-224v-256h-128v256z" />
|
||||
<glyph unicode="" glyph-name="link" d="M440.236 324.234c-13.31 0-26.616 5.076-36.77 15.23-95.134 95.136-95.134 249.934 0 345.070l192 192c46.088 46.086 107.36 71.466 172.534 71.466s126.448-25.38 172.536-71.464c95.132-95.136 95.132-249.934 0-345.070l-87.766-87.766c-20.308-20.308-53.23-20.308-73.54 0-20.306 20.306-20.306 53.232 0 73.54l87.766 87.766c54.584 54.586 54.584 143.404 0 197.99-26.442 26.442-61.6 41.004-98.996 41.004s-72.552-14.562-98.996-41.006l-192-191.998c-54.586-54.586-54.586-143.406 0-197.992 20.308-20.306 20.306-53.232 0-73.54-10.15-10.152-23.462-15.23-36.768-15.23zM256-52c-65.176 0-126.45 25.38-172.534 71.464-95.134 95.136-95.134 249.934 0 345.070l87.764 87.764c20.308 20.306 53.234 20.306 73.54 0 20.308-20.306 20.308-53.232 0-73.54l-87.764-87.764c-54.586-54.586-54.586-143.406 0-197.992 26.44-26.44 61.598-41.002 98.994-41.002s72.552 14.562 98.998 41.006l192 191.998c54.584 54.586 54.584 143.406 0 197.992-20.308 20.308-20.306 53.232 0 73.54 20.306 20.306 53.232 20.306 73.54-0.002 95.132-95.134 95.132-249.932 0.002-345.068l-192.002-192c-46.090-46.088-107.364-71.466-172.538-71.466z" />
|
||||
<glyph unicode="" glyph-name="happy" d="M512-64c282.77 0 512 229.23 512 512s-229.23 512-512 512-512-229.23-512-512 229.23-512 512-512zM512 864c229.75 0 416-186.25 416-416s-186.25-416-416-416-416 186.25-416 416 186.25 416 416 416zM512 361.24c115.95 0 226.23 30.806 320 84.92-14.574-178.438-153.128-318.16-320-318.16-166.868 0-305.422 139.872-320 318.304 93.77-54.112 204.050-85.064 320-85.064zM256 608c0 53.019 28.654 96 64 96s64-42.981 64-96c0-53.019-28.654-96-64-96s-64 42.981-64 96zM640 608c0 53.019 28.654 96 64 96s64-42.981 64-96c0-53.019-28.654-96-64-96s-64 42.981-64 96z" />
|
||||
<glyph unicode="" glyph-name="cancel-circle" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM512 32c-229.75 0-416 186.25-416 416s186.25 416 416 416 416-186.25 416-416-186.25-416-416-416zM672 704l-160-160-160 160-96-96 160-160-160-160 96-96 160 160 160-160 96 96-160 160 160 160z" />
|
||||
<glyph unicode="" glyph-name="font" d="M799.596 943.792c-90.526 0-148.62 16.208-241.848 16.208-301.284 0-441.792-171.584-441.792-345.872 0-102.678 48.64-136.458 144.564-136.458-6.758 14.864-18.914 31.080-18.914 104.034 0 204.010 77.006 263.458 175.636 267.51 0 0-80.918-793.374-315.778-888.542v-24.672h316.594l108.026 512h197.844l44.072 128h-214.908l51.944 246.19c59.446-12.156 117.542-24.316 167.532-24.316 62.148 0 118.894 18.914 149.968 162.126-37.826-12.16-78.362-16.208-122.94-16.208z" />
|
||||
<glyph unicode="" glyph-name="text-height" d="M896 192h128l-160-192-160 192h128v512h-128l160 192 160-192h-128zM640 896v-256l-64 128h-192v-704h128v-64h-384v64h128v704h-192l-64-128v256z" />
|
||||
<glyph unicode="" glyph-name="bold" d="M707.88 475.348c37.498 44.542 60.12 102.008 60.12 164.652 0 141.16-114.842 256-256 256h-320v-896h384c141.158 0 256 114.842 256 256 0 92.956-49.798 174.496-124.12 219.348zM384 768h101.5c55.968 0 101.5-57.42 101.5-128s-45.532-128-101.5-128h-101.5v256zM543 128h-159v256h159c58.45 0 106-57.42 106-128s-47.55-128-106-128z" />
|
||||
<glyph unicode="" glyph-name="underline" d="M704 896h128v-416c0-159.058-143.268-288-320-288-176.73 0-320 128.942-320 288v416h128v-416c0-40.166 18.238-78.704 51.354-108.506 36.896-33.204 86.846-51.494 140.646-51.494s103.75 18.29 140.646 51.494c33.116 29.802 51.354 68.34 51.354 108.506v416zM192 128h640v-128h-640z" />
|
||||
<glyph unicode="" glyph-name="italic" d="M896 896v-64h-128l-320-768h128v-64h-448v64h128l320 768h-128v64z" />
|
||||
<glyph unicode="" glyph-name="strikethrough" d="M1024 448v-64h-234.506c27.504-38.51 42.506-82.692 42.506-128 0-70.878-36.66-139.026-100.58-186.964-59.358-44.518-137.284-69.036-219.42-69.036-82.138 0-160.062 24.518-219.42 69.036-63.92 47.938-100.58 116.086-100.58 186.964h128c0-69.382 87.926-128 192-128s192 58.618 192 128c0 69.382-87.926 128-192 128h-512v64h299.518c-2.338 1.654-4.656 3.324-6.938 5.036-63.92 47.94-100.58 116.086-100.58 186.964s36.66 139.024 100.58 186.964c59.358 44.518 137.282 69.036 219.42 69.036 82.136 0 160.062-24.518 219.42-69.036 63.92-47.94 100.58-116.086 100.58-186.964h-128c0 69.382-87.926 128-192 128s-192-58.618-192-128c0-69.382 87.926-128 192-128 78.978 0 154.054-22.678 212.482-64h299.518z" />
|
||||
<glyph unicode="" glyph-name="page-break" d="M0 448h128v-64h-128zM192 448h192v-64h-192zM448 448h128v-64h-128zM640 448h192v-64h-192zM896 448h128v-64h-128zM880 960l16-448h-768l16 448h32l16-384h640l16 384zM144-64l-16 384h768l-16-384h-32l-16 320h-640l-16-320z" />
|
||||
<glyph unicode="" glyph-name="table2" d="M0 896v-896h1024v896h-1024zM384 320v192h256v-192h-256zM640 256v-192h-256v192h256zM640 768v-192h-256v192h256zM320 768v-192h-256v192h256zM64 512h256v-192h-256v192zM704 512h256v-192h-256v192zM704 576v192h256v-192h-256zM64 256h256v-192h-256v192zM704 64v192h256v-192h-256z" />
|
||||
<glyph unicode="" glyph-name="paragraph-left" d="M0 896h1024v-128h-1024zM0 704h640v-128h-640zM0 320h640v-128h-640zM0 512h1024v-128h-1024zM0 128h1024v-128h-1024z" />
|
||||
<glyph unicode="" glyph-name="paragraph-center" d="M0 896h1024v-128h-1024zM192 704h640v-128h-640zM192 320h640v-128h-640zM0 512h1024v-128h-1024zM0 128h1024v-128h-1024z" />
|
||||
<glyph unicode="" glyph-name="paragraph-right" d="M0 896h1024v-128h-1024zM384 704h640v-128h-640zM384 320h640v-128h-640zM0 512h1024v-128h-1024zM0 128h1024v-128h-1024z" />
|
||||
<glyph unicode="" glyph-name="close, remove, times" horiz-adv-x="805" d="M741.714 195.428q0-22.857-16-38.857l-77.714-77.714q-16-16-38.857-16t-38.857 16l-168 168-168-168q-16-16-38.857-16t-38.857 16l-77.714 77.714q-16 16-16 38.857t16 38.857l168 168-168 168q-16 16-16 38.857t16 38.857l77.714 77.714q16 16 38.857 16t38.857-16l168-168 168 168q16 16 38.857 16t38.857-16l77.714-77.714q16-16 16-38.857t-16-38.857l-168-168 168-168q16-16 16-38.857z" />
|
||||
<glyph unicode="" glyph-name="trash-o" horiz-adv-x="805" d="M292.571 530.286v-329.143q0-8-5.143-13.143t-13.143-5.143h-36.571q-8 0-13.143 5.143t-5.143 13.143v329.143q0 8 5.143 13.143t13.143 5.143h36.571q8 0 13.143-5.143t5.143-13.143zM438.857 530.286v-329.143q0-8-5.143-13.143t-13.143-5.143h-36.571q-8 0-13.143 5.143t-5.143 13.143v329.143q0 8 5.143 13.143t13.143 5.143h36.571q8 0 13.143-5.143t5.143-13.143zM585.143 530.286v-329.143q0-8-5.143-13.143t-13.143-5.143h-36.571q-8 0-13.143 5.143t-5.143 13.143v329.143q0 8 5.143 13.143t13.143 5.143h36.571q8 0 13.143-5.143t5.143-13.143zM658.286 116.571v541.714h-512v-541.714q0-12.571 4-23.143t8.286-15.429 6-4.857h475.429q1.714 0 6 4.857t8.286 15.429 4 23.143zM274.286 731.428h256l-27.429 66.857q-4 5.143-9.714 6.286h-181.143q-5.714-1.143-9.714-6.286zM804.571 713.143v-36.571q0-8-5.143-13.143t-13.143-5.143h-54.857v-541.714q0-47.429-26.857-82t-64.571-34.571h-475.429q-37.714 0-64.571 33.429t-26.857 80.857v544h-54.857q-8 0-13.143 5.143t-5.143 13.143v36.571q0 8 5.143 13.143t13.143 5.143h176.571l40 95.429q8.571 21.143 30.857 36t45.143 14.857h182.857q22.857 0 45.143-14.857t30.857-36l40-95.429h176.571q8 0 13.143-5.143t5.143-13.143z" />
|
||||
<glyph unicode="" glyph-name="terminal" horiz-adv-x="958" d="M334.286 389.143l-266.286-266.286q-5.714-5.714-13.143-5.714t-13.143 5.714l-28.571 28.571q-5.714 5.714-5.714 13.143t5.714 13.143l224.571 224.571-224.571 224.571q-5.714 5.714-5.714 13.143t5.714 13.143l28.571 28.571q5.714 5.714 13.143 5.714t13.143-5.714l266.286-266.286q5.714-5.714 5.714-13.143t-5.714-13.143zM950.857 128v-36.571q0-8-5.143-13.143t-13.143-5.143h-548.571q-8 0-13.143 5.143t-5.143 13.143v36.571q0 8 5.143 13.143t13.143 5.143h548.571q8 0 13.143-5.143t5.143-13.143z" />
|
||||
<glyph unicode="" glyph-name="header" d="M961.143 0q-25.143 0-75.714 2t-76.286 2q-25.143 0-75.429-2t-75.429-2q-13.714 0-21.143 11.714t-7.429 26q0 17.714 9.714 26.286t22.286 9.714 29.143 4 25.714 8.571q18.857 12 18.857 80l-0.571 223.429q0 12-0.571 17.714-7.429 2.286-28.571 2.286h-385.714q-21.714 0-29.143-2.286-0.571-5.714-0.571-17.714l-0.571-212q0-81.143 21.143-93.714 9.143-5.714 27.429-7.429t32.571-2 25.714-8.571 11.429-26q0-14.857-7.143-27.429t-20.857-12.571q-26.857 0-79.714 2t-79.143 2q-24.571 0-73.143-2t-72.571-2q-13.143 0-20.286 12t-7.143 25.714q0 17.143 8.857 25.714t20.571 10 27.143 4.286 24 8.571q18.857 13.143 18.857 81.714l-0.571 32.571v464.571q0 1.714 0.286 14.857t0 20.857-0.857 22-2 24-3.714 20.857-6.286 18-9.143 10.286q-8.571 5.714-25.714 6.857t-30.286 1.143-23.429 8-10.286 25.714q0 14.857 6.857 27.429t20.571 12.571q26.286 0 79.143-2t79.143-2q24 0 72.286 2t72.286 2q14.286 0 21.429-12.571t7.143-27.429q0-17.143-9.714-24.857t-22-8.286-28.286-2.286-24.571-7.429q-20-12-20-91.429l0.571-182.857q0-12 0.571-18.286 7.429-1.714 22.286-1.714h399.429q14.286 0 21.714 1.714 0.571 6.286 0.571 18.286l0.571 182.857q0 79.429-20 91.429-10.286 6.286-33.429 7.143t-37.714 7.429-14.571 28.286q0 14.857 7.143 27.429t21.429 12.571q25.143 0 75.429-2t75.429-2q24.571 0 73.714 2t73.714 2q14.286 0 21.429-12.571t7.143-27.429q0-17.143-10-25.143t-22.857-8.286-29.429-1.714-25.143-7.143q-20-13.143-20-92l0.571-538.857q0-68 19.429-80 9.143-5.714 26.286-7.714t30.571-2.571 23.714-8.857 10.286-25.429q0-14.857-6.857-27.429t-20.571-12.571z" />
|
||||
<glyph unicode="" glyph-name="paint-brush" horiz-adv-x="1023" d="M922.857 950.857q40 0 70-26.571t30-66.571q0-36-25.714-86.286-189.714-359.429-265.714-429.714-55.429-52-124.571-52-72 0-123.714 52.857t-51.714 125.429q0 73.143 52.571 121.143l364.571 330.857q33.714 30.857 74.286 30.857zM403.429 360q22.286-43.429 60.857-74.286t86-43.429l0.571-40.571q2.286-121.714-74-198.286t-199.143-76.571q-70.286 0-124.571 26.571t-87.143 72.857-49.429 104.571-16.571 125.714q4-2.857 23.429-17.143t35.429-25.429 33.714-20.857 26.286-9.714q23.429 0 31.429 21.143 14.286 37.714 32.857 64.286t39.714 43.429 50.286 27.143 58.857 14.571 71.429 6z" />
|
||||
</font></defs></svg>
|
After Width: | Height: | Size: 14 KiB |
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,123 @@
|
|||
@font-face {
|
||||
font-family: 'icomoon';
|
||||
src: url('fonts/icomoon.eot?mz0cvx');
|
||||
src: url('fonts/icomoon.eot?mz0cvx#iefix') format('embedded-opentype'),
|
||||
url('fonts/icomoon.ttf?mz0cvx') format('truetype'),
|
||||
url('fonts/icomoon.woff?mz0cvx') format('woff'),
|
||||
url('fonts/icomoon.svg?mz0cvx#icomoon') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-display: block;
|
||||
}
|
||||
|
||||
[class^="icon-"], [class*=" icon-"] {
|
||||
/* use !important to prevent issues with browser extensions that change fonts */
|
||||
font-family: 'icomoon' !important;
|
||||
speak: never;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1;
|
||||
|
||||
/* Better Font Rendering =========== */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-pencil2:before {
|
||||
content: "\e906";
|
||||
}
|
||||
.icon-image:before {
|
||||
content: "\e90d";
|
||||
}
|
||||
.icon-play:before {
|
||||
content: "\e912";
|
||||
}
|
||||
.icon-location:before {
|
||||
content: "\e947";
|
||||
}
|
||||
.icon-undo:before {
|
||||
content: "\e965";
|
||||
}
|
||||
.icon-redo:before {
|
||||
content: "\e966";
|
||||
}
|
||||
.icon-quotes-left:before {
|
||||
content: "\e977";
|
||||
}
|
||||
.icon-list-numbered:before {
|
||||
content: "\e9b9";
|
||||
}
|
||||
.icon-list2:before {
|
||||
content: "\e9bb";
|
||||
}
|
||||
.icon-upload2:before {
|
||||
content: "\e9c6";
|
||||
}
|
||||
.icon-link:before {
|
||||
content: "\e9cb";
|
||||
}
|
||||
.icon-happy:before {
|
||||
content: "\e9df";
|
||||
}
|
||||
.icon-cancel-circle:before {
|
||||
content: "\ea0d";
|
||||
}
|
||||
.icon-font:before {
|
||||
content: "\ea5c";
|
||||
}
|
||||
.icon-text-height:before {
|
||||
content: "\ea5f";
|
||||
}
|
||||
.icon-bold:before {
|
||||
content: "\ea62";
|
||||
}
|
||||
.icon-underline:before {
|
||||
content: "\ea63";
|
||||
}
|
||||
.icon-italic:before {
|
||||
content: "\ea64";
|
||||
}
|
||||
.icon-strikethrough:before {
|
||||
content: "\ea65";
|
||||
}
|
||||
.icon-page-break:before {
|
||||
content: "\ea68";
|
||||
}
|
||||
.icon-table2:before {
|
||||
content: "\ea71";
|
||||
}
|
||||
.icon-paragraph-left:before {
|
||||
content: "\ea77";
|
||||
}
|
||||
.icon-paragraph-center:before {
|
||||
content: "\ea78";
|
||||
}
|
||||
.icon-paragraph-right:before {
|
||||
content: "\ea79";
|
||||
}
|
||||
.icon-paint-format:before {
|
||||
content: "\e90c";
|
||||
}
|
||||
.icon-close:before {
|
||||
content: "\f00d";
|
||||
}
|
||||
.icon-remove:before {
|
||||
content: "\f00d";
|
||||
}
|
||||
.icon-times:before {
|
||||
content: "\f00d";
|
||||
}
|
||||
.icon-trash-o:before {
|
||||
content: "\f014";
|
||||
}
|
||||
.icon-terminal:before {
|
||||
content: "\f120";
|
||||
}
|
||||
.icon-header:before {
|
||||
content: "\f1dc";
|
||||
}
|
||||
.icon-paint-brush:before {
|
||||
content: "\f1fc";
|
||||
}
|
Binary file not shown.
|
@ -105,4 +105,7 @@
|
|||
}
|
||||
.w-e-icon-text-heigh:before {
|
||||
content: "\ea5f";
|
||||
}
|
||||
}
|
||||
.w-e-icon-paint-format:before {
|
||||
content: "\e90c";
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import { UA } from '../utils/util'
|
|||
import Editor from './index'
|
||||
|
||||
class Command {
|
||||
editor: Editor
|
||||
public editor: Editor
|
||||
|
||||
constructor(editor: Editor) {
|
||||
this.editor = editor
|
||||
|
@ -19,10 +19,10 @@ class Command {
|
|||
* @param name name
|
||||
* @param value value
|
||||
*/
|
||||
do(name: string): void
|
||||
do(name: string, value: string): void
|
||||
do(name: string, value: DomElement): void
|
||||
do(name: string, value?: string | DomElement): void {
|
||||
public do(name: string): void
|
||||
public do(name: string, value: string): void
|
||||
public do(name: string, value: DomElement): void
|
||||
public do(name: string, value?: string | DomElement): void {
|
||||
const editor = this.editor
|
||||
|
||||
if (editor.config.styleWithCSS) {
|
||||
|
@ -42,14 +42,14 @@ class Command {
|
|||
// 执行
|
||||
switch (name) {
|
||||
case 'insertHTML':
|
||||
this._insertHTML(value as string)
|
||||
this.insertHTML(value as string)
|
||||
break
|
||||
case 'insertElem':
|
||||
this._insertElem(value as DomElement)
|
||||
this.insertElem(value as DomElement)
|
||||
break
|
||||
default:
|
||||
// 默认 command
|
||||
this._execCommand(name, value as string)
|
||||
this.execCommand(name, value as string)
|
||||
break
|
||||
}
|
||||
|
||||
|
@ -68,14 +68,14 @@ class Command {
|
|||
* 插入 html
|
||||
* @param html html 字符串
|
||||
*/
|
||||
_insertHTML(html: string): void {
|
||||
private insertHTML(html: string): void {
|
||||
const editor = this.editor
|
||||
const range = editor.selection.getRange()
|
||||
if (range == null) return
|
||||
|
||||
if (this.queryCommandSupported('insertHTML')) {
|
||||
// W3C
|
||||
this._execCommand('insertHTML', html)
|
||||
this.execCommand('insertHTML', html)
|
||||
} else if (range.insertNode) {
|
||||
// IE
|
||||
range.deleteContents()
|
||||
|
@ -91,7 +91,7 @@ class Command {
|
|||
* 插入 DOM 元素
|
||||
* @param $elem DOM 元素
|
||||
*/
|
||||
_insertElem($elem: DomElement): void {
|
||||
private insertElem($elem: DomElement): void {
|
||||
const editor = this.editor
|
||||
const range = editor.selection.getRange()
|
||||
if (range == null) return
|
||||
|
@ -107,7 +107,7 @@ class Command {
|
|||
* @param name name
|
||||
* @param value value
|
||||
*/
|
||||
_execCommand(name: string, value: string): void {
|
||||
private execCommand(name: string, value: string): void {
|
||||
document.execCommand(name, false, value)
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ class Command {
|
|||
* 执行 document.queryCommandValue
|
||||
* @param name name
|
||||
*/
|
||||
queryCommandValue(name: string): string {
|
||||
public queryCommandValue(name: string): string {
|
||||
return document.queryCommandValue(name)
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ class Command {
|
|||
* 执行 document.queryCommandState
|
||||
* @param name name
|
||||
*/
|
||||
queryCommandState(name: string): boolean {
|
||||
public queryCommandState(name: string): boolean {
|
||||
return document.queryCommandState(name)
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ class Command {
|
|||
* 执行 document.queryCommandSupported
|
||||
* @param name name
|
||||
*/
|
||||
queryCommandSupported(name: string): boolean {
|
||||
public queryCommandSupported(name: string): boolean {
|
||||
return document.queryCommandSupported(name)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,22 +19,22 @@ import initConfig from './init-fns/init-config'
|
|||
let EDITOR_ID = 1
|
||||
|
||||
class Editor {
|
||||
id: string
|
||||
toolbarSelector: string
|
||||
textSelector: string | undefined
|
||||
customConfig: ConfigType
|
||||
config: ConfigType
|
||||
$toolbarElem: DomElement
|
||||
$textContainerElem: DomElement
|
||||
$textElem: DomElement
|
||||
toolbarElemId: string
|
||||
textElemId: string
|
||||
isFocus: boolean
|
||||
selection: SelectionAndRangeAPI
|
||||
cmd: CommandAPI
|
||||
txt: Text
|
||||
menus: Menus
|
||||
change: Function
|
||||
public id: string
|
||||
public toolbarSelector: string
|
||||
public textSelector: string | undefined
|
||||
public customConfig: ConfigType
|
||||
public config: ConfigType
|
||||
public $toolbarElem: DomElement
|
||||
public $textContainerElem: DomElement
|
||||
public $textElem: DomElement
|
||||
public toolbarElemId: string
|
||||
public textElemId: string
|
||||
public isFocus: boolean
|
||||
public selection: SelectionAndRangeAPI
|
||||
public cmd: CommandAPI
|
||||
public txt: Text
|
||||
public menus: Menus
|
||||
public change: Function
|
||||
|
||||
/**
|
||||
* 构造函数
|
||||
|
@ -73,14 +73,14 @@ class Editor {
|
|||
* 初始化选区
|
||||
* @param newLine 新建一行
|
||||
*/
|
||||
initSelection(newLine?: boolean): void {
|
||||
public initSelection(newLine?: boolean): void {
|
||||
initSelection(this, newLine)
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建编辑器实例
|
||||
*/
|
||||
create(): void {
|
||||
public create(): void {
|
||||
// 初始化配置
|
||||
initConfig(this)
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@ import { UA } from '../utils/util'
|
|||
import Editor from './index'
|
||||
|
||||
class SelectionAndRange {
|
||||
editor: Editor
|
||||
_currentRange: Range | null
|
||||
public editor: Editor
|
||||
private _currentRange: Range | null
|
||||
|
||||
constructor(editor: Editor) {
|
||||
this.editor = editor
|
||||
|
@ -19,7 +19,7 @@ class SelectionAndRange {
|
|||
/**
|
||||
* 获取当前 range
|
||||
*/
|
||||
getRange(): Range | null {
|
||||
public getRange(): Range | null {
|
||||
return this._currentRange
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ class SelectionAndRange {
|
|||
* 保存选区范围
|
||||
* @param _range 选区范围
|
||||
*/
|
||||
saveRange(_range?: Range): void {
|
||||
public saveRange(_range?: Range): void {
|
||||
if (_range) {
|
||||
// 保存已有选区
|
||||
this._currentRange = _range
|
||||
|
@ -65,7 +65,7 @@ class SelectionAndRange {
|
|||
* 折叠选区范围
|
||||
* @param toStart true 开始位置,false 结束位置
|
||||
*/
|
||||
collapseRange(toStart: boolean = false): void {
|
||||
public collapseRange(toStart: boolean = false): void {
|
||||
const range = this._currentRange
|
||||
if (range) {
|
||||
range.collapse(toStart)
|
||||
|
@ -75,7 +75,7 @@ class SelectionAndRange {
|
|||
/**
|
||||
* 获取选区范围内的文字
|
||||
*/
|
||||
getSelectionText(): string {
|
||||
public getSelectionText(): string {
|
||||
const range = this._currentRange
|
||||
if (range) {
|
||||
return range.toString()
|
||||
|
@ -88,7 +88,7 @@ class SelectionAndRange {
|
|||
* 获取选区范围的 DOM 元素
|
||||
* @param range 选区范围
|
||||
*/
|
||||
getSelectionContainerElem(range?: Range): DomElement | undefined {
|
||||
public getSelectionContainerElem(range?: Range): DomElement | undefined {
|
||||
let r: Range | null | undefined
|
||||
r = range || this._currentRange
|
||||
let elem: Node
|
||||
|
@ -102,7 +102,7 @@ class SelectionAndRange {
|
|||
* 选区范围开始的 DOM 元素
|
||||
* @param range 选区范围
|
||||
*/
|
||||
getSelectionStartElem(range?: Range): DomElement | undefined {
|
||||
public getSelectionStartElem(range?: Range): DomElement | undefined {
|
||||
let r: Range | null | undefined
|
||||
r = range || this._currentRange
|
||||
let elem: Node
|
||||
|
@ -116,7 +116,7 @@ class SelectionAndRange {
|
|||
* 选区范围结束的 DOM 元素
|
||||
* @param range 选区范围
|
||||
*/
|
||||
getSelectionEndElem(range?: Range): DomElement | undefined {
|
||||
public getSelectionEndElem(range?: Range): DomElement | undefined {
|
||||
let r: Range | null | undefined
|
||||
r = range || this._currentRange
|
||||
let elem: Node
|
||||
|
@ -129,7 +129,7 @@ class SelectionAndRange {
|
|||
/**
|
||||
* 选区是否为空(没有选择文字)
|
||||
*/
|
||||
isSelectionEmpty(): boolean {
|
||||
public isSelectionEmpty(): boolean {
|
||||
const range = this._currentRange
|
||||
if (range && range.startContainer) {
|
||||
if (range.startContainer === range.endContainer) {
|
||||
|
@ -144,7 +144,7 @@ class SelectionAndRange {
|
|||
/**
|
||||
* 恢复选区范围
|
||||
*/
|
||||
restoreSelection(): void {
|
||||
public restoreSelection(): void {
|
||||
const selection = window.getSelection()
|
||||
const r = this._currentRange
|
||||
if (selection && r) {
|
||||
|
@ -156,7 +156,7 @@ class SelectionAndRange {
|
|||
/**
|
||||
* 创建一个空白(即 ​ 字符)选区
|
||||
*/
|
||||
createEmptyRange(): void {
|
||||
public createEmptyRange(): void {
|
||||
const editor = this.editor
|
||||
const range = this.getRange()
|
||||
let $elem: DomElement
|
||||
|
@ -195,7 +195,7 @@ class SelectionAndRange {
|
|||
* @param toStart true 开始位置,false 结束位置
|
||||
* @param isContent 是否选中 $elem 的内容
|
||||
*/
|
||||
createRangeByElem($elem: DomElement, toStart?: boolean, isContent?: boolean): void {
|
||||
public createRangeByElem($elem: DomElement, toStart?: boolean, isContent?: boolean): void {
|
||||
if (!$elem.length) {
|
||||
return
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ class Bold extends BtnMenu implements MenuActive {
|
|||
/**
|
||||
* 点击事件
|
||||
*/
|
||||
clickHandler(): void {
|
||||
public clickHandler(): void {
|
||||
const editor = this.editor
|
||||
const isSelectEmpty = editor.selection.isSelectionEmpty()
|
||||
|
||||
|
@ -43,7 +43,7 @@ class Bold extends BtnMenu implements MenuActive {
|
|||
/**
|
||||
* 尝试修改菜单激活状态
|
||||
*/
|
||||
tryChangeActive(): void {
|
||||
public tryChangeActive(): void {
|
||||
const editor = this.editor
|
||||
if (editor.cmd.queryCommandState('bold')) {
|
||||
this.active()
|
||||
|
|
|
@ -35,7 +35,7 @@ class Head extends DropListMenu implements MenuActive {
|
|||
* 执行命令
|
||||
* @param value value
|
||||
*/
|
||||
command(value: string): void {
|
||||
public command(value: string): void {
|
||||
const editor = this.editor
|
||||
const $selectionElem = editor.selection.getSelectionContainerElem()
|
||||
if ($selectionElem && editor.$textElem.equal($selectionElem)) {
|
||||
|
@ -50,7 +50,7 @@ class Head extends DropListMenu implements MenuActive {
|
|||
/**
|
||||
* 尝试改变菜单激活(高亮)状态
|
||||
*/
|
||||
tryChangeActive() {
|
||||
public tryChangeActive() {
|
||||
const editor = this.editor
|
||||
const reg = /^h/i
|
||||
const cmdValue = editor.cmd.queryCommandValue('formatBlock')
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
import Editor from '../editor/index'
|
||||
import Menu from './menu-constructors/Menu'
|
||||
import MenuConstructorList from './menu-list'
|
||||
import { MenuActive } from './menu-constructors/Menu'
|
||||
// import { MenuActive } from './menu-constructors/Menu'
|
||||
|
||||
class Menus {
|
||||
editor: Editor
|
||||
menuList: Menu[]
|
||||
public editor: Editor
|
||||
public menuList: Menu[]
|
||||
|
||||
constructor(editor: Editor) {
|
||||
this.editor = editor
|
||||
|
|
|
@ -20,11 +20,11 @@ class Link extends PanelMenu implements MenuActive {
|
|||
/**
|
||||
* 菜单点击事件
|
||||
*/
|
||||
clickHandler(): void {
|
||||
public clickHandler(): void {
|
||||
const editor = this.editor
|
||||
let $linkElem
|
||||
|
||||
if (this._active) {
|
||||
if (this.isActive) {
|
||||
// 菜单被激活,说明选区在链接里
|
||||
$linkElem = editor.selection.getSelectionContainerElem()
|
||||
if (!$linkElem) {
|
||||
|
@ -50,7 +50,7 @@ class Link extends PanelMenu implements MenuActive {
|
|||
* @param text 文本
|
||||
* @param link 链接
|
||||
*/
|
||||
createPanel(text: string, link: string): void {
|
||||
private createPanel(text: string, link: string): void {
|
||||
const conf = createPanelConf(this.editor, text, link)
|
||||
const panel = new Panel(this, conf)
|
||||
panel.create()
|
||||
|
@ -61,7 +61,7 @@ class Link extends PanelMenu implements MenuActive {
|
|||
/**
|
||||
* 尝试修改菜单 active 状态
|
||||
*/
|
||||
tryChangeActive() {
|
||||
public tryChangeActive() {
|
||||
const editor = this.editor
|
||||
if (isActive(editor)) {
|
||||
this.active()
|
||||
|
|
|
@ -21,13 +21,14 @@ export type DropListConf = {
|
|||
}
|
||||
|
||||
class DropList {
|
||||
menu: DropListMenu
|
||||
conf: DropListConf
|
||||
hideTimeoutId: number
|
||||
showTimeoutId: number
|
||||
$container: DomElement
|
||||
_rendered: boolean
|
||||
_show: boolean
|
||||
private menu: DropListMenu
|
||||
private conf: DropListConf
|
||||
private $container: DomElement
|
||||
private rendered: boolean
|
||||
private _show: boolean
|
||||
|
||||
public hideTimeoutId: number
|
||||
public showTimeoutId: number
|
||||
|
||||
constructor(menu: DropListMenu, conf: DropListConf) {
|
||||
this.hideTimeoutId = 0
|
||||
|
@ -80,14 +81,14 @@ class DropList {
|
|||
|
||||
// 记录属性
|
||||
this.$container = $container
|
||||
this._rendered = false
|
||||
this.rendered = false
|
||||
this._show = false
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示 DropList
|
||||
*/
|
||||
show() {
|
||||
public show() {
|
||||
if (this.hideTimeoutId) {
|
||||
// 清除之前的定时隐藏
|
||||
clearTimeout(this.hideTimeoutId)
|
||||
|
@ -99,7 +100,7 @@ class DropList {
|
|||
if (this._show) {
|
||||
return
|
||||
}
|
||||
if (this._rendered) {
|
||||
if (this.rendered) {
|
||||
// 显示
|
||||
$container.show()
|
||||
} else {
|
||||
|
@ -110,7 +111,7 @@ class DropList {
|
|||
|
||||
// 加入到 DOM
|
||||
$menuELem.append($container)
|
||||
this._rendered = true
|
||||
this.rendered = true
|
||||
}
|
||||
|
||||
// 修改属性
|
||||
|
@ -120,7 +121,7 @@ class DropList {
|
|||
/**
|
||||
* 隐藏 DropList
|
||||
*/
|
||||
hide() {
|
||||
public hide() {
|
||||
if (this.showTimeoutId) {
|
||||
// 清除之前的定时显示
|
||||
clearTimeout(this.showTimeoutId)
|
||||
|
@ -134,6 +135,10 @@ class DropList {
|
|||
$container.hide()
|
||||
this._show = false
|
||||
}
|
||||
|
||||
public get isShow() {
|
||||
return this._show
|
||||
}
|
||||
}
|
||||
|
||||
export default DropList
|
||||
|
|
|
@ -9,7 +9,7 @@ import Menu from './Menu'
|
|||
import DropList, { DropListConf } from './DropList'
|
||||
|
||||
class DropListMenu extends Menu {
|
||||
dropList: DropList
|
||||
public dropList: DropList
|
||||
|
||||
constructor($elem: DomElement, editor: Editor, conf: DropListConf) {
|
||||
super($elem, editor)
|
||||
|
|
|
@ -14,9 +14,9 @@ export interface MenuActive {
|
|||
}
|
||||
|
||||
class Menu {
|
||||
$elem: DomElement
|
||||
editor: Editor
|
||||
_active: boolean // 菜单是否处于激活状态,如选中一段加粗文字时,bold 菜单要被激活(即高亮显示)
|
||||
public $elem: DomElement
|
||||
public editor: Editor
|
||||
private _active: boolean // 菜单是否处于激活状态,如选中一段加粗文字时,bold 菜单要被激活(即高亮显示)
|
||||
|
||||
constructor($elem: DomElement, editor: Editor) {
|
||||
this.$elem = $elem
|
||||
|
@ -54,6 +54,13 @@ class Menu {
|
|||
this._active = false
|
||||
this.$elem.removeClass('w-e-active')
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否处于激活状态
|
||||
*/
|
||||
public get isActive() {
|
||||
return this._active
|
||||
}
|
||||
}
|
||||
|
||||
export default Menu
|
||||
|
|
|
@ -28,9 +28,9 @@ export type PanelConf = {
|
|||
}
|
||||
|
||||
class Panel {
|
||||
menu: PanelMenu
|
||||
conf: PanelConf
|
||||
$container: DomElement
|
||||
private menu: PanelMenu
|
||||
private conf: PanelConf
|
||||
public $container: DomElement
|
||||
|
||||
constructor(menu: PanelMenu, conf: PanelConf) {
|
||||
this.menu = menu
|
||||
|
@ -41,7 +41,7 @@ class Panel {
|
|||
/**
|
||||
* 创建并展示 panel
|
||||
*/
|
||||
create(): void {
|
||||
public create(): void {
|
||||
const menu = this.menu
|
||||
if (CREATED_MENUS.has(menu)) {
|
||||
// 创建过了
|
||||
|
@ -177,7 +177,7 @@ class Panel {
|
|||
/**
|
||||
* 移除 penal
|
||||
*/
|
||||
remove(): void {
|
||||
public remove(): void {
|
||||
const menu = this.menu
|
||||
const $container = this.$container
|
||||
if ($container) {
|
||||
|
|
|
@ -9,7 +9,7 @@ import Menu from './Menu'
|
|||
import Panel from './Panel'
|
||||
|
||||
class PanelMenu extends Menu {
|
||||
panel: Panel | undefined
|
||||
public panel: Panel | undefined
|
||||
|
||||
constructor($elem: DomElement, editor: Editor) {
|
||||
super($elem, editor)
|
||||
|
|
|
@ -19,8 +19,8 @@ type TextEventHooks = {
|
|||
}
|
||||
|
||||
class Text {
|
||||
editor: Editor
|
||||
eventHooks: TextEventHooks // Text 各个事件的钩子函数,如 keyup 时要执行哪些函数
|
||||
public editor: Editor
|
||||
public eventHooks: TextEventHooks // Text 各个事件的钩子函数,如 keyup 时要执行哪些函数
|
||||
|
||||
constructor(editor: Editor) {
|
||||
this.editor = editor
|
||||
|
@ -38,7 +38,7 @@ class Text {
|
|||
/**
|
||||
* 初始化
|
||||
*/
|
||||
init(): void {
|
||||
public init(): void {
|
||||
// 实时保存选取范围
|
||||
this._saveRange()
|
||||
|
||||
|
@ -52,7 +52,7 @@ class Text {
|
|||
/**
|
||||
* 清空内容
|
||||
*/
|
||||
clear(): void {
|
||||
public clear(): void {
|
||||
this.html('<p><br></p>')
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ class Text {
|
|||
* 设置/获取 html
|
||||
* @param val html 字符串
|
||||
*/
|
||||
html(val?: string): void | string {
|
||||
public html(val?: string): void | string {
|
||||
const editor = this.editor
|
||||
const $textElem = editor.$textElem
|
||||
|
||||
|
@ -84,7 +84,7 @@ class Text {
|
|||
* 获取/设置 字符串内容
|
||||
* @param val text 字符串
|
||||
*/
|
||||
text(val?: string): void | string {
|
||||
public text(val?: string): void | string {
|
||||
const editor = this.editor
|
||||
const $textElem = editor.$textElem
|
||||
|
||||
|
@ -106,7 +106,7 @@ class Text {
|
|||
* 追加 html 内容
|
||||
* @param html html 字符串
|
||||
*/
|
||||
append(html: string): void {
|
||||
public append(html: string): void {
|
||||
const editor = this.editor
|
||||
const $textElem = editor.$textElem
|
||||
$textElem.append($(html))
|
||||
|
@ -118,7 +118,7 @@ class Text {
|
|||
/**
|
||||
* 每一步操作,都实时保存选区范围
|
||||
*/
|
||||
_saveRange(): void {
|
||||
private _saveRange(): void {
|
||||
const editor = this.editor
|
||||
const $textElem = editor.$textElem
|
||||
|
||||
|
@ -146,7 +146,7 @@ class Text {
|
|||
/**
|
||||
* 绑定事件,事件会触发钩子函数
|
||||
*/
|
||||
_bindEvent(): void {
|
||||
private _bindEvent(): void {
|
||||
const $textElem = this.editor.$textElem
|
||||
const eventHooks = this.eventHooks
|
||||
|
||||
|
|
|
@ -17,9 +17,9 @@ test('head 菜单:dropList', () => {
|
|||
headMenu = getMenuInstance(editor, Head) as Head // 赋值给全局变量
|
||||
expect(headMenu.dropList).not.toBeNull()
|
||||
headMenu.dropList.show()
|
||||
expect(headMenu.dropList._show).toBe(true)
|
||||
expect(headMenu.dropList.isShow).toBe(true)
|
||||
headMenu.dropList.hide()
|
||||
expect(headMenu.dropList._show).toBe(false)
|
||||
expect(headMenu.dropList.isShow).toBe(false)
|
||||
})
|
||||
|
||||
test('head 菜单:设置标题', () => {
|
||||
|
|
|
@ -16,5 +16,5 @@ test('初始化 menus', () => {
|
|||
test('修改菜单激活状态', () => {
|
||||
const menus = editor.menus
|
||||
menus.changeActive()
|
||||
expect(menus.menuList[0]._active).toBeFalsy()
|
||||
expect(menus.menuList[0].isActive).toBeFalsy()
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue