@ -1,273 +0,0 @@
|
||||
.htmlarea { background: #fff; }
|
||||
.htmlarea td { margin:0;padding:0; }
|
||||
|
||||
.htmlarea .toolbarRow {
|
||||
width:1px;
|
||||
}
|
||||
|
||||
.htmlarea .toolbar {
|
||||
cursor: default;
|
||||
background: ButtonFace;
|
||||
padding: 3px;
|
||||
border: 1px solid;
|
||||
border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
|
||||
}
|
||||
.htmlarea .toolbar table { margin: 0; font-family: tahoma,verdana,sans-serif; font-size: 11px; }
|
||||
.htmlarea .toolbar img { border: none; vertical-align: top; }
|
||||
.htmlarea .toolbar .label { padding: 0px 3px; }
|
||||
|
||||
.htmlarea .toolbar .button {
|
||||
background: ButtonFace;
|
||||
color: ButtonText;
|
||||
border: 1px solid ButtonFace;
|
||||
padding: 1px;
|
||||
margin: 0px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
.htmlarea .toolbar a.button:hover {
|
||||
border: 1px solid;
|
||||
border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
|
||||
}
|
||||
.htmlarea .toolbar a.buttonDisabled:hover {
|
||||
border-color: ButtonFace;
|
||||
}
|
||||
.htmlarea .toolbar .buttonActive,
|
||||
.htmlarea .toolbar .buttonPressed
|
||||
{
|
||||
padding: 2px 0px 0px 2px;
|
||||
border: 1px solid;
|
||||
border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
|
||||
}
|
||||
.htmlarea .toolbar .buttonPressed {
|
||||
background: ButtonHighlight;
|
||||
}
|
||||
.htmlarea .toolbar .indicator {
|
||||
padding: 0px 3px;
|
||||
overflow: hidden;
|
||||
width: 20px;
|
||||
text-align: center;
|
||||
cursor: default;
|
||||
border: 1px solid ButtonShadow;
|
||||
}
|
||||
|
||||
.htmlarea .toolbar .buttonDisabled img {
|
||||
filter: gray() alpha(opacity = 25);
|
||||
-moz-opacity: 0.25;
|
||||
opacity: 0.25;
|
||||
}
|
||||
|
||||
.htmlarea .toolbar .separator {
|
||||
/*position: relative;*/
|
||||
margin:0 3px;
|
||||
border-left: 1px solid ButtonShadow;
|
||||
border-right: 1px solid ButtonHighlight;
|
||||
width: 0px;
|
||||
height: 18px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.htmlarea .toolbar .space { width: 5px; }
|
||||
|
||||
.htmlarea .toolbar select, .htmlarea .toolbar option { font: 11px Tahoma,Verdana,sans-serif;}
|
||||
|
||||
.htmlarea .toolbar select,
|
||||
.htmlarea .toolbar select:hover,
|
||||
.htmlarea .toolbar select:active {
|
||||
position:relative;
|
||||
top:-2px;
|
||||
margin-bottom:-2px;
|
||||
color: ButtonText;
|
||||
}
|
||||
|
||||
.htmlarea iframe.xinha_iframe, .htmlarea textarea.xinha_textarea
|
||||
{
|
||||
border: none; /*1px solid;*/
|
||||
}
|
||||
|
||||
.htmlarea .statusBar {
|
||||
border: 1px solid;
|
||||
border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
|
||||
padding: 2px 4px;
|
||||
background-color: ButtonFace;
|
||||
color: ButtonText;
|
||||
font: 11px Tahoma,Verdana,sans-serif;
|
||||
height:16px;
|
||||
}
|
||||
|
||||
.htmlarea .statusBar .statusBarTree a {
|
||||
padding: 2px 5px;
|
||||
color: #00f;
|
||||
}
|
||||
|
||||
.htmlarea .statusBar .statusBarTree a:visited { color: #00f; }
|
||||
.htmlarea .statusBar .statusBarTree a:hover {
|
||||
background-color: Highlight;
|
||||
color: HighlightText;
|
||||
padding: 1px 4px;
|
||||
border: 1px solid HighlightText;
|
||||
}
|
||||
|
||||
|
||||
/* popup dialogs */
|
||||
|
||||
.dialog {
|
||||
color: ButtonText;
|
||||
background: ButtonFace;
|
||||
}
|
||||
|
||||
.dialog .content { padding: 2px; }
|
||||
|
||||
.dialog, .dialog button, .dialog input, .dialog select, .dialog textarea, .dialog table {
|
||||
font: 11px Tahoma,Verdana,sans-serif;
|
||||
}
|
||||
|
||||
.dialog table { border-collapse: collapse; }
|
||||
|
||||
.dialog .title, .dialog h1
|
||||
{
|
||||
background: #008;
|
||||
color: #ff8;
|
||||
border-bottom: 1px solid #000;
|
||||
padding: 1px 0px 2px 5px;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
cursor: default;
|
||||
}
|
||||
.dialog h1 { margin:0px;}
|
||||
.dialog .title .button {
|
||||
float: right;
|
||||
border: 1px solid #66a;
|
||||
padding: 0px 1px 0px 2px;
|
||||
margin-right: 1px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dialog .title .button-hilite { border-color: #88f; background: #44c; }
|
||||
|
||||
.dialog button {
|
||||
width: 5em;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.dialog .buttonColor {
|
||||
width :1em;
|
||||
padding: 1px;
|
||||
cursor: default;
|
||||
border: 1px solid;
|
||||
border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
|
||||
}
|
||||
|
||||
.dialog .buttonColor .chooser, .dialog .buttonColor .nocolor {
|
||||
height: 0.6em;
|
||||
border: 1px solid;
|
||||
padding: 0px 1em;
|
||||
border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
|
||||
}
|
||||
|
||||
.dialog .buttonClick {
|
||||
border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
|
||||
}
|
||||
.dialog .buttonColor-hilite {
|
||||
border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
|
||||
}
|
||||
|
||||
.dialog .buttonColor .nocolor { padding: 0px; }
|
||||
.dialog .buttonColor .nocolor-hilite { background-color: #fff; color: #f00; }
|
||||
|
||||
.dialog .label { text-align: right; width: 6em; }
|
||||
.dialog .value input { width: 100%; }
|
||||
.dialog .buttons { text-align: right; padding: 2px 4px 0px 4px; }
|
||||
|
||||
.dialog legend { font-weight: bold; }
|
||||
.dialog fieldset table { margin: 2px 0px; }
|
||||
|
||||
.popupwin {
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.popupwin .title {
|
||||
background: #fff;
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
font-size: 120%;
|
||||
padding: 3px 10px;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px solid black;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
|
||||
form { margin: 0px; border: none; }
|
||||
|
||||
|
||||
/** Panels **/
|
||||
.htmlarea .panels.top
|
||||
{
|
||||
border-bottom : 1px solid;
|
||||
border-color: ButtonShadow;
|
||||
}
|
||||
|
||||
.htmlarea .panels.right
|
||||
{
|
||||
border-left : 1px solid;
|
||||
border-color: ButtonShadow;
|
||||
}
|
||||
|
||||
.htmlarea .panels.left
|
||||
{
|
||||
border-right : 1px solid;
|
||||
border-color: ButtonShadow;
|
||||
}
|
||||
|
||||
.htmlarea .panels.bottom
|
||||
{
|
||||
border-top : 1px solid;
|
||||
border-color: ButtonShadow;
|
||||
}
|
||||
|
||||
.htmlarea .panel h1 {
|
||||
background: ButtonFace;
|
||||
border: 1px solid;
|
||||
border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
font-size:100%;
|
||||
font-weight:bold;
|
||||
padding: 2px;
|
||||
clear:left;
|
||||
|
||||
}
|
||||
|
||||
.htmlarea .panel { overflow:hidden; }
|
||||
.htmlarea .panels.left .panel { border-right:none; border-left:none; }
|
||||
.htmlarea .panels.left h1 { border-right:none; }
|
||||
.htmlarea .panels.right .panel { border-right:none; border-left:none; }
|
||||
.htmlarea .panels.left h1 { border-left:none; }
|
||||
.htmlarea { border: 1px solid black; }
|
||||
|
||||
.loading
|
||||
{
|
||||
font-family:sans-serif;
|
||||
position:absolute;
|
||||
z-index:998;
|
||||
text-align:center;
|
||||
width:212px;
|
||||
padding: 55px 0 5px 0;
|
||||
border:2px solid #ccc;
|
||||
/* border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;*/
|
||||
background: url(images/xinha_logo.gif) no-repeat #fff center 5px;
|
||||
}
|
||||
.loading_main
|
||||
{
|
||||
font-size:11px;
|
||||
color:#000;
|
||||
|
||||
}
|
||||
.loading_sub
|
||||
{
|
||||
font-size:9px;
|
||||
color:#666;
|
||||
text-align:center;
|
||||
}
|
@ -1,173 +0,0 @@
|
||||
/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */
|
||||
/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */
|
||||
/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/XinhaLoader.js */
|
||||
var Xinha={};
|
||||
_editor_url=_editor_url.replace(/\x2f*$/,"/");
|
||||
Xinha.agt=navigator.userAgent.toLowerCase();
|
||||
Xinha.is_ie=((Xinha.agt.indexOf("msie")!=-1)&&(Xinha.agt.indexOf("opera")==-1));
|
||||
Xinha.ie_version=parseFloat(Xinha.agt.substring(Xinha.agt.indexOf("msie")+5));
|
||||
Xinha.is_opera=(Xinha.agt.indexOf("opera")!=-1);
|
||||
Xinha.is_khtml=(Xinha.agt.indexOf("khtml")!=-1);
|
||||
Xinha.is_webkit=(Xinha.agt.indexOf("applewebkit")!=-1);
|
||||
Xinha.is_safari=(Xinha.agt.indexOf("safari")!=-1);
|
||||
Xinha.opera_version=navigator.appVersion.substring(0,navigator.appVersion.indexOf(" "))*1;
|
||||
Xinha.is_mac=(Xinha.agt.indexOf("mac")!=-1);
|
||||
Xinha.is_mac_ie=(Xinha.is_ie&&Xinha.is_mac);
|
||||
Xinha.is_win_ie=(Xinha.is_ie&&!Xinha.is_mac);
|
||||
Xinha.is_gecko=(navigator.product=="Gecko"&&!Xinha.is_safari);
|
||||
Xinha.isRunLocally=document.URL.toLowerCase().search(/^file:/)!=-1;
|
||||
Xinha.is_designMode=(typeof document.designMode!="undefined"&&!Xinha.is_ie);
|
||||
Xinha.isSupportedBrowser=Xinha.is_gecko||(Xinha.is_opera&&Xinha.opera_version>=9.1)||Xinha.ie_version>=5.5||Xinha.is_safari;
|
||||
Xinha.loadPlugins=function(_1,_2){
|
||||
if(!Xinha.isSupportedBrowser){
|
||||
return;
|
||||
}
|
||||
Xinha.loadStyle(typeof _editor_css=="string"?_editor_css:"Xinha.css","XinhaCoreDesign");
|
||||
Xinha.createLoadingMessages(xinha_editors);
|
||||
var _3=Xinha.loadingMessages;
|
||||
Xinha._loadback(_editor_url+"XinhaCore.js",function(){
|
||||
Xinha.removeLoadingMessages(xinha_editors);
|
||||
Xinha.createLoadingMessages(xinha_editors);
|
||||
_2();
|
||||
});
|
||||
return false;
|
||||
};
|
||||
Xinha._loadback=function(_4,_5,_6,_7){
|
||||
var T=!Xinha.is_ie?"onload":"onreadystatechange";
|
||||
var S=document.createElement("script");
|
||||
S.type="text/javascript";
|
||||
S.src=_4;
|
||||
if(_5){
|
||||
S[T]=function(){
|
||||
if(Xinha.is_ie&&(!(/loaded|complete/.test(window.event.srcElement.readyState)))){
|
||||
return;
|
||||
}
|
||||
_5.call(_6?_6:this,_7);
|
||||
S[T]=null;
|
||||
};
|
||||
}
|
||||
document.getElementsByTagName("head")[0].appendChild(S);
|
||||
};
|
||||
Xinha.getElementTopLeft=function(_a){
|
||||
var _b=curtop=0;
|
||||
if(_a.offsetParent){
|
||||
_b=_a.offsetLeft;
|
||||
curtop=_a.offsetTop;
|
||||
while(_a=_a.offsetParent){
|
||||
_b+=_a.offsetLeft;
|
||||
curtop+=_a.offsetTop;
|
||||
}
|
||||
}
|
||||
return {top:curtop,left:_b};
|
||||
};
|
||||
Xinha.findPosX=function(_c){
|
||||
var _d=0;
|
||||
if(_c.offsetParent){
|
||||
return Xinha.getElementTopLeft(_c).left;
|
||||
}else{
|
||||
if(_c.x){
|
||||
_d+=_c.x;
|
||||
}
|
||||
}
|
||||
return _d;
|
||||
};
|
||||
Xinha.findPosY=function(_e){
|
||||
var _f=0;
|
||||
if(_e.offsetParent){
|
||||
return Xinha.getElementTopLeft(_e).top;
|
||||
}else{
|
||||
if(_e.y){
|
||||
_f+=_e.y;
|
||||
}
|
||||
}
|
||||
return _f;
|
||||
};
|
||||
Xinha.createLoadingMessages=function(_10){
|
||||
if(Xinha.loadingMessages||!Xinha.isSupportedBrowser){
|
||||
return;
|
||||
}
|
||||
Xinha.loadingMessages=[];
|
||||
for(var i=0;i<_10.length;i++){
|
||||
if(!document.getElementById(_10[i])){
|
||||
continue;
|
||||
}
|
||||
Xinha.loadingMessages.push(Xinha.createLoadingMessage(document.getElementById(_10[i])));
|
||||
}
|
||||
};
|
||||
Xinha.createLoadingMessage=function(_12,_13){
|
||||
if(document.getElementById("loading_"+_12.id)||!Xinha.isSupportedBrowser){
|
||||
return;
|
||||
}
|
||||
var _14=document.createElement("div");
|
||||
_14.id="loading_"+_12.id;
|
||||
_14.className="loading";
|
||||
_14.style.left=(Xinha.findPosX(_12)+_12.offsetWidth/2)-106+"px";
|
||||
_14.style.top=(Xinha.findPosY(_12)+_12.offsetHeight/2)-50+"px";
|
||||
var _15=document.createElement("div");
|
||||
_15.className="loading_main";
|
||||
_15.id="loading_main_"+_12.id;
|
||||
_15.appendChild(document.createTextNode(Xinha._lc("Loading in progress. Please wait!")));
|
||||
var _16=document.createElement("div");
|
||||
_16.className="loading_sub";
|
||||
_16.id="loading_sub_"+_12.id;
|
||||
_13=_13?_13:Xinha._lc("Loading Core");
|
||||
_16.appendChild(document.createTextNode(_13));
|
||||
_14.appendChild(_15);
|
||||
_14.appendChild(_16);
|
||||
document.body.appendChild(_14);
|
||||
return _16;
|
||||
};
|
||||
Xinha.loadStyle=function(_17,id){
|
||||
var url=_editor_url||"";
|
||||
url+=_17;
|
||||
var _1a=document.getElementsByTagName("head")[0];
|
||||
var _1b=document.createElement("link");
|
||||
_1b.rel="stylesheet";
|
||||
_1b.href=url;
|
||||
if(id){
|
||||
_1b.id=id;
|
||||
}
|
||||
_1a.appendChild(_1b);
|
||||
};
|
||||
Xinha._lc=function(_1c){
|
||||
return _1c;
|
||||
};
|
||||
Xinha._addEvent=function(el,_1e,_1f){
|
||||
if(document.addEventListener){
|
||||
el.addEventListener(_1e,_1f,true);
|
||||
}else{
|
||||
el.attachEvent("on"+_1e,_1f);
|
||||
}
|
||||
};
|
||||
Xinha.addOnloadHandler=function(_20){
|
||||
var _21=function(){
|
||||
if(arguments.callee.done){
|
||||
return;
|
||||
}
|
||||
arguments.callee.done=true;
|
||||
if(Xinha.onloadTimer){
|
||||
clearInterval(Xinha.onloadTimer);
|
||||
}
|
||||
_20.call();
|
||||
};
|
||||
if(Xinha.is_ie){
|
||||
document.write("<sc"+"ript id=__ie_onload defer src=javascript:void(0)></script>");
|
||||
var _22=document.getElementById("__ie_onload");
|
||||
_22.onreadystatechange=function(){
|
||||
if(this.readyState=="loaded"){
|
||||
_21();
|
||||
}
|
||||
};
|
||||
}else{
|
||||
if(/WebKit/i.test(navigator.userAgent)){
|
||||
Xinha.onloadTimer=setInterval(function(){
|
||||
if(/loaded|complete/.test(document.readyState)){
|
||||
_21();
|
||||
}
|
||||
},10);
|
||||
}else{
|
||||
document.addEventListener("DOMContentLoaded",_21,false);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1,5 +0,0 @@
|
||||
The XinhaLoader is a subset of Xinha only containing functions to fetch further files from the server and displaying a loading message.
|
||||
It gives visual feedback to the user quite quickly so they don't have to watch the plain textarea and wonder if anything is happening.
|
||||
|
||||
Usage in short: Follow the NewbieGuide, but load XinhaLoader.js instead of XinhaCore.js.
|
||||
Make shure you define xinha_editors before calling Xinha.loadPlugins! This is different to earlier versions of the NewbieGuide (steps 1 and 2 reversed)
|
@ -1,140 +0,0 @@
|
||||
|
||||
/**
|
||||
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* This file was added automatically by CKEditor builder.
|
||||
* You may re-use it at any time at http://ckeditor.com/builder to build CKEditor again.
|
||||
*
|
||||
* NOTE:
|
||||
* This file is not used by CKEditor, you may remove it.
|
||||
* Changing this file will not change your CKEditor configuration.
|
||||
*/
|
||||
|
||||
var CKBUILDER_CONFIG = {
|
||||
skin: 'moono',
|
||||
preset: 'standard',
|
||||
ignore: [
|
||||
'dev',
|
||||
'.gitignore',
|
||||
'.gitattributes',
|
||||
'README.md',
|
||||
'.mailmap'
|
||||
],
|
||||
plugins : {
|
||||
'about' : 1,
|
||||
'a11yhelp' : 1,
|
||||
'basicstyles' : 1,
|
||||
'blockquote' : 1,
|
||||
'clipboard' : 1,
|
||||
'contextmenu' : 1,
|
||||
'resize' : 1,
|
||||
'toolbar' : 1,
|
||||
'elementspath' : 1,
|
||||
'enterkey' : 1,
|
||||
'entities' : 1,
|
||||
'filebrowser' : 1,
|
||||
'floatingspace' : 1,
|
||||
'format' : 1,
|
||||
'htmlwriter' : 1,
|
||||
'horizontalrule' : 1,
|
||||
'wysiwygarea' : 1,
|
||||
'image' : 1,
|
||||
'indent' : 1,
|
||||
'link' : 1,
|
||||
'list' : 1,
|
||||
'magicline' : 1,
|
||||
'maximize' : 1,
|
||||
'pastetext' : 1,
|
||||
'pastefromword' : 1,
|
||||
'removeformat' : 1,
|
||||
'sourcearea' : 1,
|
||||
'specialchar' : 1,
|
||||
'scayt' : 1,
|
||||
'stylescombo' : 1,
|
||||
'tab' : 1,
|
||||
'table' : 1,
|
||||
'tabletools' : 1,
|
||||
'undo' : 1,
|
||||
'wsc' : 1,
|
||||
'dialog' : 1,
|
||||
'dialogui' : 1,
|
||||
'menu' : 1,
|
||||
'floatpanel' : 1,
|
||||
'panel' : 1,
|
||||
'button' : 1,
|
||||
'popup' : 1,
|
||||
'richcombo' : 1,
|
||||
'listblock' : 1,
|
||||
'fakeobjects' : 1,
|
||||
'menubutton' : 1
|
||||
},
|
||||
languages : {
|
||||
'af' : 1,
|
||||
'sq' : 1,
|
||||
'ar' : 1,
|
||||
'eu' : 1,
|
||||
'bn' : 1,
|
||||
'bs' : 1,
|
||||
'bg' : 1,
|
||||
'ca' : 1,
|
||||
'zh-cn' : 1,
|
||||
'zh' : 1,
|
||||
'hr' : 1,
|
||||
'cs' : 1,
|
||||
'da' : 1,
|
||||
'nl' : 1,
|
||||
'en' : 1,
|
||||
'en-au' : 1,
|
||||
'en-ca' : 1,
|
||||
'en-gb' : 1,
|
||||
'eo' : 1,
|
||||
'et' : 1,
|
||||
'fo' : 1,
|
||||
'fi' : 1,
|
||||
'fr' : 1,
|
||||
'fr-ca' : 1,
|
||||
'gl' : 1,
|
||||
'ka' : 1,
|
||||
'de' : 1,
|
||||
'el' : 1,
|
||||
'gu' : 1,
|
||||
'he' : 1,
|
||||
'hi' : 1,
|
||||
'hu' : 1,
|
||||
'is' : 1,
|
||||
'it' : 1,
|
||||
'ja' : 1,
|
||||
'km' : 1,
|
||||
'ko' : 1,
|
||||
'ku' : 1,
|
||||
'lv' : 1,
|
||||
'lt' : 1,
|
||||
'mk' : 1,
|
||||
'ms' : 1,
|
||||
'mn' : 1,
|
||||
'no' : 1,
|
||||
'nb' : 1,
|
||||
'fa' : 1,
|
||||
'pl' : 1,
|
||||
'pt-br' : 1,
|
||||
'pt' : 1,
|
||||
'ro' : 1,
|
||||
'ru' : 1,
|
||||
'sr' : 1,
|
||||
'sr-latn' : 1,
|
||||
'si' : 1,
|
||||
'sk' : 1,
|
||||
'sl' : 1,
|
||||
'es' : 1,
|
||||
'sv' : 1,
|
||||
'th' : 1,
|
||||
'tr' : 1,
|
||||
'ug' : 1,
|
||||
'uk' : 1,
|
||||
'vi' : 1,
|
||||
'cy' : 1,
|
||||
}
|
||||
};
|
@ -1,82 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Ajax — CKEditor Sample</title>
|
||||
<meta charset="utf-8">
|
||||
<script src="../ckeditor.js"></script>
|
||||
<link rel="stylesheet" href="sample.css">
|
||||
<script>
|
||||
|
||||
var editor, html = '';
|
||||
|
||||
function createEditor() {
|
||||
if ( editor )
|
||||
return;
|
||||
|
||||
// Create a new editor inside the <div id="editor">, setting its value to html
|
||||
var config = {};
|
||||
editor = CKEDITOR.appendTo( 'editor', config, html );
|
||||
}
|
||||
|
||||
function removeEditor() {
|
||||
if ( !editor )
|
||||
return;
|
||||
|
||||
// Retrieve the editor contents. In an Ajax application, this data would be
|
||||
// sent to the server or used in any other way.
|
||||
document.getElementById( 'editorcontents' ).innerHTML = html = editor.getData();
|
||||
document.getElementById( 'contents' ).style.display = '';
|
||||
|
||||
// Destroy the editor.
|
||||
editor.destroy();
|
||||
editor = null;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="index.html">CKEditor Samples</a> » Create and Destroy Editor Instances for Ajax Applications
|
||||
</h1>
|
||||
<div class="description">
|
||||
<p>
|
||||
This sample shows how to create and destroy CKEditor instances on the fly. After the removal of CKEditor the content created inside the editing
|
||||
area will be displayed in a <code><div></code> element.
|
||||
</p>
|
||||
<p>
|
||||
For details of how to create this setup check the source code of this sample page
|
||||
for JavaScript code responsible for the creation and destruction of a CKEditor instance.
|
||||
</p>
|
||||
</div>
|
||||
<p>Click the buttons to create and remove a CKEditor instance.</p>
|
||||
<p>
|
||||
<input onclick="createEditor();" type="button" value="Create Editor">
|
||||
<input onclick="removeEditor();" type="button" value="Remove Editor">
|
||||
</p>
|
||||
<!-- This div will hold the editor. -->
|
||||
<div id="editor">
|
||||
</div>
|
||||
<div id="contents" style="display: none">
|
||||
<p>
|
||||
Edited Contents:
|
||||
</p>
|
||||
<!-- This div will be used to display the editor contents. -->
|
||||
<div id="editorcontents">
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,207 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>API Usage — CKEditor Sample</title>
|
||||
<script src="../ckeditor.js"></script>
|
||||
<link href="sample.css" rel="stylesheet">
|
||||
<script>
|
||||
|
||||
// The instanceReady event is fired, when an instance of CKEditor has finished
|
||||
// its initialization.
|
||||
CKEDITOR.on( 'instanceReady', function( ev ) {
|
||||
// Show the editor name and description in the browser status bar.
|
||||
document.getElementById( 'eMessage' ).innerHTML = 'Instance <code>' + ev.editor.name + '<\/code> loaded.';
|
||||
|
||||
// Show this sample buttons.
|
||||
document.getElementById( 'eButtons' ).style.display = 'block';
|
||||
});
|
||||
|
||||
function InsertHTML() {
|
||||
// Get the editor instance that we want to interact with.
|
||||
var editor = CKEDITOR.instances.editor1;
|
||||
var value = document.getElementById( 'htmlArea' ).value;
|
||||
|
||||
// Check the active editing mode.
|
||||
if ( editor.mode == 'wysiwyg' )
|
||||
{
|
||||
// Insert HTML code.
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertHtml
|
||||
editor.insertHtml( value );
|
||||
}
|
||||
else
|
||||
alert( 'You must be in WYSIWYG mode!' );
|
||||
}
|
||||
|
||||
function InsertText() {
|
||||
// Get the editor instance that we want to interact with.
|
||||
var editor = CKEDITOR.instances.editor1;
|
||||
var value = document.getElementById( 'txtArea' ).value;
|
||||
|
||||
// Check the active editing mode.
|
||||
if ( editor.mode == 'wysiwyg' )
|
||||
{
|
||||
// Insert as plain text.
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertText
|
||||
editor.insertText( value );
|
||||
}
|
||||
else
|
||||
alert( 'You must be in WYSIWYG mode!' );
|
||||
}
|
||||
|
||||
function SetContents() {
|
||||
// Get the editor instance that we want to interact with.
|
||||
var editor = CKEDITOR.instances.editor1;
|
||||
var value = document.getElementById( 'htmlArea' ).value;
|
||||
|
||||
// Set editor contents (replace current contents).
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setData
|
||||
editor.setData( value );
|
||||
}
|
||||
|
||||
function GetContents() {
|
||||
// Get the editor instance that you want to interact with.
|
||||
var editor = CKEDITOR.instances.editor1;
|
||||
|
||||
// Get editor contents
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-getData
|
||||
alert( editor.getData() );
|
||||
}
|
||||
|
||||
function ExecuteCommand( commandName ) {
|
||||
// Get the editor instance that we want to interact with.
|
||||
var editor = CKEDITOR.instances.editor1;
|
||||
|
||||
// Check the active editing mode.
|
||||
if ( editor.mode == 'wysiwyg' )
|
||||
{
|
||||
// Execute the command.
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-execCommand
|
||||
editor.execCommand( commandName );
|
||||
}
|
||||
else
|
||||
alert( 'You must be in WYSIWYG mode!' );
|
||||
}
|
||||
|
||||
function CheckDirty() {
|
||||
// Get the editor instance that we want to interact with.
|
||||
var editor = CKEDITOR.instances.editor1;
|
||||
// Checks whether the current editor contents present changes when compared
|
||||
// to the contents loaded into the editor at startup
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-checkDirty
|
||||
alert( editor.checkDirty() );
|
||||
}
|
||||
|
||||
function ResetDirty() {
|
||||
// Get the editor instance that we want to interact with.
|
||||
var editor = CKEDITOR.instances.editor1;
|
||||
// Resets the "dirty state" of the editor (see CheckDirty())
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-resetDirty
|
||||
editor.resetDirty();
|
||||
alert( 'The "IsDirty" status has been reset' );
|
||||
}
|
||||
|
||||
function Focus() {
|
||||
CKEDITOR.instances.editor1.focus();
|
||||
}
|
||||
|
||||
function onFocus() {
|
||||
document.getElementById( 'eMessage' ).innerHTML = '<b>' + this.name + ' is focused </b>';
|
||||
}
|
||||
|
||||
function onBlur() {
|
||||
document.getElementById( 'eMessage' ).innerHTML = this.name + ' lost focus';
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="index.html">CKEditor Samples</a> » Using CKEditor JavaScript API
|
||||
</h1>
|
||||
<div class="description">
|
||||
<p>
|
||||
This sample shows how to use the
|
||||
<a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.editor">CKEditor JavaScript API</a>
|
||||
to interact with the editor at runtime.
|
||||
</p>
|
||||
<p>
|
||||
For details on how to create this setup check the source code of this sample page.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- This <div> holds alert messages to be display in the sample page. -->
|
||||
<div id="alerts">
|
||||
<noscript>
|
||||
<p>
|
||||
<strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
|
||||
support, like yours, you should still see the contents (HTML data) and you should
|
||||
be able to edit it normally, without a rich editor interface.
|
||||
</p>
|
||||
</noscript>
|
||||
</div>
|
||||
<form action="../../../samples/sample_posteddata.php" method="post">
|
||||
<textarea cols="100" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
|
||||
<script>
|
||||
// Replace the <textarea id="editor1"> with an CKEditor instance.
|
||||
CKEDITOR.replace( 'editor1', {
|
||||
on: {
|
||||
focus: onFocus,
|
||||
blur: onBlur,
|
||||
|
||||
// Check for availability of corresponding plugins.
|
||||
pluginsLoaded: function( evt ) {
|
||||
var doc = CKEDITOR.document, ed = evt.editor;
|
||||
if ( !ed.getCommand( 'bold' ) )
|
||||
doc.getById( 'exec-bold' ).hide();
|
||||
if ( !ed.getCommand( 'link' ) )
|
||||
doc.getById( 'exec-link' ).hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<p id="eMessage">
|
||||
</p>
|
||||
|
||||
<div id="eButtons" style="display: none">
|
||||
<input id="exec-bold" onclick="ExecuteCommand('bold');" type="button" value="Execute "bold" Command">
|
||||
<input id="exec-link" onclick="ExecuteCommand('link');" type="button" value="Execute "link" Command">
|
||||
<input onclick="Focus();" type="button" value="Focus">
|
||||
<br><br>
|
||||
<input onclick="InsertHTML();" type="button" value="Insert HTML">
|
||||
<input onclick="SetContents();" type="button" value="Set Editor Contents">
|
||||
<input onclick="GetContents();" type="button" value="Get Editor Contents (XHTML)">
|
||||
<br>
|
||||
<textarea cols="100" id="htmlArea" rows="3"><h2>Test</h2><p>This is some <a href="/Test1.html">sample</a> HTML code.</p></textarea>
|
||||
<br>
|
||||
<br>
|
||||
<input onclick="InsertText();" type="button" value="Insert Text">
|
||||
<br>
|
||||
<textarea cols="100" id="txtArea" rows="3"> First line with some leading whitespaces.
|
||||
|
||||
Second line of text preceded by two line breaks.</textarea>
|
||||
<br>
|
||||
<br>
|
||||
<input onclick="CheckDirty();" type="button" value="checkDirty()">
|
||||
<input onclick="ResetDirty();" type="button" value="resetDirty()">
|
||||
</div>
|
||||
</form>
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,57 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>CKEDITOR.appendTo — CKEditor Sample</title>
|
||||
<meta charset="utf-8">
|
||||
<script src="../ckeditor.js"></script>
|
||||
<link rel="stylesheet" href="sample.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="index.html">CKEditor Samples</a> » Append To Page Element Using JavaScript Code
|
||||
</h1>
|
||||
<div id="section1">
|
||||
<div class="description">
|
||||
<p>
|
||||
<code>CKEDITOR.appendTo</code> is basically to place editors
|
||||
inside existing DOM elements. Unlike <code>CKEDITOR.replace</code>,
|
||||
a target container to be replaced is no longer necessary. A new editor
|
||||
instance is inserted directly wherever it is desired.
|
||||
</p>
|
||||
<pre class="samples">CKEDITOR.appendTo( '<em>container_id</em>',
|
||||
{ /* Configuration options to be used. */ }
|
||||
'Editor content to be used.'
|
||||
);</pre>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
// This call can be placed at any point after the
|
||||
// <textarea>, or inside a <head><script> in a
|
||||
// window.onload event handler.
|
||||
|
||||
// Replace the <textarea id="editor"> with an CKEditor
|
||||
// instance, using default configurations.
|
||||
CKEDITOR.appendTo( 'section1',
|
||||
null,
|
||||
'<p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>'
|
||||
);
|
||||
|
||||
</script>
|
||||
</div>
|
||||
<br>
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Before Width: | Height: | Size: 4.3 KiB |
@ -1,204 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*
|
||||
* Styles used by the XHTML 1.1 sample page (xhtml.html).
|
||||
*/
|
||||
|
||||
/**
|
||||
* Basic definitions for the editing area.
|
||||
*/
|
||||
body
|
||||
{
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
font-size: 80%;
|
||||
color: #000000;
|
||||
background-color: #ffffff;
|
||||
padding: 5px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Core styles.
|
||||
*/
|
||||
|
||||
.Bold
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.Italic
|
||||
{
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.Underline
|
||||
{
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.StrikeThrough
|
||||
{
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.Subscript
|
||||
{
|
||||
vertical-align: sub;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.Superscript
|
||||
{
|
||||
vertical-align: super;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
/**
|
||||
* Font faces.
|
||||
*/
|
||||
|
||||
.FontComic
|
||||
{
|
||||
font-family: 'Comic Sans MS';
|
||||
}
|
||||
|
||||
.FontCourier
|
||||
{
|
||||
font-family: 'Courier New';
|
||||
}
|
||||
|
||||
.FontTimes
|
||||
{
|
||||
font-family: 'Times New Roman';
|
||||
}
|
||||
|
||||
/**
|
||||
* Font sizes.
|
||||
*/
|
||||
|
||||
.FontSmaller
|
||||
{
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.FontLarger
|
||||
{
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
.FontSmall
|
||||
{
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
.FontBig
|
||||
{
|
||||
font-size: 14pt;
|
||||
}
|
||||
|
||||
.FontDouble
|
||||
{
|
||||
font-size: 200%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Font colors.
|
||||
*/
|
||||
.FontColor1
|
||||
{
|
||||
color: #ff9900;
|
||||
}
|
||||
|
||||
.FontColor2
|
||||
{
|
||||
color: #0066cc;
|
||||
}
|
||||
|
||||
.FontColor3
|
||||
{
|
||||
color: #ff0000;
|
||||
}
|
||||
|
||||
.FontColor1BG
|
||||
{
|
||||
background-color: #ff9900;
|
||||
}
|
||||
|
||||
.FontColor2BG
|
||||
{
|
||||
background-color: #0066cc;
|
||||
}
|
||||
|
||||
.FontColor3BG
|
||||
{
|
||||
background-color: #ff0000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indentation.
|
||||
*/
|
||||
|
||||
.Indent1
|
||||
{
|
||||
margin-left: 40px;
|
||||
}
|
||||
|
||||
.Indent2
|
||||
{
|
||||
margin-left: 80px;
|
||||
}
|
||||
|
||||
.Indent3
|
||||
{
|
||||
margin-left: 120px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Alignment.
|
||||
*/
|
||||
|
||||
.JustifyLeft
|
||||
{
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.JustifyRight
|
||||
{
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.JustifyCenter
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.JustifyFull
|
||||
{
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
/**
|
||||
* Other.
|
||||
*/
|
||||
|
||||
code
|
||||
{
|
||||
font-family: courier, monospace;
|
||||
background-color: #eeeeee;
|
||||
padding-left: 1px;
|
||||
padding-right: 1px;
|
||||
border: #c0c0c0 1px solid;
|
||||
}
|
||||
|
||||
kbd
|
||||
{
|
||||
padding: 0px 1px 0px 1px;
|
||||
border-width: 1px 2px 2px 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
blockquote
|
||||
{
|
||||
color: #808080;
|
||||
}
|
@ -1,59 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<?php
|
||||
/*
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Sample — CKEditor</title>
|
||||
<link rel="stylesheet" href="sample.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
CKEditor — Posted Data
|
||||
</h1>
|
||||
<table border="1" cellspacing="0" id="outputSample">
|
||||
<colgroup><col width="120"></colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field Name</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
|
||||
if (!empty($_POST))
|
||||
{
|
||||
foreach ( $_POST as $key => $value )
|
||||
{
|
||||
if ( ( !is_string($value) && !is_numeric($value) ) || !is_string($key) )
|
||||
continue;
|
||||
|
||||
if ( get_magic_quotes_gpc() )
|
||||
$value = htmlspecialchars( stripslashes((string)$value) );
|
||||
else
|
||||
$value = htmlspecialchars( (string)$value );
|
||||
?>
|
||||
<tr>
|
||||
<th style="vertical-align: top"><?php echo htmlspecialchars( (string)$key ); ?></th>
|
||||
<td><pre class="samples"><?php echo $value; ?></pre></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,3 +0,0 @@
|
||||
/**
|
||||
* Required by tests (dom/document.html).
|
||||
*/
|
Before Width: | Height: | Size: 18 KiB |
@ -1,7 +0,0 @@
|
||||
/*
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
var CKEDITOR_LANGS=function(){var c={af:"Afrikaans",ar:"Arabic",bg:"Bulgarian",bn:"Bengali/Bangla",bs:"Bosnian",ca:"Catalan",cs:"Czech",cy:"Welsh",da:"Danish",de:"German",el:"Greek",en:"English","en-au":"English (Australia)","en-ca":"English (Canadian)","en-gb":"English (United Kingdom)",eo:"Esperanto",es:"Spanish",et:"Estonian",eu:"Basque",fa:"Persian",fi:"Finnish",fo:"Faroese",fr:"French","fr-ca":"French (Canada)",gl:"Galician",gu:"Gujarati",he:"Hebrew",hi:"Hindi",hr:"Croatian",hu:"Hungarian",is:"Icelandic",
|
||||
it:"Italian",ja:"Japanese",ka:"Georgian",km:"Khmer",ko:"Korean",ku:"Kurdish",lt:"Lithuanian",lv:"Latvian",mk:"Macedonian",mn:"Mongolian",ms:"Malay",nb:"Norwegian Bokmal",nl:"Dutch",no:"Norwegian",pl:"Polish",pt:"Portuguese (Portugal)","pt-br":"Portuguese (Brazil)",ro:"Romanian",ru:"Russian",si:"Sinhala",sk:"Slovak",sq:"Albanian",sl:"Slovenian",sr:"Serbian (Cyrillic)","sr-latn":"Serbian (Latin)",sv:"Swedish",th:"Thai",tr:"Turkish",ug:"Uighur",uk:"Ukrainian",vi:"Vietnamese",zh:"Chinese Traditional",
|
||||
"zh-cn":"Chinese Simplified"},b=[],a;for(a in CKEDITOR.lang.languages)b.push({code:a,name:c[a]||a});b.sort(function(a,b){return a.name<b.name?-1:1});return b}();
|
@ -1,141 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Replace DIV — CKEditor Sample</title>
|
||||
<meta charset="utf-8">
|
||||
<script src="../ckeditor.js"></script>
|
||||
<link href="sample.css" rel="stylesheet">
|
||||
<style>
|
||||
|
||||
div.editable
|
||||
{
|
||||
border: solid 2px Transparent;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
div.editable:hover
|
||||
{
|
||||
border-color: black;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script>
|
||||
|
||||
// Uncomment the following code to test the "Timeout Loading Method".
|
||||
// CKEDITOR.loadFullCoreTimeout = 5;
|
||||
|
||||
window.onload = function() {
|
||||
// Listen to the double click event.
|
||||
if ( window.addEventListener )
|
||||
document.body.addEventListener( 'dblclick', onDoubleClick, false );
|
||||
else if ( window.attachEvent )
|
||||
document.body.attachEvent( 'ondblclick', onDoubleClick );
|
||||
|
||||
};
|
||||
|
||||
function onDoubleClick( ev ) {
|
||||
// Get the element which fired the event. This is not necessarily the
|
||||
// element to which the event has been attached.
|
||||
var element = ev.target || ev.srcElement;
|
||||
|
||||
// Find out the div that holds this element.
|
||||
var name;
|
||||
|
||||
do {
|
||||
element = element.parentNode;
|
||||
}
|
||||
while ( element && ( name = element.nodeName.toLowerCase() ) &&
|
||||
( name != 'div' || element.className.indexOf( 'editable' ) == -1 ) && name != 'body' );
|
||||
|
||||
if ( name == 'div' && element.className.indexOf( 'editable' ) != -1 )
|
||||
replaceDiv( element );
|
||||
}
|
||||
|
||||
var editor;
|
||||
|
||||
function replaceDiv( div ) {
|
||||
if ( editor )
|
||||
editor.destroy();
|
||||
|
||||
editor = CKEDITOR.replace( div );
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="index.html">CKEditor Samples</a> » Replace DIV with CKEditor on the Fly
|
||||
</h1>
|
||||
<div class="description">
|
||||
<p>
|
||||
This sample shows how to automatically replace <code><div></code> elements
|
||||
with a CKEditor instance on the fly, following user's doubleclick. The content
|
||||
that was previously placed inside the <code><div></code> element will now
|
||||
be moved into CKEditor editing area.
|
||||
</p>
|
||||
<p>
|
||||
For details on how to create this setup check the source code of this sample page.
|
||||
</p>
|
||||
</div>
|
||||
<p>
|
||||
Double-click any of the following <code><div></code> elements to transform them into
|
||||
editor instances.
|
||||
</p>
|
||||
<div class="editable">
|
||||
<h3>
|
||||
Part 1
|
||||
</h3>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi
|
||||
semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna
|
||||
rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla
|
||||
nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce
|
||||
eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus.
|
||||
</p>
|
||||
</div>
|
||||
<div class="editable">
|
||||
<h3>
|
||||
Part 2
|
||||
</h3>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi
|
||||
semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna
|
||||
rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla
|
||||
nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce
|
||||
eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus.
|
||||
</p>
|
||||
<p>
|
||||
Donec velit. Mauris massa. Vestibulum non nulla. Nam suscipit arcu nec elit. Phasellus
|
||||
sollicitudin iaculis ante. Ut non mauris et sapien tincidunt adipiscing. Vestibulum
|
||||
vitae leo. Suspendisse nec mi tristique nulla laoreet vulputate.
|
||||
</p>
|
||||
</div>
|
||||
<div class="editable">
|
||||
<h3>
|
||||
Part 3
|
||||
</h3>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi
|
||||
semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna
|
||||
rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla
|
||||
nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce
|
||||
eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus.
|
||||
</p>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,122 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>CKEditor Samples</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="sample.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
CKEditor Samples
|
||||
</h1>
|
||||
<div class="twoColumns">
|
||||
<div class="twoColumnsLeft">
|
||||
<h2 class="samples">
|
||||
Basic Samples
|
||||
</h2>
|
||||
<dl class="samples">
|
||||
<dt><a class="samples" href="replacebyclass.html">Replace textarea elements by class name</a></dt>
|
||||
<dd>Automatic replacement of all textarea elements of a given class with a CKEditor instance.</dd>
|
||||
|
||||
<dt><a class="samples" href="replacebycode.html">Replace textarea elements by code</a></dt>
|
||||
<dd>Replacement of textarea elements with CKEditor instances by using a JavaScript call.</dd>
|
||||
</dl>
|
||||
|
||||
<h2 class="samples">
|
||||
Basic Customization
|
||||
</h2>
|
||||
<dl class="samples">
|
||||
<dt><a class="samples" href="uicolor.html">User Interface color</a></dt>
|
||||
<dd>Changing CKEditor User Interface color and adding a toolbar button that lets the user set the UI color.</dd>
|
||||
|
||||
<dt><a class="samples" href="uilanguages.html">User Interface languages</a></dt>
|
||||
<dd>Changing CKEditor User Interface language and adding a drop-down list that lets the user choose the UI language.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h2 class="samples">Plugins</h2>
|
||||
<dl class="samples">
|
||||
<dt><a class="samples" href="plugins/magicline/magicline.html">Magicline plugin</a><span class="new">New!</span></dt>
|
||||
<dd>Using the Magicline plugin to access difficult focus spaces.</dd>
|
||||
|
||||
<dt><a class="samples" href="plugins/wysiwygarea/fullpage.html">Full page support</a></dt>
|
||||
<dd>CKEditor inserted with a JavaScript call and used to edit the whole page from <html> to </html>.</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="twoColumnsRight">
|
||||
<h2 class="samples">
|
||||
Inline Editing <span class="new">New!</span>
|
||||
</h2>
|
||||
<dl class="samples">
|
||||
<dt><a class="samples" href="inlineall.html">Massive inline editor creation</a> <span class="new">New!</span></dt>
|
||||
<dd>Turn all elements with <code>contentEditable = true</code> attribute into inline editors.</dd>
|
||||
|
||||
<dt><a class="samples" href="inlinebycode.html">Convert element into an inline editor by code</a> <span class="new">New!</span></dt>
|
||||
<dd>Conversion of DOM elements into inline CKEditor instances by using a JavaScript call.</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
<h2 class="samples">
|
||||
Advanced Samples
|
||||
</h2>
|
||||
<dl class="samples">
|
||||
<dt><a class="samples" href="datafiltering.html">Data filtering and features activation</a> <span class="new">New!</span></dt>
|
||||
<dd>Data filtering and automatic features activation basing on configuration.</dd>
|
||||
|
||||
<dt><a class="samples" href="divreplace.html">Replace DIV elements on the fly</a></dt>
|
||||
<dd>Transforming a <code>div</code> element into an instance of CKEditor with a mouse click.</dd>
|
||||
|
||||
<dt><a class="samples" href="appendto.html">Append editor instances</a></dt>
|
||||
<dd>Appending editor instances to existing DOM elements.</dd>
|
||||
|
||||
<dt><a class="samples" href="ajax.html">Create and destroy editor instances for Ajax applications</a></dt>
|
||||
<dd>Creating and destroying CKEditor instances on the fly and saving the contents entered into the editor window.</dd>
|
||||
|
||||
<dt><a class="samples" href="api.html">Basic usage of the API</a></dt>
|
||||
<dd>Using the CKEditor JavaScript API to interact with the editor at runtime.</dd>
|
||||
|
||||
<dt><a class="samples" href="xhtmlstyle.html">XHTML-compliant style</a></dt>
|
||||
<dd>Configuring CKEditor to produce XHTML 1.1 compliant attributes and styles.</dd>
|
||||
|
||||
<dt><a class="samples" href="readonly.html">Read-only mode</a></dt>
|
||||
<dd>Using the readOnly API to block introducing changes to the editor contents.</dd>
|
||||
|
||||
<dt><a class="samples" href="tabindex.html">"Tab" key-based navigation</a> <span class="new">New!</span></dt>
|
||||
<dd>Navigating among editor instances with tab key.</dd>
|
||||
|
||||
|
||||
|
||||
<dt><a class="samples" href="plugins/dialog/dialog.html">Using the JavaScript API to customize dialog windows</a></dt>
|
||||
<dd>Using the dialog windows API to customize dialog windows without changing the original editor code.</dd>
|
||||
|
||||
<dt><a class="samples" href="plugins/enterkey/enterkey.html">Using the "Enter" key in CKEditor</a></dt>
|
||||
<dd>Configuring the behavior of <em>Enter</em> and <em>Shift+Enter</em> keys.</dd>
|
||||
|
||||
<dt><a class="samples" href="plugins/htmlwriter/outputforflash.html">Output for Flash</a></dt>
|
||||
<dd>Configuring CKEditor to produce HTML code that can be used with Adobe Flash.</dd>
|
||||
|
||||
<dt><a class="samples" href="plugins/htmlwriter/outputhtml.html">Output HTML</a></dt>
|
||||
<dd>Configuring CKEditor to produce legacy HTML 4 code.</dd>
|
||||
|
||||
<dt><a class="samples" href="plugins/toolbar/toolbar.html">Toolbar Configurations</a><span class="new">New!</span></dt>
|
||||
<dd>Configuring CKEditor to display full or custom toolbar layout.</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,311 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Massive inline editing — CKEditor Sample</title>
|
||||
<meta charset="utf-8">
|
||||
<script src="../ckeditor.js"></script>
|
||||
<script>
|
||||
|
||||
// This code is generally not necessary, but it is here to demonstrate
|
||||
// how to customize specific editor instances on the fly. This fits well
|
||||
// this demo because we have editable elements (like headers) that
|
||||
// require less features.
|
||||
|
||||
// The "instanceCreated" event is fired for every editor instance created.
|
||||
CKEDITOR.on( 'instanceCreated', function( event ) {
|
||||
var editor = event.editor,
|
||||
element = editor.element;
|
||||
|
||||
// Customize editors for headers and tag list.
|
||||
// These editors don't need features like smileys, templates, iframes etc.
|
||||
if ( element.is( 'h1', 'h2', 'h3' ) || element.getAttribute( 'id' ) == 'taglist' ) {
|
||||
// Customize the editor configurations on "configLoaded" event,
|
||||
// which is fired after the configuration file loading and
|
||||
// execution. This makes it possible to change the
|
||||
// configurations before the editor initialization takes place.
|
||||
editor.on( 'configLoaded', function() {
|
||||
|
||||
// Remove unnecessary plugins to make the editor simpler.
|
||||
editor.config.removePlugins = 'colorbutton,find,flash,font,' +
|
||||
'forms,iframe,image,newpage,removeformat,' +
|
||||
'smiley,specialchar,stylescombo,templates';
|
||||
|
||||
// Rearrange the layout of the toolbar.
|
||||
editor.config.toolbarGroups = [
|
||||
{ name: 'editing', groups: [ 'basicstyles', 'links' ] },
|
||||
{ name: 'undo' },
|
||||
{ name: 'clipboard', groups: [ 'selection', 'clipboard' ] },
|
||||
{ name: 'about' }
|
||||
];
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<link href="sample.css" rel="stylesheet">
|
||||
<style>
|
||||
|
||||
/* The following styles are just to make the page look nice. */
|
||||
|
||||
/* Workaround to show Arial Black in Firefox. */
|
||||
@font-face
|
||||
{
|
||||
font-family: 'arial-black';
|
||||
src: local('Arial Black');
|
||||
}
|
||||
|
||||
*[contenteditable="true"]
|
||||
{
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#container
|
||||
{
|
||||
width: 960px;
|
||||
margin: 30px auto 0;
|
||||
}
|
||||
|
||||
#header
|
||||
{
|
||||
overflow: hidden;
|
||||
padding: 0 0 30px;
|
||||
border-bottom: 5px solid #05B2D2;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#headerLeft,
|
||||
#headerRight
|
||||
{
|
||||
width: 49%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#headerLeft
|
||||
{
|
||||
float: left;
|
||||
padding: 10px 1px 1px;
|
||||
}
|
||||
|
||||
#headerLeft h2,
|
||||
#headerLeft h3
|
||||
{
|
||||
text-align: right;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
#headerLeft h2
|
||||
{
|
||||
font-family: "Arial Black",arial-black;
|
||||
font-size: 4.6em;
|
||||
line-height: 1.1em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
#headerLeft h3
|
||||
{
|
||||
font-size: 2.3em;
|
||||
line-height: 1.1em;
|
||||
margin: .2em 0 0;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
#headerRight
|
||||
{
|
||||
float: right;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
#headerRight p
|
||||
{
|
||||
line-height: 1.8em;
|
||||
text-align: justify;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#headerRight p + p
|
||||
{
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
#headerRight > div
|
||||
{
|
||||
padding: 20px;
|
||||
margin: 0 0 0 30px;
|
||||
font-size: 1.4em;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
#columns
|
||||
{
|
||||
color: #333;
|
||||
overflow: hidden;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
#columns > div
|
||||
{
|
||||
float: left;
|
||||
width: 33.3%;
|
||||
}
|
||||
|
||||
#columns #column1 > div
|
||||
{
|
||||
margin-left: 1px;
|
||||
}
|
||||
|
||||
#columns #column3 > div
|
||||
{
|
||||
margin-right: 1px;
|
||||
}
|
||||
|
||||
#columns > div > div
|
||||
{
|
||||
margin: 0px 10px;
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
#columns blockquote
|
||||
{
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
#tagLine
|
||||
{
|
||||
border-top: 5px solid #05B2D2;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
#taglist {
|
||||
display: inline-block;
|
||||
margin-left: 20px;
|
||||
font-weight: bold;
|
||||
margin: 0 0 0 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<h1 class="samples"><a href="index.html">CKEditor Samples</a> » Massive inline editing</h1>
|
||||
<div class="description">
|
||||
<p>This sample page demonstrates the inline editing feature - CKEditor instances will be created automatically from page elements with <strong>contentEditable</strong> attribute set to value <strong>true</strong>:</p>
|
||||
<pre class="samples"><div <strong>contenteditable="true</strong>" > ... </div></pre>
|
||||
<p>Click inside of any element below to start editing.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="container">
|
||||
<div id="header">
|
||||
<div id="headerLeft">
|
||||
<h2 id="sampleTitle" contenteditable="true">
|
||||
CKEditor<br> Goes Inline!
|
||||
</h2>
|
||||
<h3 contenteditable="true">
|
||||
Lorem ipsum dolor sit amet dolor duis blandit vestibulum faucibus a, tortor.
|
||||
</h3>
|
||||
</div>
|
||||
<div id="headerRight">
|
||||
<div contenteditable="true">
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet enim. Etiam ullamcorper. Suspendisse a pellentesque dui, non felis. Maecenas malesuada elit lectus felis, malesuada ultricies.
|
||||
</p>
|
||||
<p>
|
||||
Curabitur et ligula. Ut molestie a, ultricies porta urna. Vestibulum commodo volutpat a, convallis ac, laoreet enim. Phasellus fermentum in, dolor. Pellentesque facilisis. Nulla imperdiet sit amet magna. Vestibulum dapibus, mauris nec malesuada fames ac.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="columns">
|
||||
<div id="column1">
|
||||
<div contenteditable="true">
|
||||
<h3>
|
||||
Fusce vitae porttitor
|
||||
</h3>
|
||||
<p>
|
||||
<strong>
|
||||
Lorem ipsum dolor sit amet dolor. Duis blandit vestibulum faucibus a, tortor.
|
||||
</strong>
|
||||
</p>
|
||||
<p>
|
||||
Proin nunc justo felis mollis tincidunt, risus risus pede, posuere cubilia Curae, Nullam euismod, enim. Etiam nibh ultricies dolor ac dignissim erat volutpat. Vivamus fermentum <a href="http://ckeditor.com/">nisl nulla sem in</a> metus. Maecenas wisi. Donec nec erat volutpat.
|
||||
</p>
|
||||
<blockquote>
|
||||
<p>
|
||||
Fusce vitae porttitor a, euismod convallis nisl, blandit risus tortor, pretium.
|
||||
Vehicula vitae, imperdiet vel, ornare enim vel sodales rutrum
|
||||
</p>
|
||||
</blockquote>
|
||||
<blockquote>
|
||||
<p>
|
||||
Libero nunc, rhoncus ante ipsum non ipsum. Nunc eleifend pede turpis id sollicitudin fringilla. Phasellus ultrices, velit ac arcu.
|
||||
</p>
|
||||
</blockquote>
|
||||
<p>Pellentesque nunc. Donec suscipit erat. Pellentesque habitant morbi tristique ullamcorper.</p>
|
||||
<p><s>Mauris mattis feugiat lectus nec mauris. Nullam vitae ante.</s></p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="column2">
|
||||
<div contenteditable="true">
|
||||
<h3>
|
||||
Integer condimentum sit amet
|
||||
</h3>
|
||||
<p>
|
||||
<strong>Aenean nonummy a, mattis varius. Cras aliquet.</strong>
|
||||
Praesent <a href="http://ckeditor.com/">magna non mattis ac, rhoncus nunc</a>, rhoncus eget, cursus pulvinar mollis.</p>
|
||||
<p>Proin id nibh. Sed eu libero posuere sed, lectus. Phasellus dui gravida gravida feugiat mattis ac, felis.</p>
|
||||
<p>Integer condimentum sit amet, tempor elit odio, a dolor non ante at sapien. Sed ac lectus. Nulla ligula quis eleifend mi, id leo velit pede cursus arcu id nulla ac lectus. Phasellus vestibulum. Nunc viverra enim quis diam.</p>
|
||||
</div>
|
||||
<div contenteditable="true">
|
||||
<h3>
|
||||
Praesent wisi accumsan sit amet nibh
|
||||
</h3>
|
||||
<p>Donec ullamcorper, risus tortor, pretium porttitor. Morbi quam quis lectus non leo.</p>
|
||||
<p style="margin-left: 40px; ">Integer faucibus scelerisque. Proin faucibus at, aliquet vulputate, odio at eros. Fusce <a href="http://ckeditor.com/">gravida, erat vitae augue</a>. Fusce urna fringilla gravida.</p>
|
||||
<p>In hac habitasse platea dictumst. Praesent wisi accumsan sit amet nibh. Maecenas orci luctus a, lacinia quam sem, posuere commodo, odio condimentum tempor, pede semper risus. Suspendisse pede. In hac habitasse platea dictumst. Nam sed laoreet sit amet erat. Integer.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="column3">
|
||||
<div contenteditable="true">
|
||||
<p>
|
||||
<img src="assets/inlineall/logo.png" alt="CKEditor logo" style="float:left">
|
||||
</p>
|
||||
<p>Quisque justo neque, mattis sed, fermentum ultrices <strong>posuere cubilia Curae</strong>, Vestibulum elit metus, quis placerat ut, lectus. Ut sagittis, nunc libero, egestas consequat lobortis velit rutrum ut, faucibus turpis. Fusce porttitor, nulla quis turpis. Nullam laoreet vel, consectetuer tellus suscipit ultricies, hendrerit wisi. Donec odio nec velit ac nunc sit amet, accumsan cursus aliquet. Vestibulum ante sit amet sagittis mi.</p>
|
||||
<h3>
|
||||
Nullam laoreet vel consectetuer tellus suscipit
|
||||
</h3>
|
||||
<ul>
|
||||
<li>Ut sagittis, nunc libero, egestas consequat lobortis velit rutrum ut, faucibus turpis.</li>
|
||||
<li>Fusce porttitor, nulla quis turpis. Nullam laoreet vel, consectetuer tellus suscipit ultricies, hendrerit wisi.</li>
|
||||
<li>Mauris eget tellus. Donec non felis. Nam eget dolor. Vestibulum enim. Donec.</li>
|
||||
</ul>
|
||||
<p>Quisque justo neque, mattis sed, <a href="http://ckeditor.com/">fermentum ultrices posuere cubilia</a> Curae, Vestibulum elit metus, quis placerat ut, lectus.</p>
|
||||
<p>Nullam laoreet vel, consectetuer tellus suscipit ultricies, hendrerit wisi. Ut sagittis, nunc libero, egestas consequat lobortis velit rutrum ut, faucibus turpis. Fusce porttitor, nulla quis turpis.</p>
|
||||
<p>Donec odio nec velit ac nunc sit amet, accumsan cursus aliquet. Vestibulum ante sit amet sagittis mi. Sed in nonummy faucibus turpis. Mauris eget tellus. Donec non felis. Nam eget dolor. Vestibulum enim. Donec.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tagLine">
|
||||
Tags of this article:
|
||||
<p id="taglist" contenteditable="true">
|
||||
inline, editing, floating, CKEditor
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">
|
||||
http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a>
|
||||
- Frederico Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,122 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Inline Editing by Code — CKEditor Sample</title>
|
||||
<meta charset="utf-8">
|
||||
<script src="../ckeditor.js"></script>
|
||||
<link href="sample.css" rel="stylesheet">
|
||||
<style>
|
||||
|
||||
#editable
|
||||
{
|
||||
padding: 10px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="index.html">CKEditor Samples</a> » Inline Editing by Code
|
||||
</h1>
|
||||
<div class="description">
|
||||
<p>
|
||||
This sample shows how to create an inline editor instance of CKEditor. It is created
|
||||
with a JavaScript call using the following code:
|
||||
</p>
|
||||
<pre class="samples">
|
||||
// This property tells CKEditor to not activate every element with contenteditable=true element.
|
||||
CKEDITOR.disableAutoInline = true;
|
||||
|
||||
var editor = CKEDITOR.inline( document.getElementById( 'editable' ) );
|
||||
</pre>
|
||||
<p>
|
||||
Note that <code>editable</code> in the code above is the <code>id</code>
|
||||
attribute of the <code><div></code> element to be converted into an inline instance.
|
||||
</p>
|
||||
</div>
|
||||
<div id="editable" contenteditable="true">
|
||||
<h1><img alt="Saturn V carrying Apollo 11" class="right" src="assets/sample.jpg" /> Apollo 11</h1>
|
||||
|
||||
<p><b>Apollo 11</b> was the spaceflight that landed the first humans, Americans <a href="http://en.wikipedia.org/wiki/Neil_Armstrong" title="Neil Armstrong">Neil Armstrong</a> and <a href="http://en.wikipedia.org/wiki/Buzz_Aldrin" title="Buzz Aldrin">Buzz Aldrin</a>, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.</p>
|
||||
|
||||
<p>Armstrong spent about <s>three and a half</s> two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5 kg) of lunar material for return to Earth. A third member of the mission, <a href="http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)" title="Michael Collins (astronaut)">Michael Collins</a>, piloted the <a href="http://en.wikipedia.org/wiki/Apollo_Command/Service_Module" title="Apollo Command/Service Module">command</a> spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.</p>
|
||||
|
||||
<h2>Broadcasting and <em>quotes</em> <a id="quotes" name="quotes"></a></h2>
|
||||
|
||||
<p>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>One small step for [a] man, one giant leap for mankind.</p>
|
||||
</blockquote>
|
||||
|
||||
<p>Apollo 11 effectively ended the <a href="http://en.wikipedia.org/wiki/Space_Race" title="Space Race">Space Race</a> and fulfilled a national goal proposed in 1961 by the late U.S. President <a href="http://en.wikipedia.org/wiki/John_F._Kennedy" title="John F. Kennedy">John F. Kennedy</a> in a speech before the United States Congress:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.</p>
|
||||
</blockquote>
|
||||
|
||||
<h2>Technical details <a id="tech-details" name="tech-details"></a></h2>
|
||||
|
||||
<table align="right" border="1" bordercolor="#ccc" cellpadding="5" cellspacing="0" style="border-collapse:collapse;margin:10px 0 10px 15px;">
|
||||
<caption><strong>Mission crew</strong></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Position</th>
|
||||
<th scope="col">Astronaut</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Commander</td>
|
||||
<td>Neil A. Armstrong</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Command Module Pilot</td>
|
||||
<td>Michael Collins</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lunar Module Pilot</td>
|
||||
<td>Edwin "Buzz" E. Aldrin, Jr.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>Launched by a <strong>Saturn V</strong> rocket from <a href="http://en.wikipedia.org/wiki/Kennedy_Space_Center" title="Kennedy Space Center">Kennedy Space Center</a> in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of <a href="http://en.wikipedia.org/wiki/NASA" title="NASA">NASA</a>'s Apollo program. The Apollo spacecraft had three parts:</p>
|
||||
|
||||
<ol>
|
||||
<li><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</li>
|
||||
<li><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</li>
|
||||
<li><strong>Lunar Module</strong> for landing on the Moon.</li>
|
||||
</ol>
|
||||
|
||||
<p>After being sent to the Moon by the Saturn V's upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the <a href="http://en.wikipedia.org/wiki/Mare_Tranquillitatis" title="Mare Tranquillitatis">Sea of Tranquility</a>. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the <a href="http://en.wikipedia.org/wiki/Pacific_Ocean" title="Pacific Ocean">Pacific Ocean</a> on July 24.</p>
|
||||
|
||||
<hr />
|
||||
<p style="text-align: right;"><small>Source: <a href="http://en.wikipedia.org/wiki/Apollo_11">Wikipedia.org</a></small></p>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
// We need to turn off the automatic editor creation first.
|
||||
CKEDITOR.disableAutoInline = true;
|
||||
|
||||
var editor = CKEDITOR.inline( 'editable' );
|
||||
|
||||
</script>
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p contenteditable="true">
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">
|
||||
http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a>
|
||||
- Frederico Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,48 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.dialog.add( 'myDialog', function( editor ) {
|
||||
return {
|
||||
title: 'My Dialog',
|
||||
minWidth: 400,
|
||||
minHeight: 200,
|
||||
contents: [
|
||||
{
|
||||
id: 'tab1',
|
||||
label: 'First Tab',
|
||||
title: 'First Tab',
|
||||
elements: [
|
||||
{
|
||||
id: 'input1',
|
||||
type: 'text',
|
||||
label: 'Text Field'
|
||||
},
|
||||
{
|
||||
id: 'select1',
|
||||
type: 'select',
|
||||
label: 'Select Field',
|
||||
items: [
|
||||
[ 'option1', 'value1' ],
|
||||
[ 'option2', 'value2' ]
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'tab2',
|
||||
label: 'Second Tab',
|
||||
title: 'Second Tab',
|
||||
elements: [
|
||||
{
|
||||
id: 'button1',
|
||||
type: 'button',
|
||||
label: 'Button Field'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
|
@ -1,187 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Using API to Customize Dialog Windows — CKEditor Sample</title>
|
||||
<meta charset="utf-8">
|
||||
<script src="../../../ckeditor.js"></script>
|
||||
<link rel="stylesheet" href="../../../samples/sample.css">
|
||||
<meta name="ckeditor-sample-name" content="Using the JavaScript API to customize dialog windows">
|
||||
<meta name="ckeditor-sample-group" content="Advanced Samples">
|
||||
<meta name="ckeditor-sample-description" content="Using the dialog windows API to customize dialog windows without changing the original editor code.">
|
||||
<style>
|
||||
|
||||
.cke_button__mybutton_icon
|
||||
{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.cke_button__mybutton_label
|
||||
{
|
||||
display: inline !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script>
|
||||
|
||||
CKEDITOR.on( 'instanceCreated', function( ev ){
|
||||
var editor = ev.editor;
|
||||
|
||||
// Listen for the "pluginsLoaded" event, so we are sure that the
|
||||
// "dialog" plugin has been loaded and we are able to do our
|
||||
// customizations.
|
||||
editor.on( 'pluginsLoaded', function() {
|
||||
|
||||
// If our custom dialog has not been registered, do that now.
|
||||
if ( !CKEDITOR.dialog.exists( 'myDialog' ) ) {
|
||||
// We need to do the following trick to find out the dialog
|
||||
// definition file URL path. In the real world, you would simply
|
||||
// point to an absolute path directly, like "/mydir/mydialog.js".
|
||||
var href = document.location.href.split( '/' );
|
||||
href.pop();
|
||||
href.push( 'assets/my_dialog.js' );
|
||||
href = href.join( '/' );
|
||||
|
||||
// Finally, register the dialog.
|
||||
CKEDITOR.dialog.add( 'myDialog', href );
|
||||
}
|
||||
|
||||
// Register the command used to open the dialog.
|
||||
editor.addCommand( 'myDialogCmd', new CKEDITOR.dialogCommand( 'myDialog' ) );
|
||||
|
||||
// Add the a custom toolbar buttons, which fires the above
|
||||
// command..
|
||||
editor.ui.add( 'MyButton', CKEDITOR.UI_BUTTON, {
|
||||
label: 'My Dialog',
|
||||
command: 'myDialogCmd'
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// When opening a dialog, its "definition" is created for it, for
|
||||
// each editor instance. The "dialogDefinition" event is then
|
||||
// fired. We should use this event to make customizations to the
|
||||
// definition of existing dialogs.
|
||||
CKEDITOR.on( 'dialogDefinition', function( ev ) {
|
||||
// Take the dialog name and its definition from the event data.
|
||||
var dialogName = ev.data.name;
|
||||
var dialogDefinition = ev.data.definition;
|
||||
|
||||
// Check if the definition is from the dialog we're
|
||||
// interested on (the "Link" dialog).
|
||||
if ( dialogName == 'myDialog' && ev.editor.name == 'editor2' ) {
|
||||
// Get a reference to the "Link Info" tab.
|
||||
var infoTab = dialogDefinition.getContents( 'tab1' );
|
||||
|
||||
// Add a new text field to the "tab1" tab page.
|
||||
infoTab.add( {
|
||||
type: 'text',
|
||||
label: 'My Custom Field',
|
||||
id: 'customField',
|
||||
'default': 'Sample!',
|
||||
validate: function() {
|
||||
if ( ( /\d/ ).test( this.getValue() ) )
|
||||
return 'My Custom Field must not contain digits';
|
||||
}
|
||||
});
|
||||
|
||||
// Remove the "select1" field from the "tab1" tab.
|
||||
infoTab.remove( 'select1' );
|
||||
|
||||
// Set the default value for "input1" field.
|
||||
var input1 = infoTab.get( 'input1' );
|
||||
input1[ 'default' ] = 'www.example.com';
|
||||
|
||||
// Remove the "tab2" tab page.
|
||||
dialogDefinition.removeContents( 'tab2' );
|
||||
|
||||
// Add a new tab to the "Link" dialog.
|
||||
dialogDefinition.addContents( {
|
||||
id: 'customTab',
|
||||
label: 'My Tab',
|
||||
accessKey: 'M',
|
||||
elements: [
|
||||
{
|
||||
id: 'myField1',
|
||||
type: 'text',
|
||||
label: 'My Text Field'
|
||||
},
|
||||
{
|
||||
id: 'myField2',
|
||||
type: 'text',
|
||||
label: 'Another Text Field'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
// Provide the focus handler to start initial focus in "customField" field.
|
||||
dialogDefinition.onFocus = function() {
|
||||
var urlField = this.getContentElement( 'tab1', 'customField' );
|
||||
urlField.select();
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
var config = {
|
||||
extraPlugins: 'dialog',
|
||||
toolbar: [ [ 'MyButton' ] ]
|
||||
};
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="../../../samples/index.html">CKEditor Samples</a> » Using CKEditor Dialog API
|
||||
</h1>
|
||||
<div class="description">
|
||||
<p>
|
||||
This sample shows how to use the
|
||||
<a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.dialog">CKEditor Dialog API</a>
|
||||
to customize CKEditor dialog windows without changing the original editor code.
|
||||
The following customizations are being done in the example below:
|
||||
</p>
|
||||
<p>
|
||||
For details on how to create this setup check the source code of this sample page.
|
||||
</p>
|
||||
</div>
|
||||
<p>A custom dialog is added to the editors using the <code>pluginsLoaded</code> event, from an external <a target="_blank" href="assets/my_dialog.js">dialog definition file</a>:</p>
|
||||
<ol>
|
||||
<li><strong>Creating a custom dialog window</strong> – "My Dialog" dialog window opened with the "My Dialog" toolbar button.</li>
|
||||
<li><strong>Creating a custom button</strong> – Add button to open the dialog with "My Dialog" toolbar button.</li>
|
||||
</ol>
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<script>
|
||||
// Replace the <textarea id="editor1"> with an CKEditor instance.
|
||||
CKEDITOR.replace( 'editor1', config );
|
||||
</script>
|
||||
<p>The below editor modify the dialog definition of the above added dialog using the <code>dialogDefinition</code> event:</p>
|
||||
<ol>
|
||||
<li><strong>Adding dialog tab</strong> – Add new tab "My Tab" to dialog window.</li>
|
||||
<li><strong>Removing a dialog window tab</strong> – Remove "Second Tab" page from the dialog window.</li>
|
||||
<li><strong>Adding dialog window fields</strong> – Add "My Custom Field" to the dialog window.</li>
|
||||
<li><strong>Removing dialog window field</strong> – Remove "Select Field" selection field from the dialog window.</li>
|
||||
<li><strong>Setting default values for dialog window fields</strong> – Set default value of "Text Field" text field. </li>
|
||||
<li><strong>Setup initial focus for dialog window</strong> – Put initial focus on "My Custom Field" text field. </li>
|
||||
</ol>
|
||||
<textarea cols="80" id="editor2" name="editor2" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<script>
|
||||
|
||||
// Replace the <textarea id="editor1"> with an CKEditor instance.
|
||||
CKEDITOR.replace( 'editor2', config );
|
||||
|
||||
</script>
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,103 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>ENTER Key Configuration — CKEditor Sample</title>
|
||||
<meta charset="utf-8">
|
||||
<script src="../../../ckeditor.js"></script>
|
||||
<link href="../../../samples/sample.css" rel="stylesheet">
|
||||
<meta name="ckeditor-sample-name" content="Using the "Enter" key in CKEditor">
|
||||
<meta name="ckeditor-sample-group" content="Advanced Samples">
|
||||
<meta name="ckeditor-sample-description" content="Configuring the behavior of <em>Enter</em> and <em>Shift+Enter</em> keys.">
|
||||
<script>
|
||||
|
||||
var editor;
|
||||
|
||||
function changeEnter() {
|
||||
// If we already have an editor, let's destroy it first.
|
||||
if ( editor )
|
||||
editor.destroy( true );
|
||||
|
||||
// Create the editor again, with the appropriate settings.
|
||||
editor = CKEDITOR.replace( 'editor1', {
|
||||
extraPlugins: 'enterkey',
|
||||
enterMode: Number( document.getElementById( 'xEnter' ).value ),
|
||||
shiftEnterMode: Number( document.getElementById( 'xShiftEnter' ).value )
|
||||
});
|
||||
}
|
||||
|
||||
window.onload = changeEnter;
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="../../../samples/index.html">CKEditor Samples</a> » ENTER Key Configuration
|
||||
</h1>
|
||||
<div class="description">
|
||||
<p>
|
||||
This sample shows how to configure the <em>Enter</em> and <em>Shift+Enter</em> keys
|
||||
to perform actions specified in the
|
||||
<a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-enterMode"><code>enterMode</code></a>
|
||||
and <a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-shiftEnterMode"><code>shiftEnterMode</code></a>
|
||||
parameters, respectively.
|
||||
You can choose from the following options:
|
||||
</p>
|
||||
<ul class="samples">
|
||||
<li><strong><code>ENTER_P</code></strong> – new <code><p></code> paragraphs are created;</li>
|
||||
<li><strong><code>ENTER_BR</code></strong> – lines are broken with <code><br></code> elements;</li>
|
||||
<li><strong><code>ENTER_DIV</code></strong> – new <code><div></code> blocks are created.</li>
|
||||
</ul>
|
||||
<p>
|
||||
The sample code below shows how to configure CKEditor to create a <code><div></code> block when <em>Enter</em> key is pressed.
|
||||
</p>
|
||||
<pre class="samples">
|
||||
CKEDITOR.replace( '<em>textarea_id</em>', {
|
||||
<strong>enterMode: CKEDITOR.ENTER_DIV</strong>
|
||||
});</pre>
|
||||
<p>
|
||||
Note that <code><em>textarea_id</em></code> in the code above is the <code>id</code> attribute of
|
||||
the <code><textarea></code> element to be replaced.
|
||||
</p>
|
||||
</div>
|
||||
<div style="float: left; margin-right: 20px">
|
||||
When <em>Enter</em> is pressed:<br>
|
||||
<select id="xEnter" onchange="changeEnter();">
|
||||
<option selected="selected" value="1">Create a new <P> (recommended)</option>
|
||||
<option value="3">Create a new <DIV></option>
|
||||
<option value="2">Break the line with a <BR></option>
|
||||
</select>
|
||||
</div>
|
||||
<div style="float: left">
|
||||
When <em>Shift+Enter</em> is pressed:<br>
|
||||
<select id="xShiftEnter" onchange="changeEnter();">
|
||||
<option value="1">Create a new <P></option>
|
||||
<option value="3">Create a new <DIV></option>
|
||||
<option selected="selected" value="2">Break the line with a <BR> (recommended)</option>
|
||||
</select>
|
||||
</div>
|
||||
<br style="clear: both">
|
||||
<form action="../../../samples/sample_posteddata.php" method="post">
|
||||
<p>
|
||||
<br>
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10">This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="Submit">
|
||||
</p>
|
||||
</form>
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,18 +0,0 @@
|
||||
var swfobject=function(){function u(){if(!s){try{var a=d.getElementsByTagName("body")[0].appendChild(d.createElement("span"));a.parentNode.removeChild(a)}catch(b){return}s=!0;for(var a=x.length,c=0;c<a;c++)x[c]()}}function L(a){s?a():x[x.length]=a}function M(a){if(typeof m.addEventListener!=i)m.addEventListener("load",a,!1);else if(typeof d.addEventListener!=i)d.addEventListener("load",a,!1);else if(typeof m.attachEvent!=i)U(m,"onload",a);else if("function"==typeof m.onload){var b=m.onload;m.onload=
|
||||
function(){b();a()}}else m.onload=a}function V(){var a=d.getElementsByTagName("body")[0],b=d.createElement(r);b.setAttribute("type",y);var c=a.appendChild(b);if(c){var f=0;(function(){if(typeof c.GetVariable!=i){var g=c.GetVariable("$version");g&&(g=g.split(" ")[1].split(","),e.pv=[parseInt(g[0],10),parseInt(g[1],10),parseInt(g[2],10)])}else if(10>f){f++;setTimeout(arguments.callee,10);return}a.removeChild(b);c=null;D()})()}else D()}function D(){var a=p.length;if(0<a)for(var b=0;b<a;b++){var c=p[b].id,
|
||||
f=p[b].callbackFn,g={success:!1,id:c};if(0<e.pv[0]){var d=n(c);if(d)if(z(p[b].swfVersion)&&!(e.wk&&312>e.wk))t(c,!0),f&&(g.success=!0,g.ref=E(c),f(g));else if(p[b].expressInstall&&F()){g={};g.data=p[b].expressInstall;g.width=d.getAttribute("width")||"0";g.height=d.getAttribute("height")||"0";d.getAttribute("class")&&(g.styleclass=d.getAttribute("class"));d.getAttribute("align")&&(g.align=d.getAttribute("align"));for(var h={},d=d.getElementsByTagName("param"),j=d.length,k=0;k<j;k++)"movie"!=d[k].getAttribute("name").toLowerCase()&&
|
||||
(h[d[k].getAttribute("name")]=d[k].getAttribute("value"));G(g,h,c,f)}else W(d),f&&f(g)}else if(t(c,!0),f){if((c=E(c))&&typeof c.SetVariable!=i)g.success=!0,g.ref=c;f(g)}}}function E(a){var b=null;if((a=n(a))&&"OBJECT"==a.nodeName)typeof a.SetVariable!=i?b=a:(a=a.getElementsByTagName(r)[0])&&(b=a);return b}function F(){return!A&&z("6.0.65")&&(e.win||e.mac)&&!(e.wk&&312>e.wk)}function G(a,b,c,f){A=!0;H=f||null;N={success:!1,id:c};var g=n(c);if(g){"OBJECT"==g.nodeName?(w=I(g),B=null):(w=g,B=c);a.id=
|
||||
O;if(typeof a.width==i||!/%$/.test(a.width)&&310>parseInt(a.width,10))a.width="310";if(typeof a.height==i||!/%$/.test(a.height)&&137>parseInt(a.height,10))a.height="137";d.title=d.title.slice(0,47)+" - Flash Player Installation";f=e.ie&&e.win?"ActiveX":"PlugIn";f="MMredirectURL="+m.location.toString().replace(/&/g,"%26")+"&MMplayerType="+f+"&MMdoctitle="+d.title;b.flashvars=typeof b.flashvars!=i?b.flashvars+("&"+f):f;e.ie&&(e.win&&4!=g.readyState)&&(f=d.createElement("div"),c+="SWFObjectNew",f.setAttribute("id",
|
||||
c),g.parentNode.insertBefore(f,g),g.style.display="none",function(){g.readyState==4?g.parentNode.removeChild(g):setTimeout(arguments.callee,10)}());J(a,b,c)}}function W(a){if(e.ie&&e.win&&4!=a.readyState){var b=d.createElement("div");a.parentNode.insertBefore(b,a);b.parentNode.replaceChild(I(a),b);a.style.display="none";(function(){4==a.readyState?a.parentNode.removeChild(a):setTimeout(arguments.callee,10)})()}else a.parentNode.replaceChild(I(a),a)}function I(a){var b=d.createElement("div");if(e.win&&
|
||||
e.ie)b.innerHTML=a.innerHTML;else if(a=a.getElementsByTagName(r)[0])if(a=a.childNodes)for(var c=a.length,f=0;f<c;f++)!(1==a[f].nodeType&&"PARAM"==a[f].nodeName)&&8!=a[f].nodeType&&b.appendChild(a[f].cloneNode(!0));return b}function J(a,b,c){var f,g=n(c);if(e.wk&&312>e.wk)return f;if(g)if(typeof a.id==i&&(a.id=c),e.ie&&e.win){var o="",h;for(h in a)a[h]!=Object.prototype[h]&&("data"==h.toLowerCase()?b.movie=a[h]:"styleclass"==h.toLowerCase()?o+=' class="'+a[h]+'"':"classid"!=h.toLowerCase()&&(o+=" "+
|
||||
h+'="'+a[h]+'"'));h="";for(var j in b)b[j]!=Object.prototype[j]&&(h+='<param name="'+j+'" value="'+b[j]+'" />');g.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+o+">"+h+"</object>";C[C.length]=a.id;f=n(a.id)}else{j=d.createElement(r);j.setAttribute("type",y);for(var k in a)a[k]!=Object.prototype[k]&&("styleclass"==k.toLowerCase()?j.setAttribute("class",a[k]):"classid"!=k.toLowerCase()&&j.setAttribute(k,a[k]));for(o in b)b[o]!=Object.prototype[o]&&"movie"!=o.toLowerCase()&&
|
||||
(a=j,h=o,k=b[o],c=d.createElement("param"),c.setAttribute("name",h),c.setAttribute("value",k),a.appendChild(c));g.parentNode.replaceChild(j,g);f=j}return f}function P(a){var b=n(a);b&&"OBJECT"==b.nodeName&&(e.ie&&e.win?(b.style.display="none",function(){if(4==b.readyState){var c=n(a);if(c){for(var f in c)"function"==typeof c[f]&&(c[f]=null);c.parentNode.removeChild(c)}}else setTimeout(arguments.callee,10)}()):b.parentNode.removeChild(b))}function n(a){var b=null;try{b=d.getElementById(a)}catch(c){}return b}
|
||||
function U(a,b,c){a.attachEvent(b,c);v[v.length]=[a,b,c]}function z(a){var b=e.pv,a=a.split(".");a[0]=parseInt(a[0],10);a[1]=parseInt(a[1],10)||0;a[2]=parseInt(a[2],10)||0;return b[0]>a[0]||b[0]==a[0]&&b[1]>a[1]||b[0]==a[0]&&b[1]==a[1]&&b[2]>=a[2]?!0:!1}function Q(a,b,c,f){if(!e.ie||!e.mac){var g=d.getElementsByTagName("head")[0];if(g){c=c&&"string"==typeof c?c:"screen";f&&(K=l=null);if(!l||K!=c)f=d.createElement("style"),f.setAttribute("type","text/css"),f.setAttribute("media",c),l=g.appendChild(f),
|
||||
e.ie&&(e.win&&typeof d.styleSheets!=i&&0<d.styleSheets.length)&&(l=d.styleSheets[d.styleSheets.length-1]),K=c;e.ie&&e.win?l&&typeof l.addRule==r&&l.addRule(a,b):l&&typeof d.createTextNode!=i&&l.appendChild(d.createTextNode(a+" {"+b+"}"))}}}function t(a,b){if(R){var c=b?"visible":"hidden";s&&n(a)?n(a).style.visibility=c:Q("#"+a,"visibility:"+c)}}function S(a){return null!=/[\\\"<>\.;]/.exec(a)&&typeof encodeURIComponent!=i?encodeURIComponent(a):a}var i="undefined",r="object",y="application/x-shockwave-flash",
|
||||
O="SWFObjectExprInst",m=window,d=document,q=navigator,T=!1,x=[function(){T?V():D()}],p=[],C=[],v=[],w,B,H,N,s=!1,A=!1,l,K,R=!0,e=function(){var a=typeof d.getElementById!=i&&typeof d.getElementsByTagName!=i&&typeof d.createElement!=i,b=q.userAgent.toLowerCase(),c=q.platform.toLowerCase(),f=c?/win/.test(c):/win/.test(b),c=c?/mac/.test(c):/mac/.test(b),b=/webkit/.test(b)?parseFloat(b.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,g=!+"\v1",e=[0,0,0],h=null;if(typeof q.plugins!=i&&typeof q.plugins["Shockwave Flash"]==
|
||||
r){if((h=q.plugins["Shockwave Flash"].description)&&!(typeof q.mimeTypes!=i&&q.mimeTypes[y]&&!q.mimeTypes[y].enabledPlugin))T=!0,g=!1,h=h.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),e[0]=parseInt(h.replace(/^(.*)\..*$/,"$1"),10),e[1]=parseInt(h.replace(/^.*\.(.*)\s.*$/,"$1"),10),e[2]=/[a-zA-Z]/.test(h)?parseInt(h.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}else if(typeof m.ActiveXObject!=i)try{var j=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(j&&(h=j.GetVariable("$version")))g=!0,h=h.split(" ")[1].split(","),
|
||||
e=[parseInt(h[0],10),parseInt(h[1],10),parseInt(h[2],10)]}catch(k){}return{w3:a,pv:e,wk:b,ie:g,win:f,mac:c}}();(function(){e.w3&&((typeof d.readyState!=i&&"complete"==d.readyState||typeof d.readyState==i&&(d.getElementsByTagName("body")[0]||d.body))&&u(),s||(typeof d.addEventListener!=i&&d.addEventListener("DOMContentLoaded",u,!1),e.ie&&e.win&&(d.attachEvent("onreadystatechange",function(){"complete"==d.readyState&&(d.detachEvent("onreadystatechange",arguments.callee),u())}),m==top&&function(){if(!s){try{d.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,
|
||||
0);return}u()}}()),e.wk&&function(){s||(/loaded|complete/.test(d.readyState)?u():setTimeout(arguments.callee,0))}(),M(u)))})();(function(){e.ie&&e.win&&window.attachEvent("onunload",function(){for(var a=v.length,b=0;b<a;b++)v[b][0].detachEvent(v[b][1],v[b][2]);a=C.length;for(b=0;b<a;b++)P(C[b]);for(var c in e)e[c]=null;e=null;for(var f in swfobject)swfobject[f]=null;swfobject=null})})();return{registerObject:function(a,b,c,f){if(e.w3&&a&&b){var d={};d.id=a;d.swfVersion=b;d.expressInstall=c;d.callbackFn=
|
||||
f;p[p.length]=d;t(a,!1)}else f&&f({success:!1,id:a})},getObjectById:function(a){if(e.w3)return E(a)},embedSWF:function(a,b,c,d,g,o,h,j,k,m){var n={success:!1,id:b};e.w3&&!(e.wk&&312>e.wk)&&a&&b&&c&&d&&g?(t(b,!1),L(function(){c+="";d+="";var e={};if(k&&typeof k===r)for(var l in k)e[l]=k[l];e.data=a;e.width=c;e.height=d;l={};if(j&&typeof j===r)for(var p in j)l[p]=j[p];if(h&&typeof h===r)for(var q in h)l.flashvars=typeof l.flashvars!=i?l.flashvars+("&"+q+"="+h[q]):q+"="+h[q];if(z(g))p=J(e,l,b),e.id==
|
||||
b&&t(b,!0),n.success=!0,n.ref=p;else{if(o&&F()){e.data=o;G(e,l,b,m);return}t(b,!0)}m&&m(n)})):m&&m(n)},switchOffAutoHideShow:function(){R=!1},ua:e,getFlashPlayerVersion:function(){return{major:e.pv[0],minor:e.pv[1],release:e.pv[2]}},hasFlashPlayerVersion:z,createSWF:function(a,b,c){if(e.w3)return J(a,b,c)},showExpressInstall:function(a,b,c,d){e.w3&&F()&&G(a,b,c,d)},removeSWF:function(a){e.w3&&P(a)},createCSS:function(a,b,c,d){e.w3&&Q(a,b,c,d)},addDomLoadEvent:L,addLoadEvent:M,getQueryParamValue:function(a){var b=
|
||||
d.location.search||d.location.hash;if(b){/\?/.test(b)&&(b=b.split("?")[1]);if(null==a)return S(b);for(var b=b.split("&"),c=0;c<b.length;c++)if(b[c].substring(0,b[c].indexOf("="))==a)return S(b[c].substring(b[c].indexOf("=")+1))}return""},expressInstallCallback:function(){if(A){var a=n(O);a&&w&&(a.parentNode.replaceChild(w,a),B&&(t(B,!0),e.ie&&e.win&&(w.style.display="block")),H&&H(N));A=!1}}}}();
|
@ -1,280 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Output for Flash — CKEditor Sample</title>
|
||||
<meta charset="utf-8">
|
||||
<script src="../../../ckeditor.js"></script>
|
||||
<script src="../../../samples/sample.js"></script>
|
||||
<script src="assets/outputforflash/swfobject.js"></script>
|
||||
<link href="../../../samples/sample.css" rel="stylesheet">
|
||||
<meta name="ckeditor-sample-required-plugins" content="sourcearea">
|
||||
<meta name="ckeditor-sample-name" content="Output for Flash">
|
||||
<meta name="ckeditor-sample-group" content="Advanced Samples">
|
||||
<meta name="ckeditor-sample-description" content="Configuring CKEditor to produce HTML code that can be used with Adobe Flash.">
|
||||
<style>
|
||||
|
||||
.alert
|
||||
{
|
||||
background: #ffa84c;
|
||||
padding: 10px 15px;
|
||||
font-weight: bold;
|
||||
display: block;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="../../../samples/index.html">CKEditor Samples</a> » Producing Flash Compliant HTML Output
|
||||
</h1>
|
||||
<div class="description">
|
||||
<p>
|
||||
This sample shows how to configure CKEditor to output
|
||||
HTML code that can be used with
|
||||
<a class="samples" href="http://www.adobe.com/livedocs/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000922.html">
|
||||
Adobe Flash</a>.
|
||||
The code will contain a subset of standard HTML elements like <code><b></code>,
|
||||
<code><i></code>, and <code><p></code> as well as HTML attributes.
|
||||
</p>
|
||||
<p>
|
||||
To add a CKEditor instance outputting Flash compliant HTML code, load the editor using a standard
|
||||
JavaScript call, and define CKEditor features to use HTML elements and attributes.
|
||||
</p>
|
||||
<p>
|
||||
For details on how to create this setup check the source code of this sample page.
|
||||
</p>
|
||||
</div>
|
||||
<p>
|
||||
To see how it works, create some content in the editing area of CKEditor on the left
|
||||
and send it to the Flash object on the right side of the page by using the
|
||||
<strong>Send to Flash</strong> button.
|
||||
</p>
|
||||
<table style="width: 100%; border-spacing: 0; border-collapse:collapse;">
|
||||
<tr>
|
||||
<td style="width: 100%">
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10"><p><b><font size="18" style="font-size:18px;">Flash and HTML</font></b></p><p>&nbsp;</p><p>It is possible to have <a href="http://ckeditor.com">CKEditor</a> creating content that will be later loaded inside <b>Flash</b> objects and animations.</p><p>&nbsp;</p><p>Flash has a few limitations when dealing with HTML:</p><p>&nbsp;</p><ul><li>It has limited support on tags.</li><li>There is no margin between block elements, like paragraphs.</li></ul></textarea>
|
||||
<script>
|
||||
|
||||
if ( document.location.protocol == 'file:' )
|
||||
alert( 'Warning: This samples does not work when loaded from local filesystem' +
|
||||
'due to security restrictions implemented in Flash.' +
|
||||
'\n\nPlease load the sample from a web server instead.' );
|
||||
|
||||
var editor = CKEDITOR.replace( 'editor1', {
|
||||
/*
|
||||
* Ensure that htmlwriter plugin, which is required for this sample, is loaded.
|
||||
*/
|
||||
extraPlugins: 'htmlwriter',
|
||||
|
||||
height: 290,
|
||||
width: '100%',
|
||||
toolbar: [
|
||||
[ 'Source', '-', 'Bold', 'Italic', 'Underline', '-', 'BulletedList', '-', 'Link', 'Unlink' ],
|
||||
[ 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock' ],
|
||||
'/',
|
||||
[ 'Font', 'FontSize' ],
|
||||
[ 'TextColor', '-', 'About' ]
|
||||
],
|
||||
|
||||
/*
|
||||
* Style sheet for the contents
|
||||
*/
|
||||
contentsCss: 'body {color:#000; background-color#FFF; font-family: Arial; font-size:80%;} p, ol, ul {margin-top: 0px; margin-bottom: 0px;}',
|
||||
|
||||
/*
|
||||
* Quirks doctype
|
||||
*/
|
||||
docType: '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">',
|
||||
|
||||
/*
|
||||
* Core styles.
|
||||
*/
|
||||
coreStyles_bold: { element: 'b' },
|
||||
coreStyles_italic: { element: 'i' },
|
||||
coreStyles_underline: { element: 'u' },
|
||||
|
||||
/*
|
||||
* Font face.
|
||||
*/
|
||||
|
||||
// Define the way font elements will be applied to the document. The "font"
|
||||
// element will be used.
|
||||
font_style: {
|
||||
element: 'font',
|
||||
attributes: { 'face': '#(family)' }
|
||||
},
|
||||
|
||||
/*
|
||||
* Font sizes.
|
||||
*/
|
||||
|
||||
// The CSS part of the font sizes isn't used by Flash, it is there to get the
|
||||
// font rendered correctly in CKEditor.
|
||||
fontSize_sizes: '8px/8;9px/9;10px/10;11px/11;12px/12;14px/14;16px/16;18px/18;20px/20;22px/22;24px/24;26px/26;28px/28;36px/36;48px/48;72px/72',
|
||||
fontSize_style: {
|
||||
element: 'font',
|
||||
attributes: { 'size': '#(size)' },
|
||||
styles: { 'font-size': '#(size)px' }
|
||||
} ,
|
||||
|
||||
/*
|
||||
* Font colors.
|
||||
*/
|
||||
colorButton_enableMore: true,
|
||||
|
||||
colorButton_foreStyle: {
|
||||
element: 'font',
|
||||
attributes: { 'color': '#(color)' }
|
||||
},
|
||||
|
||||
colorButton_backStyle: {
|
||||
element: 'font',
|
||||
styles: { 'background-color': '#(color)' }
|
||||
},
|
||||
|
||||
on: { 'instanceReady': configureFlashOutput }
|
||||
});
|
||||
|
||||
/*
|
||||
* Adjust the behavior of the dataProcessor to match the
|
||||
* requirements of Flash
|
||||
*/
|
||||
function configureFlashOutput( ev ) {
|
||||
var editor = ev.editor,
|
||||
dataProcessor = editor.dataProcessor,
|
||||
htmlFilter = dataProcessor && dataProcessor.htmlFilter;
|
||||
|
||||
// Out self closing tags the HTML4 way, like <br>.
|
||||
dataProcessor.writer.selfClosingEnd = '>';
|
||||
|
||||
// Make output formatting match Flash expectations
|
||||
var dtd = CKEDITOR.dtd;
|
||||
for ( var e in CKEDITOR.tools.extend( {}, dtd.$nonBodyContent, dtd.$block, dtd.$listItem, dtd.$tableContent ) ) {
|
||||
dataProcessor.writer.setRules( e, {
|
||||
indent: false,
|
||||
breakBeforeOpen: false,
|
||||
breakAfterOpen: false,
|
||||
breakBeforeClose: false,
|
||||
breakAfterClose: false
|
||||
});
|
||||
}
|
||||
dataProcessor.writer.setRules( 'br', {
|
||||
indent: false,
|
||||
breakBeforeOpen: false,
|
||||
breakAfterOpen: false,
|
||||
breakBeforeClose: false,
|
||||
breakAfterClose: false
|
||||
});
|
||||
|
||||
// Output properties as attributes, not styles.
|
||||
htmlFilter.addRules( {
|
||||
elements: {
|
||||
$: function( element ) {
|
||||
var style, match, width, height, align;
|
||||
|
||||
// Output dimensions of images as width and height
|
||||
if ( element.name == 'img' ) {
|
||||
style = element.attributes.style;
|
||||
|
||||
if ( style ) {
|
||||
// Get the width from the style.
|
||||
match = ( /(?:^|\s)width\s*:\s*(\d+)px/i ).exec( style );
|
||||
width = match && match[1];
|
||||
|
||||
// Get the height from the style.
|
||||
match = ( /(?:^|\s)height\s*:\s*(\d+)px/i ).exec( style );
|
||||
height = match && match[1];
|
||||
|
||||
if ( width ) {
|
||||
element.attributes.style = element.attributes.style.replace( /(?:^|\s)width\s*:\s*(\d+)px;?/i , '' );
|
||||
element.attributes.width = width;
|
||||
}
|
||||
|
||||
if ( height ) {
|
||||
element.attributes.style = element.attributes.style.replace( /(?:^|\s)height\s*:\s*(\d+)px;?/i , '' );
|
||||
element.attributes.height = height;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Output alignment of paragraphs using align
|
||||
if ( element.name == 'p' ) {
|
||||
style = element.attributes.style;
|
||||
|
||||
if ( style ) {
|
||||
// Get the align from the style.
|
||||
match = ( /(?:^|\s)text-align\s*:\s*(\w*);?/i ).exec( style );
|
||||
align = match && match[1];
|
||||
|
||||
if ( align ) {
|
||||
element.attributes.style = element.attributes.style.replace( /(?:^|\s)text-align\s*:\s*(\w*);?/i , '' );
|
||||
element.attributes.align = align;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( element.attributes.style === '' )
|
||||
delete element.attributes.style;
|
||||
|
||||
return element;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function sendToFlash() {
|
||||
var html = CKEDITOR.instances.editor1.getData() ;
|
||||
|
||||
// Quick fix for link color.
|
||||
html = html.replace( /<a /g, '<font color="#0000FF"><u><a ' )
|
||||
html = html.replace( /<\/a>/g, '</a></u></font>' )
|
||||
|
||||
var flash = document.getElementById( 'ckFlashContainer' ) ;
|
||||
flash.setData( html ) ;
|
||||
}
|
||||
|
||||
CKEDITOR.domReady( function() {
|
||||
if ( !swfobject.hasFlashPlayerVersion( '8' ) ) {
|
||||
CKEDITOR.dom.element.createFromHtml( '<span class="alert">' +
|
||||
'At least Adobe Flash Player 8 is required to run this sample. ' +
|
||||
'You can download it from <a href="http://get.adobe.com/flashplayer">Adobe\'s website</a>.' +
|
||||
'</span>' ).insertBefore( editor.element );
|
||||
}
|
||||
|
||||
swfobject.embedSWF(
|
||||
'assets/outputforflash/outputforflash.swf',
|
||||
'ckFlashContainer',
|
||||
'550',
|
||||
'400',
|
||||
'8',
|
||||
{ wmode: 'transparent' }
|
||||
);
|
||||
});
|
||||
|
||||
</script>
|
||||
<p>
|
||||
<input type="button" value="Send to Flash" onclick="sendToFlash();">
|
||||
</p>
|
||||
</td>
|
||||
<td style="vertical-align: top; padding-left: 20px">
|
||||
<div id="ckFlashContainer"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,221 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>HTML Compliant Output — CKEditor Sample</title>
|
||||
<meta charset="utf-8">
|
||||
<script src="../../../ckeditor.js"></script>
|
||||
<script src="../../../samples/sample.js"></script>
|
||||
<link href="../../../samples/sample.css" rel="stylesheet">
|
||||
<meta name="ckeditor-sample-required-plugins" content="sourcearea">
|
||||
<meta name="ckeditor-sample-name" content="Output HTML">
|
||||
<meta name="ckeditor-sample-group" content="Advanced Samples">
|
||||
<meta name="ckeditor-sample-description" content="Configuring CKEditor to produce legacy HTML 4 code.">
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="../../../samples/index.html">CKEditor Samples</a> » Producing HTML Compliant Output
|
||||
</h1>
|
||||
<div class="description">
|
||||
<p>
|
||||
This sample shows how to configure CKEditor to output valid
|
||||
<a class="samples" href="http://www.w3.org/TR/html401/">HTML 4.01</a> code.
|
||||
Traditional HTML elements like <code><b></code>,
|
||||
<code><i></code>, and <code><font></code> are used in place of
|
||||
<code><strong></code>, <code><em></code>, and CSS styles.
|
||||
</p>
|
||||
<p>
|
||||
To add a CKEditor instance outputting legacy HTML 4.01 code, load the editor using a standard
|
||||
JavaScript call, and define CKEditor features to use the HTML compliant elements and attributes.
|
||||
</p>
|
||||
<p>
|
||||
A snippet of the configuration code can be seen below; check the source of this page for
|
||||
full definition:
|
||||
</p>
|
||||
<pre class="samples">
|
||||
CKEDITOR.replace( '<em>textarea_id</em>', {
|
||||
coreStyles_bold: { element: 'b' },
|
||||
coreStyles_italic: { element: 'i' },
|
||||
|
||||
fontSize_style: {
|
||||
element: 'font',
|
||||
attributes: { 'size': '#(size)' }
|
||||
}
|
||||
|
||||
...
|
||||
});</pre>
|
||||
</div>
|
||||
<form action="../../../samples/sample_posteddata.php" method="post">
|
||||
<p>
|
||||
<label for="editor1">
|
||||
Editor 1:
|
||||
</label>
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <b>sample text</b>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<script>
|
||||
|
||||
CKEDITOR.replace( 'editor1', {
|
||||
/*
|
||||
* Ensure that htmlwriter plugin, which is required for this sample, is loaded.
|
||||
*/
|
||||
extraPlugins: 'htmlwriter',
|
||||
|
||||
/*
|
||||
* Style sheet for the contents
|
||||
*/
|
||||
contentsCss: 'body {color:#000; background-color#:FFF;}',
|
||||
|
||||
/*
|
||||
* Simple HTML5 doctype
|
||||
*/
|
||||
docType: '<!DOCTYPE HTML>',
|
||||
|
||||
/*
|
||||
* Allowed content rules which beside limiting allowed HTML
|
||||
* will also take care of transforming styles to attributes
|
||||
* (currently only for img - see transformation rules defined below).
|
||||
*
|
||||
* Read more: http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter
|
||||
*/
|
||||
allowedContent:
|
||||
'h1 h2 h3 p pre[align]; ' +
|
||||
'blockquote code kbd samp var del ins cite q b i u strike ul ol li hr table tbody tr td th caption; ' +
|
||||
'img[!src,alt,align,width,height]; font[!face]; font[!family]; font[!color]; font[!size]; font{!background-color}; a[!href]; a[!name]',
|
||||
|
||||
/*
|
||||
* Core styles.
|
||||
*/
|
||||
coreStyles_bold: { element: 'b' },
|
||||
coreStyles_italic: { element: 'i' },
|
||||
coreStyles_underline: { element: 'u' },
|
||||
coreStyles_strike: { element: 'strike' },
|
||||
|
||||
/*
|
||||
* Font face.
|
||||
*/
|
||||
|
||||
// Define the way font elements will be applied to the document.
|
||||
// The "font" element will be used.
|
||||
font_style: {
|
||||
element: 'font',
|
||||
attributes: { 'face': '#(family)' }
|
||||
},
|
||||
|
||||
/*
|
||||
* Font sizes.
|
||||
*/
|
||||
fontSize_sizes: 'xx-small/1;x-small/2;small/3;medium/4;large/5;x-large/6;xx-large/7',
|
||||
fontSize_style: {
|
||||
element: 'font',
|
||||
attributes: { 'size': '#(size)' }
|
||||
},
|
||||
|
||||
/*
|
||||
* Font colors.
|
||||
*/
|
||||
|
||||
colorButton_foreStyle: {
|
||||
element: 'font',
|
||||
attributes: { 'color': '#(color)' }
|
||||
},
|
||||
|
||||
colorButton_backStyle: {
|
||||
element: 'font',
|
||||
styles: { 'background-color': '#(color)' }
|
||||
},
|
||||
|
||||
/*
|
||||
* Styles combo.
|
||||
*/
|
||||
stylesSet: [
|
||||
{ name: 'Computer Code', element: 'code' },
|
||||
{ name: 'Keyboard Phrase', element: 'kbd' },
|
||||
{ name: 'Sample Text', element: 'samp' },
|
||||
{ name: 'Variable', element: 'var' },
|
||||
{ name: 'Deleted Text', element: 'del' },
|
||||
{ name: 'Inserted Text', element: 'ins' },
|
||||
{ name: 'Cited Work', element: 'cite' },
|
||||
{ name: 'Inline Quotation', element: 'q' }
|
||||
],
|
||||
|
||||
on: {
|
||||
pluginsLoaded: configureTransformations,
|
||||
loaded: configureHtmlWriter
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
* Add missing content transformations.
|
||||
*/
|
||||
function configureTransformations( evt ) {
|
||||
var editor = evt.editor;
|
||||
|
||||
editor.dataProcessor.htmlFilter.addRules( {
|
||||
attributes: {
|
||||
style: function( value, element ) {
|
||||
// Return #RGB for background and border colors
|
||||
return CKEDITOR.tools.convertRgbToHex( value );
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
// Default automatic content transformations do not yet take care of
|
||||
// align attributes on blocks, so we need to add our own transformation rules.
|
||||
function alignToAttribute( element ) {
|
||||
if ( element.styles[ 'text-align' ] ) {
|
||||
element.attributes.align = element.styles[ 'text-align' ];
|
||||
delete element.styles[ 'text-align' ];
|
||||
}
|
||||
}
|
||||
editor.filter.addTransformations( [
|
||||
[ { element: 'p', right: alignToAttribute } ],
|
||||
[ { element: 'h1', right: alignToAttribute } ],
|
||||
[ { element: 'h2', right: alignToAttribute } ],
|
||||
[ { element: 'h3', right: alignToAttribute } ],
|
||||
[ { element: 'pre', right: alignToAttribute } ]
|
||||
] );
|
||||
}
|
||||
|
||||
/*
|
||||
* Adjust the behavior of htmlWriter to make it output HTML like FCKeditor.
|
||||
*/
|
||||
function configureHtmlWriter( evt ) {
|
||||
var editor = evt.editor,
|
||||
dataProcessor = editor.dataProcessor;
|
||||
|
||||
// Out self closing tags the HTML4 way, like <br>.
|
||||
dataProcessor.writer.selfClosingEnd = '>';
|
||||
|
||||
// Make output formatting behave similar to FCKeditor.
|
||||
var dtd = CKEDITOR.dtd;
|
||||
for ( var e in CKEDITOR.tools.extend( {}, dtd.$nonBodyContent, dtd.$block, dtd.$listItem, dtd.$tableContent ) ) {
|
||||
dataProcessor.writer.setRules( e, {
|
||||
indent: true,
|
||||
breakBeforeOpen: true,
|
||||
breakAfterOpen: false,
|
||||
breakBeforeClose: !dtd[ e ][ '#' ],
|
||||
breakAfterClose: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="Submit">
|
||||
</p>
|
||||
</form>
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,207 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Using Magicline plugin — CKEditor Sample</title>
|
||||
<meta charset="utf-8">
|
||||
<script src="../../../ckeditor.js"></script>
|
||||
<link rel="stylesheet" href="../../../samples/sample.css">
|
||||
<meta name="ckeditor-sample-name" content="Magicline plugin">
|
||||
<meta name="ckeditor-sample-group" content="Plugins">
|
||||
<meta name="ckeditor-sample-description" content="Using the Magicline plugin to access difficult focus spaces.">
|
||||
<meta name="ckeditor-sample-isnew" content="1">
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="../../../samples/index.html">CKEditor Samples</a> » Using Magicline plugin
|
||||
</h1>
|
||||
<div class="description">
|
||||
<p>
|
||||
This sample shows the advantages of <strong>Magicline</strong> plugin
|
||||
which is to enhance the editing process. Thanks to this plugin,
|
||||
a number of difficult focus spaces which are inaccessible due to
|
||||
browser issues can now be focused.
|
||||
</p>
|
||||
<p>
|
||||
<strong>Magicline</strong> plugin shows a red line with a handler
|
||||
which, when clicked, inserts a paragraph and allows typing. To see this,
|
||||
focus an editor and move your mouse above the focus space you want
|
||||
to access. The plugin is enabled by default so no additional
|
||||
configuration is necessary.
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<label for="editor1">
|
||||
Editor 1:
|
||||
</label>
|
||||
<div class="description">
|
||||
<p>
|
||||
This editor uses a default <strong>Magicline</strong> setup.
|
||||
</p>
|
||||
</div>
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10">
|
||||
<table border="1" cellpadding="1" cellspacing="1" style="width: 100%; ">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>This table</td>
|
||||
<td>is the</td>
|
||||
<td>very first</td>
|
||||
<td>element of the document.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>We are still</td>
|
||||
<td>able to acces</td>
|
||||
<td>the space before it.</td>
|
||||
<td>
|
||||
<table border="1" cellpadding="1" cellspacing="1" style="width: 100%; ">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>This table is inside of a cell of another table.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>We can type&nbsp;either before or after it though.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>Two succesive horizontal lines (<tt>HR</tt> tags). We can access the space in between:</p>
|
||||
|
||||
<hr />
|
||||
<hr />
|
||||
<ol>
|
||||
<li>This numbered list...</li>
|
||||
<li>...is a neighbour of a horizontal line...</li>
|
||||
<li>...and another list.</li>
|
||||
</ol>
|
||||
|
||||
<ul>
|
||||
<li>We can type between the lists...</li>
|
||||
<li>...thanks to <strong>Magicline</strong>.</li>
|
||||
</ul>
|
||||
|
||||
<p>Lorem ipsum dolor sit amet dui. Morbi vel turpis. Nullam et leo. Etiam rutrum, urna tellus dui vel tincidunt mattis egestas, justo fringilla vel, massa. Phasellus.</p>
|
||||
|
||||
<p>Quisque iaculis, dui lectus varius vitae, tortor. Proin lacus. Pellentesque ac lacus. Aenean nonummy commodo nec, pede. Etiam blandit risus elit.</p>
|
||||
|
||||
<p>Ut pretium. Vestibulum rutrum in, adipiscing elit. Sed in quam in purus sem vitae pede. Pellentesque bibendum, urna sem vel risus. Vivamus posuere metus. Aliquam gravida iaculis nisl. Nam enim. Aliquam erat ac lacus tellus ac felis.</p>
|
||||
|
||||
<div style="border: 2px dashed green; background: #ddd; text-align: center;">
|
||||
<p>This text is wrapped in a&nbsp;<tt>DIV</tt>&nbsp;element. We can type after this element though.</p>
|
||||
</div>
|
||||
</textarea>
|
||||
<script>
|
||||
|
||||
// This call can be placed at any point after the
|
||||
// <textarea>, or inside a <head><script> in a
|
||||
// window.onload event handler.
|
||||
|
||||
CKEDITOR.replace( 'editor1', {
|
||||
extraPlugins: 'magicline', // Ensure that magicline plugin, which is required for this sample, is loaded.
|
||||
allowedContent: true // Switch off the ACF, so very complex content created to
|
||||
// show magicline's power isn't filtered.
|
||||
} );
|
||||
|
||||
</script>
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
<label for="editor2">
|
||||
Editor 2:
|
||||
</label>
|
||||
<div class="description">
|
||||
<p>
|
||||
This editor is using a blue line.
|
||||
</p>
|
||||
<pre class="samples">
|
||||
CKEDITOR.replace( 'editor2', {
|
||||
magicline_color: 'blue'
|
||||
});</pre>
|
||||
</div>
|
||||
<textarea cols="80" id="editor2" name="editor2" rows="10">
|
||||
<table border="1" cellpadding="1" cellspacing="1" style="width: 100%; ">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>This table</td>
|
||||
<td>is the</td>
|
||||
<td>very first</td>
|
||||
<td>element of the document.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>We are still</td>
|
||||
<td>able to acces</td>
|
||||
<td>the space before it.</td>
|
||||
<td>
|
||||
<table border="1" cellpadding="1" cellspacing="1" style="width: 100%; ">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>This table is inside of a cell of another table.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>We can type&nbsp;either before or after it though.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>Two succesive horizontal lines (<tt>HR</tt> tags). We can access the space in between:</p>
|
||||
|
||||
<hr />
|
||||
<hr />
|
||||
<ol>
|
||||
<li>This numbered list...</li>
|
||||
<li>...is a neighbour of a horizontal line...</li>
|
||||
<li>...and another list.</li>
|
||||
</ol>
|
||||
|
||||
<ul>
|
||||
<li>We can type between the lists...</li>
|
||||
<li>...thanks to <strong>Magicline</strong>.</li>
|
||||
</ul>
|
||||
|
||||
<p>Lorem ipsum dolor sit amet dui. Morbi vel turpis. Nullam et leo. Etiam rutrum, urna tellus dui vel tincidunt mattis egestas, justo fringilla vel, massa. Phasellus.</p>
|
||||
|
||||
<p>Quisque iaculis, dui lectus varius vitae, tortor. Proin lacus. Pellentesque ac lacus. Aenean nonummy commodo nec, pede. Etiam blandit risus elit.</p>
|
||||
|
||||
<p>Ut pretium. Vestibulum rutrum in, adipiscing elit. Sed in quam in purus sem vitae pede. Pellentesque bibendum, urna sem vel risus. Vivamus posuere metus. Aliquam gravida iaculis nisl. Nam enim. Aliquam erat ac lacus tellus ac felis.</p>
|
||||
|
||||
<div style="border: 2px dashed green; background: #ddd; text-align: center;">
|
||||
<p>This text is wrapped in a&nbsp;<tt>DIV</tt>&nbsp;element. We can type after this element though.</p>
|
||||
</div>
|
||||
</textarea>
|
||||
<script>
|
||||
|
||||
// This call can be placed at any point after the
|
||||
// <textarea>, or inside a <head><script> in a
|
||||
// window.onload event handler.
|
||||
|
||||
CKEDITOR.replace( 'editor2', {
|
||||
extraPlugins: 'magicline', // Ensure that magicline plugin, which is required for this sample, is loaded.
|
||||
magicline_color: 'blue', // Blue line
|
||||
allowedContent: true // Switch off the ACF, so very complex content created to
|
||||
// show magicline's power isn't filtered.
|
||||
});
|
||||
|
||||
</script>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,232 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Toolbar Configuration — CKEditor Sample</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="ckeditor-sample-name" content="Toolbar Configurations">
|
||||
<meta name="ckeditor-sample-group" content="Advanced Samples">
|
||||
<meta name="ckeditor-sample-description" content="Configuring CKEditor to display full or custom toolbar layout.">
|
||||
<meta name="ckeditor-sample-isnew" content="1">
|
||||
<script src="../../../ckeditor.js"></script>
|
||||
<link href="../../../samples/sample.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="../../../samples/index.html">CKEditor Samples</a> » Toolbar Configuration
|
||||
</h1>
|
||||
<div class="description">
|
||||
<p>
|
||||
This sample page demonstrates editor with loaded <a href="#fullToolbar">full toolbar</a> (all registered buttons) and, if
|
||||
current editor's configuration modifies default settings, also editor with <a href="#currentToolbar">modified toolbar</a>.
|
||||
</p>
|
||||
|
||||
<p>Since CKEditor 4 there are two ways to configure toolbar buttons.</p>
|
||||
|
||||
<h2 class="samples">By <a href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-toolbar">config.toolbar</a></h2>
|
||||
|
||||
<p>
|
||||
You can explicitly define which buttons are displayed in which groups and in which order.
|
||||
This is the more precise setting, but less flexible. If newly added plugin adds its
|
||||
own button you'll have to add it manually to your <code>config.toolbar</code> setting as well.
|
||||
</p>
|
||||
|
||||
<p>To add a CKEditor instance with custom toolbar setting, insert the following JavaScript call to your code:</p>
|
||||
|
||||
<pre class="samples">
|
||||
CKEDITOR.replace( <em>'textarea_id'</em>, {
|
||||
<strong>toolbar:</strong> [
|
||||
{ name: 'document', items: [ 'Source', '-', 'NewPage', 'Preview', '-', 'Templates' ] }, // Defines toolbar group with name (used to create voice label) and items in 3 subgroups.
|
||||
[ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ], // Defines toolbar group without name.
|
||||
'/', // Line break - next group will be placed in new line.
|
||||
{ name: 'basicstyles', items: [ 'Bold', 'Italic' ] }
|
||||
]
|
||||
});</pre>
|
||||
|
||||
<h2 class="samples">By <a href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-toolbarGroups">config.toolbarGroups</a></h2>
|
||||
|
||||
<p>
|
||||
You can define which groups of buttons (like e.g. <code>basicstyles</code>, <code>clipboard</code>
|
||||
and <code>forms</code>) are displayed and in which order. Registered buttons are associated
|
||||
with toolbar groups by <code>toolbar</code> property in their definition.
|
||||
This setting's advantage is that you don't have to modify toolbar configuration
|
||||
when adding/removing plugins which register their own buttons.
|
||||
</p>
|
||||
|
||||
<p>To add a CKEditor instance with custom toolbar groups setting, insert the following JavaScript call to your code:</p>
|
||||
|
||||
<pre class="samples">
|
||||
CKEDITOR.replace( <em>'textarea_id'</em>, {
|
||||
<strong>toolbarGroups:</strong> [
|
||||
{ name: 'document', groups: [ 'mode', 'document' ] }, // Displays document group with its two subgroups.
|
||||
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] }, // Group's name will be used to create voice label.
|
||||
'/', // Line break - next group will be placed in new line.
|
||||
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
|
||||
{ name: 'links' }
|
||||
]
|
||||
|
||||
// NOTE: Remember to leave 'toolbar' property with the default value (null).
|
||||
});</pre>
|
||||
</div>
|
||||
|
||||
<div id="currentToolbar" style="display: none">
|
||||
<h2 class="samples">Current toolbar configuration</h2>
|
||||
<p>Below you can see editor with current toolbar definition.</p>
|
||||
<textarea cols="80" id="editorCurrent" name="editorCurrent" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<pre id="editorCurrentCfg" class="samples"></pre>
|
||||
</div>
|
||||
|
||||
<div id="fullToolbar">
|
||||
<h2 class="samples">Full toolbar configuration</h2>
|
||||
<p>Below you can see editor with full toolbar, generated automatically by the editor.</p>
|
||||
<p>
|
||||
<strong>Note</strong>: To create editor instance with full toolbar you don't have to set anything.
|
||||
Just leave <code>toolbar</code> and <code>toolbarGroups</code> with the default, <code>null</code> values.
|
||||
</p>
|
||||
<textarea cols="80" id="editorFull" name="editorFull" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<pre id="editorFullCfg" class="samples"></pre>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
var buttonsNames;
|
||||
|
||||
CKEDITOR.config.extraPlugins = 'toolbar';
|
||||
|
||||
CKEDITOR.on( 'instanceReady', function( evt ) {
|
||||
var editor = evt.editor,
|
||||
editorCurrent = editor.name == 'editorCurrent',
|
||||
defaultToolbar = !( editor.config.toolbar || editor.config.toolbarGroups ),
|
||||
pre = CKEDITOR.document.getById( editor.name + 'Cfg' ),
|
||||
output = '';
|
||||
|
||||
if ( editorCurrent ) {
|
||||
// If default toolbar configuration has been modified, show "current toolbar" section.
|
||||
if ( !defaultToolbar )
|
||||
CKEDITOR.document.getById( 'currentToolbar' ).show();
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !buttonsNames )
|
||||
buttonsNames = createButtonsNamesHash( editor.ui.items );
|
||||
|
||||
// Toolbar isn't set explicitly, so it was created automatically from toolbarGroups.
|
||||
if ( !editor.config.toolbar ) {
|
||||
output +=
|
||||
'// Toolbar configuration generated automatically by the editor based on config.toolbarGroups.\n' +
|
||||
dumpToolbarConfiguration( editor ) +
|
||||
'\n\n' +
|
||||
'// Toolbar groups configuration.\n' +
|
||||
dumpToolbarConfiguration( editor, true )
|
||||
}
|
||||
// Toolbar groups doesn't count in this case - print only toolbar.
|
||||
else {
|
||||
output += '// Toolbar configuration.\n' +
|
||||
dumpToolbarConfiguration( editor );
|
||||
}
|
||||
|
||||
// Recreate to avoid old IE from loosing whitespaces on filling <pre> content.
|
||||
var preOutput = pre.getOuterHtml().replace( /(?=<\/)/, output );
|
||||
CKEDITOR.dom.element.createFromHtml( preOutput ).replace( pre );
|
||||
} );
|
||||
|
||||
CKEDITOR.replace( 'editorCurrent', { height: 100 } );
|
||||
CKEDITOR.replace( 'editorFull', {
|
||||
// Reset toolbar settings, so full toolbar will be generated automatically.
|
||||
toolbar: null,
|
||||
toolbarGroups: null,
|
||||
height: 100
|
||||
} );
|
||||
|
||||
function dumpToolbarConfiguration( editor, printGroups ) {
|
||||
var output = [],
|
||||
toolbar = editor.toolbar;
|
||||
|
||||
for ( var i = 0; i < toolbar.length; ++i ) {
|
||||
var group = dumpToolbarGroup( toolbar[ i ], printGroups );
|
||||
if ( group )
|
||||
output.push( group );
|
||||
}
|
||||
|
||||
return 'config.toolbar' + ( printGroups ? 'Groups' : '' ) + ' = [\n\t' + output.join( ',\n\t' ) + '\n];';
|
||||
}
|
||||
|
||||
function dumpToolbarGroup( group, printGroups ) {
|
||||
var output = [];
|
||||
|
||||
if ( typeof group == 'string' )
|
||||
return '\'' + group + '\'';
|
||||
if ( CKEDITOR.tools.isArray( group ) )
|
||||
return dumpToolbarItems( group );
|
||||
// Skip group when printing entire toolbar configuration and there are no items in this group.
|
||||
if ( !printGroups && !group.items )
|
||||
return;
|
||||
|
||||
if ( group.name )
|
||||
output.push( 'name: \'' + group.name + '\'' );
|
||||
|
||||
if ( group.groups )
|
||||
output.push( 'groups: ' + dumpToolbarItems( group.groups ) );
|
||||
|
||||
if ( !printGroups )
|
||||
output.push( 'items: ' + dumpToolbarItems( group.items ) );
|
||||
|
||||
return '{ ' + output.join( ', ' ) + ' }';
|
||||
}
|
||||
|
||||
function dumpToolbarItems( items ) {
|
||||
if ( typeof items == 'string' )
|
||||
return '\'' + items + '\'';
|
||||
|
||||
var names = [],
|
||||
i, item;
|
||||
|
||||
for ( var i = 0; i < items.length; ++i ) {
|
||||
item = items[ i ];
|
||||
if ( typeof item == 'string' )
|
||||
names.push( item );
|
||||
else {
|
||||
if ( item.type == CKEDITOR.UI_SEPARATOR )
|
||||
names.push( '-' );
|
||||
else
|
||||
names.push( buttonsNames[ item.name ] );
|
||||
}
|
||||
}
|
||||
|
||||
return '[ \'' + names.join( '\', \'' ) + '\' ]';
|
||||
}
|
||||
|
||||
// Creates { 'lowercased': 'LowerCased' } buttons names hash.
|
||||
function createButtonsNamesHash( items ) {
|
||||
var hash = {},
|
||||
name;
|
||||
|
||||
for ( name in items ) {
|
||||
hash[ items[ name ].name ] = name;
|
||||
}
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
||||
})();
|
||||
</script>
|
||||
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,73 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Using the CKEditor Read-Only API — CKEditor Sample</title>
|
||||
<meta charset="utf-8">
|
||||
<script src="../ckeditor.js"></script>
|
||||
<link rel="stylesheet" href="sample.css">
|
||||
<script>
|
||||
|
||||
var editor;
|
||||
|
||||
// The instanceReady event is fired, when an instance of CKEditor has finished
|
||||
// its initialization.
|
||||
CKEDITOR.on( 'instanceReady', function( ev ) {
|
||||
editor = ev.editor;
|
||||
|
||||
// Show this "on" button.
|
||||
document.getElementById( 'readOnlyOn' ).style.display = '';
|
||||
|
||||
// Event fired when the readOnly property changes.
|
||||
editor.on( 'readOnly', function() {
|
||||
document.getElementById( 'readOnlyOn' ).style.display = this.readOnly ? 'none' : '';
|
||||
document.getElementById( 'readOnlyOff' ).style.display = this.readOnly ? '' : 'none';
|
||||
});
|
||||
});
|
||||
|
||||
function toggleReadOnly( isReadOnly ) {
|
||||
// Change the read-only state of the editor.
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setReadOnly
|
||||
editor.setReadOnly( isReadOnly );
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="index.html">CKEditor Samples</a> » Using the CKEditor Read-Only API
|
||||
</h1>
|
||||
<div class="description">
|
||||
<p>
|
||||
This sample shows how to use the
|
||||
<code><a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setReadOnly">setReadOnly</a></code>
|
||||
API to put editor into the read-only state that makes it impossible for users to change the editor contents.
|
||||
</p>
|
||||
<p>
|
||||
For details on how to create this setup check the source code of this sample page.
|
||||
</p>
|
||||
</div>
|
||||
<form action="sample_posteddata.php" method="post">
|
||||
<p>
|
||||
<textarea class="ckeditor" id="editor1" name="editor1" cols="100" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input id="readOnlyOn" onclick="toggleReadOnly();" type="button" value="Make it read-only" style="display:none">
|
||||
<input id="readOnlyOff" onclick="toggleReadOnly( false );" type="button" value="Make it editable again" style="display:none">
|
||||
</p>
|
||||
</form>
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,339 +0,0 @@
|
||||
/*
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
html, body, h1, h2, h3, h4, h5, h6, div, span, blockquote, p, address, form, fieldset, img, ul, ol, dl, dt, dd, li, hr, table, td, th, strong, em, sup, sub, dfn, ins, del, q, cite, var, samp, code, kbd, tt, pre
|
||||
{
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
body
|
||||
{
|
||||
padding: 10px 30px;
|
||||
}
|
||||
|
||||
input, textarea, select, option, optgroup, button, td, th
|
||||
{
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
pre, code, kbd, samp, tt
|
||||
{
|
||||
font-family: monospace,monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
body {
|
||||
width: 960px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
code
|
||||
{
|
||||
background: #f3f3f3;
|
||||
border: 1px solid #ddd;
|
||||
padding: 1px 4px;
|
||||
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
abbr
|
||||
{
|
||||
border-bottom: 1px dotted #555;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.new
|
||||
{
|
||||
background: #FF7E00;
|
||||
border: 1px solid #DA8028;
|
||||
color: #fff;
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
padding: 1px 4px;
|
||||
text-shadow: 0 1px 0 #C97626;
|
||||
text-transform: uppercase;
|
||||
margin: 0 0 0 3px;
|
||||
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
|
||||
-moz-box-shadow: 0 2px 3px 0 #FFA54E inset;
|
||||
-webkit-box-shadow: 0 2px 3px 0 #FFA54E inset;
|
||||
box-shadow: 0 2px 3px 0 #FFA54E inset;
|
||||
}
|
||||
|
||||
h1.samples
|
||||
{
|
||||
color: #0782C1;
|
||||
font-size: 200%;
|
||||
font-weight: normal;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
h1.samples a
|
||||
{
|
||||
color: #0782C1;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px dotted #0782C1;
|
||||
}
|
||||
|
||||
.samples a:hover
|
||||
{
|
||||
border-bottom: 1px dotted #0782C1;
|
||||
}
|
||||
|
||||
h2.samples
|
||||
{
|
||||
color: #000000;
|
||||
font-size: 130%;
|
||||
margin: 15px 0 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
p, blockquote, address, form, pre, dl, h1.samples, h2.samples
|
||||
{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
ul.samples
|
||||
{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.clear
|
||||
{
|
||||
clear: both;
|
||||
}
|
||||
|
||||
fieldset
|
||||
{
|
||||
margin: 0;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
body, input, textarea
|
||||
{
|
||||
color: #333333;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
body
|
||||
{
|
||||
font-size: 75%;
|
||||
}
|
||||
|
||||
a.samples
|
||||
{
|
||||
color: #189DE1;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
form
|
||||
{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
pre.samples
|
||||
{
|
||||
background-color: #F7F7F7;
|
||||
border: 1px solid #D7D7D7;
|
||||
overflow: auto;
|
||||
padding: 0.25em;
|
||||
white-space: pre-wrap; /* CSS 2.1 */
|
||||
word-wrap: break-word; /* IE7 */
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
-webkit-tab-size: 4;
|
||||
tab-size: 4;
|
||||
}
|
||||
|
||||
#footer
|
||||
{
|
||||
clear: both;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
#footer hr
|
||||
{
|
||||
margin: 10px 0 15px 0;
|
||||
height: 1px;
|
||||
border: solid 1px gray;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
#footer p
|
||||
{
|
||||
margin: 0 10px 10px 10px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#footer #copy
|
||||
{
|
||||
float: right;
|
||||
}
|
||||
|
||||
#outputSample
|
||||
{
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
#outputSample thead th
|
||||
{
|
||||
color: #dddddd;
|
||||
background-color: #999999;
|
||||
padding: 4px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#outputSample tbody th
|
||||
{
|
||||
vertical-align: top;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#outputSample pre
|
||||
{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.description
|
||||
{
|
||||
border: 1px dotted #B7B7B7;
|
||||
margin-bottom: 10px;
|
||||
padding: 10px 10px 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
label
|
||||
{
|
||||
display: block;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
/**
|
||||
* CKEditor editables are automatically set with the "cke_editable" class
|
||||
* plus cke_editable_(inline|themed) depending on the editor type.
|
||||
*/
|
||||
|
||||
/* Style a bit the inline editables. */
|
||||
.cke_editable.cke_editable_inline
|
||||
{
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Once an editable element gets focused, the "cke_focus" class is
|
||||
added to it, so we can style it differently. */
|
||||
.cke_editable.cke_editable_inline.cke_focus
|
||||
{
|
||||
box-shadow: inset 0px 0px 20px 3px #ddd, inset 0 0 1px #000;
|
||||
outline: none;
|
||||
background: #eee;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
/* Avoid pre-formatted overflows inline editable. */
|
||||
.cke_editable_inline pre
|
||||
{
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
/**
|
||||
* Samples index styles.
|
||||
*/
|
||||
|
||||
.twoColumns,
|
||||
.twoColumnsLeft,
|
||||
.twoColumnsRight
|
||||
{
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.twoColumnsLeft,
|
||||
.twoColumnsRight
|
||||
{
|
||||
width: 45%;
|
||||
}
|
||||
|
||||
.twoColumnsLeft
|
||||
{
|
||||
float: left;
|
||||
}
|
||||
|
||||
.twoColumnsRight
|
||||
{
|
||||
float: right;
|
||||
}
|
||||
|
||||
dl.samples
|
||||
{
|
||||
padding: 0 0 0 40px;
|
||||
}
|
||||
dl.samples > dt
|
||||
{
|
||||
display: list-item;
|
||||
list-style-type: disc;
|
||||
list-style-position: outside;
|
||||
margin: 0 0 3px;
|
||||
}
|
||||
dl.samples > dd
|
||||
{
|
||||
margin: 0 0 3px;
|
||||
}
|
||||
.warning
|
||||
{
|
||||
color: #ff0000;
|
||||
background-color: #FFCCBA;
|
||||
border: 2px dotted #ff0000;
|
||||
padding: 15px 10px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
/* Used on inline samples */
|
||||
|
||||
blockquote
|
||||
{
|
||||
font-style: italic;
|
||||
font-family: Georgia, Times, "Times New Roman", serif;
|
||||
padding: 2px 0;
|
||||
border-style: solid;
|
||||
border-color: #ccc;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
.cke_contents_ltr blockquote
|
||||
{
|
||||
padding-left: 20px;
|
||||
padding-right: 8px;
|
||||
border-left-width: 5px;
|
||||
}
|
||||
|
||||
.cke_contents_rtl blockquote
|
||||
{
|
||||
padding-left: 8px;
|
||||
padding-right: 20px;
|
||||
border-right-width: 5px;
|
||||
}
|
||||
|
||||
img.right {
|
||||
border: 1px solid #ccc;
|
||||
float: right;
|
||||
margin-left: 15px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
img.left {
|
||||
border: 1px solid #ccc;
|
||||
float: left;
|
||||
margin-right: 15px;
|
||||
padding: 5px;
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
// Tool scripts for the sample pages.
|
||||
// This file can be ignored and is not required to make use of CKEditor.
|
||||
|
||||
(function() {
|
||||
// Check for sample compliance.
|
||||
CKEDITOR.on( 'instanceReady', function( ev ) {
|
||||
var editor = ev.editor,
|
||||
meta = CKEDITOR.document.$.getElementsByName( 'ckeditor-sample-required-plugins' ),
|
||||
requires = meta.length ? CKEDITOR.dom.element.get( meta[ 0 ] ).getAttribute( 'content' ).split( ',' ) : [],
|
||||
missing = [];
|
||||
|
||||
if ( requires.length ) {
|
||||
for ( var i = 0; i < requires.length; i++ ) {
|
||||
if ( !editor.plugins[ requires[ i ] ] )
|
||||
missing.push( '<code>' + requires[ i ] + '</code>' );
|
||||
}
|
||||
|
||||
if ( missing.length ) {
|
||||
var warn = CKEDITOR.dom.element.createFromHtml(
|
||||
'<div class="warning">' +
|
||||
'<span>To fully experience this demo, the ' + missing.join( ', ' ) + ' plugin' + ( missing.length > 1 ? 's are' : ' is' ) + ' required.</span>' +
|
||||
'</div>'
|
||||
);
|
||||
warn.insertBefore( editor.container );
|
||||
}
|
||||
}
|
||||
});
|
||||
})();
|
@ -1,16 +0,0 @@
|
||||
<?php /* <body><pre>
|
||||
|
||||
-------------------------------------------------------------------------------------------
|
||||
CKEditor - Posted Data
|
||||
|
||||
We are sorry, but your Web server does not support the PHP language used in this script.
|
||||
|
||||
Please note that CKEditor can be used with any other server-side language than just PHP.
|
||||
To save the content created with CKEditor you need to read the POST data on the server
|
||||
side and write it to a file or the database.
|
||||
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or <a href="http://ckeditor.com/license">http://ckeditor.com/license</a>
|
||||
-------------------------------------------------------------------------------------------
|
||||
|
||||
</pre><div style="display:none"></body> */ include "assets/posteddata.php"; ?>
|
@ -1,75 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>TAB Key-Based Navigation — CKEditor Sample</title>
|
||||
<meta charset="utf-8">
|
||||
<script src="../ckeditor.js"></script>
|
||||
<link href="sample.css" rel="stylesheet">
|
||||
<style>
|
||||
|
||||
.cke_focused,
|
||||
.cke_editable.cke_focused
|
||||
{
|
||||
outline: 3px dotted blue !important;
|
||||
*border: 3px dotted blue !important; /* For IE7 */
|
||||
}
|
||||
|
||||
</style>
|
||||
<script>
|
||||
|
||||
CKEDITOR.on( 'instanceReady', function( evt ) {
|
||||
var editor = evt.editor;
|
||||
editor.setData( 'This editor has it\'s tabIndex set to <strong>' + editor.tabIndex + '</strong>' );
|
||||
|
||||
// Apply focus class name.
|
||||
editor.on( 'focus', function() {
|
||||
editor.container.addClass( 'cke_focused' );
|
||||
});
|
||||
editor.on( 'blur', function() {
|
||||
editor.container.removeClass( 'cke_focused' );
|
||||
});
|
||||
|
||||
// Put startup focus on the first editor in tab order.
|
||||
if ( editor.tabIndex == 1 )
|
||||
editor.focus();
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="index.html">CKEditor Samples</a> » TAB Key-Based Navigation
|
||||
</h1>
|
||||
<div class="description">
|
||||
<p>
|
||||
This sample shows how tab key navigation among editor instances is
|
||||
affected by the <code>tabIndex</code> attribute from
|
||||
the original page element. Use TAB key to move between the editors.
|
||||
</p>
|
||||
</div>
|
||||
<p>
|
||||
<textarea class="ckeditor" cols="80" id="editor4" rows="10" tabindex="1"></textarea>
|
||||
</p>
|
||||
<div class="ckeditor" contenteditable="true" id="editor1" tabindex="4"></div>
|
||||
<p>
|
||||
<textarea class="ckeditor" cols="80" id="editor2" rows="10" tabindex="2"></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<textarea class="ckeditor" cols="80" id="editor3" rows="10" tabindex="3"></textarea>
|
||||
</p>
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,69 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>UI Color Picker — CKEditor Sample</title>
|
||||
<meta charset="utf-8">
|
||||
<script src="../ckeditor.js"></script>
|
||||
<link rel="stylesheet" href="sample.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="index.html">CKEditor Samples</a> » UI Color
|
||||
</h1>
|
||||
<div class="description">
|
||||
<p>
|
||||
This sample shows how to automatically replace <code><textarea></code> elements
|
||||
with a CKEditor instance with an option to change the color of its user interface.<br>
|
||||
<strong>Note:</strong>The UI skin color feature depends on the CKEditor skin
|
||||
compatibility. The Moono and Kama skins are examples of skins that work with it.
|
||||
</p>
|
||||
</div>
|
||||
<form action="sample_posteddata.php" method="post">
|
||||
<p>
|
||||
This editor instance has a UI color value defined in configuration to change the skin color,
|
||||
To specify the color of the user interface, set the <code>uiColor</code> property:
|
||||
</p>
|
||||
<pre class="samples">
|
||||
CKEDITOR.replace( '<em>textarea_id</em>', {
|
||||
<strong>uiColor: '#14B8C4'</strong>
|
||||
});</pre>
|
||||
<p>
|
||||
Note that <code><em>textarea_id</em></code> in the code above is the <code>id</code> attribute of
|
||||
the <code><textarea></code> element to be replaced.
|
||||
</p>
|
||||
<p>
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<script>
|
||||
|
||||
// Replace the <textarea id="editor"> with an CKEditor
|
||||
// instance, using default configurations.
|
||||
CKEDITOR.replace( 'editor1', {
|
||||
uiColor: '#14B8C4',
|
||||
toolbar: [
|
||||
[ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink' ],
|
||||
[ 'FontSize', 'TextColor', 'BGColor' ]
|
||||
]
|
||||
});
|
||||
|
||||
</script>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="Submit">
|
||||
</p>
|
||||
</form>
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,119 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>User Interface Globalization — CKEditor Sample</title>
|
||||
<meta charset="utf-8">
|
||||
<script src="../ckeditor.js"></script>
|
||||
<script src="assets/uilanguages/languages.js"></script>
|
||||
<link rel="stylesheet" href="sample.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="index.html">CKEditor Samples</a> » User Interface Languages
|
||||
</h1>
|
||||
<div class="description">
|
||||
<p>
|
||||
This sample shows how to automatically replace <code><textarea></code> elements
|
||||
with a CKEditor instance with an option to change the language of its user interface.
|
||||
</p>
|
||||
<p>
|
||||
It pulls the language list from CKEditor <code>_languages.js</code> file that contains the list of supported languages and creates
|
||||
a drop-down list that lets the user change the UI language.
|
||||
</p>
|
||||
<p>
|
||||
By default, CKEditor automatically localizes the editor to the language of the user.
|
||||
The UI language can be controlled with two configuration options:
|
||||
<code><a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-language">language</a></code> and
|
||||
<code><a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-defaultLanguage">
|
||||
defaultLanguage</a></code>. The <code>defaultLanguage</code> setting specifies the
|
||||
default CKEditor language to be used when a localization suitable for user's settings is not available.
|
||||
</p>
|
||||
<p>
|
||||
To specify the user interface language that will be used no matter what language is
|
||||
specified in user's browser or operating system, set the <code>language</code> property:
|
||||
</p>
|
||||
<pre class="samples">
|
||||
CKEDITOR.replace( '<em>textarea_id</em>', {
|
||||
// Load the German interface.
|
||||
<strong>language: 'de'</strong>
|
||||
});</pre>
|
||||
<p>
|
||||
Note that <code><em>textarea_id</em></code> in the code above is the <code>id</code> attribute of
|
||||
the <code><textarea></code> element to be replaced.
|
||||
</p>
|
||||
</div>
|
||||
<form action="sample_posteddata.php" method="post">
|
||||
<p>
|
||||
Available languages (<span id="count"> </span> languages!):<br>
|
||||
<script>
|
||||
|
||||
document.write( '<select disabled="disabled" id="languages" onchange="createEditor( this.value );">' );
|
||||
|
||||
// Get the language list from the _languages.js file.
|
||||
for ( var i = 0 ; i < window.CKEDITOR_LANGS.length ; i++ ) {
|
||||
document.write(
|
||||
'<option value="' + window.CKEDITOR_LANGS[i].code + '">' +
|
||||
window.CKEDITOR_LANGS[i].name +
|
||||
'</option>' );
|
||||
}
|
||||
|
||||
document.write( '</select>' );
|
||||
|
||||
</script>
|
||||
<br>
|
||||
<span style="color: #888888">
|
||||
(You may see strange characters if your system does not support the selected language)
|
||||
</span>
|
||||
</p>
|
||||
<p>
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<script>
|
||||
|
||||
// Set the number of languages.
|
||||
document.getElementById( 'count' ).innerHTML = window.CKEDITOR_LANGS.length;
|
||||
|
||||
var editor;
|
||||
|
||||
function createEditor( languageCode ) {
|
||||
if ( editor )
|
||||
editor.destroy();
|
||||
|
||||
// Replace the <textarea id="editor"> with an CKEditor
|
||||
// instance, using default configurations.
|
||||
editor = CKEDITOR.replace( 'editor1', {
|
||||
language: languageCode,
|
||||
|
||||
on: {
|
||||
instanceReady: function() {
|
||||
// Wait for the editor to be ready to set
|
||||
// the language combo.
|
||||
var languages = document.getElementById( 'languages' );
|
||||
languages.value = this.langCode;
|
||||
languages.disabled = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// At page startup, load the default language:
|
||||
createEditor( '' );
|
||||
|
||||
</script>
|
||||
</p>
|
||||
</form>
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,231 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>XHTML Compliant Output — CKEditor Sample</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="ckeditor-sample-required-plugins" content="sourcearea">
|
||||
<script src="../ckeditor.js"></script>
|
||||
<script src="../samples/sample.js"></script>
|
||||
<link href="sample.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="index.html">CKEditor Samples</a> » Producing XHTML Compliant Output
|
||||
</h1>
|
||||
<div class="description">
|
||||
<p>
|
||||
This sample shows how to configure CKEditor to output valid
|
||||
<a class="samples" href="http://www.w3.org/TR/xhtml11/">XHTML 1.1</a> code.
|
||||
Deprecated elements (<code><font></code>, <code><u></code>) or attributes
|
||||
(<code>size</code>, <code>face</code>) will be replaced with XHTML compliant code.
|
||||
</p>
|
||||
<p>
|
||||
To add a CKEditor instance outputting valid XHTML code, load the editor using a standard
|
||||
JavaScript call and define CKEditor features to use the XHTML compliant elements and styles.
|
||||
</p>
|
||||
<p>
|
||||
A snippet of the configuration code can be seen below; check the source of this page for
|
||||
full definition:
|
||||
</p>
|
||||
<pre class="samples">
|
||||
CKEDITOR.replace( '<em>textarea_id</em>', {
|
||||
contentsCss: 'assets/outputxhtml.css',
|
||||
|
||||
coreStyles_bold: {
|
||||
element: 'span',
|
||||
attributes: { 'class': 'Bold' }
|
||||
},
|
||||
coreStyles_italic: {
|
||||
element: 'span',
|
||||
attributes: { 'class': 'Italic' }
|
||||
},
|
||||
|
||||
...
|
||||
});</pre>
|
||||
</div>
|
||||
<form action="sample_posteddata.php" method="post">
|
||||
<p>
|
||||
<label for="editor1">
|
||||
Editor 1:
|
||||
</label>
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <span class="Bold">sample text</span>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<script>
|
||||
|
||||
CKEDITOR.replace( 'editor1', {
|
||||
/*
|
||||
* Style sheet for the contents
|
||||
*/
|
||||
contentsCss: 'assets/outputxhtml/outputxhtml.css',
|
||||
|
||||
/*
|
||||
* Special allowed content rules for spans used by
|
||||
* font face, size, and color buttons.
|
||||
*
|
||||
* Note: all rules have been written separately so
|
||||
* it was possible to specify required classes.
|
||||
*/
|
||||
extraAllowedContent: 'span(!FontColor1);span(!FontColor2);span(!FontColor3);' +
|
||||
'span(!FontColor1BG);span(!FontColor2BG);span(!FontColor3BG);' +
|
||||
'span(!FontComic);span(!FontCourier);span(!FontTimes);' +
|
||||
'span(!FontSmaller);span(!FontLarger);span(!FontSmall);span(!FontBig);span(!FontDouble)',
|
||||
|
||||
/*
|
||||
* Core styles.
|
||||
*/
|
||||
coreStyles_bold: {
|
||||
element: 'span',
|
||||
attributes: { 'class': 'Bold' }
|
||||
},
|
||||
coreStyles_italic: {
|
||||
element: 'span',
|
||||
attributes: { 'class': 'Italic' }
|
||||
},
|
||||
coreStyles_underline: {
|
||||
element: 'span',
|
||||
attributes: { 'class': 'Underline' }
|
||||
},
|
||||
coreStyles_strike: {
|
||||
element: 'span',
|
||||
attributes: { 'class': 'StrikeThrough' },
|
||||
overrides: 'strike'
|
||||
},
|
||||
coreStyles_subscript: {
|
||||
element: 'span',
|
||||
attributes: { 'class': 'Subscript' },
|
||||
overrides: 'sub'
|
||||
},
|
||||
coreStyles_superscript: {
|
||||
element: 'span',
|
||||
attributes: { 'class': 'Superscript' },
|
||||
overrides: 'sup'
|
||||
},
|
||||
|
||||
/*
|
||||
* Font face.
|
||||
*/
|
||||
|
||||
// List of fonts available in the toolbar combo. Each font definition is
|
||||
// separated by a semi-colon (;). We are using class names here, so each font
|
||||
// is defined by {Combo Label}/{Class Name}.
|
||||
font_names: 'Comic Sans MS/FontComic;Courier New/FontCourier;Times New Roman/FontTimes',
|
||||
|
||||
// Define the way font elements will be applied to the document. The "span"
|
||||
// element will be used. When a font is selected, the font name defined in the
|
||||
// above list is passed to this definition with the name "Font", being it
|
||||
// injected in the "class" attribute.
|
||||
// We must also instruct the editor to replace span elements that are used to
|
||||
// set the font (Overrides).
|
||||
font_style: {
|
||||
element: 'span',
|
||||
attributes: { 'class': '#(family)' },
|
||||
overrides: [
|
||||
{
|
||||
element: 'span',
|
||||
attributes: {
|
||||
'class': /^Font(?:Comic|Courier|Times)$/
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
/*
|
||||
* Font sizes.
|
||||
*/
|
||||
fontSize_sizes: 'Smaller/FontSmaller;Larger/FontLarger;8pt/FontSmall;14pt/FontBig;Double Size/FontDouble',
|
||||
fontSize_style: {
|
||||
element: 'span',
|
||||
attributes: { 'class': '#(size)' },
|
||||
overrides: [
|
||||
{
|
||||
element: 'span',
|
||||
attributes: {
|
||||
'class': /^Font(?:Smaller|Larger|Small|Big|Double)$/
|
||||
}
|
||||
}
|
||||
]
|
||||
} ,
|
||||
|
||||
/*
|
||||
* Font colors.
|
||||
*/
|
||||
colorButton_enableMore: false,
|
||||
|
||||
colorButton_colors: 'FontColor1/FF9900,FontColor2/0066CC,FontColor3/F00',
|
||||
colorButton_foreStyle: {
|
||||
element: 'span',
|
||||
attributes: { 'class': '#(color)' },
|
||||
overrides: [
|
||||
{
|
||||
element: 'span',
|
||||
attributes: {
|
||||
'class': /^FontColor(?:1|2|3)$/
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
colorButton_backStyle: {
|
||||
element: 'span',
|
||||
attributes: { 'class': '#(color)BG' },
|
||||
overrides: [
|
||||
{
|
||||
element: 'span',
|
||||
attributes: {
|
||||
'class': /^FontColor(?:1|2|3)BG$/
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
/*
|
||||
* Indentation.
|
||||
*/
|
||||
indentClasses: [ 'Indent1', 'Indent2', 'Indent3' ],
|
||||
|
||||
/*
|
||||
* Paragraph justification.
|
||||
*/
|
||||
justifyClasses: [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyFull' ],
|
||||
|
||||
/*
|
||||
* Styles combo.
|
||||
*/
|
||||
stylesSet: [
|
||||
{ name: 'Strong Emphasis', element: 'strong' },
|
||||
{ name: 'Emphasis', element: 'em' },
|
||||
|
||||
{ name: 'Computer Code', element: 'code' },
|
||||
{ name: 'Keyboard Phrase', element: 'kbd' },
|
||||
{ name: 'Sample Text', element: 'samp' },
|
||||
{ name: 'Variable', element: 'var' },
|
||||
|
||||
{ name: 'Deleted Text', element: 'del' },
|
||||
{ name: 'Inserted Text', element: 'ins' },
|
||||
|
||||
{ name: 'Cited Work', element: 'cite' },
|
||||
{ name: 'Inline Quotation', element: 'q' }
|
||||
]
|
||||
});
|
||||
|
||||
</script>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="Submit">
|
||||
</p>
|
||||
</form>
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Before Width: | Height: | Size: 818 B |
@ -1,219 +0,0 @@
|
||||
<?php
|
||||
die('disabled in s9y');
|
||||
/** Write the appropriate xinha_config directives to pass data to a PHP (Plugin) backend file.
|
||||
*
|
||||
* ImageManager Example:
|
||||
* The following would be placed in step 3 of your configuration (see the NewbieGuide
|
||||
* (http://xinha.python-hosting.com/wiki/NewbieGuide)
|
||||
*
|
||||
* <script language="javascript">
|
||||
* with (xinha_config.ImageManager)
|
||||
* {
|
||||
* <?php
|
||||
* xinha_pass_to_php_backend
|
||||
* (
|
||||
* array
|
||||
* (
|
||||
* 'images_dir' => '/home/your/directory',
|
||||
* 'images_url' => '/directory'
|
||||
* )
|
||||
* )
|
||||
* ?>
|
||||
* }
|
||||
* </script>
|
||||
*
|
||||
*/
|
||||
|
||||
// temporary
|
||||
unset($_REQUEST['backend_config']);
|
||||
unset($_REQUEST['backend_data']);
|
||||
function xinha_read_passed_data() {
|
||||
return array("msg"=>"dynamic configuration disabled for security reason");
|
||||
}
|
||||
function xinha_passed_data_querystring() {
|
||||
return '';
|
||||
}
|
||||
|
||||
function xinha_pass_to_php_backend($Data, $KeyLocation = 'Xinha:BackendKey', $ReturnPHP = FALSE)
|
||||
{
|
||||
|
||||
$bk = array();
|
||||
$bk['data'] = serialize($Data);
|
||||
|
||||
@session_start();
|
||||
if(!isset($_SESSION[$KeyLocation]))
|
||||
{
|
||||
$_SESSION[$KeyLocation] = uniqid('Key_');
|
||||
}
|
||||
|
||||
$bk['session_name'] = session_name();
|
||||
$bk['key_location'] = $KeyLocation;
|
||||
$bk['hash'] =
|
||||
function_exists('sha1') ?
|
||||
sha1($_SESSION[$KeyLocation] . $bk['data'])
|
||||
: md5($_SESSION[$KeyLocation] . $bk['data']);
|
||||
|
||||
|
||||
// The data will be passed via a postback to the
|
||||
// backend, we want to make sure these are going to come
|
||||
// out from the PHP as an array like $bk above, so
|
||||
// we need to adjust the keys.
|
||||
$backend_data = array();
|
||||
foreach($bk as $k => $v)
|
||||
{
|
||||
$backend_data["backend_data[$k]"] = $v;
|
||||
}
|
||||
|
||||
// The session_start() above may have been after data was sent, so cookies
|
||||
// wouldn't have worked.
|
||||
$backend_data[session_name()] = session_id();
|
||||
|
||||
if($ReturnPHP)
|
||||
{
|
||||
return array('backend_data' => $backend_data);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'backend_data = ' . xinha_to_js($backend_data) . "; \n";
|
||||
}
|
||||
}
|
||||
|
||||
/** Convert PHP data structure to Javascript */
|
||||
|
||||
function xinha_to_js($var, $tabs = 0)
|
||||
{
|
||||
if(is_numeric($var))
|
||||
{
|
||||
return $var;
|
||||
}
|
||||
|
||||
if(is_string($var))
|
||||
{
|
||||
return "'" . xinha_js_encode($var) . "'";
|
||||
}
|
||||
|
||||
if(is_array($var))
|
||||
{
|
||||
$useObject = false;
|
||||
foreach(array_keys($var) as $k) {
|
||||
if(!is_numeric($k)) $useObject = true;
|
||||
}
|
||||
$js = array();
|
||||
foreach($var as $k => $v)
|
||||
{
|
||||
$i = "";
|
||||
if($useObject) {
|
||||
if(preg_match('#^[a-zA-Z]+[a-zA-Z0-9]*$#', $k)) {
|
||||
$i .= "$k: ";
|
||||
} else {
|
||||
$i .= "'$k': ";
|
||||
}
|
||||
}
|
||||
$i .= xinha_to_js($v, $tabs + 1);
|
||||
$js[] = $i;
|
||||
}
|
||||
if($useObject) {
|
||||
$ret = "{\n" . xinha_tabify(implode(",\n", $js), $tabs) . "\n}";
|
||||
} else {
|
||||
$ret = "[\n" . xinha_tabify(implode(",\n", $js), $tabs) . "\n]";
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
return 'null';
|
||||
}
|
||||
|
||||
/** Like htmlspecialchars() except for javascript strings. */
|
||||
|
||||
function xinha_js_encode($string)
|
||||
{
|
||||
static $strings = "\\,\",',%,&,<,>,{,},@,\n,\r";
|
||||
|
||||
if(!is_array($strings))
|
||||
{
|
||||
$tr = array();
|
||||
foreach(explode(',', $strings) as $chr)
|
||||
{
|
||||
$tr[$chr] = sprintf('\x%02X', ord($chr));
|
||||
}
|
||||
$strings = $tr;
|
||||
}
|
||||
|
||||
return strtr($string, $strings);
|
||||
}
|
||||
|
||||
|
||||
/** Used by plugins to get the config passed via
|
||||
* xinha_pass_to_backend()
|
||||
* returns either the structure given, or NULL
|
||||
* if none was passed or a security error was encountered.
|
||||
*/
|
||||
|
||||
function oldxinha_read_passed_data()
|
||||
{
|
||||
if(isset($_REQUEST['backend_data']) && is_array($_REQUEST['backend_data']))
|
||||
{
|
||||
$bk = $_REQUEST['backend_data'];
|
||||
session_name($bk['session_name']);
|
||||
@session_start();
|
||||
if(!isset($_SESSION[$bk['key_location']])) return NULL;
|
||||
|
||||
if($bk['hash'] ===
|
||||
function_exists('sha1') ?
|
||||
sha1($_SESSION[$bk['key_location']] . $bk['data'])
|
||||
: md5($_SESSION[$bk['key_location']] . $bk['data']))
|
||||
{
|
||||
return unserialize(ini_get('magic_quotes_gpc') ? stripslashes($bk['data']) : $bk['data']);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/** Used by plugins to get a query string that can be sent to the backend
|
||||
* (or another part of the backend) to send the same data.
|
||||
*/
|
||||
|
||||
function oldxinha_passed_data_querystring()
|
||||
{
|
||||
$qs = array();
|
||||
if(isset($_REQUEST['backend_data']) && is_array($_REQUEST['backend_data']))
|
||||
{
|
||||
foreach($_REQUEST['backend_data'] as $k => $v)
|
||||
{
|
||||
$v = ini_get('magic_quotes_gpc') ? stripslashes($v) : $v;
|
||||
$qs[] = "backend_data[" . rawurlencode($k) . "]=" . rawurlencode($v);
|
||||
}
|
||||
}
|
||||
|
||||
$qs[] = session_name() . '=' . session_id();
|
||||
return implode('&', $qs);
|
||||
}
|
||||
|
||||
|
||||
/** Just space-tab indent some text */
|
||||
function xinha_tabify($text, $tabs)
|
||||
{
|
||||
if($text)
|
||||
{
|
||||
return str_repeat(" ", $tabs) . preg_replace('/\n(.)/', "\n" . str_repeat(" ", $tabs) . "\$1", $text);
|
||||
}
|
||||
}
|
||||
|
||||
/** Return upload_max_filesize value from php.ini in kilobytes (function adapted from php.net)**/
|
||||
function upload_max_filesize_kb()
|
||||
{
|
||||
$val = ini_get('upload_max_filesize');
|
||||
$val = trim($val);
|
||||
$last = strtolower($val{strlen($val)-1});
|
||||
switch($last)
|
||||
{
|
||||
// The 'G' modifier is available since PHP 5.1.0
|
||||
case 'g':
|
||||
$val *= 1024;
|
||||
case 'm':
|
||||
$val *= 1024;
|
||||
}
|
||||
return $val;
|
||||
}
|
||||
?>
|
@ -1,158 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Example with 2 HTMLAreas in the same form</title>
|
||||
<script type="text/javascript">
|
||||
// the _editor_url is REQUIRED! don't forget to set it.
|
||||
_editor_url = "../";
|
||||
// implicit language will be "en", but let's set it for brevity
|
||||
_editor_lang = "en";
|
||||
</script>
|
||||
<script type="text/javascript" src="../htmlarea.js"></script>
|
||||
<script type="text/javascript">
|
||||
// load the plugins that we will use
|
||||
// loading is necessary ONLY ONCE, regardless on how many editors you create
|
||||
// basically calling the following functions will load the plugin files as if
|
||||
// we would have wrote script src="..." but with easier and cleaner code
|
||||
HTMLArea.loadPlugin("TableOperations");
|
||||
HTMLArea.loadPlugin("SpellChecker");
|
||||
HTMLArea.loadPlugin("CSS");
|
||||
|
||||
// this function will get called at body.onload
|
||||
function initDocument() {
|
||||
// cache these values as we need to pass it for both editors
|
||||
var css_plugin_args = {
|
||||
combos : [
|
||||
{ label: "Syntax",
|
||||
// menu text // CSS class
|
||||
options: { "None" : "",
|
||||
"Code" : "code",
|
||||
"String" : "string",
|
||||
"Comment" : "comment",
|
||||
"Variable name" : "variable-name",
|
||||
"Type" : "type",
|
||||
"Reference" : "reference",
|
||||
"Preprocessor" : "preprocessor",
|
||||
"Keyword" : "keyword",
|
||||
"Function name" : "function-name",
|
||||
"Html tag" : "html-tag",
|
||||
"Html italic" : "html-helper-italic",
|
||||
"Warning" : "warning",
|
||||
"Html bold" : "html-helper-bold"
|
||||
},
|
||||
context: "pre"
|
||||
},
|
||||
{ label: "Info",
|
||||
options: { "None" : "",
|
||||
"Quote" : "quote",
|
||||
"Highlight" : "highlight",
|
||||
"Deprecated" : "deprecated"
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// GENERAL PATTERN
|
||||
//
|
||||
// 1. Instantitate an editor object.
|
||||
// 2. Register plugins (note, it's required to have them loaded).
|
||||
// 3. Configure any other items in editor.config.
|
||||
// 4. generate() the editor
|
||||
//
|
||||
// The above are steps that you use to create one editor. Nothing new
|
||||
// so far. In order to create more than one editor, you just have to
|
||||
// repeat those steps for each of one. Of course, you can register any
|
||||
// plugins you want (no need to register the same plugins for all
|
||||
// editors, and to demonstrate that we'll skip the TableOperations
|
||||
// plugin for the second editor). Just be careful to pass different
|
||||
// ID-s in the constructor (you don't want to _even try_ to create more
|
||||
// editors for the same TEXTAREA element ;-)).
|
||||
//
|
||||
// So much for the noise, see the action below.
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// CREATE FIRST EDITOR
|
||||
//
|
||||
var editor1 = new HTMLArea("text-area-1");
|
||||
|
||||
// plugins must be registered _per editor_. Therefore, we register
|
||||
// plugins for the first editor here, and we will also do this for the
|
||||
// second editor.
|
||||
editor1.registerPlugin(TableOperations);
|
||||
editor1.registerPlugin(SpellChecker);
|
||||
editor1.registerPlugin(CSS, css_plugin_args);
|
||||
|
||||
// custom config must be done per editor. Here we're importing the
|
||||
// stylesheet used by the CSS plugin.
|
||||
editor1.config.pageStyle = "@import url(custom.css);";
|
||||
|
||||
// generate first editor
|
||||
editor1.generate();
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// CREATE SECOND EDITOR
|
||||
//
|
||||
var editor2 = new HTMLArea("text-area-2");
|
||||
|
||||
// we are using the same plugins
|
||||
editor2.registerPlugin(TableOperations);
|
||||
editor2.registerPlugin(SpellChecker);
|
||||
editor2.registerPlugin(CSS, css_plugin_args);
|
||||
|
||||
// import the CSS plugin styles
|
||||
editor2.config.pageStyle = "@import url(custom.css);";
|
||||
|
||||
// generate the second editor
|
||||
// IMPORTANT: if we don't give it a timeout, the first editor will
|
||||
// not function in Mozilla. Soon I'll think about starting to
|
||||
// implement some kind of event that will fire when the editor
|
||||
// finished creating, then we'll be able to chain the generate()
|
||||
// calls in an elegant way. But right now there's no other solution
|
||||
// than the following.
|
||||
setTimeout(function() {
|
||||
editor2.generate();
|
||||
}, 500);
|
||||
//---------------------------------------------------------------------
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body onload="initDocument()">
|
||||
<h1>Example with 2 HTMLAreas in the same form</h1>
|
||||
|
||||
<form action="2-areas.cgi" method="post" target="_blank">
|
||||
|
||||
<input type="submit" value=" Submit " />
|
||||
<br />
|
||||
|
||||
<textarea id="text-area-1" name="text1" style="width: 100%; height: 12em">
|
||||
<h3>HTMLArea #1</h3>
|
||||
<p>This will submit a field named <em>text1</em>.</p>
|
||||
</textarea>
|
||||
|
||||
<br />
|
||||
|
||||
<textarea id="text-area-2" name="text2" style="width: 100%; height: 12em">
|
||||
<h3>Second HTMLArea</h3> <p><em>text2</em> submission. Both are
|
||||
located in the same FORM element and the script action is
|
||||
2-areas.cgi (see it in the examples directory)</p>
|
||||
</textarea>
|
||||
|
||||
<br />
|
||||
<input type="submit" value=" Submit " />
|
||||
|
||||
</form>
|
||||
|
||||
<hr>
|
||||
<address><a href="http://dynarch.com/mishoo/">Mihai Bazon</a></address>
|
||||
<!-- Created: Fri Oct 31 09:37:10 EET 2003 -->
|
||||
<!-- hhmts start --> Last modified: Wed Jan 28 11:10:40 EET 2004 <!-- hhmts end -->
|
||||
<!-- doc-lang: English -->
|
||||
</body>
|
||||
</html>
|
@ -1,16 +0,0 @@
|
||||
<html>
|
||||
<head><title>Xinha Extended Example</title></head>
|
||||
<!--------------------------------------:noTabs=true:tabSize=2:indentSize=2:--
|
||||
-- Xinha example frameset.
|
||||
--
|
||||
-- $HeadURL:http://svn.xinha.webfactional.com/trunk/examples/ExtendedDemo.html $
|
||||
-- $LastChangedDate:2008-02-04 01:43:21 +0100 (Mo, 04 Feb 2008) $
|
||||
-- $LastChangedRevision:962 $
|
||||
-- $LastChangedBy:ray $
|
||||
--------------------------------------------------------------------------->
|
||||
|
||||
<frameset cols="240,*">
|
||||
<frame src="files/ext_example-menu.php" name="menu" id="menu">
|
||||
<frame src="about:blank" name="body" id="body">
|
||||
</frameset>
|
||||
</html>
|
@ -1,24 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Xinha Newbie Guide</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<script type="text/javascript">
|
||||
_editor_url = "../" // (preferably absolute) URL (including trailing slash) where Xinha is installed
|
||||
_editor_lang = "en"; // And the language we need to use in the editor.
|
||||
_editor_skin = "silva"; // If you want use skin, add the name here
|
||||
</script>
|
||||
<script type="text/javascript" src="../XinhaLoader.js"></script>
|
||||
<script type="text/javascript" src="XinhaConfig.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<form action="">
|
||||
<div>
|
||||
<textarea id="myTextArea" name="myTextArea" rows="25" cols="50" style="width: 100%"></textarea>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
@ -1,20 +0,0 @@
|
||||
/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */
|
||||
/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */
|
||||
/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/examples/XinhaConfig.js */
|
||||
xinha_editors=null;
|
||||
xinha_init=null;
|
||||
xinha_config=null;
|
||||
xinha_plugins=null;
|
||||
xinha_init=xinha_init?xinha_init:function(){
|
||||
xinha_editors=xinha_editors?xinha_editors:["myTextArea","anotherOne"];
|
||||
xinha_plugins=xinha_plugins?xinha_plugins:["CharacterMap","ContextMenu","SmartReplace","Stylist","Linker","SuperClean","TableOperations"];
|
||||
if(!Xinha.loadPlugins(xinha_plugins,xinha_init)){
|
||||
return;
|
||||
}
|
||||
xinha_config=xinha_config?xinha_config():new Xinha.Config();
|
||||
xinha_config.pageStyleSheets=[_editor_url+"examples/full_example.css"];
|
||||
xinha_editors=Xinha.makeEditors(xinha_editors,xinha_config,xinha_plugins);
|
||||
Xinha.startEditors(xinha_editors);
|
||||
};
|
||||
Xinha.addOnloadHandler(xinha_init);
|
||||
|
@ -1,95 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Test of ContextMenu plugin</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript">
|
||||
_editor_url = "../";
|
||||
_editor_lang = "en";
|
||||
</script>
|
||||
|
||||
<!-- load the main HTMLArea file -->
|
||||
<script type="text/javascript" src="../htmlarea.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
HTMLArea.loadPlugin("ContextMenu");
|
||||
HTMLArea.loadPlugin("TableOperations");
|
||||
|
||||
function initDocument() {
|
||||
var editor = new HTMLArea("editor");
|
||||
editor.registerPlugin(ContextMenu);
|
||||
editor.registerPlugin(TableOperations);
|
||||
editor.generate();
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body onload="initDocument()">
|
||||
<h1>Test of ContextMenu plugin</h1>
|
||||
|
||||
|
||||
<textarea id="editor" style="height: 30em; width: 100%;">
|
||||
<table border="1" style="border: 1px dotted rgb(0, 102, 255); width:
|
||||
100%; background-color: rgb(255, 204, 51); background-image: none; float:
|
||||
none; text-align: left; vertical-align: top; border-collapse: collapse;"
|
||||
summary="" cellspacing="" cellpadding="" frame="box"
|
||||
rules="all"><tbody><tr><td style="border: 1px solid
|
||||
rgb(255, 0, 0); background-color: rgb(0, 51, 51); background-image: none;
|
||||
text-align: left; vertical-align: top;"><a
|
||||
href="http://dynarch.com/mishoo/articles.epl?art_id=430"><img
|
||||
src="http://127.0.0.1/~mishoo/htmlarea/examples/pieng.png" alt="" align=""
|
||||
border="0" hspace="0" vspace="0" /></a></td><td
|
||||
style="border: 1px solid rgb(255, 0, 0); background-color: rgb(255, 255, 0);
|
||||
background-image: none; text-align: left; vertical-align: top;">The
|
||||
article linked on the left image presents a script that allows Internet
|
||||
Explorer to use PNG images. We hope to be able to implement IE PNG support
|
||||
in HTMLArea soon.<br /> <br /> Go on, right-click everywhere and
|
||||
test our new context menus. And be thankful to <a
|
||||
href="http://www.americanbible.org/">American Bible Society</a> who
|
||||
sponsored the development, <a
|
||||
href="http://dynarch.com/mishoo/">mishoo</a> who made it happen and
|
||||
God, Who keeps mishoo alife. ;-)<br /> <br /><span
|
||||
style="font-style: italic;">P.S.</span> No animals were harmed
|
||||
while producing this movie.<br />
|
||||
</td></tr><tr><td style="border-style: none;
|
||||
background-color: rgb(255, 255, 51); background-image: none; text-align:
|
||||
left; vertical-align: top;">Welcome to HTMLArea, the best online
|
||||
editor.<br /></td><td>HTMLArea is a project initiated by
|
||||
<a href="http://interactivetools.com/">InteractiveTools.com</a>.
|
||||
Other companies contributed largely by sponsoring the development of
|
||||
additional extensions. Many thanks to:<br /> <br
|
||||
style="font-family: courier new,courier,monospace;" /> <div
|
||||
style="margin-left: 40px;"><a href="http://www.zapatec.com/"
|
||||
style="font-family: courier
|
||||
new,courier,monospace;">http://www.zapatec.com</a><br
|
||||
style="font-family: courier new,courier,monospace;" /> <a
|
||||
href="http://www.americanbible.org/" style="font-family: courier
|
||||
new,courier,monospace;">http://www.americanbible.org</a><br
|
||||
style="font-family: courier new,courier,monospace;" /> <a
|
||||
href="http://www.neomedia.ro/" style="font-family: courier
|
||||
new,courier,monospace;">http://www.neomedia.ro</a><br
|
||||
style="font-family: courier new,courier,monospace;" /> <a
|
||||
href="http://www.os3.it/" style="font-family: courier
|
||||
new,courier,monospace;">http://www.os3.it</a><br
|
||||
style="font-family: courier new,courier,monospace;" /> <a
|
||||
href="http://www.miro.com.au/" style="font-family: courier
|
||||
new,courier,monospace;">http://www.miro.com.au</a><br
|
||||
style="font-family: courier new,courier,monospace;" /> <a
|
||||
href="http://www.thycotic.com/" style="font-family: courier
|
||||
new,courier,monospace;">http://www.thycotic.com</a><br />
|
||||
</div> <br /> and to all the posters at <a
|
||||
href="http://www.interactivetools.com/iforum/Open_Source_C3/htmlArea_v3.0_-_Alpha_Release_F14/
|
||||
">InteractiveTools</a> HTMLArea forums, whose feedback is continually
|
||||
useful in polishing HTMLArea.<br /> <br /><div
|
||||
style="text-align: right;">-- developers and maintainers of version 3,
|
||||
<a href="http://dynarch.com/">dynarch.com</a>.<br
|
||||
/></div></td></tr></tbody></table>
|
||||
</textarea>
|
||||
|
||||
<hr />
|
||||
<address><a href="http://dynarch.com/mishoo/">Mihai Bazon</a></address>
|
||||
<!-- Created: Wed Oct 1 19:55:37 EEST 2003 -->
|
||||
<!-- hhmts start --> Last modified: Wed Jan 28 11:10:29 EET 2004 <!-- hhmts end -->
|
||||
<!-- doc-lang: English -->
|
||||
</body>
|
||||
</html>
|
@ -1,184 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Example of HTMLArea 3.0</title>
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<!-- Configure the path to the editor. We make it relative now, so that the
|
||||
example ZIP file will work anywhere, but please NOTE THAT it's better to
|
||||
have it an absolute path, such as '/htmlarea/'. -->
|
||||
<script type="text/javascript">
|
||||
_editor_url = "../";
|
||||
_editor_lang = "en";
|
||||
</script>
|
||||
<script type="text/javascript" src="../htmlarea.js"></script>
|
||||
|
||||
<style type="text/css">
|
||||
html, body {
|
||||
font-family: Verdana,sans-serif;
|
||||
background-color: #fea;
|
||||
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">
|
||||
var editor = null;
|
||||
function initEditor() {
|
||||
editor = new HTMLArea("ta");
|
||||
|
||||
// comment the following two lines to see how customization works
|
||||
editor.generate();
|
||||
return false;
|
||||
|
||||
var cfg = editor.config; // this is the default configuration
|
||||
cfg.registerButton({
|
||||
id : "my-hilite",
|
||||
tooltip : "Highlight text",
|
||||
image : "ed_custom.gif",
|
||||
textMode : false,
|
||||
action : function(editor) {
|
||||
editor.surroundHTML("<span class=\"hilite\">", "</span>");
|
||||
},
|
||||
context : 'table'
|
||||
});
|
||||
|
||||
cfg.toolbar.push(["linebreak", "my-hilite"]); // add the new button to the toolbar
|
||||
|
||||
// BEGIN: code that adds a custom button
|
||||
// uncomment it to test
|
||||
var cfg = editor.config; // this is the default configuration
|
||||
/*
|
||||
cfg.registerButton({
|
||||
id : "my-hilite",
|
||||
tooltip : "Highlight text",
|
||||
image : "ed_custom.gif",
|
||||
textMode : false,
|
||||
action : function(editor) {
|
||||
editor.surroundHTML("<span class=\"hilite\">", "</span>");
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
||||
function clickHandler(editor, buttonId) {
|
||||
switch (buttonId) {
|
||||
case "my-toc":
|
||||
editor.insertHTML("<h1>Table Of Contents</h1>");
|
||||
break;
|
||||
case "my-date":
|
||||
editor.insertHTML((new Date()).toString());
|
||||
break;
|
||||
case "my-bold":
|
||||
editor.execCommand("bold");
|
||||
editor.execCommand("italic");
|
||||
break;
|
||||
case "my-hilite":
|
||||
editor.surroundHTML("<span class=\"hilite\">", "</span>");
|
||||
break;
|
||||
}
|
||||
};
|
||||
cfg.registerButton("my-toc", "Insert TOC", "ed_custom.gif", false, clickHandler);
|
||||
cfg.registerButton("my-date", "Insert date/time", "ed_custom.gif", false, clickHandler);
|
||||
cfg.registerButton("my-bold", "Toggle bold/italic", "ed_custom.gif", false, clickHandler);
|
||||
cfg.registerButton("my-hilite", "Hilite selection", "ed_custom.gif", false, clickHandler);
|
||||
|
||||
cfg.registerButton("my-sample", "Class: sample", "ed_custom.gif", false,
|
||||
function(editor) {
|
||||
if (HTMLArea.is_ie) {
|
||||
editor.insertHTML("<span class=\"sample\"> </span>");
|
||||
var r = editor._doc.selection.createRange();
|
||||
r.move("character", -2);
|
||||
r.moveEnd("character", 2);
|
||||
r.select();
|
||||
} else { // Gecko/W3C compliant
|
||||
var n = editor._doc.createElement("span");
|
||||
n.className = "sample";
|
||||
editor.insertNodeAtSelection(n);
|
||||
var sel = editor._iframe.contentWindow.getSelection();
|
||||
sel.removeAllRanges();
|
||||
var r = editor._doc.createRange();
|
||||
r.setStart(n, 0);
|
||||
r.setEnd(n, 0);
|
||||
sel.addRange(r);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
/*
|
||||
cfg.registerButton("my-hilite", "Highlight text", "ed_custom.gif", false,
|
||||
function(editor) {
|
||||
editor.surroundHTML('<span class="hilite">', '</span>');
|
||||
}
|
||||
);
|
||||
*/
|
||||
cfg.pageStyle = "body { background-color: #efd; } .hilite { background-color: yellow; } "+
|
||||
".sample { color: green; font-family: monospace; }";
|
||||
cfg.toolbar.push(["linebreak", "my-toc", "my-date", "my-bold", "my-hilite", "my-sample"]); // add the new button to the toolbar
|
||||
// END: code that adds a custom button
|
||||
|
||||
editor.generate();
|
||||
}
|
||||
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>
|
||||
|
||||
</head>
|
||||
|
||||
<!-- use <body onload="HTMLArea.replaceAll()" if you don't care about
|
||||
customizing the editor. It's the easiest way! :) -->
|
||||
<body onload="initEditor()">
|
||||
|
||||
<h1>HTMLArea 3.0</h1>
|
||||
|
||||
<p>A replacement for <code>TEXTAREA</code> elements. © <a
|
||||
href="http://interactivetools.com">InteractiveTools.com</a>, 2003-2004.</p>
|
||||
|
||||
<form action="test.cgi" method="post" id="edit" name="edit">
|
||||
|
||||
<textarea id="ta" name="ta" style="width:100%" rows="20" cols="80">
|
||||
<p>Here is some sample text: <b>bold</b>, <i>italic</i>, <u>underline</u>. </p>
|
||||
<p align=center>Different fonts, sizes and colors (all in bold):</p>
|
||||
<p><b>
|
||||
<font face="arial" size="7" color="#000066">arial</font>,
|
||||
<font face="courier new" size="6" color="#006600">courier new</font>,
|
||||
<font face="georgia" size="5" color="#006666">georgia</font>,
|
||||
<font face="tahoma" size="4" color="#660000">tahoma</font>,
|
||||
<font face="times new roman" size="3" color="#660066">times new roman</font>,
|
||||
<font face="verdana" size="2" color="#666600">verdana</font>,
|
||||
<font face="tahoma" size="1" color="#666666">tahoma</font>
|
||||
</b></p>
|
||||
<p>Click on <a href="http://www.interactivetools.com/">this link</a> and then on the link button to the details ... OR ... select some text and click link to create a <b>new</b> link.</p>
|
||||
</textarea>
|
||||
|
||||
<p />
|
||||
|
||||
<input type="submit" name="ok" value=" submit " />
|
||||
<input type="button" name="ins" value=" insert html " onclick="return insertHTML();" />
|
||||
<input type="button" name="hil" value=" highlight text " onclick="return highlight();" />
|
||||
|
||||
<a href="javascript:mySubmit()">submit</a>
|
||||
|
||||
<script type="text/javascript">
|
||||
function mySubmit() {
|
||||
// document.edit.save.value = "yes";
|
||||
document.edit.onsubmit(); // workaround browser bugs.
|
||||
document.edit.submit();
|
||||
};
|
||||
</script>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,88 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Test of CSS plugin</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript">
|
||||
_editor_url = "../";
|
||||
_editor_lang = "en";
|
||||
</script>
|
||||
|
||||
<!-- load the main HTMLArea files -->
|
||||
<script type="text/javascript" src="../htmlarea.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
HTMLArea.loadPlugin("CSS");
|
||||
|
||||
function initDocument() {
|
||||
var editor = new HTMLArea("editor");
|
||||
editor.config.pageStyle = "@import url(custom.css);";
|
||||
editor.registerPlugin(CSS, {
|
||||
combos : [
|
||||
{ label: "Syntax",
|
||||
// menu text // CSS class
|
||||
options: { "None" : "",
|
||||
"Code" : "code",
|
||||
"String" : "string",
|
||||
"Comment" : "comment",
|
||||
"Variable name" : "variable-name",
|
||||
"Type" : "type",
|
||||
"Reference" : "reference",
|
||||
"Preprocessor" : "preprocessor",
|
||||
"Keyword" : "keyword",
|
||||
"Function name" : "function-name",
|
||||
"Html tag" : "html-tag",
|
||||
"Html italic" : "html-helper-italic",
|
||||
"Warning" : "warning",
|
||||
"Html bold" : "html-helper-bold"
|
||||
},
|
||||
context: "pre"
|
||||
},
|
||||
{ label: "Info",
|
||||
options: { "None" : "",
|
||||
"Quote" : "quote",
|
||||
"Highlight" : "highlight",
|
||||
"Deprecated" : "deprecated"
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
editor.generate();
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body onload="initDocument()">
|
||||
<h1>Test of FullPage plugin</h1>
|
||||
|
||||
<textarea id="editor" style="height: 30em; width: 100%;"
|
||||
><h1><tt>registerDropdown</tt></h1>
|
||||
|
||||
<p>Here's some sample code that adds a dropdown to the toolbar. Go on, do
|
||||
syntax highlighting on it ;-)</p>
|
||||
|
||||
<pre>var the_options = {
|
||||
"Keyword" : "keyword",
|
||||
"Function name" : "function-name",
|
||||
"String" : "string",
|
||||
"Numeric" : "integer",
|
||||
"Variable name" : "variable"
|
||||
};
|
||||
var css_class = {
|
||||
id : "CSS-class",
|
||||
tooltip : i18n["tooltip"],
|
||||
options : the_options,
|
||||
action : function(editor) { self.onSelect(editor, this); }
|
||||
};
|
||||
cfg.registerDropdown(css_class);
|
||||
toolbar[0].unshift(["CSS-class"]);</pre>
|
||||
|
||||
<p>Easy, eh? ;-)</p></textarea>
|
||||
|
||||
<hr />
|
||||
<address><a href="http://dynarch.com/mishoo/">Mihai Bazon</a></address>
|
||||
<!-- Created: Wed Oct 1 19:55:37 EEST 2003 -->
|
||||
<!-- hhmts start --> Last modified: Wed Jan 28 11:10:16 EET 2004 <!-- hhmts end -->
|
||||
<!-- doc-lang: English -->
|
||||
</body>
|
||||
</html>
|
@ -1,29 +0,0 @@
|
||||
body { background-color: #234; color: #dd8; font-family: tahoma; font-size: 12px; }
|
||||
|
||||
a:link, a:visited { color: #8cf; }
|
||||
a:hover { color: #ff8; }
|
||||
|
||||
h1 { background-color: #456; color: #ff8; padding: 2px 5px; border: 1px solid; border-color: #678 #012 #012 #678; }
|
||||
|
||||
/* syntax highlighting (used by the first combo defined for the CSS plugin) */
|
||||
|
||||
pre { margin: 0px 1em; padding: 5px 1em; background-color: #000; border: 1px dotted #02d; border-left: 2px solid #04f; }
|
||||
.code { color: #f5deb3; }
|
||||
.string { color: #00ffff; }
|
||||
.comment { color: #8fbc8f; }
|
||||
.variable-name { color: #fa8072; }
|
||||
.type { color: #90ee90; font-weight: bold; }
|
||||
.reference { color: #ee82ee; }
|
||||
.preprocessor { color: #faf; }
|
||||
.keyword { color: #ffffff; font-weight: bold; }
|
||||
.function-name { color: #ace; }
|
||||
.html-tag { font-weight: bold; }
|
||||
.html-helper-italic { font-style: italic; }
|
||||
.warning { color: #ffa500; font-weight: bold; }
|
||||
.html-helper-bold { font-weight: bold; }
|
||||
|
||||
/* info combo */
|
||||
|
||||
.quote { font-style: italic; color: #ee9; }
|
||||
.highlight { background-color: yellow; color: #000; }
|
||||
.deprecated { text-decoration: line-through; color: #aaa; }
|
@ -1,317 +0,0 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Settings</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../popups/popup.css" />
|
||||
<script type="text/javascript">
|
||||
|
||||
function getAbsolutePos(el) {
|
||||
var r = { x: el.offsetLeft, y: el.offsetTop };
|
||||
if (el.offsetParent) {
|
||||
var tmp = getAbsolutePos(el.offsetParent);
|
||||
r.x += tmp.x;
|
||||
r.y += tmp.y;
|
||||
}
|
||||
return r;
|
||||
};
|
||||
|
||||
function getSelectedValue(el) {
|
||||
if(!el)
|
||||
return "";
|
||||
return el[el.selectedIndex].value;
|
||||
}
|
||||
|
||||
function setSelectedValue(el, val) {
|
||||
if(!el)
|
||||
return "";
|
||||
var ops = el.getElementsByTagName("option");
|
||||
for (var i = ops.length; --i >= 0;) {
|
||||
var op = ops[i];
|
||||
op.selected = (op.value == val);
|
||||
}
|
||||
el.value = val;
|
||||
}
|
||||
|
||||
function getCheckedValue(el) {
|
||||
if(!el)
|
||||
return "";
|
||||
var radioLength = el.length;
|
||||
if(radioLength == undefined)
|
||||
if(el.checked)
|
||||
return el.value;
|
||||
else
|
||||
return "false";
|
||||
for(var i = 0; i < radioLength; i++) {
|
||||
if(el[i].checked) {
|
||||
return el[i].value;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
function setCheckedValue(el, val) {
|
||||
if(!el)
|
||||
return;
|
||||
var radioLength = el.length;
|
||||
if(radioLength == undefined) {
|
||||
el.checked = (el.value == val.toString());
|
||||
return;
|
||||
}
|
||||
for(var i = 0; i < radioLength; i++) {
|
||||
el[i].checked = false;
|
||||
if(el[i].value == val.toString()) {
|
||||
el[i].checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function __dlg_onclose() {
|
||||
opener.Dialog._return(null);
|
||||
};
|
||||
|
||||
// closes the dialog and passes the return info upper.
|
||||
function __dlg_close(val) {
|
||||
opener.Dialog._return(val);
|
||||
window.close();
|
||||
};
|
||||
|
||||
function __dlg_close_on_esc(ev) {
|
||||
ev || (ev = window.event);
|
||||
if (ev.keyCode == 27) {
|
||||
window.close();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
function __dlg_init(bottom) {
|
||||
var body = document.body;
|
||||
var body_height = 0;
|
||||
if (typeof bottom == "undefined") {
|
||||
var div = document.createElement("div");
|
||||
body.appendChild(div);
|
||||
var pos = getAbsolutePos(div);
|
||||
body_height = pos.y;
|
||||
} else {
|
||||
var pos = getAbsolutePos(bottom);
|
||||
body_height = pos.y + bottom.offsetHeight;
|
||||
}
|
||||
if (!window.dialogArguments && opener.Dialog._arguments)
|
||||
{
|
||||
window.dialogArguments = opener.Dialog._arguments;
|
||||
}
|
||||
if (!document.all) {
|
||||
window.sizeToContent();
|
||||
window.sizeToContent(); // for reasons beyond understanding,
|
||||
// only if we call it twice we get the
|
||||
// correct size.
|
||||
window.addEventListener("unload", __dlg_onclose, true);
|
||||
window.innerWidth = body.offsetWidth + 5;
|
||||
window.innerHeight = body_height + 2;
|
||||
// center on parent
|
||||
var x = opener.screenX + (opener.outerWidth - window.outerWidth) / 2;
|
||||
var y = opener.screenY + (opener.outerHeight - window.outerHeight) / 2;
|
||||
window.moveTo(x, y);
|
||||
} else {
|
||||
// window.dialogHeight = body.offsetHeight + 50 + "px";
|
||||
// window.dialogWidth = body.offsetWidth + "px";
|
||||
window.resizeTo(body.offsetWidth, body_height);
|
||||
var ch = body.clientHeight;
|
||||
var cw = body.clientWidth;
|
||||
window.resizeBy(body.offsetWidth - cw, body_height - ch);
|
||||
var W = body.offsetWidth;
|
||||
var H = 2 * body_height - ch;
|
||||
var x = (screen.availWidth - W) / 2;
|
||||
var y = (screen.availHeight - H) / 2;
|
||||
window.moveTo(x, y);
|
||||
}
|
||||
document.body.onkeypress = __dlg_close_on_esc;
|
||||
};
|
||||
|
||||
function placeFocus() {
|
||||
var bFound = false;
|
||||
// for each form
|
||||
for (f=0; f < document.forms.length; f++) {
|
||||
// for each element in each form
|
||||
for(i=0; i < document.forms[f].length; i++) {
|
||||
// if it's not a hidden element
|
||||
if (document.forms[f][i].type != "hidden") {
|
||||
// and it's not disabled
|
||||
if (document.forms[f][i].disabled != true) {
|
||||
// set the focus to it
|
||||
document.forms[f][i].focus();
|
||||
var bFound = true;
|
||||
}
|
||||
}
|
||||
// if found in this element, stop looking
|
||||
if (bFound == true)
|
||||
break;
|
||||
}
|
||||
// if found in this form, stop looking
|
||||
if (bFound == true)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function Init() {
|
||||
__dlg_init();
|
||||
var param = window.dialogArguments;
|
||||
if(param) {
|
||||
var el;
|
||||
for (var field in param) {
|
||||
//alert(field + '="' + param[field] + '"');
|
||||
el = document.getElementById(field);
|
||||
if (el.tagName.toLowerCase()=="input"){
|
||||
if ((el.type.toLowerCase()=="radio") || (el.type.toLowerCase()=="checkbox")){
|
||||
setCheckedValue(el, param[field]);
|
||||
} else {
|
||||
el.value = param[field];
|
||||
}
|
||||
} else if (el.tagName.toLowerCase()=="select"){
|
||||
setSelectedValue(el, param[field]);
|
||||
} else if (el.tagName.toLowerCase()=="textarea"){
|
||||
el.value = param[field];
|
||||
}
|
||||
}
|
||||
}
|
||||
placeFocus();
|
||||
};
|
||||
|
||||
// pass data back to the calling window
|
||||
function onOK() {
|
||||
var param = new Object();
|
||||
var el = document.getElementsByTagName('input');
|
||||
for (var i=0; i<el.length;i++){
|
||||
if ((el[i].type.toLowerCase()=="radio") || (el[i].type.toLowerCase()=="checkbox")){
|
||||
if (getCheckedValue(el[i])!=''){
|
||||
param[el[i].id] = getCheckedValue(el[i]);
|
||||
}
|
||||
} else {
|
||||
param[el[i].id] = el[i].value;
|
||||
}
|
||||
}
|
||||
el = document.getElementsByTagName('select');
|
||||
for (var i=0; i<el.length;i++){
|
||||
param[el[i].id] = getSelectedValue(el[i]);
|
||||
}
|
||||
el = document.getElementsByTagName('textarea');
|
||||
for (var i=0; i<el.length;i++){
|
||||
param[el[i].id] = el[i].value;
|
||||
}
|
||||
__dlg_close(param);
|
||||
return false;
|
||||
};
|
||||
|
||||
function onCancel() {
|
||||
__dlg_close(null);
|
||||
return false;
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style type="text/css">
|
||||
label { width: 16em; float: left; padding: 2px 5px; text-align: right; }
|
||||
br { clear: both; }
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="dialog" onload="Init(); window.resizeTo(420, 820);">
|
||||
<div class="title">Settings</div>
|
||||
<form action="" method="get">
|
||||
<fieldset>
|
||||
<legend>Xinha options</legend>
|
||||
<label for="width">Editor width:</label>
|
||||
<input type="text" name="width" id="width" title="Allowed values are 'auto', 'toolbar' or a numeric value followed by 'px'." /><br />
|
||||
<label for="height">Editor height:</label>
|
||||
<input type="text" name="height" id="height" title="Allowed values are 'auto' or a numeric value followed by 'px'." /><br />
|
||||
<label for="sizeIncludesBars">Size includes bars</label>
|
||||
<input type="checkbox" name="sizeIncludesBars" id="sizeIncludesBars" value="true" title="Specifies whether the toolbar should be included in the size, or are extra to it." /><br />
|
||||
<label for="sizeIncludesPanels">Size includes panels</label>
|
||||
<input type="checkbox" name="sizeIncludesPanels" id="sizeIncludesPanels" value="true" title="Specifies whether the panels should be included in the size, or are extra to it." /><br />
|
||||
<label for="statusBar">Status Bar</label>
|
||||
<input type="checkbox" name="statusBar" id="statusBar" value="true" title="Enable creation of the status bar?" /><br />
|
||||
<label for="htmlareaPaste">Htmlarea Paste</label>
|
||||
<input type="checkbox" name="htmlareaPaste" id="htmlareaPaste" value="true" title="Intercept ^V and use the Xinha paste command" /><br />
|
||||
<label for="mozParaHandler">Mozilla Parameter Handler:</label>
|
||||
<select name="mozParaHandler" id="mozParaHandler" title="Gecko only: Let the built-in routine for handling the return key decide if to enter br or p tags or use a custom implementation.">
|
||||
<option value="built-in">built-in</option>
|
||||
<option value="dirty">dirty</option>
|
||||
<option value="best">best</option>
|
||||
</select><br />
|
||||
<label for="getHtmlMethod">GetHtml Method:</label>
|
||||
<select name="getHtmlMethod" id="getHtmlMethod" title="This determines the method how the HTML output is generated.">
|
||||
<option value="DOMwalk">DOMwalk</option>
|
||||
<option value="TransformInnerHTML">TransformInnerHTML</option>
|
||||
</select><br />
|
||||
<label for="undoSteps">Undo steps:</label>
|
||||
<input type="text" name="undoSteps" id="undoSteps" title="Maximum size of the undo queue." /><br />
|
||||
<label for="undoTimeout">Undo Timeout:</label>
|
||||
<input type="text" name="undoTimeout" id="undoTimeout" title="The time interval at which undo samples are taken, default: 500 (1/2 sec)." /><br />
|
||||
<label for="changeJustifyWithDirection">change justify with direction</label>
|
||||
<input type="checkbox" name="changeJustifyWithDirection" id="changeJustifyWithDirection" value="true" title="Set this to true if you want to explicitly right-justify when setting the text direction to right-to-left" /><br />
|
||||
<label for="fullPage">full Page</label>
|
||||
<input type="checkbox" name="fullPage" id="fullPage" value="true" title="If true then Xinha will retrieve the full HTML, starting with the HTML-tag." /><br />
|
||||
<label for="pageStyle">Page style:</label>
|
||||
<textarea name="pageStyle" id="pageStyle" title="Raw style definitions included in the edited document"></textarea>
|
||||
<!-- pageStyleSheets -->
|
||||
<label for="baseHref">Base href:</label>
|
||||
<input type="text" name="baseHref" id="baseHref" title="specify a base href for relative links" /><br />
|
||||
<label for="expandRelativeUrl">expand relative Url</label>
|
||||
<input type="checkbox" name="expandRelativeUrl" id="expandRelativeUrl" value="true" title="If true, relative URLs (../) will be made absolute"/><br />
|
||||
<label for="stripBaseHref">Strip base href</label>
|
||||
<input type="checkbox" name="stripBaseHref" id="stripBaseHref" value="true" title="We can strip the server part out of URL to make/leave them semi-absolute" /><br />
|
||||
<label for="stripSelfNamedAnchors">Strip self named anchors</label>
|
||||
<input type="checkbox" name="stripSelfNamedAnchors" id="stripSelfNamedAnchors" value="true" title="We can strip the url of the editor page from named links" /><br />
|
||||
<label for="only7BitPrintablesInURLs">only 7bit printables in URLs</label>
|
||||
<input type="checkbox" name="only7BitPrintablesInURLs" id="only7BitPrintablesInURLs" value="true" title="In URLs all characters above ASCII value 127 have to be encoded using % codes" /><br />
|
||||
<label for="sevenBitClean">7bit Clean</label>
|
||||
<input type="checkbox" name="sevenBitClean" id="sevenBitClean" value="true" title="If you are putting the HTML written in Xinha into an email you might want it to be 7-bit characters only." /><br />
|
||||
<label for="killWordOnPaste">kill Word on paste</label>
|
||||
<input type="checkbox" name="killWordOnPaste" id="killWordOnPaste" value="true" title="Set to true if you want Word code to be cleaned upon Paste." /><br />
|
||||
<label for="makeLinkShowsTarget">make Link Shows Target</label>
|
||||
<input type="checkbox" name="makeLinkShowsTarget" id="makeLinkShowsTarget" value="true" title="Enable the 'Target' field in the Make Link dialog." /><br />
|
||||
<label for="flowToolbars">flow toolbars</label>
|
||||
<input type="checkbox" name="flowToolbars" id="flowToolbars" value="true" /><br />
|
||||
<label for="stripScripts">strip Scripts</label>
|
||||
<input type="checkbox" name="stripScripts" id="stripScripts" value="true" title="Set to false if you want to allow JavaScript in the content" /><br />
|
||||
<label for="showLoading">show loading</label>
|
||||
<input type="checkbox" name="showLoading" id="showLoading" value="true" /><br />
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="CharacterMapOptions" class="options">
|
||||
<legend>CharacterMap options</legend>
|
||||
<label for="CharacterMapMode">Mode :</label>
|
||||
<select id="CharacterMapMode" name="CharacterMapMode">
|
||||
<option value="popup">popup</option>
|
||||
<option value="panel">panel</option>
|
||||
</select>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="ListTypeOptions" class="options">
|
||||
<legend>ListType options</legend>
|
||||
<label class="ListTypeMode">Mode :</label>
|
||||
<select id="ListTypeMode" name="ListTypeMode">
|
||||
<option value="toolbar">toolbar</option>
|
||||
<option value="panel">panel</option>
|
||||
</select>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="CharCounterOptions" class="options">
|
||||
<legend>CharCounter options</legend>
|
||||
<label for="showChar">show Char :</label>
|
||||
<input type="checkbox" name="showChar" id="showChar" value="true" /><br />
|
||||
<label for="showWord">show Word :</label>
|
||||
<input type="checkbox" name="showWord" id="showWord" value="true" /><br />
|
||||
<label for="showHtml">show Html :</label>
|
||||
<input type="checkbox" name="showHtml" id="showHtml" value="true" /><br />
|
||||
</fieldset>
|
||||
<br />
|
||||
|
||||
<div id="buttons">
|
||||
<button type="submit" name="ok" onclick="return onOK();">OK</button>
|
||||
<button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
@ -1,40 +0,0 @@
|
||||
/*--------------------------------------:noTabs=true:tabSize=2:indentSize=2:--
|
||||
-- CSS plugin example CSS file. This file is used by full_example.js
|
||||
-- when the CSS plugin is included in an auto-generated example.
|
||||
-- @TODO Make this CSS more useful.
|
||||
--
|
||||
-- $HeadURL:http://svn.xinha.webfactional.com/trunk/examples/files/custom.css $
|
||||
-- $LastChangedDate:2008-02-04 01:43:21 +0100 (Mo, 04 Feb 2008) $
|
||||
-- $LastChangedRevision:962 $
|
||||
-- $LastChangedBy:ray $
|
||||
--------------------------------------------------------------------------*/
|
||||
|
||||
body { background-color: #234; color: #dd8; font-family: tahoma; font-size: 12px; }
|
||||
|
||||
a:link, a:visited { color: #8cf; }
|
||||
a:hover { color: #ff8; }
|
||||
|
||||
h1 { background-color: #456; color: #ff8; padding: 2px 5px; border: 1px solid; border-color: #678 #012 #012 #678; }
|
||||
|
||||
/* syntax highlighting (used by the first combo defined for the CSS plugin) */
|
||||
|
||||
pre { margin: 0px 1em; padding: 5px 1em; background-color: #000; border: 1px dotted #02d; border-left: 2px solid #04f; }
|
||||
.code { color: #f5deb3; }
|
||||
.string { color: #00ffff; }
|
||||
.comment { color: #8fbc8f; }
|
||||
.variable-name { color: #fa8072; }
|
||||
.type { color: #90ee90; font-weight: bold; }
|
||||
.reference { color: #ee82ee; }
|
||||
.preprocessor { color: #faf; }
|
||||
.keyword { color: #ffffff; font-weight: bold; }
|
||||
.function-name { color: #ace; }
|
||||
.html-tag { font-weight: bold; }
|
||||
.html-helper-italic { font-style: italic; }
|
||||
.warning { color: #ffa500; font-weight: bold; }
|
||||
.html-helper-bold { font-weight: bold; }
|
||||
|
||||
/* info combo */
|
||||
|
||||
.quote { font-style: italic; color: #ee9; }
|
||||
.highlight { background-color: yellow; color: #000; }
|
||||
.deprecated { text-decoration: line-through; color: #aaa; }
|
@ -1,56 +0,0 @@
|
||||
/*--------------------------------------:noTabs=true:tabSize=2:indentSize=2:--
|
||||
-- DynamicCSS plugin example CSS file. Used by full_example.js
|
||||
-- when the DynamicCSS plugin is included in an auto-generated example.
|
||||
-- @TODO Make this CSS more useful.
|
||||
--
|
||||
-- $HeadURL:http://svn.xinha.webfactional.com/trunk/examples/files/dynamic.css $
|
||||
-- $LastChangedDate:2008-02-04 01:43:21 +0100 (Mo, 04 Feb 2008) $
|
||||
-- $LastChangedRevision:962 $
|
||||
-- $LastChangedBy:ray $
|
||||
--------------------------------------------------------------------------*/
|
||||
|
||||
p {
|
||||
FONT-FAMILY: Arial, Helvetica;
|
||||
FONT-SIZE: 9pt;
|
||||
FONT-WEIGHT: normal;
|
||||
COLOR: #000000;
|
||||
}
|
||||
|
||||
p.p1 {
|
||||
FONT-FAMILY: Arial, Helvetica;
|
||||
FONT-SIZE: 11pt;
|
||||
FONT-WEIGHT: normal;
|
||||
COLOR: #000000;
|
||||
}
|
||||
|
||||
p.p2 {
|
||||
FONT-FAMILY: Arial, Helvetica;
|
||||
FONT-SIZE: 13pt;
|
||||
FONT-WEIGHT: normal;
|
||||
COLOR: #000000;
|
||||
}
|
||||
|
||||
div {
|
||||
FONT-FAMILY: Arial, Helvetica;
|
||||
FONT-SIZE: 9pt;
|
||||
FONT-WEIGHT: bold;
|
||||
COLOR: #000000;
|
||||
}
|
||||
|
||||
div.div1 {
|
||||
FONT-FAMILY: Arial, Helvetica;
|
||||
FONT-SIZE: 11pt;
|
||||
FONT-WEIGHT: bold;
|
||||
COLOR: #000000;
|
||||
}
|
||||
|
||||
div.div2 {
|
||||
FONT-FAMILY: Arial, Helvetica;
|
||||
FONT-SIZE: 13pt;
|
||||
FONT-WEIGHT: bold;
|
||||
COLOR: #000000;
|
||||
}
|
||||
|
||||
.quote { font-style: italic; color: #ee9; }
|
||||
.highlight { background-color: yellow; color: #000; }
|
||||
.deprecated { text-decoration: line-through; color: #aaa; }
|
@ -1,206 +0,0 @@
|
||||
<!DOCTYPE BHTML PUBLIC "-//BC//DTD BHTML 3.2 Final//EN">
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<!-- ---------------------------------------------------------------------
|
||||
-- $HeadURL:http://svn.xinha.webfactional.com/trunk/examples/files/ext_example-body.html $
|
||||
-- $LastChangedDate:2008-02-04 01:43:21 +0100 (Mo, 04 Feb 2008) $
|
||||
-- $LastChangedRevision:962 $
|
||||
-- $LastChangedBy:ray $
|
||||
------------------------------------------------------------------------ -->
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Example of Xinha</title>
|
||||
<link rel="stylesheet" type="text/css" href="full_example.css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
function showError( sMsg, sUrl, sLine){
|
||||
document.getElementById('errors').value += 'Error: ' + sMsg + '\n' +
|
||||
'Source File: ' + sUrl + '\n' +
|
||||
'Line: ' + sLine + '\n';
|
||||
return false;
|
||||
}
|
||||
// You must set _editor_url to the URL (including trailing slash) where
|
||||
// where xinha is installed, it's highly recommended to use an absolute URL
|
||||
// eg: _editor_url = "/path/to/xinha/";
|
||||
// You may try a relative URL if you wish]
|
||||
// eg: _editor_url = "../";
|
||||
// in this example we do a little regular expression to find the absolute path.
|
||||
_editor_url = document.location.href.replace(/examples\/files\/ext_example-body\.html.*/, '')
|
||||
//moved _editor_lang & _editor_skin to init function because of error thrown when frame document not ready
|
||||
</script>
|
||||
|
||||
<!-- Load up the actual editor core -->
|
||||
<script type="text/javascript" src="../../XinhaCore.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
xinha_editors = null;
|
||||
xinha_init = null;
|
||||
xinha_config = null;
|
||||
xinha_plugins = null;
|
||||
|
||||
xinha_init = xinha_init ? xinha_init : function() {
|
||||
window.onerror = showError;
|
||||
document.onerror = showError;
|
||||
|
||||
var f = top.frames["menu"].document.forms["fsettings"];
|
||||
_editor_lang = f.lang[f.lang.selectedIndex].value; // the language we need to use in the editor.
|
||||
_editor_skin = f.skin[f.skin.selectedIndex].value; // the skin we use in the editor
|
||||
// What are the plugins you will be using in the editors on this page.
|
||||
// List all the plugins you will need, even if not all the editors will use all the plugins.
|
||||
xinha_plugins = [ ];
|
||||
for(var x = 0; x < f.plugins.length; x++) {
|
||||
if(f.plugins[x].checked) xinha_plugins.push(f.plugins[x].value);
|
||||
}
|
||||
|
||||
// THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING :)
|
||||
if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return;
|
||||
|
||||
// What are the names of the textareas you will be turning into editors?
|
||||
var num = 1;
|
||||
num = parseInt(f.num.value);
|
||||
if(isNaN(num)) {
|
||||
num = 1;
|
||||
f.num.value = 1;
|
||||
}
|
||||
var dest = document.getElementById("editors_here");
|
||||
var lipsum = window.parent.menu.document.getElementById('myTextarea0').value;
|
||||
|
||||
xinha_editors = [ ]
|
||||
for(var x = 0; x < num; x++) {
|
||||
var ta = 'myTextarea' + x;
|
||||
xinha_editors.push(ta);
|
||||
|
||||
var div = document.createElement('div');
|
||||
div.className = 'area_holder';
|
||||
|
||||
var txta = document.createElement('textarea');
|
||||
txta.id = ta;
|
||||
txta.name = ta;
|
||||
txta.value = lipsum;
|
||||
txta.style.width="100%";
|
||||
txta.style.height="420px";
|
||||
|
||||
div.appendChild(txta);
|
||||
dest.appendChild(div);
|
||||
}
|
||||
|
||||
// Create a default configuration to be used by all the editors.
|
||||
settings = top.frames["menu"].settings;
|
||||
xinha_config = new Xinha.Config();
|
||||
xinha_config.width = settings.width;
|
||||
xinha_config.height = settings.height;
|
||||
xinha_config.sizeIncludesBars = settings.sizeIncludesBars;
|
||||
xinha_config.sizeIncludesPanels = settings.sizeIncludesPanels;
|
||||
xinha_config.statusBar = settings.statusBar;
|
||||
xinha_config.htmlareaPaste = settings.htmlareaPaste;
|
||||
xinha_config.mozParaHandler = settings.mozParaHandler;
|
||||
xinha_config.getHtmlMethod = settings.getHtmlMethod;
|
||||
xinha_config.undoSteps = settings.undoSteps;
|
||||
xinha_config.undoTimeout = settings.undoTimeout;
|
||||
xinha_config.changeJustifyWithDirection = settings.changeJustifyWithDirection;
|
||||
xinha_config.fullPage = settings.fullPage;
|
||||
xinha_config.pageStyle = settings.pageStyle;
|
||||
xinha_config.baseHref = settings.baseHref;
|
||||
xinha_config.expandRelativeUrl = settings.expandRelativeUrl;
|
||||
xinha_config.stripBaseHref = settings.stripBaseHref;
|
||||
xinha_config.stripSelfNamedAnchors = settings.stripSelfNamedAnchors;
|
||||
xinha_config.only7BitPrintablesInURLs = settings.only7BitPrintablesInURLs;
|
||||
xinha_config.sevenBitClean = settings.sevenBitClean;
|
||||
xinha_config.killWordOnPaste = settings.killWordOnPaste;
|
||||
xinha_config.makeLinkShowsTarget = settings.makeLinkShowsTarget;
|
||||
xinha_config.flowToolbars = settings.flowToolbars;
|
||||
xinha_config.stripScripts = settings.stripScripts;
|
||||
xinha_config.flowToolbars = settings.flowToolbars;
|
||||
xinha_config.showLoading = settings.showLoading;
|
||||
xinha_config.pageStyleSheets = ["own.css"];
|
||||
|
||||
// Create a default configuration for the plugins
|
||||
if (typeof CharCounter != 'undefined') {
|
||||
xinha_config.CharCounter.showChar = settings.showChar;
|
||||
xinha_config.CharCounter.showWord = settings.showWord;
|
||||
xinha_config.CharCounter.showHtml = settings.showHtml;
|
||||
}
|
||||
|
||||
if(typeof CharacterMap != 'undefined') xinha_config.CharacterMap.mode = settings.CharacterMapMode;
|
||||
if(typeof ListType != 'undefined') xinha_config.ListType.mode = settings.ListTypeMode;
|
||||
if(typeof CSS != 'undefined') xinha_config.pageStyle = xinha_config.pageStyle + "\n" + "@import url(custom.css);";
|
||||
if(typeof DynamicCSS != 'undefined') xinha_config.pageStyle = "@import url(dynamic.css);";
|
||||
if(typeof Filter != 'undefined') xinha_config.Filters = ["Word", "Paragraph"];
|
||||
|
||||
if(typeof Stylist != 'undefined') {
|
||||
// We can load an external stylesheet like this - NOTE : YOU MUST GIVE AN ABSOLUTE URL
|
||||
// otherwise it won't work!
|
||||
xinha_config.stylistLoadStylesheet(document.location.href.replace(/[^\/]*\.html/, 'stylist.css'));
|
||||
|
||||
// Or we can load styles directly
|
||||
xinha_config.stylistLoadStyles('p.red_text { color:red }');
|
||||
|
||||
// If you want to provide "friendly" names you can do so like
|
||||
// (you can do this for stylistLoadStylesheet as well)
|
||||
xinha_config.stylistLoadStyles('p.pink_text { color:pink }', {'p.pink_text' : 'Pretty Pink'});
|
||||
}
|
||||
|
||||
if(typeof InsertWords != 'undefined') {
|
||||
// Register the keyword/replacement list
|
||||
var keywrds1 = new Object();
|
||||
var keywrds2 = new Object();
|
||||
|
||||
keywrds1['-- Dropdown Label --'] = '';
|
||||
keywrds1['onekey'] = 'onevalue';
|
||||
keywrds1['twokey'] = 'twovalue';
|
||||
keywrds1['threekey'] = 'threevalue';
|
||||
|
||||
keywrds2['-- Insert Keyword --'] = '';
|
||||
keywrds2['Username'] = '%user%';
|
||||
keywrds2['Last login date'] = '%last_login%';
|
||||
xinha_config.InsertWords = {
|
||||
combos : [ { options: keywrds1, context: "body" },
|
||||
{ options: keywrds2, context: "li" } ]
|
||||
}
|
||||
}
|
||||
|
||||
// First create editors for the textareas.
|
||||
// You can do this in two ways, either
|
||||
// xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);
|
||||
// if you want all the editor objects to use the same set of plugins, OR;
|
||||
// xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config);
|
||||
// xinha_editors['myTextarea0'].registerPlugins(['Stylist']);
|
||||
// xinha_editors['myTextarea1'].registerPlugins(['CSS','SuperClean']);
|
||||
// if you want to use a different set of plugins for one or more of the editors.
|
||||
xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);
|
||||
|
||||
// If you want to change the configuration variables of any of the editors,
|
||||
// this is the place to do that, for example you might want to
|
||||
// change the width and height of one of the editors, like this...
|
||||
// xinha_editors['myTextarea0'].config.width = '640px';
|
||||
// xinha_editors['myTextarea0'].config.height = '480px';
|
||||
|
||||
// Finally we "start" the editors, this turns the textareas into Xinha editors.
|
||||
Xinha.startEditors(xinha_editors);
|
||||
}
|
||||
|
||||
// javascript submit handler
|
||||
// this shows how to create a javascript submit button that works with the htmleditor.
|
||||
submitHandler = function(formname) {
|
||||
var form = document.getElementById(formname);
|
||||
// in order for the submit to work both of these methods have to be called.
|
||||
form.onsubmit();
|
||||
window.parent.menu.document.getElementById('myTextarea0').value = document.getElementById('myTextarea0').value;
|
||||
form.submit();
|
||||
return true;
|
||||
}
|
||||
|
||||
window.onload = xinha_init;
|
||||
// window.onunload = Xinha.collectGarbageForIE;
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<form id="to_submit" name="to_submit" method="post" action="ext_example-dest.php">
|
||||
<div id="editors_here"></div>
|
||||
<button type="button" onclick="submitHandler('to_submit');">Submit</button>
|
||||
<textarea id="errors" name="errors" style="width:100%; height:100px; background:silver;"></textarea><!-- style="display:none;" -->
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
@ -1,357 +0,0 @@
|
||||
<?php
|
||||
$LocalPluginPath = dirname(dirname(dirname(__FILE__))).DIRECTORY_SEPARATOR.'plugins';
|
||||
$LocalSkinPath = dirname(dirname(dirname(__File__))).DIRECTORY_SEPARATOR.'skins';
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<!--------------------------------------:noTabs=true:tabSize=2:indentSize=2:--
|
||||
-- Xinha example menu. This file is used by full_example.html within a
|
||||
-- frame to provide a menu for generating example editors using
|
||||
-- full_example-body.html, and full_example.js.
|
||||
--
|
||||
-- $HeadURL:http://svn.xinha.webfactional.com/trunk/examples/files/ext_example-menu.php $
|
||||
-- $LastChangedDate:2008-04-12 23:23:17 +0200 (Sa, 12 Apr 2008) $
|
||||
-- $LastChangedRevision:993 $
|
||||
-- $LastChangedBy:ray $
|
||||
--------------------------------------------------------------------------->
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Example of Xinha</title>
|
||||
<link rel="stylesheet" href="full_example.css" />
|
||||
<style type="text/css">
|
||||
h1 {font: bold 22px "Staccato222 BT", cursive;}
|
||||
form, p {margin: 0px; padding: 0px;}
|
||||
label { display:block;}
|
||||
</style>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
var settings = null;
|
||||
settings = {
|
||||
width: "auto",
|
||||
height: "auto",
|
||||
sizeIncludesBars: true,
|
||||
sizeIncludesPanels: true,
|
||||
statusBar: true,
|
||||
htmlareaPaste: false,
|
||||
mozParaHandler: "best",
|
||||
getHtmlMethod: "DOMwalk",
|
||||
undoSteps: 20,
|
||||
undoTimeout: 500,
|
||||
changeJustifyWithDirection: false,
|
||||
fullPage: false,
|
||||
pageStyle: "",
|
||||
baseHref: null,
|
||||
expandRelativeUrl: true,
|
||||
stripBaseHref: true,
|
||||
stripSelfNamedAnchors: true,
|
||||
only7BitPrintablesInURLs: true,
|
||||
sevenBitClean: false,
|
||||
killWordOnPaste: true,
|
||||
makeLinkShowsTarget: true,
|
||||
flowToolbars: true,
|
||||
stripScripts: false,
|
||||
CharacterMapMode: "popup",
|
||||
ListTypeMode: "toolbar",
|
||||
showLoading: false,
|
||||
showChar: true,
|
||||
showWord: true,
|
||||
showHtml: true
|
||||
};
|
||||
|
||||
|
||||
function getCookieVal (offset) {
|
||||
var endstr = document.cookie.indexOf (";", offset);
|
||||
if (endstr == -1)
|
||||
endstr = document.cookie.length;
|
||||
return unescape(document.cookie.substring(offset, endstr));
|
||||
}
|
||||
|
||||
function getCookie (name) {
|
||||
var arg = name + "=";
|
||||
var alen = arg.length;
|
||||
var clen = document.cookie.length;
|
||||
var i = 0;
|
||||
while (i < clen) {
|
||||
var j = i + alen;
|
||||
if (document.cookie.substring(i, j) == arg)
|
||||
return getCookieVal (j);
|
||||
i = document.cookie.indexOf(" ", i) + 1;
|
||||
if (i == 0) break;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function setCookie (name, value) {
|
||||
var argv = setCookie.arguments;
|
||||
var argc = setCookie.arguments.length;
|
||||
var expires = (argc > 2) ? argv[2] : null;
|
||||
var path = (argc > 3) ? argv[3] : null;
|
||||
var domain = (argc > 4) ? argv[4] : null;
|
||||
var secure = (argc > 5) ? argv[5] : false;
|
||||
document.cookie = name + "=" + escape (value) +
|
||||
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
|
||||
((path == null) ? "" : ("; path=" + path)) +
|
||||
((domain == null) ? "" : ("; domain=" + domain)) +
|
||||
((secure == true) ? "; secure" : "");
|
||||
}
|
||||
|
||||
function _onResize() {
|
||||
var sHeight;
|
||||
if (window.innerHeight) sHeight = window.innerHeight;
|
||||
else if (document.body && document.body.offsetHeight) sHeight = document.body.offsetHeight;
|
||||
else return;
|
||||
if (sHeight>270) {
|
||||
sHeight = sHeight - 245;
|
||||
} else {
|
||||
sHeight = 30
|
||||
}
|
||||
var div = document.getElementById("div_plugins");
|
||||
div.style.height = sHeight + "px";
|
||||
}
|
||||
|
||||
function Dialog(url, action, init) {
|
||||
if (typeof init == "undefined") {
|
||||
init = window; // pass this window object by default
|
||||
}
|
||||
if (typeof window.showModalDialog == 'function')
|
||||
{
|
||||
Dialog._return = action;
|
||||
var r = window.showModalDialog(url, init, "dialogheight=10;dialogheight=10;scroll=yes;resizable=yes");
|
||||
}
|
||||
else
|
||||
{
|
||||
Dialog._geckoOpenModal(url, action, init);
|
||||
}
|
||||
};
|
||||
|
||||
Dialog._parentEvent = function(ev) {
|
||||
setTimeout( function() { if (Dialog._modal && !Dialog._modal.closed) { Dialog._modal.focus() } }, 50);
|
||||
if (Dialog._modal && !Dialog._modal.closed) {
|
||||
agt = navigator.userAgent.toLowerCase();
|
||||
is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
|
||||
if (is_ie) {
|
||||
ev.cancelBubble = true;
|
||||
ev.returnValue = false;
|
||||
} else {
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// should be a function, the return handler of the currently opened dialog.
|
||||
Dialog._return = null;
|
||||
|
||||
// constant, the currently opened dialog
|
||||
Dialog._modal = null;
|
||||
|
||||
// the dialog will read it's args from this variable
|
||||
Dialog._arguments = null;
|
||||
|
||||
Dialog._geckoOpenModal = function(url, action, init) {
|
||||
var dlg = window.open(url, "hadialog",
|
||||
"toolbar=no,menubar=no,personalbar=no,width=10,height=10," +
|
||||
"scrollbars=no,resizable=yes,modal=yes,dependable=yes");
|
||||
Dialog._modal = dlg;
|
||||
Dialog._arguments = init;
|
||||
|
||||
// capture some window's events
|
||||
function capwin(w) {
|
||||
// Xinha._addEvent(w, "click", Dialog._parentEvent);
|
||||
// Xinha._addEvent(w, "mousedown", Dialog._parentEvent);
|
||||
// Xinha._addEvent(w, "focus", Dialog._parentEvent);
|
||||
};
|
||||
// release the captured events
|
||||
function relwin(w) {
|
||||
// Xinha._removeEvent(w, "click", Dialog._parentEvent);
|
||||
// Xinha._removeEvent(w, "mousedown", Dialog._parentEvent);
|
||||
// Xinha._removeEvent(w, "focus", Dialog._parentEvent);
|
||||
};
|
||||
capwin(window);
|
||||
// capture other frames
|
||||
for (var i = 0; i < window.frames.length; capwin(window.frames[i++]));
|
||||
// make up a function to be called when the Dialog ends.
|
||||
Dialog._return = function (val) {
|
||||
if (val && action) {
|
||||
action(val);
|
||||
}
|
||||
relwin(window);
|
||||
// capture other frames
|
||||
for (var i = 0; i < window.frames.length; relwin(window.frames[i++]));
|
||||
Dialog._modal = null;
|
||||
};
|
||||
};
|
||||
|
||||
function fExtended () {
|
||||
Dialog("Extended.html", function(param) {
|
||||
if(param) {
|
||||
settings.width = param["width"];
|
||||
settings.height = param["height"];
|
||||
settings.sizeIncludesBars = (param["sizeIncludesBars"]=="true");
|
||||
settings.sizeIncludesPanels = (param["sizeIncludesPanels"]=="true");
|
||||
settings.statusBar = (param["statusBar"]=="true");
|
||||
settings.htmlareaPaste = (param["htmlareaPaste"]=="true");
|
||||
settings.mozParaHandler = param["mozParaHandler"];
|
||||
settings.getHtmlMethod = param["getHtmlMethod"];
|
||||
settings.undoSteps = param["undoSteps"];
|
||||
settings.undoTimeout = param["undoTimeout"];
|
||||
settings.changeJustifyWithDirection = (param["changeJustifyWithDirection"]=="true");
|
||||
settings.fullPage = (param["fullPage"]=="true");
|
||||
settings.pageStyle = param["pageStyle"];
|
||||
settings.baseHref = param["baseHref"];
|
||||
settings.expandRelativeUrl = (param["expandRelativeUrl"]=="true");
|
||||
settings.stripBaseHref = (param["stripBaseHref"]=="true");
|
||||
settings.stripSelfNamedAnchors = (param["stripSelfNamedAnchors"]=="true");
|
||||
settings.only7BitPrintablesInURLs = (param["only7BitPrintablesInURLs"]=="true");
|
||||
settings.sevenBitClean = (param["sevenBitClean"]=="true");
|
||||
settings.killWordOnPaste = (param["killWordOnPaste"]=="true");
|
||||
settings.makeLinkShowsTarget = (param["makeLinkShowsTarget"]=="true");
|
||||
settings.flowToolbars = (param["flowToolbars"]=="true");
|
||||
settings.stripScripts = (param["stripScripts"]=="true");
|
||||
settings.CharacterMapMode = param["CharacterMapMode"];
|
||||
settings.ListTypeMode = param["ListTypeMode"];
|
||||
settings.showLoading = (param["showLoading"]=="true");
|
||||
settings.showChar = (param["showChar"]=="true");
|
||||
settings.showWord = (param["showWord"]=="true");
|
||||
settings.showHtml = (param["showHtml"]=="true");
|
||||
}
|
||||
}, settings );
|
||||
}
|
||||
|
||||
function init(){
|
||||
var co = getCookie('co_ext_Xinha');
|
||||
if(co!=null){
|
||||
var co_values;
|
||||
var co_entries = co.split('###');
|
||||
for (var i in co_entries) {
|
||||
co_values = co_entries[i].split('=');
|
||||
if(co_values[0]=='plugins') {
|
||||
for(var x = 0; x < document.forms[0].plugins.length; x++) {
|
||||
if(co_values[1].indexOf(document.forms[0].plugins[x].value)!=-1) {
|
||||
document.forms[0].plugins[x].checked = true;
|
||||
}
|
||||
}
|
||||
} else if(co_values[0]!='') {
|
||||
document.getElementById(co_values[0]).value = co_values[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
_onResize();
|
||||
};
|
||||
|
||||
window.onresize = _onResize;
|
||||
window.onload = init;
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<form action="ext_example-body.html" target="body" name="fsettings" id="fsettings">
|
||||
<h1>Xinha Example</h1>
|
||||
<fieldset>
|
||||
<legend>Settings</legend>
|
||||
<label>
|
||||
Number of Editors: <input type="text" name="num" id="num" value="1" style="width:25;" maxlength="2"/>
|
||||
</label>
|
||||
<label>
|
||||
Language:
|
||||
<select name="lang" id="lang">
|
||||
<option value="en">English</option>
|
||||
<option value="de">German</option>
|
||||
<option value="fr">French</option>
|
||||
<option value="it">Italian</option>
|
||||
<option value="no">Norwegian</option>
|
||||
<option value="pl">Polish</option>
|
||||
<option value="ja">Japanese</option>
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
Skin:
|
||||
<select name="skin" id="skin">
|
||||
<option value="">-- no skin --</option>
|
||||
<?php
|
||||
$d = @dir($LocalSkinPath);
|
||||
while (false !== ($entry = $d->read())) //not a dot file or directory
|
||||
{ if(substr($entry,0,1) != '.')
|
||||
{ echo '<option value="' . $entry . '"> ' . $entry . '</option>'."\n";
|
||||
}
|
||||
}
|
||||
$d->close();
|
||||
?>
|
||||
</select>
|
||||
</label>
|
||||
<center><input type="button" value="extended Settings" onClick="fExtended();" /></center>
|
||||
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Plugins</legend>
|
||||
<div id="div_plugins" style="width:100%; overflow:auto">
|
||||
<?php
|
||||
$d = @dir($LocalPluginPath);
|
||||
$dir_array = array();
|
||||
while (false !== ($entry = $d->read())) //not a dot file or directory
|
||||
{ if(substr($entry,0,1) != '.')
|
||||
{ $dir_array[] = $entry;
|
||||
}
|
||||
}
|
||||
$d->close();
|
||||
sort($dir_array);
|
||||
foreach ($dir_array as $entry)
|
||||
{ echo '<label><input type="checkbox" name="plugins" id="plugins" value="' . $entry . '"> ' . $entry . '</label>'."\n";
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<center><button type="submit">reload editor</button></center>
|
||||
|
||||
<textarea id="myTextarea0" style="display:none">
|
||||
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
|
||||
Aliquam et tellus vitae justo varius placerat. Suspendisse iaculis
|
||||
velit semper dolor. Donec gravida tincidunt mi. Curabitur tristique
|
||||
ante elementum turpis. Aliquam nisl. Nulla posuere neque non
|
||||
tellus. Morbi vel nibh. Cum sociis natoque penatibus et magnis dis
|
||||
parturient montes, nascetur ridiculus mus. Nam nec wisi. In wisi.
|
||||
Curabitur pharetra bibendum lectus.</p>
|
||||
|
||||
<ul>
|
||||
<li> Phasellus et massa sed diam viverra semper. </li>
|
||||
<li> Mauris tincidunt felis in odio. </li>
|
||||
<li> Nulla placerat nunc ut pede. </li>
|
||||
<li> Vivamus ultrices mi sit amet urna. </li>
|
||||
<li> Quisque sed augue quis nunc laoreet volutpat.</li>
|
||||
<li> Nunc sit amet metus in tortor semper mattis. </li>
|
||||
</ul>
|
||||
</textarea>
|
||||
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
top.frames["body"].location.href = document.location.href.replace(/ext_example-menu\.php.*/, 'ext_example-body.html')
|
||||
var _oldSubmitHandler = null;
|
||||
if (document.forms[0].onsubmit != null) {
|
||||
_oldSubmitHandler = document.forms[0].onsubmit;
|
||||
}
|
||||
function frame_onSubmit(){
|
||||
var thenewdate = new Date ();
|
||||
thenewdate.setTime(thenewdate.getTime() + (5*24*60*60*1000));
|
||||
var co_value = 'skin=' + document.getElementById('skin').options[document.getElementById('skin').selectedIndex].value + '###' +
|
||||
'lang=' + document.getElementById('lang').options[document.getElementById('lang').selectedIndex].value + '###' +
|
||||
'num=' + document.getElementById('num').value + '###';
|
||||
var s_value='';
|
||||
for(var x = 0; x < document.forms[0].plugins.length; x++) {
|
||||
if(document.forms[0].plugins[x].checked)
|
||||
s_value += document.forms[0].plugins[x].value + '/';
|
||||
}
|
||||
if(s_value!='') {
|
||||
co_value += 'plugins=' + s_value + '###'
|
||||
}
|
||||
setCookie('co_ext_Xinha', co_value, thenewdate);
|
||||
if (_oldSubmitHandler != null) {
|
||||
_oldSubmitHandler();
|
||||
}
|
||||
}
|
||||
document.forms[0].onsubmit = frame_onSubmit;
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,48 +0,0 @@
|
||||
/*--------------------------------------:noTabs=true:tabSize=2:indentSize=2:--
|
||||
-- Xinha example CSS file. This is ripped from Trac ;)
|
||||
--
|
||||
-- $HeadURL:http://svn.xinha.webfactional.com/trunk/examples/files/full_example.css $
|
||||
-- $LastChangedDate:2008-02-04 01:43:21 +0100 (Mo, 04 Feb 2008) $
|
||||
-- $LastChangedRevision:962 $
|
||||
-- $LastChangedBy:ray $
|
||||
--------------------------------------------------------------------------*/
|
||||
|
||||
body {
|
||||
background: #fff;
|
||||
color: #000;
|
||||
margin: 10px;
|
||||
}
|
||||
body, th, td {
|
||||
font: normal 13px verdana,arial,'Bitstream Vera Sans',helvetica,sans-serif;
|
||||
}
|
||||
h1, h2, h3, h4 {
|
||||
font-family: arial,verdana,'Bitstream Vera Sans',helvetica,sans-serif;
|
||||
font-weight: bold;
|
||||
letter-spacing: -0.018em;
|
||||
}
|
||||
h1 { font-size: 21px; margin: .15em 1em 0 0 }
|
||||
h2 { font-size: 16px; margin: 2em 0 .5em; }
|
||||
h3 { font-size: 14px; margin: 1.5em 0 .5em; }
|
||||
hr { border: none; border-top: 1px solid #ccb; margin: 2em 0; }
|
||||
address { font-style: normal }
|
||||
img { border: none }
|
||||
|
||||
:link, :visited {
|
||||
text-decoration: none;
|
||||
color: #b00;
|
||||
border-bottom: 1px dotted #bbb;
|
||||
}
|
||||
:link:hover, :visited:hover {
|
||||
background-color: #eee;
|
||||
color: #555;
|
||||
}
|
||||
h1 :link, h1 :visited ,h2 :link, h2 :visited, h3 :link, h3 :visited,
|
||||
h4 :link, h4 :visited, h5 :link, h5 :visited, h6 :link, h6 :visited {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.area_holder
|
||||
{
|
||||
margin:10px;
|
||||
}
|
||||
label {font-size: 11px;}
|
@ -1,31 +0,0 @@
|
||||
/*--------------------------------------:noTabs=true:tabSize=2:indentSize=2:--
|
||||
-- Stylist plugin example CSS file. Used by full_example.js
|
||||
-- when the Stylist plugin is included in an auto-generated example.
|
||||
--
|
||||
-- $HeadURL:http://svn.xinha.webfactional.com/trunk/examples/files/stylist.css $
|
||||
-- $LastChangedDate:2008-02-04 01:43:21 +0100 (Mo, 04 Feb 2008) $
|
||||
-- $LastChangedRevision:962 $
|
||||
-- $LastChangedBy:ray $
|
||||
--------------------------------------------------------------------------*/
|
||||
|
||||
.bluetext
|
||||
{
|
||||
color:blue;
|
||||
}
|
||||
|
||||
p.blue_paragraph
|
||||
{
|
||||
color:darkblue;
|
||||
}
|
||||
|
||||
li.green_list_item
|
||||
{
|
||||
color:green;
|
||||
}
|
||||
|
||||
h1.webdings_lvl_1
|
||||
{
|
||||
font-family:webdings;
|
||||
}
|
||||
|
||||
img.polaroid { border:1px solid black; background-color:white; padding:10px; padding-bottom:30px; }
|
@ -1,77 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Test of FullPage plugin</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript">
|
||||
_editor_url = "../";
|
||||
_editor_lang = "en";
|
||||
</script>
|
||||
|
||||
<!-- load the main HTMLArea files -->
|
||||
<script type="text/javascript" src="../htmlarea.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
HTMLArea.loadPlugin("FullPage");
|
||||
|
||||
function initDocument() {
|
||||
var editor = new HTMLArea("editor");
|
||||
editor.registerPlugin(FullPage);
|
||||
editor.generate();
|
||||
}
|
||||
|
||||
HTMLArea.onload = initDocument;
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body onload="HTMLArea.init()">
|
||||
<h1>Test of FullPage plugin</h1>
|
||||
|
||||
<textarea id="editor" style="height: 30em; width: 100%;">
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>FullPage plugin for HTMLArea</title>
|
||||
<link rel="alternate stylesheet" href="http://dynarch.com/mishoo/css/dark.css" />
|
||||
<link rel="stylesheet" href="http://dynarch.com/mishoo/css/cool-light.css" />
|
||||
</head>
|
||||
<body style="background-color: #ddddee; color: #000077;">
|
||||
<table style="width:60%; height: 90%; margin: 2% auto 1% auto;" align="center" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td style="background-color: #ddeedd; border: 2px solid #002; height: 1.5em; padding: 2px; font: bold 24px Verdana;">
|
||||
FullPage plugin
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color: #fff; border: 1px solid #aab; padding: 1em 3em; font: 12px Verdana;">
|
||||
<p>
|
||||
This plugin enables one to edit a full HTML file in <a
|
||||
href="http://dynarch.com/htmlarea/">HTMLArea</a>. This is not
|
||||
normally possible with just the core editor since it only
|
||||
retrieves the HTML inside the <code>body</code> tag.
|
||||
</p>
|
||||
<p>
|
||||
It provides the ability to change the <code>DOCTYPE</code> of
|
||||
the document, <code>body</code> <code>bgcolor</code> and
|
||||
<code>fgcolor</code> attributes as well as to add additional
|
||||
<code>link</code>-ed stylesheets. Cool, eh?
|
||||
</p>
|
||||
<p>
|
||||
The development of this plugin was initiated and sponsored by
|
||||
<a href="http://thycotic.com">Thycotic Software Ltd.</a>.
|
||||
That's also cool, isn't it? ;-)
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
</textarea>
|
||||
|
||||
<hr />
|
||||
<address><a href="http://dynarch.com/mishoo/">Mihai Bazon</a></address>
|
||||
<!-- Created: Wed Oct 1 19:55:37 EEST 2003 -->
|
||||
<!-- hhmts start --> Last modified: Wed Aug 11 13:59:07 CEST 2004 <!-- hhmts end -->
|
||||
<!-- doc-lang: English -->
|
||||
</body>
|
||||
</html>
|
@ -1,262 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Example of HTMLArea 3.0</title>
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<!-- Configure the path to the editor. We make it relative now, so that the
|
||||
example ZIP file will work anywhere, but please NOTE THAT it's better to
|
||||
have it an absolute path, such as '/htmlarea/'. -->
|
||||
<script type="text/javascript">
|
||||
_editor_url = "../";
|
||||
_editor_lang = "en";
|
||||
</script>
|
||||
|
||||
<!-- load the main HTMLArea file, this will take care of loading the CSS and
|
||||
other required core scripts. -->
|
||||
<script type="text/javascript" src="../htmlarea.js"></script>
|
||||
|
||||
<!-- load the plugins -->
|
||||
<script type="text/javascript">
|
||||
// WARNING: using this interface to load plugin
|
||||
// will _NOT_ work if plugins do not have the language
|
||||
// loaded by HTMLArea.
|
||||
|
||||
// In other words, this function generates SCRIPT tags
|
||||
// that load the plugin and the language file, based on the
|
||||
// global variable HTMLArea.I18N.lang (defined in the lang file,
|
||||
// in our case "lang/en.js" loaded above).
|
||||
|
||||
// If this lang file is not found the plugin will fail to
|
||||
// load correctly and NOTHING WILL WORK.
|
||||
|
||||
HTMLArea.loadPlugin("TableOperations");
|
||||
HTMLArea.loadPlugin("SpellChecker");
|
||||
HTMLArea.loadPlugin("FullPage");
|
||||
HTMLArea.loadPlugin("CSS");
|
||||
HTMLArea.loadPlugin("ContextMenu");
|
||||
//HTMLArea.loadPlugin("HtmlTidy");
|
||||
HTMLArea.loadPlugin("ListType");
|
||||
HTMLArea.loadPlugin("CharacterMap");
|
||||
HTMLArea.loadPlugin("DynamicCSS");
|
||||
</script>
|
||||
|
||||
<style type="text/css">
|
||||
html, body {
|
||||
font-family: Verdana,sans-serif;
|
||||
background-color: #fea;
|
||||
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">
|
||||
var editor = null;
|
||||
|
||||
function initEditor() {
|
||||
|
||||
// create an editor for the "ta" textbox
|
||||
editor = new HTMLArea("ta");
|
||||
|
||||
// register the FullPage plugin
|
||||
editor.registerPlugin(FullPage);
|
||||
|
||||
// register the SpellChecker plugin
|
||||
editor.registerPlugin(TableOperations);
|
||||
|
||||
// register the SpellChecker plugin
|
||||
editor.registerPlugin(SpellChecker);
|
||||
|
||||
// register the HtmlTidy plugin
|
||||
//editor.registerPlugin(HtmlTidy);
|
||||
|
||||
// register the ListType plugin
|
||||
editor.registerPlugin(ListType);
|
||||
|
||||
editor.registerPlugin(CharacterMap);
|
||||
editor.registerPlugin(DynamicCSS);
|
||||
|
||||
// register the CSS plugin
|
||||
editor.registerPlugin(CSS, {
|
||||
combos : [
|
||||
{ label: "Syntax:",
|
||||
// menu text // CSS class
|
||||
options: { "None" : "",
|
||||
"Code" : "code",
|
||||
"String" : "string",
|
||||
"Comment" : "comment",
|
||||
"Variable name" : "variable-name",
|
||||
"Type" : "type",
|
||||
"Reference" : "reference",
|
||||
"Preprocessor" : "preprocessor",
|
||||
"Keyword" : "keyword",
|
||||
"Function name" : "function-name",
|
||||
"Html tag" : "html-tag",
|
||||
"Html italic" : "html-helper-italic",
|
||||
"Warning" : "warning",
|
||||
"Html bold" : "html-helper-bold"
|
||||
},
|
||||
context: "pre"
|
||||
},
|
||||
{ label: "Info:",
|
||||
options: { "None" : "",
|
||||
"Quote" : "quote",
|
||||
"Highlight" : "highlight",
|
||||
"Deprecated" : "deprecated"
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
// add a contextual menu
|
||||
editor.registerPlugin("ContextMenu");
|
||||
|
||||
// load the stylesheet used by our CSS plugin configuration
|
||||
editor.config.pageStyle = "@import url(custom.css);";
|
||||
|
||||
editor.generate();
|
||||
return false;
|
||||
}
|
||||
|
||||
HTMLArea.onload = initEditor;
|
||||
|
||||
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>
|
||||
|
||||
</head>
|
||||
|
||||
<!-- use <body onload="HTMLArea.replaceAll()" if you don't care about
|
||||
customizing the editor. It's the easiest way! :) -->
|
||||
<body onload="HTMLArea.init();">
|
||||
|
||||
<h1>HTMLArea 3.0</h1>
|
||||
|
||||
<p>A replacement for <code>TEXTAREA</code> elements. © <a
|
||||
href="http://interactivetools.com">InteractiveTools.com</a>, 2003-2004.</p>
|
||||
|
||||
<form action="test.cgi" method="post" id="edit" name="edit">
|
||||
|
||||
<textarea id="ta" name="ta" style="width:100%" rows="24" cols="80">
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//EN">
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Passing parameters to JavaScript code</title>
|
||||
<link rel="stylesheet" href="custom.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Passing parameters to JavaScript code</h1>
|
||||
|
||||
<p>Sometimes we need to pass parameters to some JavaScript function that we
|
||||
wrote ourselves. But sometimes it's simply more convenient to include the
|
||||
parameter not in the function call, but in the affected HTML elements.
|
||||
Usually, all JavaScript calls affect some element, right? ;-)</p>
|
||||
|
||||
<p>Well, here's an original way to do it. Or at least, I think it's
|
||||
original.</p>
|
||||
|
||||
<h2>But first...</h2>
|
||||
|
||||
<p>... an example. Why would I need such thing? I have a JS function that
|
||||
is called on <code>BODY</code> <code>onload</code> handler. This function
|
||||
tries to retrieve the element with the ID "conttoc" and, if present, it will
|
||||
<a href="toc.epl" title="Automatic TOC generation">generate an index</a>.
|
||||
The problem is, this function exists in some external JavaScript library
|
||||
that it's loaded in page. I only needed to pass the parameter from
|
||||
<em>one</em> page. Thus, it makes sense to pass the parameter from the HTML
|
||||
code on <em>that</em> page, not to affect the others.</p>
|
||||
|
||||
<p>The first idea that came to me was to use some attribute, like "id" or
|
||||
"class". But "id" was locked already, it <em>had</em> to be "conttoc". Use
|
||||
"class"? It's not elegant.. what if I really wanted to give it a class, at
|
||||
some point?</p>
|
||||
|
||||
<h2>The idea</h2>
|
||||
|
||||
<p>So I thought: what are the HTML elements that do not affect the page
|
||||
rendering in any way? Well, comments. I mean, <em>comments</em>, HTML
|
||||
comments. You know, like <code>&lt;!-- this is a comment --&gt;</code>.</p>
|
||||
|
||||
<p>Though comments do not normally affect the way browser renders the page,
|
||||
they are still parsed and are part of the DOM, as well as any other node.
|
||||
But this mean that we can access comments from JavaScript code, just like we
|
||||
access any other element, right? Which means that they <em>can</em> affect
|
||||
the way that page finally appears ;-)</p>
|
||||
|
||||
<h2>The code</h2>
|
||||
|
||||
<p>The main part was the idea. The code is simple ;-) Suppose we have the
|
||||
following HTML code:</p>
|
||||
|
||||
<pre class="code"><span class="function-name">&lt;</span><span class="html-tag">div</span> <span class="variable-name">id=</span><span class="string">&quot;conttoc&quot;</span><span class="paren-face-match">&gt;</span><span class="function-name">&lt;</span><span class="html-tag">/div</span><span class="function-name">&gt;</span></pre>
|
||||
|
||||
<p>and our function checks for the presence an element having the ID
|
||||
"conttoc", and generates a table of contents into it. Our code will also
|
||||
check if the "conttoc" element's first child is a comment node, and if so
|
||||
will parse additional parameters from there, for instance, a desired prefix
|
||||
for the links that are to be generated into it. Why did I need it? Because
|
||||
if the page uses a <code>&lt;base&gt;</code> element to specify the default
|
||||
link prefix, then links like "#gen1" generated by the <a href="toc.epl">toc
|
||||
generator</a> will not point to that same page as they should, but to the
|
||||
page reffered from <code>&lt;base&gt;</code>.</p>
|
||||
|
||||
<p>So the HTML would now look like this:</p>
|
||||
|
||||
<pre class="code"><span class="function-name">&lt;</span><span class="html-tag">div</span> <span class="variable-name">id=</span><span class="string">&quot;conttoc&quot;</span><span class="function-name">&gt;</span><span class="comment">&lt;!-- base:link/prefix.html --&gt;</span><span class="paren-face-match">&lt;</span><span class="html-tag">/div</span><span class="paren-face-match">&gt;</span></pre>
|
||||
|
||||
<p>And our TOC generation function does something like this:</p>
|
||||
|
||||
<pre class="code"><span class="keyword">var</span> <span class="variable-name">element</span> = getElementById(&quot;<span class="string">conttoc</span>&quot;);
|
||||
<span class="keyword">if</span> (element.firstChild &amp;&amp; element.firstChild.nodeType == 8) {
|
||||
<span class="comment">// 8 means Node.COMMENT_NODE. We're using numeric values
|
||||
</span> <span class="comment">// because IE6 does not support constant names.
|
||||
</span> <span class="keyword">var</span> <span class="variable-name">parameters</span> = element.firstChild.data;
|
||||
<span class="comment">// at this point &quot;parameters&quot; contains base:link/prefix.html
|
||||
</span> <span class="comment">// ...
|
||||
</span>}</pre>
|
||||
|
||||
<p>So we retrieved the value passed to the script from the HTML code. This
|
||||
was the goal of this article.</p>
|
||||
|
||||
<hr />
|
||||
<address><a href="http://students.infoiasi.ro/~mishoo/">Mihai Bazon</a></address>
|
||||
<!-- hhmts start --> Last modified on Thu Apr 3 20:34:17 2003
|
||||
<!-- hhmts end -->
|
||||
<!-- doc-lang: English -->
|
||||
</body>
|
||||
</html>
|
||||
</textarea>
|
||||
|
||||
<p />
|
||||
|
||||
<input type="submit" name="ok" value=" submit " />
|
||||
<input type="button" name="ins" value=" insert html " onclick="return insertHTML();" />
|
||||
<input type="button" name="hil" value=" highlight text " onclick="return highlight();" />
|
||||
|
||||
<a href="javascript:mySubmit()">submit</a>
|
||||
|
||||
<script type="text/javascript">
|
||||
function mySubmit() {
|
||||
// document.edit.save.value = "yes";
|
||||
document.edit.onsubmit(); // workaround browser bugs.
|
||||
document.edit.submit();
|
||||
};
|
||||
</script>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,29 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
||||
<html> <head>
|
||||
<title>HTMLArea examples index</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>HTMLArea: auto-generated examples index</h1>
|
||||
|
||||
<ul>
|
||||
% while (<*.html>) {
|
||||
% next if /^index.html$/;
|
||||
<li>
|
||||
<a href="<% $_ %>"><% $_ %></a>
|
||||
</li>
|
||||
% }
|
||||
</ul>
|
||||
|
||||
<hr />
|
||||
<address>mihai_bazon@yahoo.com</address>
|
||||
<!-- hhmts start --> Last modified: Sun Feb 1 13:30:39 EET 2004 <!-- hhmts end -->
|
||||
</body> </html>
|
||||
|
||||
<%INIT>
|
||||
my $dir = $m->interp->comp_root;
|
||||
$dir =~ s{/+$}{}g;
|
||||
#$dir =~ s{/[^/]+$}{}g;
|
||||
$dir .= $m->current_comp->dir_path;
|
||||
chdir $dir;
|
||||
</%INIT>
|
@ -1,54 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Simple example of Xinha</title>
|
||||
<script type="text/javascript">
|
||||
var _editor_url = document.location.href.replace(/examples\/simple_example\.html.*/, '')
|
||||
|
||||
var _editor_lang = "en";
|
||||
</script>
|
||||
<!-- Load up the actual editor core -->
|
||||
<script type="text/javascript" src="../XinhaCore.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
var xinha_plugins =
|
||||
[
|
||||
'Linker'
|
||||
];
|
||||
var xinha_editors =
|
||||
[
|
||||
'myTextArea',
|
||||
'anotherOne'
|
||||
];
|
||||
|
||||
function xinha_init()
|
||||
{
|
||||
if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return;
|
||||
|
||||
var xinha_config = new Xinha.Config();
|
||||
|
||||
xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);
|
||||
|
||||
Xinha.startEditors(xinha_editors);
|
||||
}
|
||||
Xinha.addOnloadHandler(xinha_init);
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<form onsubmit="alert(this.myTextArea.value); return false;">
|
||||
<textarea id="myTextArea" name="myTextArea" rows="25" cols="80">
|
||||
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
|
||||
Aliquam et tellus vitae justo varius placerat. Suspendisse iaculis
|
||||
velit semper dolor. Donec gravida tincidunt mi. Curabitur tristique
|
||||
ante elementum turpis. Aliquam nisl. Nulla posuere neque non
|
||||
tellus. Morbi vel nibh. Cum sociis natoque penatibus et magnis dis
|
||||
parturient montes, nascetur ridiculus mus. Nam nec wisi. In wisi.
|
||||
Curabitur pharetra bibendum lectus.</p>
|
||||
</textarea>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
@ -1,132 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Example of HTMLArea 3.0</title>
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<!-- Configure the path to the editor. We make it relative now, so that the
|
||||
example ZIP file will work anywhere, but please NOTE THAT it's better to
|
||||
have it an absolute path, such as '/htmlarea/'. -->
|
||||
<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: #fea;
|
||||
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">
|
||||
HTMLArea.loadPlugin("SpellChecker");
|
||||
var editor = null;
|
||||
function initEditor() {
|
||||
// create an editor for the "ta" textbox
|
||||
editor = new HTMLArea("ta");
|
||||
|
||||
// register the SpellChecker plugin
|
||||
editor.registerPlugin(SpellChecker);
|
||||
|
||||
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>
|
||||
|
||||
</head>
|
||||
|
||||
<!-- use <body onload="HTMLArea.replaceAll()" if you don't care about
|
||||
customizing the editor. It's the easiest way! :) -->
|
||||
<body onload="initEditor()">
|
||||
|
||||
<h1>HTMLArea 3.0</h1>
|
||||
|
||||
<p>A replacement for <code>TEXTAREA</code> elements. © <a
|
||||
href="http://interactivetools.com">InteractiveTools.com</a>, 2003-2004.</p>
|
||||
|
||||
<p>Plugins:
|
||||
<tt>SpellChecker</tt> (sponsored by <a
|
||||
href="http://americanbible.org">American Bible Society</a>).
|
||||
</p>
|
||||
|
||||
<form action="test.cgi" method="post" id="edit" name="edit">
|
||||
|
||||
<textarea id="ta" name="ta" style="width:100%" rows="24" cols="80">
|
||||
|
||||
<h1>The <tt>SpellChecker</tt> plugin</h1>
|
||||
|
||||
<p>This file deminstrates the <tt>SpellChecker</tt> plugin of
|
||||
HTMLArea. To inwoke the spell checkert you need to press the
|
||||
<em>spell-check</em> buton in the toolbar.</p>
|
||||
|
||||
<p>The spell-checker uses a serverside script written in Perl. The
|
||||
Perl script calls <a href="http://aspell.net">aspell</a> for any
|
||||
word in the text and reports wordz that aren't found in the
|
||||
dyctionari.</p>
|
||||
|
||||
<p>The document that yu are reading now <b>intentionaly</b> containes
|
||||
some errorz, so that you have something to corect ;-)</p>
|
||||
|
||||
<p>Credits for the <tt>SpellChecker</tt> plugin go to:</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="http://aspell.net">Aspell</a> -- spell
|
||||
checker</li>
|
||||
|
||||
<li>The <a href="http://perl.org">Perl</a> programming language</li>
|
||||
|
||||
<li><tt><a
|
||||
href="http://cpan.org/modules/by-module/Text/Text-Aspell-0.02.readme">Text::Aspell</a></tt>
|
||||
-- Perl interface to Aspell</li>
|
||||
|
||||
<li><a href="http://americanbible.org">American Bible Society</a> --
|
||||
for sponsoring the <tt>SpellChecker</tt> plugin for
|
||||
<tt>HTMLArea</tt></li>
|
||||
|
||||
<li><a href="http://dynarch.com/mishoo/">Your humble servant</a> for
|
||||
implementing it ;-)</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</textarea>
|
||||
|
||||
<p />
|
||||
|
||||
<input type="submit" name="ok" value=" submit " />
|
||||
<input type="button" name="ins" value=" insert html " onclick="return insertHTML();" />
|
||||
<input type="button" name="hil" value=" highlight text " onclick="return highlight();" />
|
||||
|
||||
<a href="javascript:mySubmit()">submit</a>
|
||||
|
||||
<script type="text/javascript">
|
||||
function mySubmit() {
|
||||
// document.edit.save.value = "yes";
|
||||
document.edit.onsubmit(); // workaround browser bugs.
|
||||
document.edit.submit();
|
||||
};
|
||||
</script>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,116 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Example of HTMLArea 3.0</title>
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<!-- Configure the path to the editor. We make it relative now, so that the
|
||||
example ZIP file will work anywhere, but please NOTE THAT it's better to
|
||||
have it an absolute path, such as '/htmlarea/'. -->
|
||||
<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: #fea;
|
||||
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 "ta" textbox
|
||||
editor = new HTMLArea("ta");
|
||||
|
||||
// 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>
|
||||
|
||||
</head>
|
||||
|
||||
<!-- use <body onload="HTMLArea.replaceAll()" if you don't care about
|
||||
customizing the editor. It's the easiest way! :) -->
|
||||
<body onload="initEditor()">
|
||||
|
||||
<h1>HTMLArea 3.0</h1>
|
||||
|
||||
<p>A replacement for <code>TEXTAREA</code> elements. © <a
|
||||
href="http://interactivetools.com">InteractiveTools.com</a>, 2003-2004.</p>
|
||||
|
||||
<p>Page that demonstrates the additional features of the
|
||||
<tt>TableOperations</tt> plugin (sponsored by <a
|
||||
href="http://www.bloki.com">Zapatec Inc.</a>).</p>
|
||||
|
||||
<form action="test.cgi" method="post" id="edit" name="edit">
|
||||
|
||||
<textarea id="ta" name="ta" style="width:100%" rows="24" cols="80">
|
||||
|
||||
<h1>Plugin: <tt>TableOperations</tt></h1>
|
||||
|
||||
<p>This page exemplifies the table operations toolbar, provided by the
|
||||
TableOperations plugin.</p>
|
||||
|
||||
<p>Following there is a table.</p>
|
||||
|
||||
<table border="1" style="border: 2px solid rgb(255, 0, 0); width: 80%; background-image: none; border-collapse: collapse; color: rgb(153, 102, 0); background-color: rgb(255, 255, 51);" align="center" cellspacing="2" cellpadding="1" summary="">
|
||||
<caption>This <span style="font-weight: bold;">is</span> a table</caption>
|
||||
<tbody>
|
||||
<tr style="border-style: none; background-image: none; background-color: rgb(255, 255, 153);" char="." align="left" valign="middle"> <td>1.1</td> <td>1.2</td> <td>1.3</td> <td>1.4</td> </tr>
|
||||
<tr> <td>2.1</td> <td style="border: 1px solid rgb(51, 51, 255); background-image: none; background-color: rgb(102, 255, 255); color: rgb(0, 0, 51);" char="." align="left" valign="middle">2.2</td> <td>2.3</td> <td>2.4</td> </tr>
|
||||
<tr> <td>3.1</td> <td>3.2</td> <td style="border: 2px dashed rgb(51, 204, 102); background-image: none; background-color: rgb(102, 255, 153); color: rgb(0, 51, 0);" char="." align="left" valign="middle">3.3</td> <td>3.4</td> </tr>
|
||||
<tr> <td style="background-color: rgb(255, 204, 51);">4.1</td> <td style="background-color: rgb(255, 204, 51);">4.2</td> <td style="background-color: rgb(255, 204, 51);">4.3</td> <td style="background-color: rgb(255, 204, 51);">4.4</td> </tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>Text after the table</p>
|
||||
|
||||
</textarea>
|
||||
|
||||
<p />
|
||||
|
||||
<input type="submit" name="ok" value=" submit " />
|
||||
<input type="button" name="ins" value=" insert html " onclick="return insertHTML();" />
|
||||
<input type="button" name="hil" value=" highlight text " onclick="return highlight();" />
|
||||
|
||||
<a href="javascript:mySubmit()">submit</a>
|
||||
|
||||
<script type="text/javascript">
|
||||
function mySubmit() {
|
||||
// document.edit.save.value = "yes";
|
||||
document.edit.onsubmit(); // workaround browser bugs.
|
||||
document.edit.submit();
|
||||
};
|
||||
</script>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,195 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
|
||||
<!--------------------------------------:noTabs=true:tabSize=2:indentSize=2:--
|
||||
-- Xinha example usage. This file shows how a developer might make use of
|
||||
-- Xinha, it forms the primary example file for the entire Xinha project.
|
||||
-- This file can be copied and used as a template for development by the
|
||||
-- end developer who should simply removed the area indicated at the bottom
|
||||
-- of the file to remove the auto-example-generating code and allow for the
|
||||
-- use of the file as a boilerplate.
|
||||
--
|
||||
-- $HeadURL:http://svn.xinha.webfactional.com/trunk/examples/testbed.html $
|
||||
-- $LastChangedDate:2008-04-12 14:39:04 +0200 (Sa, 12 Apr 2008) $
|
||||
-- $LastChangedRevision:987 $
|
||||
-- $LastChangedBy:ray $
|
||||
--------------------------------------------------------------------------->
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Example of Xinha</title>
|
||||
<link rel="stylesheet" href="full_example.css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
// You must set _editor_url to the URL (including trailing slash) where
|
||||
// where xinha is installed, it's highly recommended to use an absolute URL
|
||||
// eg: _editor_url = "/path/to/xinha/";
|
||||
// You may try a relative URL if you wish]
|
||||
// eg: _editor_url = "../";
|
||||
// in this example we do a little regular expression to find the absolute path.
|
||||
_editor_url = document.location.href.replace(/examples\/.*/, '')
|
||||
_editor_lang = "en"; // And the language we need to use in the editor.
|
||||
</script>
|
||||
|
||||
<!-- Load up the actual editor core -->
|
||||
<script type="text/javascript" src="../XinhaCore.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
xinha_editors = null;
|
||||
xinha_init = null;
|
||||
xinha_config = null;
|
||||
xinha_plugins = null;
|
||||
|
||||
// This contains the names of textareas we will make into Xinha editors
|
||||
xinha_init = xinha_init ? xinha_init : function()
|
||||
{
|
||||
/** STEP 1 ***************************************************************
|
||||
* First, what are the plugins you will be using in the editors on this
|
||||
* page. List all the plugins you will need, even if not all the editors
|
||||
* will use all the plugins.
|
||||
************************************************************************/
|
||||
|
||||
xinha_plugins = xinha_plugins ? xinha_plugins :
|
||||
[
|
||||
'CharacterMap', 'SpellChecker', 'Linker'
|
||||
];
|
||||
// THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING :)
|
||||
if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return;
|
||||
|
||||
/** STEP 2 ***************************************************************
|
||||
* Now, what are the names of the textareas you will be turning into
|
||||
* editors?
|
||||
************************************************************************/
|
||||
|
||||
xinha_editors = xinha_editors ? xinha_editors :
|
||||
[
|
||||
'myTextArea'
|
||||
];
|
||||
|
||||
/** STEP 3 ***************************************************************
|
||||
* We create a default configuration to be used by all the editors.
|
||||
* If you wish to configure some of the editors differently this will be
|
||||
* done in step 4.
|
||||
*
|
||||
* If you want to modify the default config you might do something like this.
|
||||
*
|
||||
* xinha_config = new Xinha.Config();
|
||||
* xinha_config.width = 640;
|
||||
* xinha_config.height = 420;
|
||||
*
|
||||
*************************************************************************/
|
||||
|
||||
xinha_config = xinha_config ? xinha_config : new Xinha.Config();
|
||||
xinha_config.fullPage = true;
|
||||
xinha_config.CharacterMap.mode = 'panel';
|
||||
/*
|
||||
// We can load an external stylesheet like this - NOTE : YOU MUST GIVE AN ABSOLUTE URL
|
||||
// otherwise it won't work!
|
||||
xinha_config.stylistLoadStylesheet(document.location.href.replace(/[^\/]*\.html/, 'stylist.css'));
|
||||
|
||||
// Or we can load styles directly
|
||||
xinha_config.stylistLoadStyles('p.red_text { color:red }');
|
||||
|
||||
// If you want to provide "friendly" names you can do so like
|
||||
// (you can do this for stylistLoadStylesheet as well)
|
||||
xinha_config.stylistLoadStyles('p.pink_text { color:pink }', {'p.pink_text' : 'Pretty Pink'});
|
||||
*/
|
||||
/** STEP 3 ***************************************************************
|
||||
* We first create editors for the textareas.
|
||||
*
|
||||
* You can do this in two ways, either
|
||||
*
|
||||
* xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);
|
||||
*
|
||||
* if you want all the editor objects to use the same set of plugins, OR;
|
||||
*
|
||||
* xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config);
|
||||
* xinha_editors['myTextArea'].registerPlugins(['Stylist']);
|
||||
* xinha_editors['anotherOne'].registerPlugins(['CSS','SuperClean']);
|
||||
*
|
||||
* if you want to use a different set of plugins for one or more of the
|
||||
* editors.
|
||||
************************************************************************/
|
||||
|
||||
xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);
|
||||
|
||||
/** STEP 4 ***************************************************************
|
||||
* If you want to change the configuration variables of any of the
|
||||
* editors, this is the place to do that, for example you might want to
|
||||
* change the width and height of one of the editors, like this...
|
||||
*
|
||||
* xinha_editors.myTextArea.config.width = 640;
|
||||
* xinha_editors.myTextArea.config.height = 480;
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
|
||||
/** STEP 5 ***************************************************************
|
||||
* Finally we "start" the editors, this turns the textareas into
|
||||
* Xinha editors.
|
||||
************************************************************************/
|
||||
|
||||
Xinha.startEditors(xinha_editors);
|
||||
window.onload = null;
|
||||
}
|
||||
|
||||
window.onload = xinha_init;
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<form action="javascript:void(0);" id="editors_here" onsubmit="alert(this.myTextArea.value);">
|
||||
<div>
|
||||
<textarea id="myTextArea" name="myTextArea" style="width:100%;height:320px;">
|
||||
<html>
|
||||
<head>
|
||||
<title>Hello</title>
|
||||
<style type="text/css">
|
||||
li { color:red; }
|
||||
</style>
|
||||
</head>
|
||||
<body><span style="color:purple">
|
||||
<img src="../images/xinha_logo.gif" usemap="#m1">
|
||||
<map name="m1">
|
||||
<area shape="rect" coords="137,101,255,124" href="http://www.mydomain.com">
|
||||
</map>
|
||||
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
|
||||
Aliquam et tellus vitae justo varius placerat. Suspendisse iaculis
|
||||
velit semper dolor. Donec gravida tincidunt mi. Curabitur tristique
|
||||
ante elementum turpis. <span style="color:green">Aliquam </span> nisl. Nulla posuere neque non
|
||||
tellus. Morbi vel nibh. <font face="Arial"><font color="#009933">Cum sociis natoque</font></font> penatibus et magnis dis
|
||||
parturient montes, nascetur ridiculus mus. Nam nec wisi. In wisi.
|
||||
Curabitur pharetra bibendum lectus.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li style="color:green"> Phasellus et massa sed diam viverra semper. </li>
|
||||
<li> Mauris tincidunt felis in odio. </li>
|
||||
<li> Nulla placerat nunc ut pede. </li>
|
||||
<li> Vivamus ultrices mi sit amet urna. </li>
|
||||
<li> Quisque sed augue quis nunc laoreet volutpat.</li>
|
||||
<li> Nunc sit amet metus in tortor semper mattis. </li>
|
||||
</ul>
|
||||
</span></body>
|
||||
</html>
|
||||
</textarea>
|
||||
|
||||
<input type="submit" /> <input type="reset" />
|
||||
</div>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
document.write(document.compatMode);
|
||||
</script>
|
||||
<div>
|
||||
<a href="#" onclick="xinha_editors.myTextArea.hidePanels();">Hide</a>
|
||||
<a href="#" onclick="xinha_editors.myTextArea.showPanels();">Show</a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,180 +0,0 @@
|
||||
.htmlarea { background: #fff; }
|
||||
|
||||
.htmlarea .toolbar {
|
||||
cursor: default;
|
||||
background: ButtonFace;
|
||||
padding: 3px;
|
||||
border: 1px solid;
|
||||
border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
|
||||
}
|
||||
.htmlarea .toolbar table { font-family: tahoma,verdana,sans-serif; font-size: 11px; }
|
||||
.htmlarea .toolbar img { border: none; }
|
||||
.htmlarea .toolbar .label { padding: 0px 3px; }
|
||||
|
||||
.htmlarea .toolbar .button {
|
||||
background: ButtonFace;
|
||||
color: ButtonText;
|
||||
border: 1px solid ButtonFace;
|
||||
padding: 1px;
|
||||
margin: 0px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
.htmlarea .toolbar .buttonHover {
|
||||
border: 1px solid;
|
||||
border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
|
||||
}
|
||||
.htmlarea .toolbar .buttonActive, .htmlarea .toolbar .buttonPressed {
|
||||
padding: 2px 0px 0px 2px;
|
||||
border: 1px solid;
|
||||
border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
|
||||
}
|
||||
.htmlarea .toolbar .buttonPressed {
|
||||
background: ButtonHighlight;
|
||||
}
|
||||
.htmlarea .toolbar .indicator {
|
||||
padding: 0px 3px;
|
||||
overflow: hidden;
|
||||
width: 20px;
|
||||
text-align: center;
|
||||
cursor: default;
|
||||
border: 1px solid ButtonShadow;
|
||||
}
|
||||
|
||||
.htmlarea .toolbar .buttonDisabled img {
|
||||
filter: gray() alpha(opacity = 25);
|
||||
-moz-opacity: 0.25;
|
||||
}
|
||||
|
||||
.htmlarea .toolbar .separator {
|
||||
position: relative;
|
||||
margin: 3px;
|
||||
border-left: 1px solid ButtonShadow;
|
||||
border-right: 1px solid ButtonHighlight;
|
||||
width: 0px;
|
||||
height: 16px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.htmlarea .toolbar .space { width: 5px; }
|
||||
|
||||
.htmlarea .toolbar select { font: 11px Tahoma,Verdana,sans-serif; }
|
||||
|
||||
.htmlarea .toolbar select,
|
||||
.htmlarea .toolbar select:hover,
|
||||
.htmlarea .toolbar select:active { background: FieldFace; color: ButtonText; }
|
||||
|
||||
.htmlarea .statusBar {
|
||||
border: 1px solid;
|
||||
border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
|
||||
padding: 2px 4px;
|
||||
background-color: ButtonFace;
|
||||
color: ButtonText;
|
||||
font: 11px Tahoma,Verdana,sans-serif;
|
||||
}
|
||||
|
||||
.htmlarea .statusBar .statusBarTree a {
|
||||
padding: 2px 5px;
|
||||
color: #00f;
|
||||
}
|
||||
|
||||
.htmlarea .statusBar .statusBarTree a:visited { color: #00f; }
|
||||
.htmlarea .statusBar .statusBarTree a:hover {
|
||||
background-color: Highlight;
|
||||
color: HighlightText;
|
||||
padding: 1px 4px;
|
||||
border: 1px solid HighlightText;
|
||||
}
|
||||
|
||||
|
||||
/* Hidden DIV popup dialogs (PopupDiv) */
|
||||
|
||||
.dialog {
|
||||
color: ButtonText;
|
||||
background: ButtonFace;
|
||||
}
|
||||
|
||||
.dialog .content { padding: 2px; }
|
||||
|
||||
.dialog, .dialog button, .dialog input, .dialog select, .dialog textarea, .dialog table {
|
||||
font: 11px Tahoma,Verdana,sans-serif;
|
||||
}
|
||||
|
||||
.dialog table { border-collapse: collapse; }
|
||||
|
||||
.dialog .title {
|
||||
background: #008;
|
||||
color: #ff8;
|
||||
border-bottom: 1px solid #000;
|
||||
padding: 1px 0px 2px 5px;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.dialog .title .button {
|
||||
float: right;
|
||||
border: 1px solid #66a;
|
||||
padding: 0px 1px 0px 2px;
|
||||
margin-right: 1px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dialog .title .button-hilite { border-color: #88f; background: #44c; }
|
||||
|
||||
.dialog button {
|
||||
width: 5em;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.dialog .buttonColor {
|
||||
padding: 1px;
|
||||
cursor: default;
|
||||
border: 1px solid;
|
||||
border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
|
||||
}
|
||||
|
||||
.dialog .buttonColor-hilite {
|
||||
border-color: #000;
|
||||
}
|
||||
|
||||
.dialog .buttonColor .chooser, .dialog .buttonColor .nocolor {
|
||||
height: 0.6em;
|
||||
border: 1px solid;
|
||||
padding: 0px 1em;
|
||||
border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
|
||||
}
|
||||
|
||||
.dialog .buttonColor .nocolor { padding: 0px; }
|
||||
.dialog .buttonColor .nocolor-hilite { background-color: #fff; color: #f00; }
|
||||
|
||||
.dialog .label { text-align: right; width: 6em; }
|
||||
.dialog .value input { width: 100%; }
|
||||
.dialog .buttons { text-align: right; padding: 2px 4px 0px 4px; }
|
||||
|
||||
.dialog legend { font-weight: bold; }
|
||||
.dialog fieldset table { margin: 2px 0px; }
|
||||
|
||||
.popupdiv {
|
||||
border: 2px solid;
|
||||
border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
|
||||
}
|
||||
|
||||
.popupwin {
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.popupwin .title {
|
||||
background: #fff;
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
font-size: 120%;
|
||||
padding: 3px 10px;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px solid black;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
|
||||
form { margin: 0px; border: none; }
|
@ -1,11 +0,0 @@
|
||||
/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */
|
||||
/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */
|
||||
/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/htmlarea.js */
|
||||
if(typeof _editor_url=="string"){
|
||||
_editor_url=_editor_url.replace(/\x2f*$/,"/");
|
||||
}else{
|
||||
alert("WARNING: _editor_url is not set! You should set this variable to the editor files path; it should preferably be an absolute path, like in '/htmlarea/', but it can be relative if you prefer. Further we will try to load the editor files correctly but we'll probably fail.");
|
||||
_editor_url="";
|
||||
}
|
||||
document.write("<script type=\"text/javascript\" src=\""+_editor_url+"XinhaCore.js\"></script>");
|
||||
|
Before Width: | Height: | Size: 57 B |
Before Width: | Height: | Size: 63 B |
Before Width: | Height: | Size: 69 B |
Before Width: | Height: | Size: 76 B |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 61 B |
Before Width: | Height: | Size: 60 B |
Before Width: | Height: | Size: 60 B |
Before Width: | Height: | Size: 61 B |
Before Width: | Height: | Size: 56 B |
Before Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 134 B |
Before Width: | Height: | Size: 134 B |
Before Width: | Height: | Size: 172 B |
Before Width: | Height: | Size: 164 B |
Before Width: | Height: | Size: 97 B |
Before Width: | Height: | Size: 50 B |
Before Width: | Height: | Size: 78 B |
Before Width: | Height: | Size: 80 B |
Before Width: | Height: | Size: 57 B |
Before Width: | Height: | Size: 67 B |
Before Width: | Height: | Size: 66 B |
Before Width: | Height: | Size: 67 B |
Before Width: | Height: | Size: 67 B |
Before Width: | Height: | Size: 69 B |
Before Width: | Height: | Size: 55 B |
Before Width: | Height: | Size: 53 B |
Before Width: | Height: | Size: 64 B |
Before Width: | Height: | Size: 125 B |
Before Width: | Height: | Size: 84 B |
Before Width: | Height: | Size: 84 B |
Before Width: | Height: | Size: 151 B |
Before Width: | Height: | Size: 72 B |
Before Width: | Height: | Size: 78 B |