線上 HTML 編輯器 HTMLArea
發表於 : 2005-06-06 12:03:51
http://www.dynarch.com/projects/htmlarea/
使用方法
相關目錄
images
popups
plugins
lang
相關檔案
htmlarea.js
dialog.js
popupdiv.js
popupwin.js
html head 部份
<script type="text/javascript">
_editor_lang = "en";
_editor_url = "./";
</script>
<!-- load the main HTMLArea files -->
<script type="text/javascript" src="./htmlarea.js"></script>
<style type="text/css">html, body { font-family: Verdana,sans-serif;
background-color: #ffffff; color: #000; } a:link, a:visited { color: #00f; }
a:hover { color: #048; } a:active { color: #f00; } textarea { background-color:
#fff; border: 1px solid 00f; }</style>
<script type="text/javascript">
// load the plugin files
HTMLArea.loadPlugin("TableOperations");
var editor = null;
function initEditor() {
// create an editor for the "e_news_articale1content" textbox
editor = new HTMLArea("e_news_articale1content");
// register the TableOperations plugin with our editor
editor.registerPlugin(TableOperations);
editor.generate();
return false;
}
function insertHTML() {
var html = prompt("Enter some HTML code here");
if (html) {
editor.insertHTML(html);
}
}
function highlight() {
editor.surroundHTML('<span style="background-color: yellow">', '</span>');
}
</script>
//e_news_articale1content 為文字區塊的名稱
<body bgcolor="#ffffff" text="#000000" link="#000000" vlink="#000000" alink="#000000" class="BlueNotePageBODY" onload="initEditor()">
//Body 加上 onload="initEditor()"
<textarea name="e_news_articale1content" rows="24" cols="80" id="e_news_articale1content" class="BlueNoteTextarea">
</text>
//TextArea 需有 id 及 name
Mozilla 不能使用複製貼上
http://www.mozilla.org/editor/midasdemo ... prefs.html
使用方法
相關目錄
images
popups
plugins
lang
相關檔案
htmlarea.js
dialog.js
popupdiv.js
popupwin.js
html head 部份
<script type="text/javascript">
_editor_lang = "en";
_editor_url = "./";
</script>
<!-- load the main HTMLArea files -->
<script type="text/javascript" src="./htmlarea.js"></script>
<style type="text/css">html, body { font-family: Verdana,sans-serif;
background-color: #ffffff; color: #000; } a:link, a:visited { color: #00f; }
a:hover { color: #048; } a:active { color: #f00; } textarea { background-color:
#fff; border: 1px solid 00f; }</style>
<script type="text/javascript">
// load the plugin files
HTMLArea.loadPlugin("TableOperations");
var editor = null;
function initEditor() {
// create an editor for the "e_news_articale1content" textbox
editor = new HTMLArea("e_news_articale1content");
// register the TableOperations plugin with our editor
editor.registerPlugin(TableOperations);
editor.generate();
return false;
}
function insertHTML() {
var html = prompt("Enter some HTML code here");
if (html) {
editor.insertHTML(html);
}
}
function highlight() {
editor.surroundHTML('<span style="background-color: yellow">', '</span>');
}
</script>
//e_news_articale1content 為文字區塊的名稱
<body bgcolor="#ffffff" text="#000000" link="#000000" vlink="#000000" alink="#000000" class="BlueNotePageBODY" onload="initEditor()">
//Body 加上 onload="initEditor()"
<textarea name="e_news_articale1content" rows="24" cols="80" id="e_news_articale1content" class="BlueNoteTextarea">
</text>
//TextArea 需有 id 及 name
Mozilla 不能使用複製貼上
http://www.mozilla.org/editor/midasdemo ... prefs.html