📄 insert_image.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>openWYSIWYG | Select Color</title>
</head>
<script language="JavaScript" type="text/javascript">
var qsParm = new Array();
/* ---------------------------------------------------------------------- *\
Function : retrieveWYSIWYG()
Description : Retrieves the textarea ID for which the image will be inserted into.
\* ---------------------------------------------------------------------- */
function retrieveWYSIWYG() {
var query = window.location.search.substring(1);
var parms = query.split('&');
for (var i=0; i<parms.length; i++) {
var pos = parms[i].indexOf('=');
if (pos > 0) {
var key = parms[i].substring(0,pos);
var val = parms[i].substring(pos+1);
qsParm[key] = val;
}
}
}
/* ---------------------------------------------------------------------- *\
Function : insertImage()
Description : Inserts image into the WYSIWYG.
\* ---------------------------------------------------------------------- */
function insertImage() {
var image = '<img src="' + document.all.imageurl.value + '" alt="' + document.all.alt.value + '" alignment="' + document.all.alignment.value + '" border="' + document.all.borderThickness.value + '" hspace="' + document.all.horizontal.value + '" vspace="' + document.all.vertical.value + '">';
window.opener.insertHTML(image, qsParm['wysiwyg']);
window.close();
}
</script>
<body bgcolor="#EEEEEE" marginwidth="0" marginheight="0" topmargin="0" leftmargin="0" onLoad="retrieveWYSIWYG();">
<table border="0" cellpadding="0" cellspacing="0" style="padding: 10px;"><tr><td>
<span style="font-family: arial, verdana, helvetica; font-size: 11px; font-weight: bold;">Insert Image:</span>
<table width="380" border="0" cellpadding="0" cellspacing="0" style="background-color: #F7F7F7; border: 2px solid #FFFFFF; padding: 5px;">
<tr>
<td style="padding-bottom: 2px; padding-top: 0px; font-family: arial, verdana, helvetica; font-size: 11px;" width="80">Image URL:</td>
<td style="padding-bottom: 2px; padding-top: 0px;" width="300"><input type="text" name="imageurl" value="" style="font-size: 10px; width: 100%;"></td>
</tr>
<tr>
<td style="padding-bottom: 2px; padding-top: 0px; font-family: arial, verdana, helvetica; font-size: 11px;">Alternate Text:</td>
<td style="padding-bottom: 2px; padding-top: 0px;"><input type="text" name="alt" value="" style="font-size: 10px; width: 100%;"></td>
</tr>
</table>
<table width="380" border="0" cellpadding="0" cellspacing="0" style="margin-top: 10px;"><tr><td>
<span style="font-family: arial, verdana, helvetica; font-size: 11px; font-weight: bold;">Layout:</span>
<table width="185" border="0" cellpadding="0" cellspacing="0" style="background-color: #F7F7F7; border: 2px solid #FFFFFF; padding: 5px;">
<tr>
<td style="padding-bottom: 2px; padding-top: 0px; font-family: arial, verdana, helvetica; font-size: 11px;" width="100">Alignment:</td>
<td style="padding-bottom: 2px; padding-top: 0px;" width="85">
<select name="alignment" style="font-family: arial, verdana, helvetica; font-size: 11px; width: 100%;">
<option value="">Not Set</option>
<option value="left">Left</option>
<option value="right">Right</option>
<option value="texttop">Texttop</option>
<option value="absmiddle">Absmiddle</option>
<option value="baseline">Baseline</option>
<option value="absbottom">Absbottom</option>
<option value="bottom">Bottom</option>
<option value="middle">Middle</option>
<option value="top">Top</option>
</select>
</td>
</tr>
<tr>
<td style="padding-bottom: 2px; padding-top: 0px; font-family: arial, verdana, helvetica; font-size: 11px;">Border Thickness:</td>
<td style="padding-bottom: 2px; padding-top: 0px;"><input type="text" name="borderThickness" value="" style="font-size: 10px; width: 100%;"></td>
</tr>
</table>
</td>
<td width="10"> </td>
<td>
<span style="font-family: arial, verdana, helvetica; font-size: 11px; font-weight: bold;">Spacing:</span>
<table width="185" border="0" cellpadding="0" cellspacing="0" style="background-color: #F7F7F7; border: 2px solid #FFFFFF; padding: 5px;">
<tr>
<td style="padding-bottom: 2px; padding-top: 0px; font-family: arial, verdana, helvetica; font-size: 11px;" width="80">Horizontal:</td>
<td style="padding-bottom: 2px; padding-top: 0px;" width="105"><input type="text" name="horizontal" value="" style="font-size: 10px; width: 100%;"></td>
</tr>
<tr>
<td style="padding-bottom: 2px; padding-top: 0px; font-family: arial, verdana, helvetica; font-size: 11px;">Vertical:</td>
<td style="padding-bottom: 2px; padding-top: 0px;"><input type="text" name="vertical" value="" style="font-size: 10px; width: 100%;"></td>
</tr>
</table>
</td></tr></table>
<div align="right" style="padding-top: 5px;"><input type="submit" value=" Submit " onClick="insertImage();" style="font-size: 12px;" > <input type="submit" value=" Cancel " onClick="window.close();" style="font-size: 12px;" ></div>
</tr></td</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -