WebFX Dynamic Webboard 2.0 : Editor « GUI Components « JavaScript DHTML

JavaScript DHTML
1. Ajax Layer
2. Data Type
3. Date Time
4. Development
5. Document
6. Event
7. Event onMethod
8. Form Control
9. GUI Components
10. HTML
11. Javascript Collections
12. Javascript Objects
13. Language Basics
14. Node Operation
15. Object Oriented
16. Page Components
17. Security
18. Style Layout
19. Table
20. Utilities
21. Window Browser
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
JavaScript DHTML » GUI Components » Editor 
WebFX Dynamic Webboard 2.0


<!--
##############################################
#         WebFX Dynamic Webboard 2.0         #
#       By Emil A Eklund ([email protected])       #
#      and Erik Arvidson ([email protected])      #
#           http://webfx.eae.net             #
#              April 131999                #
##############################################
# Feel free to use this script for personal  #
# and non profit web sites, as long as you   #
# are giving us credits for it, in other     #
# words, not removing nor modifying this     #
# notice in any of the files it appears in   #
##############################################
#  For commercial use contact Emil or Erik   #
##############################################
-->

<html>
<head>
<style> 
 <!--
 body  {background : buttonface; margin: 5; margin-top: 2;
     border-top: solid buttonhighlight;
    border-left: solid buttonhighlight;
    border-right: solid buttonshadow;
    border-bottom: solid buttonshadow;}
td    {width : 10px; height : 10px; font-size : 1px; cursor: hand;}
 -->
 </style>
<script type="text/javascript">
<!--

var ie5 = document.getElementById != null;

function doOver() {
  var el = window.event.srcElement;
  bgc = el.style.backgroundColor;

  if (bgc != "") {
    el.style.borderTopColor = "white";
    el.style.borderLeftColor = "white";
    el.style.borderRightColor = "black";
    el.style.borderBottomColor = "black";
  
    colorBox.style.backgroundColor = bgc;
    colorName.innerHTML = bgc;
  }
}
function doClick() {
  bgc = window.event.srcElement.style.backgroundColor;
  window.event.srcElement.style.borderColor = bgc;
  if (bgc != "") {
    window.external.raiseEvent("colorchange", bgc);
  }
}
function doOut() {
  var el = window.event.fromElement;
  bgc = el.style.backgroundColor;

  if (bgc != "") {
    el.style.borderColor = bgc;
  }
}
window.onload = init;

function init() {
  fixTitle();
}

function fixTitle() {
  document.title = parent.document.title;
}

var colors = new Array("white""snow""floralwhite""ghostwhite""whitesmoke"
"ivory""oldlace""linen""seashell""antiquewhite","papayawhip","peachpuff",
"beige","bisque","blanchedalmond","cornsilk","lemonchiffon","lightyellow",
"lightgoldenrodyellow","palegoldenrod",
"wheat","moccasin","navajowhite","khaki","burlywood","tan","darkkhaki",
"gold","yellow","goldenrod","darkgoldenrod","peru","saddlebrown","sienna","chocolate","brown",
"mintcream""aliceblue","azure","lightcyan","lightblue","powderblue",
"lightskyblue","skyblue","deepskyblue",
"cyan","aqua","aquamarine","paleturquoise","turquoise","darkturquoise","mediumturquoise",
"darkcyan","royalblue","cornflowerblue","dodgerblue","blue","mediumblue","darkblue","midnightblue","navy",
"darkslateblue","lightsteelblue","steelblue","cadetblue","slateblue","mediumslateblue",
"indigo","purple","darkmagenta","darkorchid","mediumorchid","blueviolet","mediumpurple","darkviolet","magenta",
"fuchsia","plum","thistle","violet","orchid","deeppink","hotpink",
"mediumvioletred","palevioletred",
"lavender","lavenderblush","mistyrose","pink","lightpink","salmon","lightsalmon",
"coral","darksalmon","sandybrown","orange","orangered","tomato",
"darkorange","crimson","red","firebrick","maroon","darkred","indianred","rosybrown","lightcoral",
"honeydew","springgreen","mediumspringgreen",
"palegreen","chartreuse","lawngreen","greenyellow",
"lime","lightgreen","limegreen",
"mediumaquamarine","lightseagreen","teal","mediumseagreen","seagreen","darkseagreen",
"yellowgreen","olive","olivedrab",
"forestgreen","green","darkgreen""darkolivegreen",
"lightslategray","slategray","darkslategray",
"gainsboro","lightgrey","silver","darkgray","gray","dimgray","black");

var sysColors = new Array("activeborder","activecaption","appworkspace","background","buttonface",
"buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext",
"inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext",
"scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window",
"windowframe","windowtext");

function writeRow(ar) {
  var cells = 15;
  var str = "";
  
  for (var i=0; i<ar.length; ) {
    str += "<tr>"
    for (var j=0; j<=cells && i<ar.length; j++) {
      str += "<td style='background-color: " + ar[i"; border: 1px outset " + ar[i";'>";
      str += "&nbsp;</td>\n";
      i++;
    }
    str += "</tr>\n";
  }
  return str;
}  
//-->
</script>
</head>
<body>

<table cellspacing="0" 
       cellpadding="0" 
       onmouseover="doOver()" 
       onmouseout="doOut()" 
       onclick="doClick()" 
       style="width: 180;">
  <tr>
    <td colspan="15" 
        style="font-family: verdana, helvetica; font-size: 9px; color: button-text; cursor: default; height: 15px;">
        <nobr>Named Colors:</nobr>
    </td>
</tr>
<script>
  document.write(writeRow(colors));
</script>
</table>
<table cellspacing="0" 
       cellpadding="0" 
       onmouseover="doOver()" 
       onmouseout="doOut()" 
       onclick="doClick()" 
       style="width: 180;">
<hr>
<script>
  document.write(writeRow(sysColors));
</script>
</table>
<hr>
<table>
  <tr>
    <td id="colorBox" style="border: 1px inset window;  width: 20; height: 20; font-size: 2px; cursor: default;">&nbsp;</td>
    <td id="colorName" style="border: 0; font-family: verdana, helvetica; font-size: 9px; color: button-text; cursor: default;">ColorName</td>
  </tr>
</table></body></html>
           
       
XsDhtmlEditor_0.95.zip( 134 k)
Related examples in the same category
1. Editor based on Javascript
2. Rich text
3. HTML Text Editing Component for hosting in Web Pages
4. Walter - A WYSIWYG HTML editor that runs purely on JavaScript
5. Text Editor in JavaScript: toolbar, Color picker, Bold style etc
6. Edit in place (Direct edit)
7. WebIEdit
8. Bitflux Editor Examples
w_w_w__.__j___av___a_2_s_.___co__m_ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.