first commit

This commit is contained in:
MaddoScientisto 2026-03-14 20:04:39 +01:00
commit 4d332ef662
27586 changed files with 3281783 additions and 0 deletions

View file

@ -0,0 +1,142 @@
# build relese
# author: Troex Nevelin <troex@fury.scancode.ru>
Q= @
CAT= cat
RM= rm
CP= cp
SRC= .
DST= ..
CSS= ${DST}/css
JS= ${DST}/js
I18N= ${DST}/js/i18n
IMG= ${DST}/images
# YUI Compressor
COMPRESSOR= 1
COMPRESSOR_JS= java -jar ../../../_old/yuicompressor-2.4.6/build/yuicompressor-2.4.6.jar \
--charset utf8 --type js --line-break 500 \
-o ${elrte_js_min} ${elrte_js}
COMPRESSOR_CSS= java -jar ../../../_old/yuicompressor-2.4.6/build/yuicompressor-2.4.6.jar \
--charset utf8 --type css --line-break 1 \
-o ${elrte_css_min} ${elrte_css}
# Closure Compiler
# ADVANCED_OPTIMIZATIONS maybe someday
#COMPRESSOR= java -jar ../../../compiler.jar \
--charset UTF-8 --compilation_level SIMPLE_OPTIMIZATIONS \
--js_output_file ${elrte_js_min} --js ${elrte_js}
PHONY: help
all: elrte elrte-install
clean: clean-elrte
install: elrte-install
uninstall: ellib-uninstall elrte-uninstall
distclean: uninstall clean
help:
@echo 'Makefile for release build automation'
@echo ' Packages:'
@echo ' elrte - elRTE WYSIWYG html editor'
@echo ''
@echo ' MAKE targets:'
@echo ' all - build and install all packages'
@echo ' help - show this message'
@echo ' install - install all packages, will auto build'
@echo ' uninstall - remove all generated files from DST (${DST})'
@echo ' clean - remove generated files from SRC (${SRC})'
@echo ' distclean - preform uninstall and clean'
@echo ''
@echo ' Individual package targets are possible. To build single package replace PACKAGE'
@echo ' with name from "Packages" section:'
@echo ' PACKAGE'
@echo ' PACKAGE-install'
@echo ' PACKAGE-unstall'
@echo ' clean-PACKAGE'
# define objects
# elLib
ellib_img_obj= ${SRC}/ellib/images/loading.gif
ellib_img_obj_dst= ${IMG}/loading.gif
# elRTE
elrte_css= elrte.full.css
elrte_css_min= elrte.min.css
elrte_css_obj= ${SRC}/about.txt \
${SRC}/ellib/css/elcommon.css \
${SRC}/ellib/css/elcolorpicker.css \
${SRC}/ellib/css/eldialogform.css \
${SRC}/ellib/css/elpaddinginput.css \
${SRC}/ellib/css/elselect.css \
${SRC}/elrte/css/elrte.css
elrte_js= elrte.full.js
elrte_js_min= elrte.min.js
elrte_js_obj= \
${SRC}/ellib/js/eli18n.js \
${SRC}/ellib/js/eldialogform.js \
${SRC}/ellib/js/jquery.elcolorpicker.js \
${SRC}/ellib/js/jquery.elborderselect.js \
${SRC}/ellib/js/jquery.elpaddinginput.js \
${SRC}/ellib/js/jquery.elselect.js \
${SRC}/elrte/js/elRTE.js \
${SRC}/elrte/js/elRTE.*.js \
${SRC}/elrte/js/ui/*.js
# elLib
ellib-install:
${CP} ${ellib_img_obj} ${IMG}/
ellib-uninstall:
${RM} -f ${ellib_img_obj_dst}
# elRTE
elrte: ${elrte_css} ${elrte_js}
elrte-install: elrte ellib-install
${CP} ${elrte_css} ${SRC}/elrte/css/elrte-inner.css ${CSS}/
${CP} ${elrte_js} ${JS}/
${CP} ${SRC}/elrte/js/i18n/elrte.??.js ${I18N}/
${CP} ${SRC}/elrte/js/i18n/elrte.??_??.js ${I18N}/
${CP} ${SRC}/elrte/js/i18n/elrte.YOUR_LANG.js ${I18N}/
${CP} ${SRC}/elrte/images/*.png ${IMG}/
${CP} ${SRC}/elrte/images/*.gif ${IMG}/
${CP} -R ${SRC}/elrte/images/smileys ${IMG}/
${elrte_css}:
${CAT} ${elrte_css_obj} > $@
${elrte_js}:
${CAT} ${elrte_js_obj} > $@
elrte-uninstall:
${RM} -f ${CSS}/${elrte_css} ${CSS}/${elrte_css_min} ${CSS}/elrte-inner.css \
${JS}/${elrte_js} ${JS}/${elrte_js_min} \
${I18N}/elrte.??.js ${I18N}/elrte.??_??.js ${I18N}/elrte.YOUR_LANG.js \
${IMG}/*.png ${IMG}/*.gif
${RM} -rf ${IMG}/smileys
clean-elrte:
${RM} -f ${elrte_css} ${elrte_css_min} ${elrte_js} ${elrte_js_min}
# compressor
elrte-compress:
${COMPRESSOR_JS}
${COMPRESSOR_CSS}
elrte-compress-install:
${CP} ${SRC}/${elrte_js_min} ${JS}/
${CP} ${SRC}/${elrte_css_min} ${CSS}/
ifdef COMPRESSOR
elrte: elrte-compress
elrte-install: elrte-compress-install
endif

View file

@ -0,0 +1,9 @@
/*!
* elRTE WYSIWYG HTML-editor
* Version 1.3 (2011-06-23)
* http://elrte.org
*
* Copyright 2009-2011, Studio 42 Ltd.
* Licensed under a 3 clauses BSD license
*/

View file

@ -0,0 +1,50 @@
/* colorpicker "button" */
.el-colorpicker {
width : 16px;
height : 16px;
border:1px solid #ccc;
position:relative;
cursor:default;
}
/* colors palette */
.el-palette {
width: 182px;
border:1px solid #ccc;
background:#fff;
padding:3px 2px 3px 3px;
z-index:99000; /* fight with ui.dialog 0_o */
position:absolute;
top:16px;
left:0;
}
/* color cell in palette */
.el-palette .color {
float:left;
width:14px;
height:14px;
line-height:1px;
border-top: 1px solid #eee;
border-left:1px solid #eee;
}
/* side below color cells */
.el-palette .panel {
border-top:1px solid #ccc;
margin-top:7px;
padding:5px 3px 5px 3px;
}
/* "window" with selected color */
.el-palette .panel .preview {
float:right;
width:18px;
height:18px;
border:1px solid #ccc;
}
/* color value text field */
.el-palette .panel input {
border:1px solid #ccc;
}

View file

@ -0,0 +1,29 @@
@charset "UTF-8";
a { outline: none; }
/************* clearfix **********************/
.clearfix:after {
content: ".";
display: block;
font-size:0;
height: 0;
clear: both;
visibility: hidden;
}
.clearfix { display: block; }
.rounded-2 { -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; }
.rounded-3 { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; }
.rounded-4 { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
.rounded-5 { -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }
.rounded-6 { -moz-border-radius: 6px; -webkit-border-radius: 5px; border-radius: 6px; }
.rounded-7 { -moz-border-radius: 7px; -webkit-border-radius: 7px; border-radius: 7px; }
.rounded-left-3 { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; }
.rounded-bottom-7 { -moz-border-radius-bottomleft:7px; -moz-border-radius-bottomright:7px; -webkit-border-bottom-left-radius: 7px;-webkit-border-bottom-right-radius: 7px; border-bottom-left-radius: 7px; border-bottom-right-radius: 7px;}
.ui-widget { font-size:.9em;}
.ui-dialog .ui-dialog-buttonpane button { padding: .1em .6em .2em .6em; }

View file

@ -0,0 +1,80 @@
/* dialog container */
.ui-widget .el-dialogform {
padding:5px 3px;
}
.ui-widget .el-dialogform-rtl {
direction: rtl;
}
.ui-widget .el-dialogform-rtl .ui-tabs-nav li {
float:right;
}
.el-dialogform div.tab:hover { background:transparent; }
.ui-dialog .ui-dialog-title, .ui-dialog .ui-dialog-content {
font-size:.9em;
}
/* tabs nav */
.ui-tabs .ui-tabs-nav li a {
padding:.2em .7em;
}
/* tab container */
.el-dialogform .tab {
padding:5px 0 12px 0;
border:none;
}
/* line separator */
.el-dialogform .separator {
border-top:1px solid #ccc;
margin: 5px 2px;
}
/* table in dialog or in tab */
.el-dialogform table {
width:100%;
border: none;
}
.el-dialogform table td {
padding: 2px;
}
.el-dialogform input, .el-dialogform textarea {
border:1px solid #ccc;
}
.el-dialogform select {
padding:0;
/* font-size:11px;*/
}
.el-dialogform .spinner {
background:url(../images/loading.gif) 50% 50% no-repeat;
text-align:center;
width:150px;
height:50px;
margin:10px auto;
padding-top:33px;
font-weight:bold;
}
.el-dialogform-error {
background: #fee; color:#ff0000; border: 2px #844 solid; padding: 10px; margin-bottom: 1em 0;
}
.el-dialogform-message {
background: #efe; color: #040; border: 2px #484 solid; padding: 10px; margin-bottom: 1em 0;
}
.el-dialogform table td .el-borderselect table {
width:auto;
}
.el-dialogform table td .el-borderselect table td {
padding-left :0;
padding-right:2px;
}

View file

@ -0,0 +1,11 @@
.el-paddinginput {
display: block;
white-space: nowrap;
}
.el-paddinginput input {
margin :0 1px 0 0;
border:1px solid #ccc;
}
.el-paddinginput select {
padding:0;
}

View file

@ -0,0 +1,49 @@
@charset "UTF-8";
* { margin:0; padding: 0; }
html, body, div, span,
applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, ins, kbd, q, s, samp,
small, strike, strong, tt, var,
dd, dl, dt, li, ol, ul,
fieldset, form, label, legend, caption
{
margin:0; padding: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
text-align: left;
vertical-align: baseline;
}
html, body, div, span,
applet, object, iframe,
fieldset, form, label, legend { border: 0 solid; }
/* IE5 & IE6 likes it */
* html body * { overflow:visible; }
* html iframe,
* html frame { overflow:auto; }
/* Включаем вертикальный скролл в FF & Safari */
html { height: 100%; margin-bottom: 1px; }
/** Default body **/
body {
font-size: 100.01%; /* Fix for font size in old Opera */
color: #000;
background: #fff;
text-align: left;
}
/* Исправляем слишком мелкий select */
option { padding-left: 0.4em; }
select { padding: 1px; }
/* No image borders */
img, a img, :link img, :visited img { border: 0; }
a { outline: none; }

View file

@ -0,0 +1,57 @@
/* container for elselect */
.el-select {
height:17px;
width : 110px;
border:1px solid #ccc;
cursor: default;
position:relative;
}
.el-select.hover {
background-color:#eee;
}
/* selected element */
.el-select label {
height:17px;
line-height:17px;
/* font-size:.92em;*/
padding: 0 5px;
margin: 0 12px 0 0;
display:block;
white-space:nowrap;
overflow:hidden;
background: #fff;
border-right:1px solid #ccc;
}
/* drop-down list */
.el-select .list {
border:1px solid #ccc;
display:block;
position:absolute;
overflow:auto;
background:#fff;
z-index:1000;
/* height:1610px*/
}
/* drop-down list item */
.el-select .list div {
position:relative;
padding:3px 25px 3px 7px;
border-bottom:1px solid #eee;
}
/* drop-down list item hovered */
.el-select .list .hover {
background:#efefef;
}
/* drop-down list item selected */
.el-select .list .active {
background-color:#c3dbef;
}
/* any elements in drop-down list item */
.el-select .list div * {
padding:0;
margin:0;
border:none;
white-space:nowrap;
display:block;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1,293 @@
/**
* @class elDialogForm
* Wraper for jquery.ui.dialog and jquery.ui.tabs
* Create form in dialog. You can decorate it as you wish - with tabs or/and tables
*
* Usage:
* var d = new elDialogForm(opts)
* d.append(['Field name: ', $('<input type="text" name="f1" />')])
* .separator()
* .append(['Another field name: ', $('<input type="text" name="f2" />')])
* .open()
* will create dialog with pair text field separated by horizontal rule
* Calling append() with 2 additional arguments ( d.append([..], null, true))
* - will create table in dialog and put text inputs and labels in table cells
*
* Dialog with tabs:
* var d = new elDialogForm(opts)
* d.tab('first', 'First tab label)
* .tab('second', 'Second tab label)
* .append(['Field name: ', $('<input type="text" name="f1" />')], 'first', true) - add label and input to first tab in table (table will create automagicaly)
* .append(['Field name 2: ', $('<input type="text" name="f2" />')], 'second', true) - same in secon tab
*
* Options:
* class - css class for dialog
* submit - form submit event callback. Accept 2 args - event and this object
* ajaxForm - arguments for ajaxForm, if needed (dont forget include jquery.form.js)
* tabs - arguments for ui.tabs
* dialog - arguments for ui.dialog
* name - hidden text field in wich selected value will saved
*
* Notice!
* When close dialog, it will destroing insead of dialog('close'). Reason - strange bug with tabs in dialog on secondary opening.
*
* @author: Dmitry Levashov (dio) dio@std42.ru
*
**/
function elDialogForm(o) {
var self = this;
var defaults = {
'class' : 'el-dialogform',
submit : function(e, d) { d.close(); },
form : { action : window.location.href, method : 'post' },
ajaxForm : null,
validate : null,
spinner : 'Loading',
tabs : { active: 0, selected : 0 },
tabPrefix : 'el-df-tab-',
dialog : {
title : 'dialog',
autoOpen : false,
modal : true,
resizable : false,
closeOnEscape : true,
buttons : {
Cancel : function() { self.close(); },
Ok : function() { self.form.trigger('submit'); }
}
}
};
this.opts = jQuery.extend(true, {}, defaults, o);
this.opts.dialog.close = function() {
self.close();
}
// this.opts.dialog.autoOpen = true;
if (this.opts.rtl) {
this.opts['class'] += ' el-dialogform-rtl';
}
if (o && o.dialog && o.dialog.buttons && typeof(o.dialog.buttons) == 'object') {
this.opts.dialog.buttons = o.dialog.buttons;
}
this.ul = null;
this.tabs = {};
this._table = null;
this.dialog = jQuery('<div />').addClass(this.opts['class']).dialog(this.opts.dialog);
this.message = jQuery('<div class="el-dialogform-message rounded-5" />').hide().appendTo(this.dialog);
this.error = jQuery('<div class="el-dialogform-error rounded-5" />').hide().appendTo(this.dialog);
this.spinner = jQuery('<div class="spinner" />').hide().appendTo(this.dialog);
this.content = jQuery('<div class="el-dialogform-content" />').appendTo(this.dialog)
this.form = jQuery('<form />').attr(this.opts.form).appendTo(this.content);
if (this.opts.submit) {
this.form.bind('submit', function(e) { self.opts.submit(e, self) })
}
if (this.opts.ajaxForm && jQuery.fn.ajaxForm) {
this.form.ajaxForm(this.opts.ajaxForm);
}
if (this.opts.validate) {
this.form.validate(this.opts.validate);
}
this.option = function(name, value) {
return this.dialog.dialog('option', name, value)
}
this.showError = function(msg, hideContent) {
this.hideMessage();
this.hideSpinner();
this.error.html(msg).show();
hideContent && this.content.hide();
return this;
}
this.hideError= function() {
this.error.text('').hide();
this.content.show();
return this;
}
this.showSpinner = function(txt) {
this.error.hide();
this.message.hide();
this.content.hide();
this.spinner.text(txt||this.opts.spinner).show();
this.option('buttons', {});
return this;
}
this.hideSpinner = function() {
this.content.show();
this.spinner.hide();
return this;
}
this.showMessage = function(txt, hideContent) {
this.hideError();
this.hideSpinner();
this.message.html(txt||'').show();
hideContent && this.content.hide();
return this;
}
this.hideMessage = function() {
this.message.hide();
this.content.show();
return this;
}
/**
* Create new tab
* @param string id - tab id
* @param string title - tab name
* @return elDialogForm
**/
this.tab = function(id, title) {
id = this.opts.tabPrefix+id;
if (!this.ul) {
this.ul = jQuery('<ul />').prependTo(this.form);
}
jQuery('<li />').append(jQuery('<a />').attr('href', '#'+id).html(title)).appendTo(this.ul);
this.tabs[id] = {tab : jQuery('<div />').attr('id', id).addClass('tab').appendTo(this.form), table : null};
return this;
}
/**
* Create new table
* @param string id tab id, if set - table will create in tab, otherwise - in dialog
* @return elDialogForm
**/
this.table = function(id) {
id = id && id.indexOf(this.opts.tabPrefix) == -1 ? this.opts.tabPrefix+id : id;
if (id && this.tabs && this.tabs[id]) {
this.tabs[id].table = jQuery('<table />').appendTo(this.tabs[id].tab);
} else {
this._table = jQuery('<table />').appendTo(this.form);
}
return this;
}
/**
* Append html, dom nodes or jQuery objects to dialog or tab
* @param array|object|string data object(s) to append to dialog
* @param string tid tab id, if adding to tab
* @param bool t if true - data will added in table (creating automagicaly)
* @return elDialogForm
**/
this.append = function(data, tid, t) {
tid = tid ? 'el-df-tab-'+tid : '';
if (!data) {
return this;
}
if (tid && this.tabs[tid]) {
if (t) {
!this.tabs[tid].table && this.table(tid);
var tr = jQuery('<tr />').appendTo(this.tabs[tid].table);
if (!jQuery.isArray(data)) {
tr.append(jQuery('<td />').append(data));
} else {
for (var i=0; i < data.length; i++) {
tr.append(jQuery('<td />').append(data[i]));
};
}
} else {
if (!jQuery.isArray(data)) {
this.tabs[tid].tab.append(data)
} else {
for (var i=0; i < data.length; i++) {
this.tabs[tid].tab.append(data[i]);
};
}
}
} else {
if (!t) {
if (!jQuery.isArray(data)) {
this.form.append(data);
} else {
for (var i=0; i < data.length; i++) {
this.form.append(data[i]);
};
}
} else {
if (!this._table) {
this.table();
}
var tr = jQuery('<tr />').appendTo(this._table);
if (!jQuery.isArray(data)) {
tr.append(jQuery('<td />').append(data));
} else {
for (var i=0; i < data.length; i++) {
tr.append(jQuery('<td />').append(data[i]));
};
}
}
}
return this;
}
/**
* Append separator (div class="separator") to dialog or tab
* @param string tid tab id, if adding to tab
* @return elDialogForm
**/
this.separator = function(tid) {
tid = 'el-df-tab-'+tid;
if (this.tabs && this.tabs[tid]) {
this.tabs[tid].tab.append(jQuery('<div />').addClass('separator'));
this.tabs[tid].table && this.table(tid);
} else {
this.form.append(jQuery('<div />').addClass('separator'));
}
return this;
}
/**
* Open dialog window
* @return elDialogForm
**/
this.open = function() {
var self = this;
this.ul && this.form.tabs(this.opts.tabs);
setTimeout(function() {
self.dialog.find(':text')
.keydown(function(e) {
if (e.keyCode == 13) {
e.preventDefault()
self.form.submit();
}
})
.filter(':first')[0].focus()
}, 200);
this.dialog.dialog('open');
return this;
}
/**
* Close dialog window and destroy content
* @return void
**/
this.close = function() {
if (typeof(this.opts.close) == 'function') {
this.opts.close();
}
this.dialog.dialog('destroy')//.remove();
}
}

View file

@ -0,0 +1,104 @@
/**
* @class eli18n
* Javascript applications localization
*
* @param Object o - class options. Object. {textdomain : 'имя_группы_сообщений', messages : {textdomain1 : {}[, textdomain2 : {}]...}}
*
* Usage:
*
* var msgs = { Hello : 'Превэд', 'Hello %user' : 'Превед %user' };
* //load messages and set default textdomain
* var translator = new eli18n( {textdomain : 'test', messages : {test : msgs}} )
* window.console.log(translator.translate('Hello'));
* window.console.log(translator.format('Hello %user', {user : 'David Blain'}))
* // create new textdomain
* translator.load({test2 : {'Goodbye' : 'Ja, deva mata!'} })
* // and use it, without changing default one
* window.console.log(translator.translate('Goodbye', 'test2'));
*
* @author: Dmitry (dio) Levashov dio@std42.ru
* license: BSD license
**/
function eli18n(o) {
/**
* Get/set default textdomain
*
* @param String d new textdomain name
* @return String default textdomain
**/
this.textdomain = function(d) {
return this.messages[d] ? this._domain = d : this._domain;
}
o && o.messages && this.load(o.messages);
o && o.textdomain && this.textdomain(o.textdomain);
}
eli18n.prototype = new function() {
/**
* @var Object messages (key - messages in English or message handler, value - message in selected language)
**/
this.messages = {};
/**
* @var String default textdomain
**/
this._domain = '';
/**
* Load new messages
*
* @param Object msgs - messages (key - textdomain name, value - messages Object)
* @return Object this
**/
this.load = function(msgs) {
if (typeof(msgs) == 'object') {
for (var d in msgs) {
var _msgs = msgs[d];
if (typeof(_msgs) == 'object') {
if (!this.messages[d]) {
this.messages[d] = {};
}
for (var k in _msgs) {
if (typeof(_msgs[k]) == 'string') {
this.messages[d][k] = _msgs[k];
}
}
}
}
}
return this;
}
/**
* Return translated message, if message exists in required or default textdomain, otherwise returns original message
*
* @param String msg - message
* @param String d - textdomain. If empty, default textdomain will be used
* @return String translated message
**/
this.translate = function(msg, d) {
var d = d && this.messages[d] ? d : this._domain;
return this.messages[d] && this.messages[d][msg] ? this.messages[d][msg] : msg;
}
/**
* Translate message and replace placeholders (%placeholder)
*
* @param String msg - message
* @param Object replacement for placeholders (keys - placeholders name without leading %, values - replacements)
* @param String d - textdomain. If empty, default textdomain will be used
* @return String translated message
**/
this.format = function(msg, data, d) {
msg = this.translate(msg, d);
if (typeof(data) == 'object') {
for (var i in data) {
msg = msg.replace('%'+i, this.translate(data[i], d));
}
}
return msg;
}
}

View file

@ -0,0 +1,150 @@
/**
* jQuery plugin. Create group of text input, elSelect and elColorPicker.
* Allow input border-width, border-style and border-color. Used in elRTE
*
* @author: Dmitry Levashov (dio) dio@std42.ru
**/
(function($) {
$.fn.elBorderSelect = function(o) {
var $self = this;
var self = this.eq(0);
var opts = $.extend({}, $.fn.elBorderSelect.defaults, o);
var width = $('<input type="text" />')
.attr({'name' : opts.name+'[width]', size : 3}).css('text-align', 'right')
.change(function() { $self.change(); });
var color = $('<div />').css('position', 'relative')
.elColorPicker({
'class' : 'el-colorpicker ui-icon ui-icon-pencil',
name : opts.name+'[color]',
palettePosition : 'outer',
change : function() { $self.change(); }
});
var style = $('<div />').elSelect({
tpl : '<div style="border-bottom:4px %val #000;width:100%;margin:7px 0"> </div>',
tpls : { '' : '%label'},
maxHeight : opts.styleHeight || null,
select : function() { $self.change(); },
src : {
'' : 'none',
solid : 'solid',
dashed : 'dashed',
dotted : 'dotted',
'double' : 'double',
groove : 'groove',
ridge : 'ridge',
inset : 'inset',
outset : 'outset'
}
});
self.empty()
.addClass(opts['class'])
.attr('name', opts.name||'')
.append(
$('<table />').attr('cellspacing', 0).append(
$('<tr />')
.append($('<td />').append(width).append(' px'))
.append($('<td />').append(style))
.append($('<td />').append(color))
)
);
function rgb2hex(str) {
function hex(x) {
hexDigits = ["0", "1", "2", "3", "4", "5", "6", "7", "8","9", "a", "b", "c", "d", "e", "f"];
return !x ? "00" : hexDigits[(x - x % 16) / 16] + hexDigits[x% 16];
}
var rgb = (str||'').match(/\(([0-9]{1,3}),\s*([0-9]{1,3}),\s*([0-9]{1,3})\)/);
return rgb ? "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]) : '';
}
function toPixels(num) {
if (!num) {
return num;
}
var m = num.match(/([0-9]+\.?[0-9]*)\s*(px|pt|em|%)/);
if (m) {
num = m[1];
unit = m[2];
}
if (num[0] == '.') {
num = '0'+num;
}
num = parseFloat(num);
if (isNaN(num)) {
return '';
}
var base = parseInt($(document.body).css('font-size')) || 16;
switch (unit) {
case 'em': return parseInt(num*base);
case 'pt': return parseInt(num*base/12);
case '%' : return parseInt(num*base/100);
}
return num;
}
this.change = function() {
opts.change && opts.change(this.val());
}
this.val = function(v) {
var w, s, c, b, m;
if (!v && v !== '') {
w = parseInt(width.val());
w = !isNaN(w) ? w+'px' : '';
s = style.val();
c = color.val();
return {
width : w,
style : s,
color : c,
css : $.trim(w+' '+s+' '+c)
}
} else {
b = '';
if (v.nodeName || v.css) {
if (!v.css) {
v = $(v);
}
b = v.css('border');
if ((b = v.css('border'))) {
w = s = c = b;
} else {
w = v.css('border-width');
s = v.css('border-style');
c = v.css('border-color');
}
} else {
w = v.width||'';
s = v.style||'';
c = v.color||'';
}
width.val(toPixels(w));
m = s ? s.match(/(solid|dashed|dotted|double|groove|ridge|inset|outset)/i) :'';
style.val(m ? m[1] : '');
color.val(c.indexOf('#') === 0 ? c : rgb2hex(c));
return this;
}
}
this.val(opts.value);
return this;
}
$.fn.elBorderSelect.defaults = {
name : 'el-borderselect',
'class' : 'el-borderselect',
value : {},
change : null
}
})(jQuery);

View file

@ -0,0 +1,237 @@
/**
* elColorPicker. JQuery plugin
* Create drop-down colors palette.
*
* Usage:
* $(selector).elColorPicker(opts)
*
* set color after init:
* var c = $(selector).elColorPicker(opts)
* c.val('#ffff99)
*
* Get selected color:
* var color = c.val();
*
* Notice!
* Palette created only after first click on element (lazzy loading)
*
* Options:
* colors - colors array (by default display 256 web safe colors)
* color - current (selected) color
* class - css class for display "button" (element on wich plugin was called)
* paletteClass - css class for colors palette
* palettePosition - string indicate where palette will created:
* 'inner' - palette will attach to element (acceptable in most cases)
* 'outer' - palette will attach to document.body.
* Use, when create color picker inside element with overflow == 'hidden', for example in ui.dialog
* update - function wich update button view on select color (by default set selected color as background)
* change - callback, called when color was selected (by default write color to console.log)
* name - hidden text field in wich selected color value will saved
*
* @author: Dmitry Levashov (dio) dio@std42.ru
*
**/
(function($) {
$.fn.elColorPicker = function(o) {
var self = this;
var opts = $.extend({}, $.fn.elColorPicker.defaults, o);
this.hidden = $('<input type="hidden" />').attr('name', opts.name).val(opts.color||'').appendTo(this);
this.palette = null;
this.preview = null;
this.input = null;
function setColor(c) {
self.val(c);
opts.change && opts.change(self.val());
self.palette.slideUp();
}
function init() {
self.palette = $('<div />').addClass(opts.paletteClass+' rounded-3');
for (var i=0; i < opts.colors.length; i++) {
$('<div />')
.addClass('color')
.css('background-color', opts.colors[i])
.attr({title : opts.colors[i], unselectable : 'on'})
.appendTo(self.palette)
.mouseenter(function() {
var v = $(this).attr('title');
self.input.val(v);
self.preview.css('background-color', v);
})
.click(function(e) {
e.stopPropagation();
setColor($(this).attr('title'));
});
};
self.input = $('<input type="text" />')
.addClass('rounded-3')
.attr('size', 8)
.click(function(e) {
e.stopPropagation();
$(this).focus();
})
.keydown(function(e) {
if (e.ctrlKey || e.metaKey) {
return true;
}
var k = e.keyCode;
// on esc - close palette
if (k == 27) {
return self.mouseleave();
}
// allow input only hex color value
if (k!=8 && k != 13 && k!=46 && k!=37 && k != 39 && (k<48 || k>57) && (k<65 || k > 70)) {
return false;
}
var c = $(this).val();
if (c.length == 7 || c.length == 0) {
if (k == 13) {
e.stopPropagation();
e.preventDefault();
setColor(c);
self.palette.slideUp();
}
if (e.keyCode != 8 && e.keyCode != 46 && k!=37 && k != 39) {
return false;
}
}
})
.keyup(function(e) {
var c = $(this).val();
c.length == 7 && /^#[0-9abcdef]{6}$/i.test(c) && self.val(c);
});
self.preview = $('<div />')
.addClass('preview rounded-3')
.click(function(e) {
e.stopPropagation();
setColor(self.input.val());
});
self.palette
.append($('<div />').addClass('clearfix'))
.append($('<div />').addClass('panel').append(self.input).append(self.preview));
if (opts.palettePosition == 'outer') {
self.palette.hide()
.appendTo(self.parents('body').eq(0))
.mouseleave(function() {
if (!self.palette.is(':animated')) {
$(this).slideUp();
self.val(self.val());
}
});
self.mouseleave(function(e) {
if (e.relatedTarget != self.palette.get(0)) {
if (!self.palette.is(':animated')) {
self.palette.slideUp();
self.val(self.val());
}
}
})
} else {
self.append(self.palette.hide())
.mouseleave(function(e) {
self.palette.slideUp();
self.val(self.val());
});
}
self.val(self.val());
}
this.empty().addClass(opts['class']+' rounded-3')
.css({'position' : 'relative', 'background-color' : opts.color||''})
.click(function(e) {
if (!self.hasClass('disabled')) {
!self.palette && init();
if (opts.palettePosition == 'outer' && self.palette.css('display') == 'none') {
var o = $(this).offset();
var w = self.palette.width();
var l = self.parents('body').width() - o.left >= w ? o.left : o.left + $(this).outerWidth() - w;
self.palette.css({left : l+'px', top : o.top+$(this).height()+1+'px'});
}
self.palette.slideToggle();
}
});
this.val = function(v) {
if (!v && v!=='') {
return this.hidden.val();
} else {
this.hidden.val(v);
if (opts.update) {
opts.update(this.hidden.val());
} else {
this.css('background-color', v);
}
if (self.palette) {
self.preview.css('background-color', v);
self.input.val(v);
}
}
return this;
}
return this;
}
$.fn.elColorPicker.defaults = {
'class' : 'el-colorpicker',
paletteClass : 'el-palette',
palettePosition : 'inner',
name : 'color',
color : '',
update : null,
change : function(c) { },
colors : [
'#ffffff', '#cccccc', '#999999', '#666666', '#333333', '#000000',
'#ffcccc', '#cc9999', '#996666', '#663333', '#330000',
'#ff9999', '#cc6666', '#cc3333', '#993333', '#660000',
'#ff6666', '#ff3333', '#ff0000', '#cc0000', '#990000',
'#ff9966', '#ff6633', '#ff3300', '#cc3300', '#993300',
'#ffcc99', '#cc9966', '#cc6633', '#996633', '#663300',
'#ff9933', '#ff6600', '#ff9900', '#cc6600', '#cc9933',
'#ffcc66', '#ffcc33', '#ffcc00', '#cc9900', '#996600',
'#ffffcc', '#cccc99', '#999966', '#666633', '#333300',
'#ffff99', '#cccc66', '#cccc33', '#999933', '#666600',
'#ffff66', '#ffff33', '#ffff00', '#cccc00', '#999900',
'#ccff66', '#ccff33', '#ccff00', '#99cc00', '#669900',
'#ccff99', '#99cc66', '#99cc33', '#669933', '#336600',
'#99ff33', '#99ff00', '#66ff00', '#66cc00', '#66cc33',
'#99ff66', '#66ff33', '#33ff00', '#33cc00', '#339900',
'#ccffcc', '#99cc99', '#669966', '#336633', '#003300',
'#99ff99', '#66cc66', '#33cc33', '#339933', '#006600',
'#66ff66', '#33ff33', '#00ff00', '#00cc00', '#009900',
'#66ff99', '#33ff66', '#00ff33', '#00cc33', '#009933',
'#99ffcc', '#66cc99', '#33cc66', '#339966', '#006633',
'#33ff99', '#00ff66', '#00ff99', '#00cc66', '#33cc99',
'#66ffcc', '#33ffcc', '#00ffcc', '#00cc99', '#009966',
'#ccffff', '#99cccc', '#669999', '#336666', '#003333',
'#99ffff', '#66cccc', '#33cccc', '#339999', '#006666',
'#66cccc', '#33ffff', '#00ffff', '#00cccc', '#009999',
'#66ccff', '#33ccff', '#00ccff', '#0099cc', '#006699',
'#99ccff', '#6699cc', '#3399cc', '#336699', '#003366',
'#3399ff', '#0099ff', '#0066ff', '#066ccc', '#3366cc',
'#6699ff', '#3366ff', '#0033ff', '#0033cc', '#003399',
'#ccccff', '#9999cc', '#666699', '#333366', '#000033',
'#9999ff', '#6666cc', '#3333cc', '#333399', '#000066',
'#6666ff', '#3333ff', '#0000ff', '#0000cc', '#009999',
'#9966ff', '#6633ff', '#3300ff', '#3300cc', '#330099',
'#cc99ff', '#9966cc', '#6633cc', '#663399', '#330066',
'#9933ff', '#6600ff', '#9900ff', '#6600cc', '#9933cc',
'#cc66ff', '#cc33ff', '#cc00ff', '#9900cc', '#660099',
'#ffccff', '#cc99cc', '#996699', '#663366', '#330033',
'#ff99ff', '#cc66cc', '#cc33cc', '#993399', '#660066',
'#ff66ff', '#ff33ff', '#ff00ff', '#cc00cc', '#990099',
'#ff66cc', '#ff33cc', '#ff00cc', '#cc0099', '#990066',
'#ff99cc', '#cc6699', '#cc3399', '#993366', '#660033',
'#ff3399', '#ff0099', '#ff0066', '#cc0066', '#cc3366',
'#ff6699', '#ff3366', '#ff0033', '#cc0033', '#990033'
]
};
})(jQuery);

View file

@ -0,0 +1,142 @@
/**
* jQuery plugin. Create group of text input fields and selects for setting padding/margin. Used in elRTE
*
* @author: Dmitry Levashov (dio) dio@std42.ru
**/
(function($) {
$.fn.elPaddingInput = function(o) {
var self = this;
var opts = $.extend({}, $.fn.elPaddingInput.defaults, {name : this.attr('name')}, o);
this.regexps = {
main : new RegExp(opts.type == 'padding' ? 'padding\s*:\s*([^;"]+)' : 'margin\s*:\s*([^;"]+)', 'im'),
left : new RegExp(opts.type == 'padding' ? 'padding-left\s*:\s*([^;"]+)' : 'margin-left\s*:\s*([^;"]+)', 'im'),
top : new RegExp(opts.type == 'padding' ? 'padding-top\s*:\s*([^;"]+)' : 'margin-top\s*:\s*([^;"]+)', 'im'),
right : new RegExp(opts.type == 'padding' ? 'padding-right\s*:\s*([^;"]+)' : 'margin-right\s*:\s*([^;"]+)', 'im'),
bottom : new RegExp(opts.type == 'padding' ? 'padding-bottom\s*:\s*([^;"]+)' : 'margin-bottom\s*:\s*([^;"]+)', 'im')
};
$.each(['left', 'top', 'right', 'bottom'], function() {
self[this] = $('<input type="text" />')
.attr('size', 3)
.css('text-align', 'right')
.css('border-'+this, '2px solid red')
.bind('change', function() { $(this).val(parseNum($(this).val())); change(); })
.attr('name', opts.name+'['+this+']');
});
$.each(['uleft', 'utop', 'uright', 'ubottom'], function() {
self[this] = $('<select />')
.append('<option value="px">px</option>')
.append('<option value="em">em</option>')
.append('<option value="pt">pt</option>')
.bind('change', function() { change(); })
.attr('name', opts.name+'['+this+']');
if (opts.percents) {
self[this].append('<option value="%">%</option>');
}
});
this.empty().addClass(opts['class'])
.append(this.left).append(this.uleft).append(' x ')
.append(this.top).append(this.utop).append(' x ')
.append(this.right).append(this.uright).append(' x ')
.append(this.bottom).append(this.ubottom);
this.val = function(v) {
if (!v && v!=='') {
var l = parseNum(this.left.val());
var t = parseNum(this.top.val());
var r = parseNum(this.right.val());
var b = parseNum(this.bottom.val());
var ret = {
left : l=='auto' || l==0 ? l : (l!=='' ? l+this.uleft.val() : ''),
top : t=='auto' || t==0 ? t : (t!=='' ? t+this.utop.val() : ''),
right : r=='auto' || r==0 ? r : (r!=='' ? r+this.uright.val() : ''),
bottom : b=='auto' || b==0 ? b : (b!=='' ? b+this.ubottom.val() : ''),
css : ''
};
if (ret.left!=='' && ret.right!=='' && ret.top!=='' && ret.bottom!=='') {
if (ret.left == ret.right && ret.top == ret.bottom) {
ret.css = ret.top+' '+ret.left;
} else{
ret.css = ret.top+' '+ret.right+' '+ret.bottom+' '+ret.left;
}
}
return ret;
} else {
if (v.nodeName || v.css) {
if (!v.css) {
v = $(v);
}
var val = {left : '', top : '', right: '', bottom : ''};
var style = (v.attr('style')||'').toLowerCase();
if (style) {
style = $.trim(style);
var m = style.match(this.regexps.main);
if (m) {
var tmp = $.trim(m[1]).replace(/\s+/g, ' ').split(' ', 4);
val.top = tmp[0];
val.right = tmp[1] && tmp[1]!=='' ? tmp[1] : val.top;
val.bottom = tmp[2] && tmp[2]!=='' ? tmp[2] : val.top;
val.left = tmp[3] && tmp[3]!=='' ? tmp[3] : val.right;
} else {
$.each(['left', 'top', 'right', 'bottom'], function() {
var name = this.toString();
m = style.match(self.regexps[name]);
if (m) {
val[name] = m[1];
}
});
}
}
var v = val;
}
$.each(['left', 'top', 'right', 'bottom'], function() {
var name = this.toString();
self[name].val('');
self['u'+name].val();
if (typeof(v[name]) != 'undefined' && v[name] !== null) {
v[name] = v[name].toString();
var _v = parseNum(v[name]);
self[name].val(_v);
var m = v[name].match(/(px|em|pt|%)/i);
self['u'+name].val(m ? m[1] : 'px');
}
});
return this;
}
}
function parseNum(num) {
num = $.trim(num.toString());
if (num[0] == '.') {
num = '0'+num;
}
n = parseFloat(num);
return !isNaN(n) ? n : (num == 'auto' ? num : '');
}
function change() {
opts.change && opts.change(self);
}
this.val(opts.value);
return this;
}
$.fn.elPaddingInput.defaults = {
name : 'el-paddinginput',
'class' : 'el-paddinginput',
type : 'padding',
value : {},
percents : true,
change : null
}
})(jQuery);

View file

@ -0,0 +1,175 @@
/**
* elSelect JQuery plugin
* Replacement for select input
* Allow to put any html and css decoration in drop-down list
*
* Usage:
* $(selector).elSelect(opts)
*
* set value after init:
* var c = $(selector).elSelect(opts)
* c.val('some value')
*
* Get selected value:
* var val = c.val();
*
* Notice!
* 1. When called on multiply elements, elSelect create drop-down list only for fist element
* 2. Elements list created only after first click on element (lazzy loading)
*
* Options:
* src - object with pairs value:label to create drop-down list
* value - current (selected) value
* class - css class for display "button" (element on wich plugin was called)
* listClass - css class for drop down elements list
* select - callback, called when value was selected (by default write value to console.log)
* name - hidden text field in wich selected value will saved
* maxHeight - elements list max height (if height greater - scroll will appear)
* tpl - template for element in list (contains 2 vars: %var - for src key, %label - for src[val] )
* labelTpl - template for label (current selected element) (contains 2 placeholders: %var - for src key, %label - for src[val] )
*
* @author: Dmitry Levashov (dio) dio@std42.ru
**/
(function($) {
$.fn.elSelect = function(o) {
var $self = this;
var self = this.eq(0);
var opts = $.extend({}, $.fn.elSelect.defaults, o);
var hidden = $('<input type="hidden" />').attr('name', opts.name);
var label = $('<label />').attr({unselectable : 'on'}).addClass('rounded-left-3');
var list = null;
var ieWidth = null;
if (self.get(0).nodeName == 'SELECT') {
opts.src = {};
self.children('option').each(function() {
opts.src[$(this).val()] = $(this).text();
});
opts.value = self.val();
opts.name = self.attr('name');
self.replaceWith((self = $('<div />')));
}
if (!opts.value || !opts.src[opts.val]) {
opts.value = null;
var i = 0;
for (var v in opts.src) {
if (i++ == 0) {
opts.value = v;
}
}
}
this.val = function(v) {
if (!v && v!=='') {
return hidden.val();
} else {
if (opts.src[v]) {
hidden.val(v);
updateLabel(v);
if (list) {
list.children().each(function() {
if ($(this).attr('name') == v) {
$(this).addClass('active');
} else {
$(this).removeClass('active');
}
});
}
}
return this;
}
}
// update label content
function updateLabel(v) {
var tpl = opts.labelTpl || opts.tpls[v] || opts.tpl;
label.html(tpl.replace(/%val/g, v).replace(/%label/, opts.src[v])).children().attr({unselectable : 'on'});
}
// init "select"
self.empty()
.addClass(opts['class']+' rounded-3')
.attr({unselectable : 'on'})
.append(hidden)
.append(label)
.hover(
function() { $(this).addClass('hover') },
function() { $(this).removeClass('hover') }
)
.click(function(e) {
!list && init();
list.slideToggle();
// stupid ie inherit width from parent
if ($.browser.msie && !ieWidth) {
list.children().each(function() {
ieWidth = Math.max(ieWidth, $(this).width());
});
if (ieWidth > list.width()) {
list.width(ieWidth+40);
}
}
});
this.val(opts.value);
// create drop-down list
function init() {
// not ul because of ie is stupid with mouseleave in it :(
list = $('<div />')
.addClass(opts.listClass+' rounded-3')
.hide()
.appendTo(self.mouseleave(function(e) { list.slideUp(); }));
for (var v in opts.src) {
var tpl = opts.tpls[v] || opts.tpl;
$('<div />')
.attr('name', v)
.append( $(tpl.replace(/%val/g, v).replace(/%label/g, opts.src[v])).attr({unselectable : 'on'}) )
.appendTo(list)
.hover(
function() { $(this).addClass('hover') },
function() { $(this).removeClass('hover') }
)
.click(function(e) {
e.stopPropagation();
e.preventDefault();
var v = $(this).attr('name');
$self.val(v);
opts.select(v);
list.slideUp();
});
};
var w = self.outerWidth();
if (list.width() < w) {
list.width(w);
}
var h = list.height();
if (opts.maxHeight>0 && h>opts.maxHeight) {
list.height(opts.maxHeight);
}
$self.val(hidden.val());
}
return this;
}
$.fn.elSelect.defaults = {
name : 'el-select',
'class' : 'el-select',
listClass : 'list',
labelTpl : null,
tpl : '<%val>%label</%val>',
tpls : {},
value : null,
src : {},
select : function(v) { window.console && window.console.log && window.console.log('selected: '+v); },
maxHeight : 410
}
})(jQuery);

View file

@ -0,0 +1,264 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>elRTE from source</title>
<!-- jQuery and UI -->
<script src="../js/jquery-1.6.1.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/jquery-ui-1.8.13.custom.min.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="../css/smoothness/jquery-ui-1.8.13.custom.css" type="text/css" media="screen" title="no title" charset="utf-8">
<!-- CSS for widgets -->
<link rel="stylesheet" href="ellib/css/elcommon.css" type="text/css" media="screen" charset="utf-8">
<link rel="stylesheet" href="ellib/css/elcolorpicker.css" type="text/css" media="screen" charset="utf-8">
<link rel="stylesheet" href="ellib/css/eldialogform.css" type="text/css" media="screen" charset="utf-8">
<link rel="stylesheet" href="ellib/css/elpaddinginput.css" type="text/css" media="screen" charset="utf-8">
<link rel="stylesheet" href="ellib/css/elselect.css" type="text/css" media="screen" charset="utf-8">
<link rel="stylesheet" href="elrte/css/elrte.css" type="text/css" media="screen" charset="utf-8">
<!-- Common JS and widgets -->
<script src="ellib/js/eli18n.js" type="text/javascript" charset="utf-8"></script>
<script src="ellib/js/eldialogform.js" type="text/javascript" charset="utf-8"></script>
<script src="ellib/js/jquery.elcolorpicker.js" type="text/javascript" charset="utf-8"></script>
<script src="ellib/js/jquery.elborderselect.js" type="text/javascript" charset="utf-8"></script>
<script src="ellib/js/jquery.elpaddinginput.js" type="text/javascript" charset="utf-8"></script>
<script src="ellib/js/jquery.elselect.js" type="text/javascript" charset="utf-8"></script>
<!-- elRTE core -->
<script src="elrte/js/elRTE.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/elRTE.options.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/elRTE.utils.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/elRTE.DOM.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/elRTE.selection.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/elRTE.w3cRange.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/elRTE.ui.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/elRTE.history.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/elRTE.filter.js" type="text/javascript" charset="utf-8"></script>
<!-- elRTE languages -->
<script src="elrte/js/i18n/elrte.ar.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/i18n/elrte.ca.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/i18n/elrte.cs.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/i18n/elrte.da.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/i18n/elrte.de.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/i18n/elrte.en.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/i18n/elrte.es.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/i18n/elrte.fa.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/i18n/elrte.fr.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/i18n/elrte.hr.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/i18n/elrte.hu.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/i18n/elrte.it.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/i18n/elrte.jp.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/i18n/elrte.ko.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/i18n/elrte.lv.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/i18n/elrte.nl.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/i18n/elrte.pl.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/i18n/elrte.pt_BR.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/i18n/elrte.ru.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/i18n/elrte.th.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/i18n/elrte.tr.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/i18n/elrte.uk.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/i18n/elrte.vi.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/i18n/elrte.zh_CN.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/i18n/elrte.zh_TW.js" type="text/javascript" charset="utf-8"></script>
<!-- elRTE buttons -->
<script src="elrte/js/ui/anchor.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/blockquote.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/copy.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/css.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/div.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/docstructure.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/elfinder.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/fontname.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/fontsize.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/forecolor.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/formatblock.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/fullscreen.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/horizontalrule.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/image.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/flash.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/indent.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/justifyleft.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/link.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/nbsp.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/outdent.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/pasteformattext.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/pastetext.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/save.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/stopfloat.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/table.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/tablerm.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/tbcellprops.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/tbcellsmerge.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/tbcellsplit.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/tbcollbefore.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/tbcolrm.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/tbrowbefore.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/tbrowrm.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/unlink.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/undo.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/direction.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/smiley.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/pagebreak.js" type="text/javascript" charset="utf-8"></script>
<script src="elrte/js/ui/about.js" type="text/javascript" charset="utf-8"></script>
<!-- elFinder -->
<link rel="stylesheet" href="../../elfinder/css/elfinder.css" type="text/css" media="screen" charset="utf-8">
<script src="../../elfinder/js/elfinder.full.js" type="text/javascript" charset="utf-8"></script>
<script src="../../elfinder/js/i18n/elfinder.ru.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
jQuery().ready(function() {
// Disable filtering chains
// elRTE.prototype.filter.prototype.chains = { }
/* elRTE 'custom' toolbar */
elRTE.prototype.options.panels.custom = [
'bold', 'italic', 'underline', 'forecolor',
'fontsize', 'formatblock', 'insertorderedlist', 'insertunorderedlist', 'docstructure'
];
elRTE.prototype.options.toolbars.custom = ['custom', 'eol', 'undoredo', 'alignment', 'eol', 'links', 'images'];
var opts = {
// doctype : '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
cssClass : 'el-rte',
//lang : 'en',
height : 350,
toolbar : 'maxi', // custom
cssfiles : ['elrte/css/elrte-inner.css', 'elrte/css/inner-example.css'],
// elfinder
fmOpen : function(callback) {
$('<div id="myelfinder"></div>').elfinder({
url : '../../elfinder/connectors/php/connector.php',
lang : 'en',
dialog : { width : 900, modal : true, title : 'Files' }, // open in dialog
closeOnEditorCallback : true, // close elFinder after file select
editorCallback : callback // pass callback to editor
});
},
// example of user replacement
// restricts edit of blocks like <!-- BEGIN MY_BLOCK -->anything<!-- END MY_BLOCK -->
replace : [ function(html) {
var self = this;
return html.replace(/(<!--\s*BEGIN\s*([^>]+)\s*-->([\s\S]*?)<!--\s*END\s*(\2)\s*-->)/gi, function(t, a, b, c, d) {
if (b == d) {
//self.rte.log([b, d]);
var id = 'MYTAG'+Math.random().toString().substring(2);
self.scripts[id] = t;
return '<img id="'+id+'" src="'+self.url+'pixel.gif" class="elrte-protected elrte-MYTAG">';
}
return html;
});
}],
restore : [ function(html) {
var self = this;
return html.replace(this.serviceClassRegExp, function(t, n, a) {
a = self.parseAttrs(a);
if (a["class"]['elrte-MYTAG']) {
return self.scripts[a.id] + "\n" || '';
}
return t;
});
}]
};
// create elRTE
var rte = $('#editor').elrte(opts);
// elRTE in dialog example
$('#dialog').click(function() { // open dialog on click
var dialog = $('<div/>').dialog({
title : 'Editor in dialog',
width : 600
});
// create element for elRTE
var rteInDialog = $('<div>Content for editor in dialog</div>');
// put element inside dialog
dialog.append(rteInDialog);
// create elRTE on element
rteInDialog.elrte(opts);
});
$('#getContent').click(function() {
alert($('#editor').elrte('val'));
});
$('#setContent').click(function() {
$('#editor').elrte('val', 'This is new <b>content</b> for editor');
});
$('#destroy').click(function() {
$('#editor').elrte('destroy');
});
});
</script>
<style type="text/css" media="screen">
body { padding: 0 20px; }
.button { display:inline-block; border:1px solid #ccc; background:#eee; padding:5px; margin:10px; }
</style>
</head>
<body>
<!-- <object style="" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" height="300" width="500"><param name="quality" value="high"><param name="movie" value="http://localhost/git/elrte-stable/files/flash/500.swf"><embed pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" src="http://localhost/git/elrte-stable/files/flash/500.swf" type="application/x-shockwave-flash"></object> -->
<!-- <object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/yksg5lL6D_U?fs=1&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/yksg5lL6D_U?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object> -->
<!-- <iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps/ms?ie=UTF8&amp;hl=en&amp;msa=0&amp;msid=109895569633316339579.0004564e2ac5710eda622&amp;ll=7.815809,98.33674&amp;spn=0.000361,0.004838&amp;output=embed"></iframe><br /><small>View <a href="http://maps.google.com/maps/ms?ie=UTF8&amp;hl=en&amp;msa=0&amp;msid=109895569633316339579.0004564e2ac5710eda622&amp;ll=7.815809,98.33674&amp;spn=0.000361,0.004838&amp;source=embed" style="color:#0000FF;text-align:left">World Ocean Trip</a> in a larger map</small> -->
<form method="post" action="post.php?debug=yes">
<!-- <textarea id="editor2">
<table>
<tr>
<td>Полотенце</td>
<td>Полотенце, возможно, самый необходимый предмет ! для межзвездного путешественника.</td>
</tr>
</table>
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8">
Полотенце, возможно, самый необходимый предмет ! для межзвездного путешественника.
</textarea> -->
<!-- <textarea id="editor3"></textarea> -->
<div id="editor">
<!-- BEGIN DO_NOT_EDIT -->
hello eldorado <!-- BEGIN DO_NOT_INNER -->inner<!-- END DO_NOT_INNER -->
<!-- END DO_NOT_EDIT -->
<!-- BEGIN DO_NOT_WOW -->
here is my fancy code
<!-- END DO_NOT_WOW -->
<p>Полотенце, <a name="42"></a>возможно, <span> необходимый предмет ! </span>для межзвездного путешественника.</p> &nbsp; <br /> &nbsp;
<br>&nbsp;&nbsp;<p>Полотенце, возможно, самый необходимый предмет ! для межзвездного путешественника.</p>
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8">
<font color="red">empty text</font>
<div>div'ed text</div><p>p test</p>
<table>
<tbody> {?foreach key=k value=v?}
<tr><td>123</td></tr> {?/foreach?}
</tbody>
</table>
<h2>ДУГЛАС АДАМС - Путеводитель "Автостопом по Галактике"<br>
DOUGLAS ADAMS - The Hitchhiker's Guide to the Galaxy</h2>
<!-- pagebreak -->
<script type="text/javascript" charset="utf-8">
// alert('a')
</script>
<img src="elrte/images/media-director.png" alt="Marvin">
<!-- pagebreak -->
<b>Вот что сообщает <a href="http://google.com">Галактический Путеводитель</a> на предмет <span style="background-color: rgb(255, 255, 153);">полотенец</span>:</b>
Полотенце, возможно, самый необходимый предмет ! для межзвездного путешественника. Оно имеет некоторую практическую ценность - вы можете: завернуться в него, чтобы согреться, прыгая по холодным лунам Джаглан-Беты; использовать его, как подстилку,лежа на мраморном песке пляжей Сантрагинуса V и вдыхая пьянящий морской воздух; спать на нем под огненно-красными звездами на пустынной планете Какрафун; сделать из него парус, чтобы спуститься на плоту по ленивой реке Мотт; намочить его и завязать узлом, чтобы использовать, как оружие в рукопашной; обвязать им голову, чтобы избежать ядовитого дыма или взгляда Прожорного Заглотозавера с Трааля
</div>
<input type="submit" name="" value="go" id="">
</form>
<div id="dialog" class="button">dialog</div>
<div id="getContent" class="button">get content</div>
<div id="setContent" class="button">set content</div>
<div id="destroy" class="button">destroy</div>
</body>
</html>

View file

@ -0,0 +1,85 @@
body.el-rte-rtl, body.el-rte-rtl * { direction:rtl; }
body.el-rte-structure blockquote { border:1px dotted #ccc; }
body.el-rte-structure span { outline:1px solid #ccc; }
body.el-rte-structure table { border:1px dotted #aaa; }
body.el-rte-structure caption,
body.el-rte-structure td,
body.el-rte-structure th { border:1px dotted #ccc; }
body.el-rte-structure p {
background-image:url(../images/outline-p.png);
background-repeat:no-repeat;
background-position:right top;
border:1px dotted #99ccff; }
body.el-rte-structure div {
background-image:url(../images/outline-div.png);
background-repeat:no-repeat;
background-position:right top;
border:1px dotted #aaa;
}
body.el-rte-structure a.elrte-anchor {
display:inline-block;
vertical-align:baseline;
width:12px;
height:12px;
border:1px dotted #ccc;
background: url('../images/elrte-toolbar.png') -564px -8px no-repeat;
}
img { cursor: default; }
img.elrte-webkit-hl { outline:1px dashed #777; }
.elrtebm { }
.elrte-media-x-shockwave-flash,
.elrte-media-quicktime,
.elrte-media-x-director,
.elrte-media-x-mplayer2,
.elrte-media-x-pn-realaudio-plugin,
.elrte-media-youtube,
.elrte-media-rutube,
.elrte-media-vimeo,
.elrte-yandex-maps,
.elrte-google-maps,
.elrte-iframe,
.elrte-media {
border:1px solid #ccc;
background:#eee url(../images/media-flash.png) center center no-repeat;
}
.elrte-media-x-shockwave-flash { background-image:url(../images/media-flash.png); }
.elrte-media-youtube { background-image:url(../images/media-youtube.png); }
.elrte-media-vimeo { background-image:url(../images/media-vimeo.png); }
.elrte-media-rutube { background-image:url(../images/media-rutube.png); }
.elrte-media-quicktime { background-image:url(../images/media-quicktime.png); }
.elrte-media-x-director { background-image:url(../images/media-director.png); }
.elrte-media-x-mplayer2 { background-image:url(../images/media-winmedia.png); }
.elrte-media-x-pn-realaudio-plugin { background-image:url(../images/media-realaudio.png); }
.elrte-yandex-maps { background-image:url(../images/yandex-maps.png); }
.elrte-google-maps { background-image:url(../images/google-maps.png); display: block; }
.elrte-iframe { background-image:url(../images/iframe.png); }
.elrte-pagebreak {
display:block;
clear:both;
width:100%;
height:7px;
outline:1px dotted #777;
outline-left:none;
outline-right:none;
background:transparent url(../images/pagebreak.gif) center center no-repeat;
}
.elrte-pagebreak:after {
content: ".";
display: block;
font-size:0;
height: 0;
clear: both;
visibility: hidden;
}

View file

@ -0,0 +1,301 @@
/* контейнер */
.el-rte {
font-family: Trebuchet MS, Verdana, Geneva,sans-serif;
overflow:hidden;
/* border:1px solid #aaa;*/
}
.el-rte.el-fullscreen {
position:absolute;
width:99%;
/* height:100%;*/
top:0;
left:0;
margin:0;
z-index:10;
}
.elrte-swf-placeholder {
width:1px;
background: url('../images/swf.png') 0 0 no-repeat;
}
/* style to detect images url */
/*.el-rte */
.elrtetesturl { color:red; background-image:url(../images/pixel.gif);}
/* панель инструментов */
.el-rte .toolbar { background-color:#eee; padding:3px 7px 2px 7px; border:1px solid #ccc; white-space:normal; }
.el-rte-rtl .toolbar { direction: rtl; }
/* панель кнопок */
.el-rte .toolbar ul {
position:relative;
display:inline-block;
display: -moz-inline-stack;
display: inline-block;
vertical-align: top;
zoom: 1;
*display: inline;
margin:0;
list-style:none;
padding:0 2px 0 5px;
background: url('../images/elrte-toolbar.png') -934px -2px no-repeat;
}
/* первая панель кнопок */
.el-rte .toolbar ul.first {
background:transparent;
padding-left:0;
}
/* кнопка */
.el-rte .toolbar ul li {
display:inline-block;
display: -moz-inline-stack;
display: inline-block;
height:22px;
width:22px;
vertical-align: top;
zoom: 1;
*display: inline;
margin:1px 1px;
padding:0; /* Joomla 1.6 compat */
background:url('../images/elrte-toolbar.png') no-repeat;
border:1px solid #ccc;
z-index:100;
}
/* активная и подсвеченная и неактивная кнопка */
.el-rte .toolbar ul li.hover { border:1px solid #54b9bf; }
.el-rte .toolbar ul li.active { background-color:#c3dbef; border:1px solid #fff; }
.el-rte .toolbar ul li.disabled { opacity:alpha(0.3); opacity: 0.3; filter:Alpha(Opacity=30);}
/* кнопки */
.el-rte .toolbar ul li.about {background-position:-829px -5px;}
.el-rte .toolbar ul li.save {background-position:-30px -2px;}
.el-rte .toolbar ul li.new {background-position:-55px -2px}
.el-rte .toolbar ul li.copy {background-position:-78px -2px}
.el-rte .toolbar ul li.css {background-position:-801px -5px}
.el-rte .toolbar ul li.cut {background-position:-104px -2px}
.el-rte .toolbar ul li.paste {background-position:-128px -2px}
.el-rte .toolbar ul li.pastetext {background-position:-534px -2px}
.el-rte .toolbar ul li.pasteformattext {background-position:-154px -2px}
.el-rte .toolbar ul li.removeformat {background-position:-180px -2px}
.el-rte .toolbar ul li.docstructure {background-position:-712px -4px}
.el-rte .toolbar ul li.undo {background-position:-205px -2px}
.el-rte .toolbar ul li.redo {background-position:-230px -2px}
.el-rte .toolbar ul li.bold {background-position:-252px -2px; }
.el-rte .toolbar ul li.italic {background-position:-270px -2px;}
.el-rte .toolbar ul li.underline {background-position:-290px -2px; }
.el-rte .toolbar ul li.strikethrough {background-position:-149px -29px}
.el-rte .toolbar ul li.subscript {background-position:-54px -29px}
.el-rte .toolbar ul li.superscript {background-position:-76px -29px}
.el-rte .toolbar ul li.justifyleft {background-position:-311px -2px}
.el-rte .toolbar ul li.justifycenter {background-position:-335px -2px}
.el-rte .toolbar ul li.justifyright {background-position:-360px -2px}
.el-rte .toolbar ul li.justifyfull {background-position:-174px -29px}
.el-rte .toolbar ul li.insertunorderedlist {background-position:-100px -29px}
.el-rte .toolbar ul li.insertorderedlist {background-position:-124px -29px}
.el-rte .toolbar ul li.outdent {background-position:-6px -29px}
.el-rte .toolbar ul li.indent {background-position:-32px -29px}
.el-rte .toolbar ul li.blockquote {background-position:-220px -30px}
.el-rte .toolbar ul li.div {background-position:-655px -29px}
.el-rte .toolbar ul li.stopfloat {background-position:-771px -5px}
.el-rte .toolbar ul li.nbsp {background-position:-580px -2px}
.el-rte .toolbar ul li.forecolor {background-position:-372px -30px}
.el-rte .toolbar ul li.hilitecolor {background-position:-395px -30px}
.el-rte .toolbar ul li.link {background-position:-244px -29px}
.el-rte .toolbar ul li.unlink {background-position:-270px -29px}
.el-rte .toolbar ul li.anchor {background-position:-296px -30px}
.el-rte .toolbar ul li.image {background-position:-384px -2px}
.el-rte .toolbar ul li.flash {background-position:-410px -2px}
.el-rte .toolbar ul li.file {background-position:-436px -3px}
.el-rte .toolbar ul li.table {background-position:-421px -30px}
.el-rte .toolbar ul li.tableprops {background-position:-602px -29px}
.el-rte .toolbar ul li.tbcellprops {background-position:-806px -27px}
.el-rte .toolbar ul li.tablerm {background-position:-461px -2px}
.el-rte .toolbar ul li.tbrowbefore {background-position:-683px -4px}
.el-rte .toolbar ul li.tbrowafter {background-position:-654px -4px}
.el-rte .toolbar ul li.tbrowrm {background-position:-500px -30px}
.el-rte .toolbar ul li.tbcolbefore {background-position:-741px -27px}
.el-rte .toolbar ul li.tbcolafter {background-position:-772px -27px}
.el-rte .toolbar ul li.tbcolrm {background-position:-526px -30px}
.el-rte .toolbar ul li.tbcellsmerge {background-position:-552px -30px}
.el-rte .toolbar ul li.tbcellsplit {background-position:-629px -29px}
.el-rte .toolbar ul li.smiley {background-position:-322px -29px}
.el-rte .toolbar ul li.spec-text {background-position:-487px -2px}
.el-rte .toolbar ul li.print {background-position:-509px -2px}
.el-rte .toolbar ul li.horizontalrule {background-position:-199px -29px}
.el-rte .toolbar ul li.fullscreen {background-position:-348px -30px}
.el-rte .toolbar ul li.elfinder {background-position:-436px -2px}
.el-rte .toolbar ul li.ltr {background-position:-855px -27px}
.el-rte .toolbar ul li.rtl {background-position:-855px -3px}
.el-rte .toolbar ul li.pagebreak {background-position:-711px -28px}
/* рабочая зона (обертка над iframe) */
.el-rte .workzone { border:1px solid #eee; border-top:none; height:400px; overflow:hidden; }
.el-rte.small .workzone { min-height:250px; }
/* source code */
.el-rte textarea { width:100%; height:100%; border:none; zoom:1; padding:0; outline:none; }
.el-rte.small textarea { min-height:250px;}
/* редактор */
.el-rte iframe {
width: 100%;
height:400px;
display:block;
outline:none;
border:0 solid;
padding:0;
margin:0;
background:#fff;
}
.el-rte.small iframe { min-height:250px;}
/* панель статуса (путь) */
.el-rte .statusbar {
height: 21px;
padding: 0 9px;
font: 11px/21px 'monaco', 'andale mono', 'lucida console', monospace;
background-color:#eee;
border-top:1px solid #ccc;
border-top:none;
}
.el-rte-rtl .statusbar {
direction:rtl;
/* text-align:right;*/
}
/* табы */
.el-rte .tabsbar { display: block; }
.el-rte .tabsbar .tab {
float:left;
margin-right:2px;
padding: 6px 17px;
font-size: .82em;
font-weight:bold;
color:#777;
text-align:center;
border:1px solid #eee;
border-top:none;
background: #fff;
cursor: default;
}
.el-rte .tabsbar div.active { background: #eee; color:#444; }
.el-rte-rtl .tabsbar .tab { float:right; }
/* выпадающие меню */
/* container for elselect */
.el-rte .toolbar ul li.el-select {
height:22px;
width : 120px;
border:1px solid #ccc;
font-size:.82em;
cursor: default;
background-position:-475px -30px;
}
.el-rte .toolbar ul li.el-select.hover {
background-color:#fefefe;
}
.el-rte .toolbar ul li.el-select label {
height:19px;
padding: 3px 5px 0 5px;
float:none; /* Joomla 1.6 compat */
width:96px; /* Joomla 1.6 compat */
}
/* textarea & iframe в диплогах вставки текста */
.el-rte-paste-input {
width : 99%;
height: 250px;
border: 1px solid #ccc;
padding:0;
margin:0;
outline:none;
}
/* индикатор выбраного цвета на кнопке */
.el-rte .toolbar ul li div.color-indicator {
width:18px;
height:4px;
margin:16px 0 2px 2px;
background-color: #000;
}
.el-rte-rtl .toolbar ul li div.color-indicator {
margin:16px 2px 2px 0;
}
.el-rte .toolbar .panel-format { z-index: 10; }
/* colors palette */
.el-palette { top:20px; }
.el-dialogform, .el-dialogform td { font-size:.9em; }
.el-dialogform select { font-size:.9em;}
.ui-dialog .ui-dialog-buttonpane { padding: .4em, 1em;}
.ui-dialog .ui-dialog-buttonpane button { margin: .3em .4em .1em 0; font-size:.9em;}
.ui-dialog .ui-dialog-titlebar { padding: .3em 1em .3em; }
/*.ui-dialog-buttonset { padding:0; background-color:#333;}*/
/* диалоговые окна */
.el-dialogform label { display:block; }
.el-dialogform label input { margin-right:2px; }
.el-dialogform iframe.el-rte-preview {
width : 100%;
height : 235px;
margin:0;
padding:0;
outline:none;
border:none;
}
.el-dialogform fieldset {
border:1px solid #ccc;
padding : 0;
}
.el-dialogform fieldset legend {
font-size:.9em;
padding: .1em .5em;
margin: 0 0 5px 1em;
border:1px solid #ccc;
background-color: #eee;
}
.el-dialogform p { padding:.2em .3em;}
.el-dialogform h3 { color:#555; padding:1.2em 0 0 0; margin:0; font-size:1.2em; }
.el-dialogform h4 { color:#555;font-size:1em; padding:0; margin: 3px 9px; }
.elrte-logo {
width:48px;
height:46px;
float:left;
margin:.5em 1em;
background:url('../images/elrte-toolbar.png') -880px -7px no-repeat;
}
.elrte-ver { font-size:.9em; padding-left:.7em; }
.elrte-copy { font-size:.9em; padding-left:.3em; }
table.elrte-authors { margin-bottom:1em; }
table.elrte-authors td { border-bottom:1px solid #eee; }
/* widgets */
.el-borderselect {}
.el-borderselect table { margin:0; }
.el-borderselect table td { padding : 0 2px 0 0; vertical-align:middle; }
.el-borderselect input { margin:0; border:1px solid #ccc; }
.el-paddinginput { display: block; white-space: nowrap; }
.el-paddinginput input { margin :0 1px 0 0; border:1px solid #ccc; }
.el-paddinginput select { padding:0; }
.el-rte-smiley { margin:5px; }
.elrte-image-src-fm .ui-state-default {
float:right;
}
.el-dialogform-rtl .elrte-image-src-fm .ui-state-default { float:left;}
.elrte-image-preview {
font-size:.7em;
overflow:auto;
height:240px;
width:480px;
}

View file

@ -0,0 +1 @@
.elrte-MYTAG { width: 200px; height: 20px; background: pink; border: 1px solid red; }

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 797 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 780 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 820 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 785 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 802 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -0,0 +1,675 @@
/*
* DOM utilites for elRTE
*
* @author: Dmitry Levashov (dio) dio@std42.ru
*/
(function($) {
elRTE.prototype.dom = function(rte) {
this.rte = rte;
var self = this;
this.regExp = {
textNodes : /^(A|ABBR|ACRONYM|ADDRESS|B|BDO|BIG|BLOCKQUOTE|CAPTION|CENTER|CITE|CODE|DD|DEL|DFN|DIV|DT|EM|FIELDSET|FONT|H[1-6]|I|INS|KBD|LABEL|LEGEND|LI|MARQUEE|NOBR|NOEMBED|P|PRE|Q|SAMP|SMALL|SPAN|STRIKE|STRONG|SUB|SUP|TD|TH|TT|VAR)$/,
textContainsNodes : /^(A|ABBR|ACRONYM|ADDRESS|B|BDO|BIG|BLOCKQUOTE|CAPTION|CENTER|CITE|CODE|DD|DEL|DFN|DIV|DL|DT|EM|FIELDSET|FONT|H[1-6]|I|INS|KBD|LABEL|LEGEND|LI|MARQUEE|NOBR|NOEMBED|OL|P|PRE|Q|SAMP|SMALL|SPAN|STRIKE|STRONG|SUB|SUP|TABLE|THEAD|TBODY|TFOOT|TD|TH|TR|TT|UL|VAR)$/,
block : /^(APPLET|BLOCKQUOTE|BR|CAPTION|CENTER|COL|COLGROUP|DD|DIV|DL|DT|H[1-6]|EMBED|FIELDSET|LI|MARQUEE|NOBR|OBJECT|OL|P|PRE|TABLE|THEAD|TBODY|TFOOT|TD|TH|TR|UL)$/,
selectionBlock : /^(APPLET|BLOCKQUOTE|BR|CAPTION|CENTER|COL|COLGROUP|DD|DIV|DL|DT|H[1-6]|EMBED|FIELDSET|LI|MARQUEE|NOBR|OBJECT|OL|P|PRE|TD|TH|TR|UL)$/,
header : /^H[1-6]$/,
formElement : /^(FORM|INPUT|HIDDEN|TEXTAREA|SELECT|BUTTON)$/
};
/********************************************************/
/* Утилиты */
/********************************************************/
/**
* Возвращает body редактируемого документа
*
* @return Element
**/
this.root = function() {
return this.rte.body;
}
this.create = function(t) {
return this.rte.doc.createElement(t);
}
/**
* Return node for bookmark with unique ID
*
* @return DOMElement
**/
this.createBookmark = function() {
var b = this.rte.doc.createElement('span');
b.id = 'elrte-bm-'+Math.random().toString().substr(2);
$(b).addClass('elrtebm elrte-protected');
return b;
}
/**
* Вовращает индекс элемента внутри родителя
*
* @param Element n нода
* @return integer
**/
this.indexOf = function(n) {
var ndx = 0;
n = $(n);
while ((n = n.prev()) && n.length) {
ndx++;
}
return ndx;
}
/**
* Вовращает значение аттрибута в нижнем регистре (ох уж этот IE)
*
* @param Element n нода
* @param String attr имя аттрибута
* @return string
**/
this.attr = function(n, attr) {
var v = '';
if (n.nodeType == 1) {
v = $(n).attr(attr);
if (v && attr != 'src' && attr != 'href' && attr != 'title' && attr != 'alt') {
v = v.toString().toLowerCase();
}
}
return v||'';
}
/**
* Вовращает ближайший общий контейнер для 2-х эл-тов
*
* @param Element n нода1
* @param Element n нода2
* @return Element
**/
this.findCommonAncestor = function(n1, n2) {
if (!n1 || !n2) {
return this.rte.log('dom.findCommonAncestor invalid arguments');
}
if (n1 == n2) {
return n1;
} else if (n1.nodeName == 'BODY' || n2.nodeName == 'BODY') {
return this.rte.doc.body;
}
var p1 = $(n1).parents(), p2 = $(n2).parents(), l = p2.length-1, c = p2[l];
for (var i = p1.length - 1; i >= 0; i--, l--){
if (p1[i] == p2[l]) {
c = p1[i];
} else {
break;
}
};
return c;
}
/**
* Вовращает TRUE, если нода пустая
* пустой считаем ноды:
* - текстовые эл-ты, содержащие пустую строку или тег br
* - текстовые ноды с пустой строкой
*
* @param DOMElement n нода
* @return bool
**/
this.isEmpty = function(n) {
if (n.nodeType == 1) {
return this.regExp.textNodes.test(n.nodeName) ? $.trim($(n).text()).length == 0 : false;
} else if (n.nodeType == 3) {
return /^(TABLE|THEAD|TFOOT|TBODY|TR|UL|OL|DL)$/.test(n.parentNode.nodeName)
|| n.nodeValue == ''
|| ($.trim(n.nodeValue).length== 0 && !(n.nextSibling && n.previousSibling && n.nextSibling.nodeType==1 && n.previousSibling.nodeType==1 && !this.regExp.block.test(n.nextSibling.nodeName) && !this.regExp.block.test(n.previousSibling.nodeName) ));
}
return true;
}
/********************************************************/
/* Перемещение по DOM */
/********************************************************/
/**
* Вовращает следующую соседнюю ноду (не включаются текстовые ноды не создающие значимые пробелы между инлайн элементами)
*
* @param DOMElement n нода
* @return DOMElement
**/
this.next = function(n) {
while (n.nextSibling && (n = n.nextSibling)) {
if (n.nodeType == 1 || (n.nodeType == 3 && !this.isEmpty(n))) {
return n;
}
}
return null;
}
/**
* Вовращает предыдующую соседнюю ноду (не включаются текстовые ноды не создающие значимые пробелы между инлайн элементами)
*
* @param DOMElement n нода
* @return DOMElement
**/
this.prev = function(n) {
while (n.previousSibling && (n = n.previousSibling)) {
if (n.nodeType == 1 || (n.nodeType ==3 && !this.isEmpty(n))) {
return n;
}
}
return null;
}
this.isPrev = function(n, prev) {
while ((n = this.prev(n))) {
if (n == prev) {
return true;
}
}
return false;
}
/**
* Вовращает все следующие соседнии ноды (не включаются текстовые ноды не создающие значимые пробелы между инлайн элементами)
*
* @param DOMElement n нода
* @return Array
**/
this.nextAll = function(n) {
var ret = [];
while ((n = this.next(n))) {
ret.push(n);
}
return ret;
}
/**
* Вовращает все предыдующие соседнии ноды (не включаются текстовые ноды не создающие значимые пробелы между инлайн элементами)
*
* @param DOMElement n нода
* @return Array
**/
this.prevAll = function(n) {
var ret = [];
while ((n = this.prev(n))) {
ret.push(n);
}
return ret;
}
/**
* Вовращает все следующие соседнии inline ноды (не включаются текстовые ноды не создающие значимые пробелы между инлайн элементами)
*
* @param DOMElement n нода
* @return Array
**/
this.toLineEnd = function(n) {
var ret = [];
while ((n = this.next(n)) && n.nodeName != 'BR' && n.nodeName != 'HR' && this.isInline(n)) {
ret.push(n);
}
return ret;
}
/**
* Вовращает все предыдующие соседнии inline ноды (не включаются текстовые ноды не создающие значимые пробелы между инлайн элементами)
*
* @param DOMElement n нода
* @return Array
**/
this.toLineStart = function(n) {
var ret = [];
while ((n = this.prev(n)) && n.nodeName != 'BR' && n.nodeName != 'HR' && this.isInline(n) ) {
ret.unshift(n);
}
return ret;
}
/**
* Вовращает TRUE, если нода - первый непустой эл-т внутри родителя
*
* @param Element n нода
* @return bool
**/
this.isFirstNotEmpty = function(n) {
while ((n = this.prev(n))) {
if (n.nodeType == 1 || (n.nodeType == 3 && $.trim(n.nodeValue)!='' ) ) {
return false;
}
}
return true;
}
/**
* Вовращает TRUE, если нода - последний непустой эл-т внутри родителя
*
* @param Element n нода
* @return bool
**/
this.isLastNotEmpty = function(n) {
while ((n = this.next(n))) {
if (!this.isEmpty(n)) {
return false;
}
}
return true;
}
/**
* Вовращает TRUE, если нода - единственный непустой эл-т внутри родителя
*
* @param DOMElement n нода
* @return bool
**/
this.isOnlyNotEmpty = function(n) {
return this.isFirstNotEmpty(n) && this.isLastNotEmpty(n);
}
/**
* Вовращает последний непустой дочерний эл-т ноды или FALSE
*
* @param Element n нода
* @return Element
**/
this.findLastNotEmpty = function(n) {
this.rte.log('findLastNotEmpty Who is here 0_o');
if (n.nodeType == 1 && (l = n.lastChild)) {
if (!this.isEmpty(l)) {
return l;
}
while (l.previousSibling && (l = l.previousSibling)) {
if (!this.isEmpty(l)) {
return l;
}
}
}
return false;
}
/**
* Возвращает TRUE, если нода "inline"
*
* @param DOMElement n нода
* @return bool
**/
this.isInline = function(n) {
if (n.nodeType == 3) {
return true;
} else if (n.nodeType == 1) {
n = $(n);
var d = n.css('display');
var f = n.css('float');
return d == 'inline' || d == 'inline-block' || f == 'left' || f == 'right';
}
return true;
}
/********************************************************/
/* Поиск элементов */
/********************************************************/
this.is = function(n, f) {
if (n && n.nodeName) {
if (typeof(f) == 'string') {
f = this.regExp[f]||/.?/;
}
if (f instanceof RegExp && n.nodeName) {
return f.test(n.nodeName);
} else if (typeof(f) == 'function') {
return f(n);
}
}
return false;
}
/**
* Вовращает элемент(ы) отвечающие условиям поиска
*
* @param DOMElement||Array n нода
* @param RegExp||String filter фильтр условия поиска (RegExp или имя ключа this.regExp или *)
* @return DOMElement||Array
**/
this.filter = function(n, filter) {
var ret = [], i;
if (!n.push) {
return this.is(n, filter) ? n : null;
}
for (i=0; i < n.length; i++) {
if (this.is(n[i], filter)) {
ret.push(n[i]);
}
};
return ret;
}
/**
* Вовращает массив родительских элементов, отвечающих условиям поиска
*
* @param DOMElement n нода, родителей, которой ищем
* @param RegExp||String filter фильтр условия поиска (RegExp или имя ключа this.regExp или *)
* @return Array
**/
this.parents = function(n, filter) {
var ret = [];
while (n && (n = n.parentNode) && n.nodeName != 'BODY' && n.nodeName != 'HTML') {
if (this.is(n, filter)) {
ret.push(n);
}
}
return ret;
}
/**
* Вовращает ближайший родительский эл-т, отвечающий условиям поиска
*
* @param DOMElement n нода, родителя, которой ищем
* @param RegExp||String f фильтр условия поиска (RegExp или имя ключа this.regExp или *)
* @return DOMElement
**/
this.parent = function(n, f) {
return this.parents(n, f)[0] || null;
}
/**
* Вовращает или саму ноду или ее ближайшего родителя, если выполняются условия sf для самой ноды или pf для родителя
*
* @param DOMElement n нода, родителя, которой ищем
* @param RegExp||String sf фильтр условия для самой ноды
* @param RegExp||String pf фильтр условия для родителя
* @return DOMElement
**/
this.selfOrParent = function(n, sf, pf) {
return this.is(n, sf) ? n : this.parent(n, pf||sf);
}
/**
* Вовращает родительскую ноду - ссылку
*
* @param Element n нода
* @return Element
**/
this.selfOrParentLink = function(n) {
n = this.selfOrParent(n, /^A$/);
return n && n.href ? n : null;
}
/**
* Вовращает TRUE, если нода - anchor
*
* @param Element n нода
* @return bool
**/
this.selfOrParentAnchor = function(n) {
n = this.selfOrParent(n, /^A$/);
return n && !n.href && n.name ? n : null;
}
/**
* Вовращает массив дочерних ссылок
*
* @param DOMElement n нода
* @return Array
**/
this.childLinks = function(n) {
var res = [];
$('a[href]', n).each(function() { res.push(this); });
return res;
}
this.selectionHas = function(f) {
var n = this.rte.selection.cloneContents(), i;
if (n && n.childNodes && n.childNodes.length) {
for (i=0; i < n.childNodes.length; i++) {
if (typeof(f) == 'function') {
if (f(n.childNodes[i])) {
return true;
}
} else if (n instanceof RegExp) {
if (f.test(n.childNodes[i].nodeName)) {
return true;
}
}
};
}
return false;
}
/********************************************************/
/* Изменения DOM */
/********************************************************/
/**
* Оборачивает одну ноду другой
*
* @param DOMElement n оборачиваемая нода
* @param DOMElement w нода обертка или имя тега
* @return DOMElement
**/
this.wrap = function(n, w) {
n = $.isArray(n) ? n : [n];
w = w.nodeName ? w : this.create(w);
if (n[0] && n[0].nodeType && n[0].parentNode) {
w = n[0].parentNode.insertBefore(w, n[0]);
$(n).each(function() {
if (this!=w) {
w.appendChild(this);
}
});
}
return w;
}
/**
* Replace node with its contents
*
* @param DOMElement n node
* @return void
**/
this.unwrap = function(n) {
if (n && n.parentNode) {
while (n.firstChild) {
n.parentNode.insertBefore(n.firstChild, n);
}
n.parentNode.removeChild(n);
}
}
/**
* Оборачивает все содержимое ноды
*
* @param DOMElement n оборачиваемая нода
* @param DOMElement w нода обертка или имя тега
* @return DOMElement
**/
this.wrapContents = function(n, w) {
w = w.nodeName ? w : this.create(w);
for (var i=0; i < n.childNodes.length; i++) {
w.appendChild(n.childNodes[i]);
};
n.appendChild(w);
return w;
}
this.cleanNode = function(n) {
if (n.nodeType != 1) {
return;
}
if (/^(P|LI)$/.test(n.nodeName) && (l = this.findLastNotEmpty(n)) && l.nodeName == 'BR') {
$(l).remove();
}
$n = $(n);
$n.children().each(function() {
this.cleanNode(this);
});
if (n.nodeName != 'BODY' && !/^(TABLE|TR|TD)$/.test(n) && this.isEmpty(n)) {
return $n.remove();
}
if ($n.attr('style') === '') {
$n.removeAttr('style');
}
if (this.rte.browser.safari && $n.hasClass('Apple-span')) {
$n.removeClass('Apple-span');
}
if (n.nodeName == 'SPAN' && !$n.attr('style') && !$n.attr('class') && !$n.attr('id')) {
$n.replaceWith($n.html());
}
}
this.cleanChildNodes = function(n) {
var cmd = this.cleanNode;
$(n).children().each(function() { cmd(this); });
}
/********************************************************/
/* Таблицы */
/********************************************************/
this.tableMatrix = function(n) {
var mx = [];
if (n && n.nodeName == 'TABLE') {
var max = 0;
function _pos(r) {
for (var i=0; i<=max; i++) {
if (!mx[r][i]) {
return i;
}
};
}
$(n).find('tr').each(function(r) {
if (!$.isArray(mx[r])) {
mx[r] = [];
}
$(this).children('td,th').each(function() {
var w = parseInt($(this).attr('colspan')||1);
var h = parseInt($(this).attr('rowspan')||1);
var i = _pos(r);
for (var y=0; y<h; y++) {
for (var x=0; x<w; x++) {
var _y = r+y;
if (!$.isArray(mx[_y])) {
mx[_y] = [];
}
var d = x==0 && y==0 ? this : (y==0 ? x : "-");
mx[_y][i+x] = d;
}
};
max= Math.max(max, mx[r].length);
});
});
}
return mx;
}
this.indexesOfCell = function(n, tbm) {
for (var rnum=0; rnum < tbm.length; rnum++) {
for (var cnum=0; cnum < tbm[rnum].length; cnum++) {
if (tbm[rnum][cnum] == n) {
return [rnum, cnum];
}
};
};
}
this.fixTable = function(n) {
if (n && n.nodeName == 'TABLE') {
var tb = $(n);
//tb.find('tr:empty').remove();
var mx = this.tableMatrix(n);
var x = 0;
$.each(mx, function() {
x = Math.max(x, this.length);
});
if (x==0) {
return tb.remove();
}
// for (var i=0; i<mx.length; i++) {
// this.rte.log(mx[i]);
// }
for (var r=0; r<mx.length; r++) {
var l = mx[r].length;
//this.rte.log(r+' : '+l)
if (l==0) {
//this.rte.log('remove: '+tb.find('tr').eq(r))
tb.find('tr').eq(r).remove();
// tb.find('tr').eq(r).append('<td>remove</td>')
} else if (l<x) {
var cnt = x-l;
var row = tb.find('tr').eq(r);
for (i=0; i<cnt; i++) {
row.append('<td>&nbsp;</td>');
}
}
}
}
}
this.tableColumn = function(n, ext, fix) {
n = this.selfOrParent(n, /^TD|TH$/);
var tb = this.selfOrParent(n, /^TABLE$/);
ret = [];
info = {offset : [], delta : []};
if (n && tb) {
fix && this.fixTable(tb);
var mx = this.tableMatrix(tb);
var _s = false;
var x;
for (var r=0; r<mx.length; r++) {
for (var _x=0; _x<mx[r].length; _x++) {
if (mx[r][_x] == n) {
x = _x;
_s = true;
break;
}
}
if (_s) {
break;
}
}
// this.rte.log('matrix');
// for (var i=0; i<mx.length; i++) {
// this.rte.log(mx[i]);
// }
if (x>=0) {
for(var r=0; r<mx.length; r++) {
var tmp = mx[r][x]||null;
if (tmp) {
if (tmp.nodeName) {
ret.push(tmp);
if (ext) {
info.delta.push(0);
info.offset.push(x);
}
} else {
var d = parseInt(tmp);
if (!isNaN(d) && mx[r][x-d] && mx[r][x-d].nodeName) {
ret.push(mx[r][x-d]);
if (ext) {
info.delta.push(d);
info.offset.push(x);
}
}
}
}
}
}
}
return !ext ? ret : {column : ret, info : info};
}
}
})(jQuery);

View file

@ -0,0 +1,873 @@
(function($) {
/**
* @class Filter - clean editor content
* @param elRTE editor instance
* @author Dmitry (dio) Levashov, dio@std42.ru
*/
elRTE.prototype.filter = function(rte) {
var self = this,
n = $('<span/>').addClass('elrtetesturl').appendTo(document.body)[0];
// media replacement image base url
this.url = (typeof(n.currentStyle )!= "undefined" ? n.currentStyle['backgroundImage'] : document.defaultView.getComputedStyle(n, null)['backgroundImage']).replace(/^url\((['"]?)([\s\S]+\/)[\s\S]+\1\)$/i, "$2");
$(n).remove();
this.rte = rte;
// flag - return xhtml tags?
this.xhtml = /xhtml/i.test(rte.options.doctype);
// boolean attributes
this.boolAttrs = rte.utils.makeObject('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected'.split(','));
// tag regexp
this.tagRegExp = /<(\/?)([\w:]+)((?:\s+[a-z\-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*\/?>/g;
// this.tagRegExp = /<(\/?)([\w:]+)((?:\s+\w+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*\/?>/g;
// opened tag regexp
this.openTagRegExp = /<([\w:]+)((?:\s+\w+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*\/?>/g;
// attributes regexp
this.attrRegExp = /(\w+)(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^\s]+))?/g;
// script tag regexp
this.scriptRegExp = /<script([^>]*)>([\s\S]*?)<\/script>/gi;
// style tag regexp
this.styleRegExp = /(<style([^>]*)>[\s\S]*?<\/style>)/gi;
// link tag regexp
this.linkRegExp = /(<link([^>]+)>)/gi;
// cdata regexp
this.cdataRegExp = /<!\[CDATA\[([\s\S]+)\]\]>/g;
// object tag regexp
this.objRegExp = /<object([^>]*)>([\s\S]*?)<\/object>/gi;
// embed tag regexp
this.embRegExp = /<(embed)((?:\s+\w+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*>/gi;
// param tag regexp
this.paramRegExp = /<(param)((?:\s+\w+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*>/gi;
// iframe tag regexp
this.iframeRegExp = /<iframe([^>]*)>([\s\S]*?)<\/iframe>/gi;
// yandex maps regexp
this.yMapsRegExp = /<div\s+([^>]*id\s*=\s*('|")?YMapsID[^>]*)>/gi;
// google maps regexp
this.gMapsRegExp = /<iframe\s+([^>]*src\s*=\s*"http:\/\/maps\.google\.\w+[^>]*)>([\s\S]*?)<\/iframe>/gi;
// video hostings url regexp
this.videoHostRegExp = /^(http:\/\/[\w\.]*)?(youtube|vimeo|rutube).*/i;
// elrte services classes regexp
this.serviceClassRegExp = /<(\w+)([^>]*class\s*=\s*"[^>]*elrte-[^>]*)>\s*(<\/\1>)?/gi;
this.pagebreakRegExp = /<(\w+)([^>]*style\s*=\s*"[^>]*page-break[^>]*)>\s*(<\/\1>)?/gi;
this.pbRegExp = new RegExp('<!-- pagebreak -->', 'gi');
// allowed tags
this.allowTags = rte.options.allowTags.length ? rte.utils.makeObject(rte.options.allowTags) : null;
// denied tags
this.denyTags = rte.options.denyTags.length ? rte.utils.makeObject(rte.options.denyTags) : null;
// deny attributes
this.denyAttr = rte.options.denyAttr ? rte.utils.makeObject(rte.options.denyAttr) : null;
// deny attributes for pasted html
this.pasteDenyAttr = rte.options.pasteDenyAttr ? rte.utils.makeObject(rte.options.pasteDenyAttr) : null;
// font sizes to convert size attr into css property
this.fontSize = ['medium', 'xx-small', 'small', 'medium','large','x-large','xx-large' ];
// font families regexp to detect family by font name
this.fontFamily = {
'sans-serif' : /^(arial|tahoma|verdana)$/i,
'serif' : /^(times|times new roman)$/i,
'monospace' : /^courier$/i
}
// scripts storage
this.scripts = {};
// cached chains of rules
this._chains = {};
// cache chains
$.each(this.chains, function(n) {
self._chains[n] = [];
$.each(this, function(i, r) {
typeof(self.rules[r]) == 'function' && self._chains[n].push(self.rules[r]);
});
});
/**
* filtering through required chain
*
* @param String chain name
* @param String html-code
* @return String
**/
this.proccess = function(chain, html) {
// remove whitespace at the begin and end
html = $.trim(html).replace(/^\s*(&nbsp;)+/gi, '').replace(/(&nbsp;|<br[^>]*>)+\s*$/gi, '');
// pass html through chain
$.each(this._chains[chain]||[], function() {
html = this.call(self, html);
});
html = html.replace(/\t/g, ' ').replace(/\r/g, '').replace(/\s*\n\s*\n+/g, "\n")+' ';
return $.trim(html) ? html : ' ';
}
/**
* wrapper for "wysiwyg" chain filtering
*
* @param String
* @return String
**/
this.wysiwyg = function(html) {
return this.proccess('wysiwyg', html);
}
/**
* wrapper for "source" chain filtering
*
* @param String
* @return String
**/
this.source = function(html) {
return this.proccess('source', html);
}
/**
* wrapper for "source2source" chain filtering
*
* @param String
* @return String
**/
this.source2source = function(html) {
return this.proccess('source2source', html);
}
/**
* wrapper for "wysiwyg2wysiwyg" chain filtering
*
* @param String
* @return String
**/
this.wysiwyg2wysiwyg = function(html) {
return this.proccess('wysiwyg2wysiwyg', html);
}
/**
* Parse attributes from string into object
*
* @param String string of attributes
* @return Object
**/
this.parseAttrs = function(s) {
var a = {},
b = this.boolAttrs,
m = s.match(this.attrRegExp),
t, n, v;
// this.rte.log(s)
// this.rte.log(m)
m && $.each(m, function(i, s) {
t = s.split('=');
n = $.trim(t[0]).toLowerCase();
if (t.length>2) {
t.shift();
v = t.join('=');
} else {
v = b[n] ||t[1]||'';
}
a[n] = $.trim(v).replace(/^('|")(.*)(\1)$/, "$2");
});
a.style = this.rte.utils.parseStyle(a.style);
// rte.log(a.style)
a['class'] = this.rte.utils.parseClass(a['class']||'')
return a;
}
/**
* Restore attributes string from hash
*
* @param Object attributes hash
* @return String
**/
this.serializeAttrs = function(a, c) {
var s = [], self = this;
$.each(a, function(n, v) {
if (n=='style') {
v = self.rte.utils.serializeStyle(v, c);
} else if (n=='class') {
// self.rte.log(v)
// self.rte.log(self.rte.utils.serializeClass(v))
v = self.rte.utils.serializeClass(v);
}
v && s.push(n+'="'+v+'"');
});
return s.join(' ');
}
/**
* Remove/replace denied attributes/style properties
*
* @param Object attributes hash
* @param String tag name to wich attrs belongs
* @return Object
**/
this.cleanAttrs = function(a, t) {
var self = this, ra = this.replaceAttrs;
// remove safari and mso classes
$.each(a['class'], function(n) {
/^(Apple-style-span|mso\w+)$/i.test(n) && delete a['class'][n];
});
function value(v) {
return v+(/\d$/.test(v) ? 'px' : '');
}
$.each(a, function(n, v) {
// replace required attrs with css
ra[n] && ra[n].call(self, a, t);
// remove/fix mso styles
if (n == 'style') {
$.each(v, function(sn, sv) {
switch (sn) {
case "mso-padding-alt":
case "mso-padding-top-alt":
case "mso-padding-right-alt":
case "mso-padding-bottom-alt":
case "mso-padding-left-alt":
case "mso-margin-alt":
case "mso-margin-top-alt":
case "mso-margin-right-alt":
case "mso-margin-bottom-alt":
case "mso-margin-left-alt":
case "mso-table-layout-alt":
case "mso-height":
case "mso-width":
case "mso-vertical-align-alt":
a.style[sn.replace(/^mso-|-alt$/g, '')] = value(sv);
delete a.style[sn];
break;
case "horiz-align":
a.style['text-align'] = sv;
delete a.style[sn];
break;
case "vert-align":
a.style['vertical-align'] = sv;
delete a.style[sn];
break;
case "font-color":
case "mso-foreground":
a.style.color = sv;
delete a.style[sn];
break;
case "mso-background":
case "mso-highlight":
a.style.background = sv;
delete a.style[sn];
break;
case "mso-default-height":
a.style['min-height'] = value(sv);
delete a.style[sn];
break;
case "mso-default-width":
a.style['min-width'] = value(sv);
delete a.style[sn];
break;
case "mso-padding-between-alt":
a.style['border-collapse'] = 'separate';
a.style['border-spacing'] = value(sv);
delete a.style[sn];
break;
case "text-line-through":
if (sv.match(/(single|double)/i)) {
a.style['text-decoration'] = 'line-through';
}
delete a.style[sn];
break;
case "mso-zero-height":
if (sv == 'yes') {
a.style.display = 'none';
}
delete a.style[sn];
break;
case 'font-weight':
if (sv == 700) {
a.style['font-weight'] = 'bold';
}
break;
default:
if (sn.match(/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/)) {
delete a.style[sn]
}
}
});
}
});
return a;
}
}
// rules to replace tags
elRTE.prototype.filter.prototype.replaceTags = {
b : { tag : 'strong' },
big : { tag : 'span', style : {'font-size' : 'large'} },
center : { tag : 'div', style : {'text-align' : 'center'} },
i : { tag : 'em' },
font : { tag : 'span' },
nobr : { tag : 'span', style : {'white-space' : 'nowrap'} },
menu : { tag : 'ul' },
plaintext : { tag : 'pre' },
s : { tag : 'strike' },
small : { tag : 'span', style : {'font-size' : 'small'}},
u : { tag : 'span', style : {'text-decoration' : 'underline'} },
xmp : { tag : 'pre' }
}
// rules to replace attributes
elRTE.prototype.filter.prototype.replaceAttrs = {
align : function(a, n) {
switch (n) {
case 'img':
a.style[a.align.match(/(left|right)/) ? 'float' : 'vertical-align'] = a.align;
break;
case 'table':
if (a.align == 'center') {
a.style['margin-left'] = a.style['margin-right'] = 'auto';
} else {
a.style['float'] = a.align;
}
break;
default:
a.style['text-align'] = a.align;
}
delete a.align;
},
border : function(a) {
!a.style['border-width'] && (a.style['border-width'] = (parseInt(a.border)||1)+'px');
!a.style['border-style'] && (a.style['border-style'] = 'solid');
delete a.border;
},
bordercolor : function(a) {
!a.style['border-color'] && (a.style['border-color'] = a.bordercolor);
delete a.bordercolor;
},
background : function(a) {
!a.style['background-image'] && (a.style['background-image'] = 'url('+a.background+')');
delete a.background;
},
bgcolor : function(a) {
!a.style['background-color'] && (a.style['background-color'] = a.bgcolor);
delete a.bgcolor;
},
clear : function(a) {
a.style.clear = a.clear == 'all' ? 'both' : a.clear;
delete a.clear;
},
color : function(a) {
!a.style.color && (a.style.color = a.color);
delete a.color;
},
face : function(a) {
var f = a.face.toLowerCase();
$.each(this.fontFamily, function(n, r) {
if (f.match(r)) {
a.style['font-family'] = f+','+n;
}
});
delete a.face;
},
hspace : function(a, n) {
if (n == 'img') {
var v = parseInt(a.hspace)||0;
!a.style['margin-left'] && (a.style['margin-left'] = v+'px');
!a.style['margin-right'] && (a.style['margin-right'] = v+'px')
delete a.hspace;
}
},
size : function(a, n) {
if (n != 'input') {
a.style['font-size'] = this.fontSize[parseInt(a.size)||0]||'medium';
delete a.size;
}
},
valign : function(a) {
if (!a.style['vertical-align']) {
a.style['vertical-align'] = a.valign;
}
delete a.valign;
},
vspace : function(a, n) {
if (n == 'img') {
var v = parseInt(a.vspace)||0;
!a.style['margin-top'] && (a.style['margin-top'] = v+'px');
!a.style['margin-bottom'] && (a.style['margin-bottom'] = v+'px')
delete a.hspace;
}
}
}
// rules collection
elRTE.prototype.filter.prototype.rules = {
/**
* If this.rte.options.allowTags is set - remove all except this ones
*
* @param String html code
* @return String
**/
allowedTags : function(html) {
var a = this.allowTags;
return a ? html.replace(this.tagRegExp, function(t, c, n) { return a[n.toLowerCase()] ? t : ''; }) : html;
},
/**
* If this.rte.options.denyTags is set - remove all deny tags
*
* @param String html code
* @return String
**/
deniedTags : function(html) {
var d = this.denyTags;
return d ? html.replace(this.tagRegExp, function(t, c, n) { return d[n.toLowerCase()] ? '' : t }) : html;
},
/**
* Replace not allowed tags/attributes
*
* @param String html code
* @return String
**/
clean : function(html) {
var self = this,
rt = this.replaceTags,
ra = this.replaceAttrs,
da = this.denyAttr,
n;
html = html.replace(/<!DOCTYPE([\s\S]*)>/gi, '')
.replace(/<p [^>]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi, "<p><strong>$1</strong></p>")
.replace(/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s&nbsp;]*)<\/span>/gi, "$1")
.replace(/(<p[^>]*>\s*<\/p>|<p[^>]*\/>)/gi, '<br>')
.replace(/(<\/p>)(?:\s*<br\s*\/?>\s*|\s*&nbsp;\s*)+\s*(<p[^>]*>)/gi, function(t, b, e) {
return b+"\n"+e;
})
.replace(this.tagRegExp, function(t, c, n, a) {
n = n.toLowerCase();
if (c) {
return '</'+(rt[n] ? rt[n].tag : n)+'>';
}
// self.rte.log(t)
// create attributes hash and clean it
a = self.cleanAttrs(self.parseAttrs(a||''), n);
// self.rte.log(a)
if (rt[n]) {
rt[n].style && $.extend(a.style, rt[n].style);
n = rt[n].tag;
}
da && $.each(a, function(na) {
if (da[na]) {
delete a[na];
}
});
a = self.serializeAttrs(a);
// self.rte.log(a)
return '<'+n+(a?' ':'')+a+'>';
});
n = $('<div>'+html+'</div>');
// remove empty spans and merge nested spans
n.find('span:not([id]):not([class])').each(function() {
var t = $(this);
if (!t.attr('style')) {
$.trim(t.html()).length ? self.rte.dom.unwrap(this) : t.remove();
// t.children().length ? self.rte.dom.unwrap(this) : t.remove();
}
}).end().find('span span:only-child').each(function() {
var t = $(this),
p = t.parent().eq(0),
tid = t.attr('id'),
pid = p.attr('id'), id, s, c;
if (self.rte.dom.isOnlyNotEmpty(this) && (!tid || !pid)) {
c = $.trim(p.attr('class')+' '+t.attr('class'))
c && p.attr('class', c);
s = self.rte.utils.serializeStyle($.extend(self.rte.utils.parseStyle($(this).attr('style')||''), self.rte.utils.parseStyle($(p).attr('style')||'')));
s && p.attr('style', s);
id = tid||pid;
id && p.attr('id', id);
this.firstChild ? $(this.firstChild).unwrap() : t.remove();
}
})
.end().find('a[name]').each(function() {
$(this).addClass('elrte-protected elrte-anchor');
});
return n.html()
},
/**
* Clean pasted html
*
* @param String html code
* @return String
**/
cleanPaste : function(html) {
var self = this, d = this.pasteDenyAttr;
html = html
.replace(this.scriptRegExp, '')
.replace(this.styleRegExp, '')
.replace(this.linkRegExp, '')
.replace(this.cdataRegExp, '')
.replace(/\<\!--[\s\S]*?--\>/g, '');
if (this.rte.options.pasteOnlyText) {
html = html.replace(this.tagRegExp, function(t, c, n) {
return /br/i.test(n) || (c && /h[1-6]|p|ol|ul|li|div|blockquote|tr/i) ? '<br>' : '';
}).replace(/(&nbsp;|<br[^>]*>)+\s*$/gi, '');
} else if (d) {
html = html.replace(this.openTagRegExp, function(t, n, a) {
a = self.parseAttrs(a);
$.each(a, function(an) {
if (d[an]) {
delete a[an];
}
});
a = self.serializeAttrs(a, true);
return '<'+n+(a?' ':'')+a+'>';
});
}
return html;
},
/**
* Replace script/style/media etc with placeholders
*
* @param String html code
* @return String
**/
replace : function(html) {
var self = this, r = this.rte.options.replace||[], n;
// custom replaces if set
if (r.length) {
$.each(r, function(i, f) {
if (typeof(f) == 'function') {
html = f.call(self, html);
}
});
}
/**
* Return media replacement - img html code
*
* @param Object object to store in rel attr
* @param String media mime-type
* @return String
**/
function img(o, t) {
var s = src(),
c = s && self.videoHostRegExp.test(s) ? s.replace(self.videoHostRegExp, "$2") : t.replace(/^\w+\/(.+)/, "$1"),
w = parseInt((o.obj ? o.obj.width || o.obj.style.width : 0)||(o.embed ? o.embed.width || o.embed.style.width : 0))||150,
h = parseInt((o.obj ? o.obj.height || o.obj.style.height : 0)||(o.embed ? o.embed.height || o.embed.style.height : 0))||100,
id = 'media'+Math.random().toString().substring(2),
style ='',
l;
// find media src
function src() {
if (o.embed && o.embed.src) {
return o.embed.src;
}
if (o.params && o.params.length) {
l = o.params.length;
while (l--) {
if (o.params[l].name == 'src' || o.params[l].name == 'movie') {
return o.params[l].value;
}
}
}
}
if (o.obj && o.obj.style && o.obj.style['float']) {
style = ' style="float:'+o.obj.style['float']+'"';
}
self.scripts[id] = o;
return '<img src="'+self.url+'pixel.gif" class="elrte-media elrte-media-'+c+' elrte-protected" title="'+(s ? self.rte.utils.encode(s) : '')+'" rel="'+id+'" width="'+w+'" height="'+h+'"'+style+'>';
}
html = html
.replace(this.styleRegExp, "<!-- ELRTE_COMMENT$1 -->")
.replace(this.linkRegExp, "<!-- ELRTE_COMMENT$1-->")
.replace(this.cdataRegExp, "<!--[CDATA[$1]]-->")
.replace(this.scriptRegExp, function(t, a, s) {
var id;
if (self.denyTags.script) {
return '';
}
id = 'script'+Math.random().toString().substring(2);
a = self.parseAttrs(a);
!a.type && (a.type = 'text/javascript');
self.scripts[id] = '<script '+self.serializeAttrs(a)+">"+s+"</script>";
return '<!-- ELRTE_SCRIPT:'+(id)+' -->';
})
.replace(this.yMapsRegExp, function(t, a) {
a = self.parseAttrs(a);
a['class']['elrte-yandex-maps'] = 'elrte-yandex-maps';
a['class']['elrte-protected'] = 'elrte-protected';
return '<div '+self.serializeAttrs(a)+'>';
})
.replace(this.gMapsRegExp, function(t, a) {
var id = 'gmaps'+Math.random().toString().substring(2), w, h;
a = self.parseAttrs(a);
w = parseInt(a.width||a.style.width||100);
h = parseInt(a.height||a.style.height||100);
self.scripts[id] = t;
return '<img src="'+self.url+'pixel.gif" class="elrte-google-maps elrte-protected" id="'+id+'" style="width:'+w+'px;height:'+h+'px">';
})
.replace(this.objRegExp, function(t, a, c) {
var m = c.match(self.embRegExp),
o = { obj : self.parseAttrs(a), embed : m && m.length ? self.parseAttrs(m[0].substring(7)) : null, params : [] },
i = self.rte.utils.mediaInfo(o.embed ? o.embed.type||'' : '', o.obj.classid||'');
if (i) {
if ((m = c.match(self.paramRegExp))) {
$.each(m, function(i, p) {
o.params.push(self.parseAttrs(p.substring(6)));
});
}
!o.obj.classid && (o.obj.classid = i.classid[0]);
!o.obj.codebase && (o.obj.codebase = i.codebase);
o.embed && !o.embed.type && (o.embed.type = i.type);
// ie bug with empty attrs
o.obj.width == '1' && delete o.obj.width;
o.obj.height == '1' && delete o.obj.height;
if (o.embed) {
o.embed.width == '1' && delete o.embed.width;
o.embed.height == '1' && delete o.embed.height;
}
return img(o, i.type);
}
return t;
})
.replace(this.embRegExp, function(t, n, a) {
var a = self.parseAttrs(a),
i = self.rte.utils.mediaInfo(a.type||'');
// ie bug with empty attrs
a.width == '1' && delete a.width;
a.height == '1' && delete a.height;
return i ? img({ embed : a }, i.type) : t;
})
.replace(this.iframeRegExp, function(t, a) {
var a = self.parseAttrs(a);
var w = a.style.width || (parseInt(a.width) > 1 ? parseInt(a.width)+'px' : '100px');
var h = a.style.height || (parseInt(a.height) > 1 ? parseInt(a.height)+'px' : '100px');
var id = 'iframe'+Math.random().toString().substring(2);
self.scripts[id] = t;
var img = '<img id="'+id+'" src="'+self.url+'pixel.gif" class="elrte-protected elrte-iframe" style="width:'+w+'; height:'+h+'">';
return img;
})
.replace(this.vimeoRegExp, function(t, n, a) {
a = self.parseAttrs(a);
delete a.frameborder;
a.width == '1' && delete a.width;
a.height == '1' && delete a.height;
a.type = 'application/x-shockwave-flash';
return img({ embed : a }, 'application/x-shockwave-flash');
})
.replace(/<\/(embed|param)>/gi, '')
.replace(this.pbRegExp, function() {
return '<img src="'+self.url+'pixel.gif" class="elrte-protected elrte-pagebreak">';
});
n = $('<div>'+html+'</div>');
// remove empty spans and merge nested spans
// n.find('span:not([id]):not([class])').each(function() {
// var t = $(this);
//
// if (!t.attr('style')) {
// $.trim(t.html()).length ? self.rte.dom.unwrap(this) : t.remove();
// // t.children().length ? self.rte.dom.unwrap(this) : t.remove();
// }
// }).end().find('span span:only-child').each(function() {
// var t = $(this),
// p = t.parent().eq(0),
// tid = t.attr('id'),
// pid = p.attr('id'), id, s, c;
//
// if (self.rte.dom.is(this, 'onlyChild') && (!tid || !pid)) {
// c = $.trim(p.attr('class')+' '+t.attr('class'))
// c && p.attr('class', c);
// s = self.rte.utils.serializeStyle($.extend(self.rte.utils.parseStyle($(this).attr('style')||''), self.rte.utils.parseStyle($(p).attr('style')||'')));
// s && p.attr('style', s);
// id = tid||pid;
// id && p.attr('id', id);
// this.firstChild ? $(this.firstChild).unwrap() : t.remove();
// }
// })
// .end().find('a[name]').each(function() {
// $(this).addClass('elrte-anchor');
// });
if (!this.rte.options.allowTextNodes) {
// wrap inline nodes with p
var dom = this.rte.dom,
nodes = [],
w = [];
if ($.browser.msie) {
for (var i = 0; i<n[0].childNodes.length; i++) {
nodes.push(n[0].childNodes[i])
}
} else {
nodes = Array.prototype.slice.call(n[0].childNodes);
}
function wrap() {
if (w.length && dom.filter(w, 'notEmpty').length) {
dom.wrap(w, document.createElement('p'));
}
w = [];
}
$.each(nodes, function(i, n) {
if (dom.is(n, 'block')) {
wrap();
} else {
if (w.length && n.previousSibling != w[w.length-1]) {
wrap();
}
w.push(n);
}
});
wrap();
}
return n.html();
},
/**
* Restore script/style/media etc from placeholders
*
* @param String html code
* @return String
**/
restore : function(html) {
var self =this, r = this.rte.options.restore||[];
// custom restore if set
if (r.length) {
$.each(r, function(i, f) {
if (typeof(f) == 'function') {
html = f.call(self, html);
}
});
}
html = html
.replace(/\<\!--\[CDATA\[([\s\S]*?)\]\]--\>/gi, "<![CDATA[$1]]>")
.replace(/\<\!--\s*ELRTE_SCRIPT\:\s*(script\d+)\s*--\>/gi, function(t, n) {
if (self.scripts[n]) {
t = self.scripts[n];
delete self.scripts[n];
}
return t||'';
})
.replace(/\<\!-- ELRTE_COMMENT([\s\S]*?) --\>/gi, "$1")
.replace(this.serviceClassRegExp, function(t, n, a, e) {
var a = self.parseAttrs(a), j, o = '';
// alert(t)
if (a['class']['elrte-google-maps']) {
var t = '';
if (self.scripts[a.id]) {
t = self.scripts[a.id];
delete self.scripts[a.id]
}
return t;
} else if (a['class']['elrte-iframe']) {
return self.scripts[a.id] || '';
} else if (a['class']['elrtebm']) {
return '';
} else if (a['class']['elrte-media']) {
// alert(a.rel)
// return ''
// j = a.rel ? JSON.parse(self.rte.utils.decode(a.rel)) : {};
j = self.scripts[a.rel]||{};
j.params && $.each(j.params, function(i, p) {
o += '<param '+self.serializeAttrs(p)+">\n";
});
j.embed && (o+='<embed '+self.serializeAttrs(j.embed)+">");
j.obj && (o = '<object '+self.serializeAttrs(j.obj)+">\n"+o+"\n</object>\n");
return o||t;
} else if (a['class']['elrte-pagebreak']) {
return '<!-- pagebreak -->';
}
$.each(a['class'], function(n) {
if (/^elrte-\w+/i.test(n)) {
delete(a['class'][n]);
}
// /^elrte\w+/i.test(n) && delete(a['class'][n]);
});
return '<'+n+' '+self.serializeAttrs(a)+'>'+(e||'');
});
return html;
},
/**
* compact styles and move tags and attributes names in lower case(for ie&opera)
*
* @param String html code
* return String
**/
compactStyles : function(html) {
var self = this;
return html.replace(this.tagRegExp, function(t, c, n, a) {
a = !c && a ? self.serializeAttrs(self.parseAttrs(a), true) : '';
return '<'+c+n.toLowerCase()+(a?' ':'')+a+'>';
});
},
/**
* return xhtml tags
*
* @param String html code
* return String
**/
xhtmlTags : function(html) {
return this.xhtml ? html.replace(/<(img|hr|br|embed|param|link|area)([^>]*\/*)>/gi, "<$1$2 />") : html;
}
}
/**
* Chains configuration
* Default chains
* wysiwyg - proccess html from source for wysiwyg editor mode
* source - proccess html from wysiwyg for source editor mode
* paste - clean pasted html
* wysiwyg2wysiwyg - ciclyc rule to clean html from wysiwyg for wysiwyg paste
* source2source - ciclyc rule to clean html from source for source paste
* deniedTags is in the end of chain to protect google maps iframe from removed
**/
elRTE.prototype.filter.prototype.chains = {
wysiwyg : ['replace', 'clean', 'allowedTags', 'deniedTags', 'compactStyles'],
source : ['clean', 'allowedTags', 'restore', 'compactStyles', 'xhtmlTags'],
paste : ['clean', 'allowedTags', 'cleanPaste', 'replace', 'deniedTags', 'compactStyles'],
wysiwyg2wysiwyg : ['clean', 'allowedTags', 'restore', 'replace', 'deniedTags', 'compactStyles'],
source2source : ['clean', 'allowedTags', 'replace', 'deniedTags', 'restore', 'compactStyles', 'xhtmlTags']
}
})(jQuery);

View file

@ -0,0 +1,51 @@
(function($) {
elRTE.prototype.history = function(rte) {
this.rte = rte;
this._prev = []
this._next = [];
this.add = function() {
if (this.rte.options.historyLength>0 && this._prev.length>= this.rte.options.historyLength) {
this._prev.slice(this.rte.options.historyLength);
}
var b = this.rte.selection.getBookmark();
this._prev.push([$(this.rte.doc.body).html(), b]);
this.rte.selection.moveToBookmark(b);
// this._prev.push($(this.rte.doc.body).html());
this._next = [];
}
this.back = function() {
if (this._prev.length) {
var b = this.rte.selection.getBookmark(),
data = this._prev.pop();
this._next.push([$(this.rte.doc.body).html(), b]);
$(this.rte.doc.body).html(data[0]);
this.rte.selection.moveToBookmark(data[1]);
}
}
this.fwd = function() {
if (this._next.length) {
var b = this.rte.selection.getBookmark(),
data = this._next.pop();
this._prev.push([$(this.rte.doc.body).html(), b]);
$(this.rte.doc.body).html(data[0]);
this.rte.selection.moveToBookmark(data[1]);
}
}
this.canBack = function() {
return this._prev.length;
}
this.canFwd = function() {
return this._next.length;
}
}
})(jQuery);

View file

@ -0,0 +1,460 @@
/*
* elRTE - WSWING editor for web
*
* Usage:
* var opts = {
* .... // see elRTE.options.js
* }
* var editor = new elRTE($('#my-id').get(0), opts)
* or
* $('#my-id').elrte(opts)
*
* $('#my-id) may be textarea or any DOM Element with text
*
* @author: Dmitry Levashov (dio) dio@std42.ru
* Copyright: Studio 42, http://www.std42.ru
*/
(function($) {
elRTE = function(target, opts) {
if (!target || !target.nodeName) {
return alert('elRTE: argument "target" is not DOM Element');
}
var self = this, html;
this.version = '1.3';
this.build = '2011-06-23';
this.options = $.extend(true, {}, this.options, opts);
this.browser = $.browser;
this.target = $(target);
this.lang = (''+this.options.lang);
this._i18n = new eli18n({textdomain : 'rte', messages : { rte : this.i18Messages[this.lang] || {}} });
this.rtl = !!(/^(ar|fa|he)$/.test(this.lang) && this.i18Messages[this.lang]);
if (this.rtl) {
this.options.cssClass += ' el-rte-rtl';
}
this.toolbar = $('<div class="toolbar"/>');
this.iframe = document.createElement('iframe');
this.iframe.setAttribute('frameborder', 0); // fixes IE border
// this.source = $('<textarea />').hide();
this.workzone = $('<div class="workzone"/>').append(this.iframe).append(this.source);
this.statusbar = $('<div class="statusbar"/>');
this.tabsbar = $('<div class="tabsbar"/>');
this.editor = $('<div class="'+this.options.cssClass+'" />').append(this.toolbar).append(this.workzone).append(this.statusbar).append(this.tabsbar);
this.doc = null;
this.$doc = null;
this.window = null;
this.utils = new this.utils(this);
this.dom = new this.dom(this);
this.filter = new this.filter(this)
/**
* Sync iframes/textareas height with workzone height
*
* @return void
*/
this.updateHeight = function() {
self.workzone.add(self.iframe).add(self.source).height(self.workzone.height());
}
/**
* Turn editor resizable on/off if allowed
*
* @param Boolean
* @return void
**/
this.resizable = function(r) {
var self = this;
if (this.options.resizable && $.fn.resizable) {
if (r) {
this.editor.resizable({handles : 'se', alsoResize : this.workzone, minWidth :300, minHeight : 200 }).bind('resize', self.updateHeight);
} else {
this.editor.resizable('destroy').unbind('resize', self.updateHeight);
}
}
}
/* attach editor to document */
this.editor.insertAfter(target);
/* init editor textarea */
var content = '';
if (target.nodeName == 'TEXTAREA') {
this.source = this.target;
this.source.insertAfter(this.iframe).hide();
content = this.target.val();
} else {
this.source = $('<textarea />').insertAfter(this.iframe).hide();
content = this.target.hide().html();
}
this.source.attr('name', this.target.attr('name')||this.target.attr('id'));
content = $.trim(content);
if (!content) {
content = ' ';
}
/* add tabs */
if (this.options.allowSource) {
this.tabsbar.append('<div class="tab editor rounded-bottom-7 active">'+self.i18n('Editor')+'</div><div class="tab source rounded-bottom-7">'+self.i18n('Source')+'</div><div class="clearfix" style="clear:both"/>')
.children('.tab').click(function(e) {
if (!$(this).hasClass('active')) {
self.tabsbar.children('.tab').toggleClass('active');
self.workzone.children().toggle();
if ($(this).hasClass('editor')) {
self.updateEditor();
self.window.focus();
self.ui.update(true);
} else {
self.updateSource();
self.source.focus();
if ($.browser.msie) {
// @todo
} else {
self.source[0].setSelectionRange(0, 0);
}
self.ui.disable();
self.statusbar.empty();
}
}
});
}
this.window = this.iframe.contentWindow;
this.doc = this.iframe.contentWindow.document;
this.$doc = $(this.doc);
/* put content into iframe */
html = '<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
$.each(self.options.cssfiles, function() {
html += '<link rel="stylesheet" type="text/css" href="'+this+'" />';
});
this.doc.open();
var s = this.filter.wysiwyg(content),
cl = this.rtl ? ' class="el-rte-rtl"' : '';
this.doc.write(self.options.doctype+html+'</head><body'+cl+'>'+(s)+'</body></html>');
this.doc.close();
/* make iframe editable */
if ($.browser.msie) {
this.doc.body.contentEditable = true;
} else {
try { this.doc.designMode = "on"; }
catch(e) { }
this.doc.execCommand('styleWithCSS', false, this.options.styleWithCSS);
}
if (this.options.height>0) {
this.workzone.height(this.options.height);
}
if (this.options.width>0) {
this.editor.width(this.options.width);
}
this.updateHeight();
this.resizable(true);
this.window.focus();
this.history = new this.history(this);
/* init selection object */
this.selection = new this.selection(this);
/* init buttons */
this.ui = new this.ui(this);
/* bind updateSource to parent form submit */
this.target.parents('form').bind('submit.elfinder', function(e) {
self.source.parents('form').find('[name="el-select"]').remove()
self.beforeSave();
});
// on tab press - insert \t and prevent move focus
this.source.bind('keydown', function(e) {
if (e.keyCode == 9) {
e.preventDefault();
if ($.browser.msie) {
var r = document.selection.createRange();
r.text = "\t"+r.text;
this.focus();
} else {
var before = this.value.substr(0, this.selectionStart),
after = this.value.substr(this.selectionEnd);
this.value = before+"\t"+after;
this.setSelectionRange(before.length+1, before.length+1);
}
}
});
$(this.doc.body).bind('dragend', function(e) {
setTimeout(function() {
try {
self.window.focus();
var bm = self.selection.getBookmark();
self.selection.moveToBookmark(bm);
self.ui.update();
} catch(e) { }
}, 200);
});
this.typing = false;
this.lastKey = null;
/* update buttons on click and keyup */
this.$doc.bind('mouseup', function() {
self.typing = false;
self.lastKey = null;
self.ui.update();
})
.bind('keyup', function(e) {
if ((e.keyCode >= 8 && e.keyCode <= 13) || (e.keyCode>=32 && e.keyCode<= 40) || e.keyCode == 46 || (e.keyCode >=96 && e.keyCode <= 111)) {
self.ui.update();
}
})
.bind('keydown', function(e) {
if ((e.metaKey || e.ctrlKey) && e.keyCode == 65) {
self.ui.update();
} else if (e.keyCode == 13) {
var n = self.selection.getNode();
// self.log(n)
if (self.dom.selfOrParent(n, /^PRE$/)) {
self.selection.insertNode(self.doc.createTextNode("\r\n"));
return false;
} else if ($.browser.safari && e.shiftKey) {
self.selection.insertNode(self.doc.createElement('br'))
return false;
}
}
if ((e.keyCode>=48 && e.keyCode <=57) || e.keyCode==61 || e.keyCode == 109 || (e.keyCode>=65 && e.keyCode<=90) || e.keyCode==188 ||e.keyCode==190 || e.keyCode==191 || (e.keyCode>=219 && e.keyCode<=222)) {
if (!self.typing) {
self.history.add(true);
}
self.typing = true;
self.lastKey = null;
} else if (e.keyCode == 8 || e.keyCode == 46 || e.keyCode == 32 || e.keyCode == 13) {
if (e.keyCode != self.lastKey) {
self.history.add(true);
}
self.lastKey = e.keyCode;
self.typing = false;
}
if (e.keyCode == 32 && $.browser.opera) {
self.selection.insertNode(self.doc.createTextNode(" "));
return false
}
})
.bind('paste', function(e) {
if (!self.options.allowPaste) {
// paste denied
e.stopPropagation();
e.preventDefault();
} else {
var n = $(self.dom.create('div'))[0],
r = self.doc.createTextNode('_');
self.history.add(true);
self.typing = true;
self.lastKey = null;
n.appendChild(r);
self.selection.deleteContents().insertNode(n);
self.selection.select(r);
setTimeout(function() {
if (n.parentNode) {
// clean sandbox content
$(n).html(self.filter.proccess('paste', $(n).html()));
r = n.lastChild;
self.dom.unwrap(n);
if (r) {
self.selection.select(r);
self.selection.collapse(false);
}
} else {
// smth wrong - clean all doc
n.parentNode && n.parentNode.removeChild(n);
self.val(self.filter.proccess('paste', self.filter.wysiwyg2wysiwyg($(self.doc.body).html())));
self.selection.select(self.doc.body.firstChild);
self.selection.collapse(true);
}
$(self.doc.body).mouseup(); // to activate history buutons
}, 15);
}
});
if ($.browser.msie) {
this.$doc.bind('keyup', function(e) {
if (e.keyCode == 86 && (e.metaKey||e.ctrlKey)) {
self.history.add(true);
self.typing = true;
self.lastKey = null;
self.selection.saveIERange();
self.val(self.filter.proccess('paste', self.filter.wysiwyg2wysiwyg($(self.doc.body).html())));
self.selection.restoreIERange();
$(self.doc.body).mouseup();
this.ui.update();
}
});
}
if ($.browser.safari) {
this.$doc.bind('click', function(e) {
$(self.doc.body).find('.elrte-webkit-hl').removeClass('elrte-webkit-hl');
if (e.target.nodeName == 'IMG') {
$(e.target).addClass('elrte-webkit-hl');
}
}).bind('keyup', function(e) {
$(self.doc.body).find('.elrte-webkit-hl').removeClass('elrte-webkit-hl');
})
}
this.window.focus();
this.destroy = function() {
this.updateSource();
this.target.is('textarea')
? this.target.val($.trim(this.source.val()))
: this.target.html($.trim(this.source.val()));
this.editor.remove();
this.target.show().parents('form').unbind('submit.elfinder');
}
}
/**
* Return message translated to selected language
*
* @param string msg message text in english
* @return string
**/
elRTE.prototype.i18n = function(msg) {
return this._i18n.translate(msg);
}
/**
* Display editor
*
* @return void
**/
elRTE.prototype.open = function() {
this.editor.show();
}
/**
* Hide editor and display elements on wich editor was created
*
* @return void
**/
elRTE.prototype.close = function() {
this.editor.hide();
}
elRTE.prototype.updateEditor = function() {
this.val(this.source.val());
}
elRTE.prototype.updateSource = function() {
this.source.val(this.filter.source($(this.doc.body).html()));
}
/**
* Return edited text
*
* @return String
**/
elRTE.prototype.val = function(v) {
if (typeof(v) == 'string') {
v = ''+v;
if (this.source.is(':visible')) {
this.source.val(this.filter.source2source(v));
} else {
if ($.browser.msie) {
this.doc.body.innerHTML = '<br />'+this.filter.wysiwyg(v);
this.doc.body.removeChild(this.doc.body.firstChild);
} else {
this.doc.body.innerHTML = this.filter.wysiwyg(v);
}
}
} else {
if (this.source.is(':visible')) {
return this.filter.source2source(this.source.val()).trim();
} else {
return this.filter.source($(this.doc.body).html()).trim();
}
}
}
elRTE.prototype.beforeSave = function() {
this.source.val($.trim(this.val())||'');
}
/**
* Submit form
*
* @return void
**/
elRTE.prototype.save = function() {
this.beforeSave();
this.editor.parents('form').submit();
}
elRTE.prototype.log = function(msg) {
if (window.console && window.console.log) {
window.console.log(msg);
}
}
elRTE.prototype.i18Messages = {};
$.fn.elrte = function(o, v) {
var cmd = typeof(o) == 'string' ? o : '', ret;
this.each(function() {
if (!this.elrte) {
this.elrte = new elRTE(this, typeof(o) == 'object' ? o : {});
}
switch (cmd) {
case 'open':
case 'show':
this.elrte.open();
break;
case 'close':
case 'hide':
this.elrte.close();
break;
case 'updateSource':
this.elrte.updateSource();
break;
case 'destroy':
this.elrte.destroy();
}
});
if (cmd == 'val') {
if (!this.length) {
return '';
} else if (this.length == 1) {
return v ? this[0].elrte.val(v) : this[0].elrte.val();
} else {
ret = {}
this.each(function() {
ret[this.elrte.source.attr('name')] = this.elrte.val();
});
return ret;
}
}
return this;
}
})(jQuery);

View file

@ -0,0 +1,168 @@
/*
* elRTE configuration
*
* @param doctype - doctype for editor iframe
* @param cssClass - css class for editor
* @param cssFiles - array of css files, witch will inlude in iframe
* @param height - not used now (may be deleted in future)
* @param lang - interface language (requires file in i18n dir)
* @param toolbar - name of toolbar to load
* @param absoluteURLs - convert files and images urls to absolute or not
* @param allowSource - is source editing allowing
* @param stripWhiteSpace - strip лишние whitespaces/tabs or not
* @param styleWithCSS - use style=... instead of strong etc.
* @param fmAllow - allow using file manger (elFinder)
* @param fmOpen - callback for open file manager
* @param buttons - object with pairs of buttons classes names and titles (when create new button, you have to add iys name here)
* @param panels - named groups of buttons
* @param panelNames - title of panels (required for one planned feature)
* @param toolbars - named redy to use toolbals (you may combine your own toolbar)
*
* @author: Dmitry Levashov (dio) dio@std42.ru
* Copyright: Studio 42, http://www.std42.ru
*/
(function($) {
elRTE.prototype.options = {
doctype : '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">',
cssClass : 'el-rte',
cssfiles : [],
height : null,
resizable : true,
lang : 'en',
toolbar : 'normal',
absoluteURLs : true,
allowSource : true,
stripWhiteSpace : true,
styleWithCSS : false,
fmAllow : true,
fmOpen : null,
/* if set all other tag will be removed */
allowTags : [],
/* if set this tags will be removed */
denyTags : ['applet', 'base', 'basefont', 'bgsound', 'blink', 'body', 'col', 'colgroup', 'isindex', 'frameset', 'html', 'head', 'meta', 'marquee', 'noframes', 'noembed', 'o:p', 'title', 'xml'],
denyAttr : [],
/* on paste event this attributes will removed from pasted html */
pasteDenyAttr : ['id', 'name', 'class', 'style', 'language', 'onclick', 'ondblclick', 'onhover', 'onkeup', 'onkeydown', 'onkeypress'],
/* If false - all text nodes will be wrapped by paragraph tag */
allowTextNodes : true,
/* allow browser specific styles like -moz|-webkit|-o */
allowBrowsersSpecStyles : false,
/* allow paste content into editor */
allowPaste : true,
/* if true - only text will be pasted (not in ie) */
pasteOnlyText : false,
/* user replacement rules */
replace : [],
/* user restore rules */
restore : [],
pagebreak : '<div style="page-break-after: always;"></div>', //'<!-- pagebreak -->',
buttons : {
'save' : 'Save',
'copy' : 'Copy',
'cut' : 'Cut',
'css' : 'Css style and class',
'paste' : 'Paste',
'pastetext' : 'Paste only text',
'pasteformattext' : 'Paste formatted text',
'removeformat' : 'Clean format',
'undo' : 'Undo last action',
'redo' : 'Redo previous action',
'bold' : 'Bold',
'italic' : 'Italic',
'underline' : 'Underline',
'strikethrough' : 'Strikethrough',
'superscript' : 'Superscript',
'subscript' : 'Subscript',
'justifyleft' : 'Align left',
'justifyright' : 'Ailgn right',
'justifycenter' : 'Align center',
'justifyfull' : 'Align full',
'indent' : 'Indent',
'outdent' : 'Outdent',
'rtl' : 'Right to left',
'ltr' : 'Left to right',
'forecolor' : 'Font color',
'hilitecolor' : 'Background color',
'formatblock' : 'Format',
'fontsize' : 'Font size',
'fontname' : 'Font',
'insertorderedlist' : 'Ordered list',
'insertunorderedlist' : 'Unordered list',
'horizontalrule' : 'Horizontal rule',
'blockquote' : 'Blockquote',
'div' : 'Block element (DIV)',
'link' : 'Link',
'unlink' : 'Delete link',
'anchor' : 'Bookmark',
'image' : 'Image',
'pagebreak' : 'Page break',
'smiley' : 'Smiley',
'flash' : 'Flash',
'table' : 'Table',
'tablerm' : 'Delete table',
'tableprops' : 'Table properties',
'tbcellprops' : 'Table cell properties',
'tbrowbefore' : 'Insert row before',
'tbrowafter' : 'Insert row after',
'tbrowrm' : 'Delete row',
'tbcolbefore' : 'Insert column before',
'tbcolafter' : 'Insert column after',
'tbcolrm' : 'Delete column',
'tbcellsmerge' : 'Merge table cells',
'tbcellsplit' : 'Split table cell',
'docstructure' : 'Toggle display document structure',
'elfinder' : 'Open file manager',
'fullscreen' : 'Toggle full screen mode',
'nbsp' : 'Non breakable space',
'stopfloat' : 'Stop element floating',
'about' : 'About this software'
},
panels : {
eol : [], // special panel, insert's a new line in toolbar
save : ['save'],
copypaste : ['copy', 'cut', 'paste', 'pastetext', 'pasteformattext', 'removeformat', 'docstructure'],
undoredo : ['undo', 'redo'],
style : ['bold', 'italic', 'underline', 'strikethrough', 'subscript', 'superscript'],
colors : ['forecolor', 'hilitecolor'],
alignment : ['justifyleft', 'justifycenter', 'justifyright', 'justifyfull'],
indent : ['outdent', 'indent'],
format : ['formatblock', 'fontsize', 'fontname'],
lists : ['insertorderedlist', 'insertunorderedlist'],
elements : ['horizontalrule', 'blockquote', 'div', 'stopfloat', 'css', 'nbsp', 'smiley', 'pagebreak'],
direction : ['ltr', 'rtl'],
links : ['link', 'unlink', 'anchor'],
images : ['image'],
media : ['image', 'flash'],
tables : ['table', 'tableprops', 'tablerm', 'tbrowbefore', 'tbrowafter', 'tbrowrm', 'tbcolbefore', 'tbcolafter', 'tbcolrm', 'tbcellprops', 'tbcellsmerge', 'tbcellsplit'],
elfinder : ['elfinder'],
fullscreen : ['fullscreen', 'about']
},
toolbars : {
tiny : ['style'],
compact : ['save', 'undoredo', 'style', 'alignment', 'lists', 'links', 'fullscreen'],
normal : ['save', 'copypaste', 'undoredo', 'style', 'alignment', 'colors', 'indent', 'lists', 'links', 'elements', 'images', 'fullscreen'],
complete : ['save', 'copypaste', 'undoredo', 'style', 'alignment', 'colors', 'format', 'indent', 'lists', 'links', 'elements', 'media', 'fullscreen'],
maxi : ['save', 'copypaste', 'undoredo', 'elfinder', 'style', 'alignment', 'direction', 'colors', 'format', 'indent', 'lists', 'links', 'elements', 'media', 'tables', 'fullscreen'],
eldorado : ['save', 'copypaste', 'elfinder', 'undoredo', 'style', 'alignment', 'colors', 'format', 'indent', 'lists', 'links', 'elements', 'media', 'tables', 'fullscreen']
},
panelNames : {
save : 'Save',
copypaste : 'Copy/Pase',
undoredo : 'Undo/Redo',
style : 'Text styles',
colors : 'Colors',
alignment : 'Alignment',
indent : 'Indent/Outdent',
format : 'Text format',
lists : 'Lists',
elements : 'Misc elements',
direction : 'Script direction',
links : 'Links',
images : 'Images',
media : 'Media',
tables : 'Tables',
elfinder : 'File manager (elFinder)'
}
};
})(jQuery);

View file

@ -0,0 +1,777 @@
/**
* @class selection - elRTE utils for working with text selection
*
* @param elRTE rte объект-редактор
*
* @author: Dmitry Levashov (dio) dio@std42.ru
**/
(function($) {
elRTE.prototype.selection = function(rte) {
this.rte = rte;
var self = this;
this.w3cRange = null;
var start, end, node, bm;
$(this.rte.doc)
.keyup(function(e) {
if (e.ctrlKey || e.metaKey || (e.keyCode >= 8 && e.keyCode <= 13) || (e.keyCode>=32 && e.keyCode<= 40) || e.keyCode == 46 || (e.keyCode >=96 && e.keyCode <= 111)) {
self.cleanCache();
}
})
.mousedown(function(e) {
// self.rte.log(e)
if (e.target.nodeName == 'HTML') {
start = self.rte.doc.body;
} else {
start = e.target;
}
end = node = null;
})
.mouseup(function(e) {
if (e.target.nodeName == 'HTML') {
end = self.rte.doc.body;
} else {
end = e.target;
}
end = e.target;
node = null;
}).click();
/**
* возвращает selection
*
* @return Selection
**/
function selection() {
return self.rte.window.getSelection ? self.rte.window.getSelection() : self.rte.window.document.selection;
}
/**
* Вспомогательная функция
* Возвращает самого верхнего родителя, отвечающего условию - текущая нода - его единственная непустая дочерняя нода
*
* @param DOMElement n нода, для которой ищем родителя
* @param DOMElement p если задана - нода, выше которой не поднимаемся
* @param String s строна поиска (left||right||null)
* @return DOMElement
**/
function realSelected(n, p, s) {
while (n.nodeName != 'BODY' && n.parentNode && n.parentNode.nodeName != 'BODY' && (p ? n!== p && n.parentNode != p : 1) && ((s=='left' && self.rte.dom.isFirstNotEmpty(n)) || (s=='right' && self.rte.dom.isLastNotEmpty(n)) || (self.rte.dom.isFirstNotEmpty(n) && self.rte.dom.isLastNotEmpty(n))) ) {
n = n.parentNode;
}
return n;
}
/**
* Возвращает TRUE, если выделение "схлопнуто"
*
* @return bool
**/
this.collapsed = function() {
return this.getRangeAt().isCollapsed();
}
/**
* "Схлопывает" выделение
*
* @param bool toStart схлопнуть к начальной точке
* @return void
**/
this.collapse = function(st) {
var s = selection(),
r = this.getRangeAt();
r.collapse(st?true:false);
if (!$.browser.msie) {
s.removeAllRanges();
s.addRange(r);
}
return this;
}
/**
* Возвращает TextRange
* Для нормальных браузеров - нативный range
* для "самизнаетечего" - эмуляцию w3c range
*
* @return range|w3cRange
**/
this.getRangeAt = function(updateW3cRange) {
if (this.rte.browser.msie) {
if (!this.w3cRange) {
this.w3cRange = new this.rte.w3cRange(this.rte);
}
updateW3cRange && this.w3cRange.update();
return this.w3cRange;
}
var s = selection();
var r = s.rangeCount > 0 ? s.getRangeAt(0) : this.rte.doc.createRange();
r.getStart = function() {
return this.startContainer.nodeType==1
? this.startContainer.childNodes[Math.min(this.startOffset, this.startContainer.childNodes.length-1)]
: this.startContainer;
}
r.getEnd = function() {
return this.endContainer.nodeType==1
? this.endContainer.childNodes[ Math.min(this.startOffset == this.endOffset ? this.endOffset : this.endOffset-1, this.endContainer.childNodes.length-1)]
: this.endContainer;
}
r.isCollapsed = function() {
return this.collapsed;
}
return r;
}
this.saveIERange = function() {
if ($.browser.msie) {
bm = this.getRangeAt().getBookmark();
}
}
this.restoreIERange = function() {
$.browser.msie && bm && this.getRangeAt().moveToBookmark(bm);
}
this.cloneContents = function() {
var n = this.rte.dom.create('div'), r, c, i;
if ($.browser.msie) {
try {
r = this.rte.window.document.selection.createRange();
} catch(e) {
r = this.rte.doc.body.createTextRange();
}
$(n).html(r.htmlText);
} else {
c = this.getRangeAt().cloneContents();
for (i=0; i<c.childNodes.length; i++) {
n.appendChild(c.childNodes[i].cloneNode(true));
}
}
return n;
}
/**
* Выделяет ноды
*
* @param DOMNode s нода начала выделения
* @param DOMNode e нода конца выделения
* @return selection
**/
this.select = function(s, e) {
e = e||s;
if (this.rte.browser.msie) {
var r = this.rte.doc.body.createTextRange(),
r1 = r.duplicate(),
r2 = r.duplicate();
r1.moveToElementText(s);
r2.moveToElementText(e);
r.setEndPoint('StartToStart', r1);
r.setEndPoint('EndToEnd', r2);
r.select();
} else {
var sel = selection(),
r = this.getRangeAt();
r.setStartBefore(s);
r.setEndAfter(e);
sel.removeAllRanges();
sel.addRange(r);
}
return this.cleanCache();
}
/**
* Выделяет содержимое ноды
*
* @param Element n нода
* @return selection
**/
this.selectContents = function(n) {
var r = this.getRangeAt();
if (n && n.nodeType == 1) {
if (this.rte.browser.msie) {
r.range();
r.r.moveToElementText(n.parentNode);
r.r.select();
} else {
try {
r.selectNodeContents(n);
} catch (e) {
return this.rte.log('unable select node contents '+n);
}
var s = selection();
s.removeAllRanges();
s.addRange(r);
}
}
return this;
}
this.deleteContents = function() {
if (!$.browser.msie) {
this.getRangeAt().deleteContents();
}
return this;
}
/**
* Вставляет ноду в текущее выделение
*
* @param Element n нода
* @return selection
**/
this.insertNode = function(n, collapse) {
if (collapse && !this.collapsed()) {
this.collapse();
}
if (this.rte.browser.msie) {
var html = n.nodeType == 3 ? n.nodeValue : $(this.rte.dom.create('span')).append($(n)).html();
var r = this.getRangeAt();
r.insertNode(html);
} else {
var r = this.getRangeAt();
r.insertNode(n);
r.setStartAfter(n);
r.setEndAfter(n);
var s = selection();
s.removeAllRanges();
s.addRange(r);
}
return this.cleanCache();
}
/**
* Вставляет html в текущее выделение
*
* @param Element n нода
* @return selection
**/
this.insertHtml = function(html, collapse) {
if (collapse && !this.collapsed()) {
this.collapse();
}
if (this.rte.browser.msie) {
this.getRangeAt().range().pasteHTML(html);
} else {
var n = $(this.rte.dom.create('span')).html(html||'').get(0);
this.insertNode(n);
$(n).replaceWith($(n).html());
}
return this.cleanCache();
}
/**
* Вставляет ноду в текущее выделение
*
* @param Element n нода
* @return selection
**/
this.insertText = function(text, collapse) {
var n = this.rte.doc.createTextNode(text);
return this.insertHtml(n.nodeValue);
}
this.getBookmark = function() {
this.rte.window.focus();
var r, r1, r2, _s, _e,
s = this.rte.dom.createBookmark(),
e = this.rte.dom.createBookmark();
if ($.browser.msie) {
try {
r = this.rte.window.document.selection.createRange();
} catch(e) {
r = this.rte.doc.body.createTextRange();
}
if (r.item) {
var n = r.item(0);
r = this.rte.doc.body.createTextRange();
r.moveToElementText(n);
}
r1 = r.duplicate();
r2 = r.duplicate();
_s = this.rte.dom.create('span');
_e = this.rte.dom.create('span');
_s.appendChild(s);
_e.appendChild(e);
r1.collapse(true);
r1.pasteHTML(_s.innerHTML);
r2.collapse(false);
r2.pasteHTML(_e.innerHTML);
} else {
var sel = selection();
var r = sel.rangeCount > 0 ? sel.getRangeAt(0) : this.rte.doc.createRange();
// r = this.getRangeAt();
r1 = r.cloneRange();
r2 = r.cloneRange();
// this.insertNode(this.rte.dom.create('hr'))
// return
r2.collapse(false);
r2.insertNode(e);
r1.collapse(true);
r1.insertNode(s);
this.select(s, e);
}
return [s.id, e.id];
}
this.moveToBookmark = function(b) {
this.rte.window.focus();
if (b && b.length==2) {
var s = this.rte.doc.getElementById(b[0]),
e = this.rte.doc.getElementById(b[1]),
sel, r;
if (s && e) {
this.select(s, e);
if (this.rte.dom.next(s) == e) {
this.collapse(true);
}
if (!$.browser.msie) {
sel = selection();
r = sel.rangeCount > 0 ? sel.getRangeAt(0) : this.rte.doc.createRange();
sel.removeAllRanges();
sel.addRange(r);
}
s.parentNode.removeChild(s);
e.parentNode.removeChild(e);
}
}
return this;
}
this.removeBookmark = function(b) {
this.rte.window.focus();
if (b.length==2) {
var s = this.rte.doc.getElementById(b[0]),
e = this.rte.doc.getElementById(b[1]);
if (s && e) {
s.parentNode.removeChild(s);
e.parentNode.removeChild(e);
}
}
}
/**
* Очищает кэш
*
* @return selection
**/
this.cleanCache = function() {
start = end = node = null;
return this;
}
/**
* Возвращает ноду начала выделения
*
* @return DOMElement
**/
this.getStart = function() {
if (!start) {
var r = this.getRangeAt();
start = r.getStart();
}
return start;
}
/**
* Возвращает ноду конца выделения
*
* @return DOMElement
**/
this.getEnd = function() {
if (!end) {
var r = this.getRangeAt();
end = r.getEnd();
}
return end;
}
/**
* Возвращает выбраную ноду (общий контейнер всех выбранных нод)
*
* @return Element
**/
this.getNode = function() {
if (!node) {
node = this.rte.dom.findCommonAncestor(this.getStart(), this.getEnd());
}
return node;
}
/**
* Возвращает массив выбранных нод
*
* @param Object o параметры получения и обработки выбраных нод
* @return Array
**/
this.selected = function(o) {
var opts = {
collapsed : false, // вернуть выделение, даже если оно схлопнуто
blocks : false, // блочное выделение
filter : false, // фильтр результатов
wrap : 'text', // что оборачиваем
tag : 'span' // во что оборачиваем
}
opts = $.extend({}, opts, o);
// блочное выделение - ищем блочную ноду, но не таблицу
if (opts.blocks) {
var n = this.getNode(), _n = null;
if (_n = this.rte.dom.selfOrParent(n, 'selectionBlock') ) {
return [_n];
}
}
var sel = this.selectedRaw(opts.collapsed, opts.blocks);
var ret = [];
var buffer = [];
var ndx = null;
// оборачиваем ноды в буффере
function wrap() {
function allowParagraph() {
for (var i=0; i < buffer.length; i++) {
if (buffer[i].nodeType == 1 && (self.rte.dom.selfOrParent(buffer[i], /^P$/) || $(buffer[i]).find('p').length>0)) {
return false;
}
};
return true;
}
if (buffer.length>0) {
var tag = opts.tag == 'p' && !allowParagraph() ? 'div' : opts.tag;
var n = self.rte.dom.wrap(buffer, tag);
ret[ndx] = n;
ndx = null;
buffer = [];
}
}
// добавляем ноды в буффер
function addToBuffer(n) {
if (n.nodeType == 1) {
if (/^(THEAD|TFOOT|TBODY|COL|COLGROUP|TR)$/.test(n.nodeName)) {
$(n).find('td,th').each(function() {
var tag = opts.tag == 'p' && $(this).find('p').length>0 ? 'div' : opts.tag;
var n = self.rte.dom.wrapContents(this, tag);
return ret.push(n);
})
} else if (/^(CAPTION|TD|TH|LI|DT|DD)$/.test(n.nodeName)) {
var tag = opts.tag == 'p' && $(n).find('p').length>0 ? 'div' : opts.tag;
var n = self.rte.dom.wrapContents(n, tag);
return ret.push(n);
}
}
var prev = buffer.length>0 ? buffer[buffer.length-1] : null;
if (prev && prev != self.rte.dom.prev(n)) {
wrap();
}
buffer.push(n);
if (ndx === null) {
ndx = ret.length;
ret.push('dummy'); // заглушка для оборачиваемых элементов
}
}
if (sel.nodes.length>0) {
for (var i=0; i < sel.nodes.length; i++) {
var n = sel.nodes[i];
// первую и посл текстовые ноды разрезаем, если необходимо
if (n.nodeType == 3 && (i==0 || i == sel.nodes.length-1) && $.trim(n.nodeValue).length>0) {
if (i==0 && sel.so>0) {
n = n.splitText(sel.so);
}
if (i == sel.nodes.length-1 && sel.eo>0) {
n.splitText(i==0 && sel.so>0 ? sel.eo - sel.so : sel.eo);
}
}
switch (opts.wrap) {
// оборачиваем только текстовые ноды с br
case 'text':
if ((n.nodeType == 1 && n.nodeName == 'BR') || (n.nodeType == 3 && $.trim(n.nodeValue).length>0)) {
addToBuffer(n);
} else if (n.nodeType == 1) {
ret.push(n);
}
break;
// оборачиваем все инлайн элементы
case 'inline':
if (this.rte.dom.isInline(n)) {
addToBuffer(n);
} else if (n.nodeType == 1) {
ret.push(n);
}
break;
// оборачиваем все
case 'all':
if (n.nodeType == 1 || !this.rte.dom.isEmpty(n)) {
addToBuffer(n);
}
break;
// ничего не оборачиваем
default:
if (n.nodeType == 1 || !this.rte.dom.isEmpty(n)) {
ret.push(n);
}
}
};
wrap();
}
if (ret.length) {
this.rte.window.focus();
this.select(ret[0], ret[ret.length-1]);
}
return opts.filter ? this.rte.dom.filter(ret, opts.filter) : ret;
}
this.dump = function(ca, s, e, so, eo) {
var r = this.getRangeAt();
this.rte.log('commonAncestorContainer');
this.rte.log(ca || r.commonAncestorContainer);
// this.rte.log('commonAncestorContainer childs num')
// this/rte.log((ca||r.commonAncestorContainer).childNodes.length)
this.rte.log('startContainer');
this.rte.log(s || r.startContainer);
this.rte.log('startOffset: '+(so>=0 ? so : r.startOffset));
this.rte.log('endContainer');
this.rte.log(e||r.endContainer);
this.rte.log('endOffset: '+(eo>=0 ? eo : r.endOffset));
}
/**
* Возвращает массив выбранных нод, как есть
*
* @param bool возвращать если выделение схлопнуто
* @param bool "блочное" выделение (текстовые ноды включаются полностью, не зависимо от offset)
* @return Array
**/
this.selectedRaw = function(collapsed, blocks) {
var res = {so : null, eo : null, nodes : []};
var r = this.getRangeAt(true);
var ca = r.commonAncestorContainer;
var s, e; // start & end nodes
var sf = false; // start node fully selected
var ef = false; // end node fully selected
// возвращает true, если нода не текстовая или выделена полностью
function isFullySelected(n, s, e) {
if (n.nodeType == 3) {
e = e>=0 ? e : n.nodeValue.length;
return (s==0 && e==n.nodeValue.length) || $.trim(n.nodeValue).length == $.trim(n.nodeValue.substring(s, e)).length;
}
return true;
}
// возвращает true, если нода пустая или в ней не выделено ни одного непробельного символа
function isEmptySelected(n, s, e) {
if (n.nodeType == 1) {
return self.rte.dom.isEmpty(n);
} else if (n.nodeType == 3) {
return $.trim(n.nodeValue.substring(s||0, e>=0 ? e : n.nodeValue.length)).length == 0;
}
return true;
}
//this.dump()
// начальная нода
if (r.startContainer.nodeType == 1) {
if (r.startOffset<r.startContainer.childNodes.length) {
s = r.startContainer.childNodes[r.startOffset];
res.so = s.nodeType == 1 ? null : 0;
} else {
s = r.startContainer.childNodes[r.startOffset-1];
res.so = s.nodeType == 1 ? null : s.nodeValue.length;
}
} else {
s = r.startContainer;
res.so = r.startOffset;
}
// выделение схлопнуто
if (r.collapsed) {
if (collapsed) {
// блочное выделение
if (blocks) {
s = realSelected(s);
if (!this.rte.dom.isEmpty(s) || (s = this.rte.dom.next(s))) {
res.nodes = [s];
}
// добавляем инлайн соседей
if (this.rte.dom.isInline(s)) {
res.nodes = this.rte.dom.toLineStart(s).concat(res.nodes, this.rte.dom.toLineEnd(s));
}
// offset для текстовых нод
if (res.nodes.length>0) {
res.so = res.nodes[0].nodeType == 1 ? null : 0;
res.eo = res.nodes[res.nodes.length-1].nodeType == 1 ? null : res.nodes[res.nodes.length-1].nodeValue.length;
}
} else if (!this.rte.dom.isEmpty(s)) {
res.nodes = [s];
}
}
return res;
}
// конечная нода
if (r.endContainer.nodeType == 1) {
e = r.endContainer.childNodes[r.endOffset-1];
res.eo = e.nodeType == 1 ? null : e.nodeValue.length;
} else {
e = r.endContainer;
res.eo = r.endOffset;
}
// this.rte.log('select 1')
//this.dump(ca, s, e, res.so, res.eo)
// начальная нода выделена полностью - поднимаемся наверх по левой стороне
if (s.nodeType == 1 || blocks || isFullySelected(s, res.so, s.nodeValue.length)) {
// this.rte.log('start text node is fully selected')
s = realSelected(s, ca, 'left');
sf = true;
res.so = s.nodeType == 1 ? null : 0;
}
// конечная нода выделена полностью - поднимаемся наверх по правой стороне
if (e.nodeType == 1 || blocks || isFullySelected(e, 0, res.eo)) {
// this.rte.log('end text node is fully selected')
e = realSelected(e, ca, 'right');
ef = true;
res.eo = e.nodeType == 1 ? null : e.nodeValue.length;
}
// блочное выделение - если ноды не элементы - поднимаемся к родителю, но ниже контейнера
if (blocks) {
if (s.nodeType != 1 && s.parentNode != ca && s.parentNode.nodeName != 'BODY') {
s = s.parentNode;
res.so = null;
}
if (e.nodeType != 1 && e.parentNode != ca && e.parentNode.nodeName != 'BODY') {
e = e.parentNode;
res.eo = null;
}
}
// если контенер выделен полностью, поднимаемся наверх насколько можно
if (s.parentNode == e.parentNode && s.parentNode.nodeName != 'BODY' && (sf && this.rte.dom.isFirstNotEmpty(s)) && (ef && this.rte.dom.isLastNotEmpty(e))) {
// this.rte.log('common parent')
s = e = s.parentNode;
res.so = s.nodeType == 1 ? null : 0;
res.eo = e.nodeType == 1 ? null : e.nodeValue.length;
}
// начальная нода == конечной ноде
if (s == e) {
// this.rte.log('start is end')
if (!this.rte.dom.isEmpty(s)) {
res.nodes.push(s);
}
return res;
}
// this.rte.log('start 2')
//this.dump(ca, s, e, res.so, res.eo)
// находим начальную и конечную точки - ноды из иерархии родителей начальной и конечно ноды, у которых родитель - контейнер
var sp = s;
while (sp.nodeName != 'BODY' && sp.parentNode !== ca && sp.parentNode.nodeName != 'BODY') {
sp = sp.parentNode;
}
//this.rte.log(s.nodeName)
// this.rte.log('start point')
// this.rte.log(sp)
var ep = e;
// this.rte.log(ep)
while (ep.nodeName != 'BODY' && ep.parentNode !== ca && ep.parentNode.nodeName != 'BODY') {
// this.rte.log(ep)
ep = ep.parentNode;
}
// this.rte.log('end point')
// this.rte.log(ep)
// если начальная нода не пустая - добавляем ее
if (!isEmptySelected(s, res.so, s.nodeType==3 ? s.nodeValue.length : null)) {
res.nodes.push(s);
}
// поднимаемся от начальной ноды до начальной точки
var n = s;
while (n !== sp) {
var _n = n;
while ((_n = this.rte.dom.next(_n))) {
res.nodes.push(_n);
}
n = n.parentNode;
}
// от начальной точки до конечной точки
n = sp;
while ((n = this.rte.dom.next(n)) && n!= ep ) {
// this.rte.log(n)
res.nodes.push(n);
}
// поднимаемся от конечной ноды до конечной точки, результат переворачиваем
var tmp = [];
n = e;
while (n !== ep) {
var _n = n;
while ((_n = this.rte.dom.prev(_n))) {
tmp.push(_n);
}
n = n.parentNode;
}
if (tmp.length) {
res.nodes = res.nodes.concat(tmp.reverse());
}
// если конечная нода не пустая и != начальной - добавляем ее
if (!isEmptySelected(e, 0, e.nodeType==3 ? res.eo : null)) {
res.nodes.push(e);
}
if (blocks) {
// добавляем инлайн соседей слева
if (this.rte.dom.isInline(s)) {
res.nodes = this.rte.dom.toLineStart(s).concat(res.nodes);
res.so = res.nodes[0].nodeType == 1 ? null : 0;
}
// добавляем инлайн соседей справа
if (this.rte.dom.isInline(e)) {
res.nodes = res.nodes.concat(this.rte.dom.toLineEnd(e));
res.eo = res.nodes[res.nodes.length-1].nodeType == 1 ? null : res.nodes[res.nodes.length-1].nodeValue.length;
}
}
// все радуются! :)
return res;
}
}
})(jQuery);

View file

@ -0,0 +1,190 @@
/**
* @class elRTE User interface controller
*
* @param elRTE rte объект-редактор
*
* @author: Dmitry Levashov (dio) dio@std42.ru
* @todo: this.domElem.removeClass('disabled') - move to ui.update;
* @todo: add dom and selection as button members
* Copyright: Studio 42, http://www.std42.ru
**/
(function($) {
elRTE.prototype.ui = function(rte) {
this.rte = rte;
this._buttons = [];
var self = this,
tb = this.rte.options.toolbars[rte.options.toolbar && rte.options.toolbars[rte.options.toolbar] ? rte.options.toolbar : 'normal'],
tbl = tb.length,
p, pname, pl, n, c, b, i;
// add prototype to all buttons
for (i in this.buttons) {
if (this.buttons.hasOwnProperty(i) && i != 'button') {
this.buttons[i].prototype = this.buttons.button.prototype;
}
}
// create buttons and put on toolbar
while (tbl--) {
first = (tbl == 0 ? true : false);
if (tb[tbl - 1] == 'eol') { first = true; }
pname = tb[tbl];
// special 'end of line' panel, starts next panel on a new line
if (pname == 'eol') {
$(this.rte.doc.createElement('br')).prependTo(this.rte.toolbar);
continue;
}
p = $('<ul class="panel-'+pname+(first ? ' first' : '')+'" />').prependTo(this.rte.toolbar);
p.bind('mousedown', function(e) {
e.preventDefault();
})
pl = this.rte.options.panels[pname].length;
while (pl--) {
n = this.rte.options.panels[pname][pl];
c = this.buttons[n] || this.buttons.button;
this._buttons.push((b = new c(this.rte, n)));
p.prepend(b.domElem);
}
}
this.update();
this.disable = function() {
$.each(self._buttons, function() {
!this.active && this.domElem.addClass('disabled');
});
}
}
/**
* Обновляет кнопки - вызывает метод update() для каждой кнопки
*
* @return void
**/
elRTE.prototype.ui.prototype.update = function(cleanCache) {
cleanCache && this.rte.selection.cleanCache();
var n = this.rte.selection.getNode(),
p = this.rte.dom.parents(n, '*'),
rtl = this.rte.rtl,
sep = rtl ? ' &laquo; ' : ' &raquo; ',
path = '', name, i;
function _name(n) {
var name = n.nodeName.toLowerCase();
n = $(n)
if (name == 'img') {
if (n.hasClass('elrte-media')) {
name = 'media';
} else if (n.hasClass('elrte-google-maps')) {
name = 'google map';
} else if (n.hasClass('elrte-yandex-maps')) {
name = 'yandex map';
} else if (n.hasClass('elrte-pagebreak')) {
name = 'pagebreak';
}
}
return name;
}
if (n && n.nodeType == 1 && n.nodeName != 'BODY') {
p.unshift(n);
}
if (!rtl) {
p = p.reverse();
}
for (i=0; i < p.length; i++) {
path += (i>0 ? sep : '')+_name(p[i]);
}
this.rte.statusbar.html(path);
$.each(this._buttons, function() {
this.update();
});
this.rte.window.focus();
}
elRTE.prototype.ui.prototype.buttons = {
/**
* @class кнопка на toolbar редактора
* реализует поведение по умолчанию и является родителем для других кнопок
*
* @param elRTE rte объект-редактор
* @param String name название кнопки (команда исполняемая document.execCommand())
**/
button : function(rte, name) {
var self = this;
this.rte = rte;
this.active = false;
this.name = name;
this.val = null;
this.domElem = $('<li style="-moz-user-select:-moz-none" class="'+name+' rounded-3" name="'+name+'" title="'+this.rte.i18n(this.rte.options.buttons[name] || name)+'" unselectable="on" />')
.hover(
function() { $(this).addClass('hover'); },
function() { $(this).removeClass('hover'); }
)
.click( function(e) {
e.stopPropagation();
e.preventDefault();
if (!$(this).hasClass('disabled')) {
// try{
self.command();
// } catch(e) {
// self.rte.log(e)
// }
}
self.rte.window.focus();
});
}
}
/**
* Обработчик нажатия на кнопку на тулбаре. Выполнение команды или открытие окна|меню и тд
*
* @return void
**/
elRTE.prototype.ui.prototype.buttons.button.prototype.command = function() {
this.rte.history.add();
try {
this.rte.doc.execCommand(this.name, false, this.val);
} catch(e) {
return this.rte.log('commands failed: '+this.name);
}
this.rte.ui.update(true);
}
/**
* Обновляет состояние кнопки
*
* @return void
**/
elRTE.prototype.ui.prototype.buttons.button.prototype.update = function() {
try {
if (!this.rte.doc.queryCommandEnabled(this.name)) {
return this.domElem.addClass('disabled');
} else {
this.domElem.removeClass('disabled');
}
} catch (e) {
return;
}
try {
if (this.rte.doc.queryCommandState(this.name)) {
this.domElem.addClass('active');
} else {
this.domElem.removeClass('active');
}
} catch (e) { }
}
})(jQuery);

View file

@ -0,0 +1,396 @@
/*
* Misc utils for elRTE
*
* @param Object rte - editor
* @todo Подумать, что из этого реально нужно и навести порядок. Возможно часть перенести в ellib
*
* @author: Dmitry Levashov (dio) dio@std42.ru
* Copyright: Studio 42, http://www.std42.ru
*/
(function($) {
elRTE.prototype.utils = function(rte) {
this.rte = rte;
this.url = null;
// domo arigato, Steave, http://blog.stevenlevithan.com/archives/parseuri
this.reg = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/;
this.baseURL = '';
this.path = '';
/**
* entities map
**/
this.entities = {'&' : '&amp;', '"' : '&quot;', '<' : '&lt;', '>' : '&gt;'};
/**
* entities regexp
**/
this.entitiesRegExp = /[<>&\"]/g;
/**
* media info
**/
this.media = [{
type : 'application/x-shockwave-flash',
classid : ['clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'],
codebase : 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'
}, {
type : 'application/x-director',
classid : ['clsid:166b1bca-3f9c-11cf-8075-444553540000'],
codebase : 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0'
}, {
type : 'application/x-mplayer2',
classid : ['clsid:6bf52a52-394a-11d3-b153-00c04f79faa6', 'clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95', 'clsid:05589fa1-c356-11ce-bf01-00aa0055595a'],
codebase : 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'
}, {
type : 'video/quicktime',
classid : ['clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b'],
codebase : 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0'
}, {
type : 'audio/x-pn-realaudio-plugin',
classid : ['clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa'],
codebase : 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'
}];
// rgb color regexp
this.rgbRegExp = /\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*/i;
// regexp to detect color in border/background properties
this.colorsRegExp = /aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|rgb\s*\([^\)]+\)/i;
// web safe colors
this.colors = {
aqua : '#00ffff',
black : '#000000',
blue : '#0000ff',
fuchsia : '#ff00ff',
gray : '#808080',
green : '#008000',
lime : '#00ff00',
maroon : '#800000',
navy : '#000080',
olive : '#808000',
orange : '#ffa500',
purple : '#800080',
red : '#ff0000',
silver : '#c0c0c0',
teal : '#008080',
white : '#fffffff',
yellow : '#ffff00'
}
var self = this;
this.rgb2hex = function(str) {
return this.color2Hex(''+str)
}
this.toPixels = function(num) {
var m = num.match(/([0-9]+\.?[0-9]*)\s*(px|pt|em|%)/);
if (m) {
num = m[1];
unit = m[2];
}
if (num[0] == '.') {
num = '0'+num;
}
num = parseFloat(num);
if (isNaN(num)) {
return '';
}
var base = parseInt($(document.body).css('font-size')) || 16;
switch (unit) {
case 'em': return parseInt(num*base);
case 'pt': return parseInt(num*base/12);
case '%' : return parseInt(num*base/100);
}
return num;
}
// TODO: add parse rel path ../../etc
this.absoluteURL = function(url) {
!this.url && this._url();
url = $.trim(url);
if (!url) {
return '';
}
// ссылки на якоря не переводим в абс
if (url[0] == '#') {
return url;
}
var u = this.parseURL(url);
if (!u.host && !u.path && !u.anchor) {
//this.rte.log('Invalid URL: '+url)
return '';
}
if (!this.rte.options.absoluteURLs) {
return url;
}
if (u.protocol) {
//this.rte.log('url already absolute: '+url);
return url;
}
if (u.host && (u.host.indexOf('.')!=-1 || u.host == 'localhost')) {
//this.rte.log('no protocol');
return this.url.protocol+'://'+url;
}
if (url[0] == '/') {
url = this.baseURL+url;
} else {
if (url.indexOf('./') == 0) {
url = url.substring(2);
}
url = this.baseURL+this.path+url;
}
return url;
}
this.parseURL = function(url) {
var u = url.match(this.reg);
var ret = {};
$.each(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"], function(i) {
ret[this] = u[i];
});
if (!ret.host.match(/[a-z0-9]/i)) {
ret.host = '';
}
return ret;
}
this.trimEventCallback = function(c) {
c = c ? c.toString() : '';
return $.trim(c.replace(/\r*\n/mg, '').replace(/^function\s*on[a-z]+\s*\(\s*event\s*\)\s*\{(.+)\}$/igm, '$1'));
}
this._url = function() {
this.url = this.parseURL(window.location.href);
this.baseURL = this.url.protocol+'://'+(this.url.userInfo ? parts.userInfo+'@' : '')+this.url.host+(this.url.port ? ':'+this.url.port : '');
this.path = !this.url.file ? this.url.path : this.url.path.substring(0, this.url.path.length - this.url.file.length);
}
/**
* Create object (map) from array
*
* @param Array
* @return Object
**/
this.makeObject = function(o) {
var m = {};
$.each(o, function(i, e) {
m[e] = e;
});
return m;
}
/**
* Encode entities in string
*
* @param String
* @return String
**/
this.encode = function(s) {
var e = this.entities;
return (''+s).replace(this.entitiesRegExp, function(c) {
return e[c];
});
}
/**
* Decode entities in string
*
* @param String
* @return String
**/
this.decode = function(s) {
return $('<div/>').html(s||'').text();
}
/**
* Parse style string into object
*
* @param String
* @return Object
**/
this.parseStyle = function(s) {
var st = {}, a = this.rte.options.allowBrowsersSpecStyles, t, n, v, p;
if (typeof(s) == 'string' && s.length) {
$.each(s.replace(/&quot;/gi, "'").split(';'), function(i, str) {
if ((p = str.indexOf(':')) !== -1) {
n = $.trim(str.substr(0, p));
v = $.trim(str.substr(p+1))
if (n == 'color' || n == 'background-color') {
v = v.toLowerCase();
}
if (n && v && (a || n.substring(0, 1) != '-')) {
st[n] = v;
}
}
});
}
return st;
}
/**
* Compact some style properties and convert colors in hex
*
* @param Object
* @return Object
**/
this.compactStyle = function(s) {
var self = this;
if (s.border == 'medium none') {
delete s.border;
}
$.each(s, function(n, v) {
if (/color$/i.test(n)) {
s[n] = self.color2Hex(v);
} else if (/^(border|background)$/i.test(n)) {
s[n] = v.replace(self.colorsRegExp, function(m) {
return self.color2Hex(m);
});
}
});
if (s['border-width']) {
s.border = s['border-width']+' '+(s['border-style']||'solid')+' '+(s['border-color']||'#000');
delete s['border-width'];
delete s['border-style'];
delete s['border-color'];
}
if (s['background-image']) {
s.background = (s['background-color']+' ')||''+s['background-image']+' '+s['background-position']||'0 0'+' '+s['background-repeat']||'repeat';
delete s['background-image'];
delete['background-image'];
delete['background-position'];
delete['background-repeat'];
}
if (s['margin-top'] && s['margin-right'] && s['margin-bottom'] && s['margin-left']) {
s.margin = s['margin-top']+' '+s['margin-right']+' '+s['margin-bottom']+' '+s['margin-left'];
delete s['margin-top'];
delete s['margin-right'];
delete s['margin-bottom'];
delete s['margin-left'];
}
if (s['padding-top'] && s['padding-right'] && s['padding-bottom'] && s['padding-left']) {
s.padding = s['padding-top']+' '+s['padding-right']+' '+s['padding-bottom']+' '+s['padding-left'];
delete s['padding-top'];
delete s['padding-right'];
delete s['padding-bottom'];
delete s['padding-left'];
}
if (s['list-style-type'] || s['list-style-position'] || s['list-style-image']) {
s['list-style'] = $.trim(s['list-style-type']||' '+s['list-style-position']||''+s['list-style-image']||'');
delete s['list-style-type'];
delete s['list-style-position'];
delete s['list-style-image'];
}
return s;
}
/**
* Serialize style object into string
*
* @param Object style map
* @param Boolean flag - compact style?
* @return String
**/
this.serializeStyle = function(o, c) {
var s = [];
// c=true
$.each(c ? this.compactStyle(o) : o, function(n, v) {
v && s.push(n+':'+v);
});
return s.join(';');
}
/**
* Parse class string into object
*
* @param String
* @return Object
**/
this.parseClass = function(c) {
c = $.trim(c);
// this.rte.log(c)
return c.length ? this.makeObject(c.split(/\s+/)) : {};
return c.length ? c.split(/\s+/) : [];
}
/**
* Serialize class object into string
*
* @param Object
* @return String
**/
this.serializeClass = function(c) {
// return c.join(' ')
var s = [];
// this.rte.log(c)
var rte = this.rte
$.each(c, function(n) {
s.push(n);
// rte.log(typeof(n))
});
return s.join(' ');
}
/**
* Return required media type info
*
* @param String mimetype
* @param String classid
* @return Object
**/
this.mediaInfo = function(t, c) {
var l = this.media.length;
while (l--) {
if (t === this.media[l].type || (c && $.inArray(c, this.media[l].classid) != -1)) {
return this.media[l];
}
}
}
/**
* Return color hex value
*
* @param String color name or rgb
* @return String
**/
this.color2Hex = function(c) {
var m;
c = c||'';
if (c.indexOf('#') === 0) {
return c;
}
function hex(s) {
s = parseInt(s).toString(16);
return s.length > 1 ? s : '0' + s;
};
if (this.colors[c]) {
return this.colors[c];
}
if ((m = c.match(this.rgbRegExp))) {
return '#'+hex(m[1])+hex(m[2])+hex(m[3]);
}
return '';
}
}
})(jQuery);

View file

@ -0,0 +1,330 @@
/**
* @class w3cRange - w3c text range emulation for "strange" browsers
*
* @param elRTE rte объект-редактор
*
* @author: Dmitry Levashov (dio) dio@std42.ru
* Copyright: Studio 42, http://www.std42.ru
**/
(function($) {
elRTE.prototype.w3cRange = function(rte) {
var self = this;
this.rte = rte;
this.r = null;
this.collapsed = true;
this.startContainer = null;
this.endContainer = null;
this.startOffset = 0;
this.endOffset = 0;
this.commonAncestorContainer = null;
this.range = function() {
try {
this.r = this.rte.window.document.selection.createRange();
} catch(e) {
this.r = this.rte.doc.body.createTextRange();
}
return this.r;
}
this.insertNode = function(html) {
this.range();
self.r.collapse(false)
var r = self.r.duplicate();
r.pasteHTML(html);
}
this.getBookmark = function() {
this.range();
if (this.r.item) {
var n = this.r.item(0);
this.r = this.rte.doc.body.createTextRange();
this.r.moveToElementText(n);
}
return this.r.getBookmark();
}
this.moveToBookmark = function(bm) {
this.rte.window.focus();
this.range().moveToBookmark(bm);
this.r.select();
}
/**
* Обновляет данные о выделенных нодах
*
* @return void
**/
this.update = function() {
function _findPos(start) {
var marker = '\uFEFF';
var ndx = offset = 0;
var r = self.r.duplicate();
r.collapse(start);
var p = r.parentElement();
if (!p || p.nodeName == 'HTML') {
return {parent : self.rte.doc.body, ndx : ndx, offset : offset};
}
r.pasteHTML(marker);
childs = p.childNodes;
for (var i=0; i < childs.length; i++) {
var n = childs[i];
if (i>0 && (n.nodeType!==3 || childs[i-1].nodeType !==3)) {
ndx++;
}
if (n.nodeType !== 3) {
offset = 0;
} else {
var pos = n.nodeValue.indexOf(marker);
if (pos !== -1) {
offset += pos;
break;
}
offset += n.nodeValue.length;
}
};
r.moveStart('character', -1);
r.text = '';
return {parent : p, ndx : Math.min(ndx, p.childNodes.length-1), offset : offset};
}
this.range();
this.startContainer = this.endContainer = null;
if (this.r.item) {
this.collapsed = false;
var i = this.r.item(0);
this.setStart(i.parentNode, this.rte.dom.indexOf(i));
this.setEnd(i.parentNode, this.startOffset+1);
} else {
this.collapsed = this.r.boundingWidth == 0;
var start = _findPos(true);
var end = _findPos(false);
start.parent.normalize();
end.parent.normalize();
start.ndx = Math.min(start.ndx, start.parent.childNodes.length-1);
end.ndx = Math.min(end.ndx, end.parent.childNodes.length-1);
if (start.parent.childNodes[start.ndx].nodeType && start.parent.childNodes[start.ndx].nodeType == 1) {
this.setStart(start.parent, start.ndx);
} else {
this.setStart(start.parent.childNodes[start.ndx], start.offset);
}
if (end.parent.childNodes[end.ndx].nodeType && end.parent.childNodes[end.ndx].nodeType == 1) {
this.setEnd(end.parent, end.ndx);
} else {
this.setEnd(end.parent.childNodes[end.ndx], end.offset);
}
// this.dump();
this.select();
}
return this;
}
this.isCollapsed = function() {
this.range();
this.collapsed = this.r.item ? false : this.r.boundingWidth == 0;
return this.collapsed;
}
/**
* "Схлопывает" выделение
*
* @param bool toStart - схлопывать выделение к началу или к концу
* @return void
**/
this.collapse = function(toStart) {
this.range();
if (this.r.item) {
var n = this.r.item(0);
this.r = this.rte.doc.body.createTextRange();
this.r.moveToElementText(n);
}
this.r.collapse(toStart);
this.r.select();
this.collapsed = true;
}
this.getStart = function() {
this.range();
if (this.r.item) {
return this.r.item(0);
}
var r = this.r.duplicate();
r.collapse(true);
var s = r.parentElement();
return s && s.nodeName == 'BODY' ? s.firstChild : s;
}
this.getEnd = function() {
this.range();
if (this.r.item) {
return this.r.item(0);
}
var r = this.r.duplicate();
r.collapse(false);
var e = r.parentElement();
return e && e.nodeName == 'BODY' ? e.lastChild : e;
}
/**
* Устанавливает начaло выделения на указаную ноду
*
* @param Element node нода
* @param Number offset отступ от начала ноды
* @return void
**/
this.setStart = function(node, offset) {
this.startContainer = node;
this.startOffset = offset;
if (this.endContainer) {
this.commonAncestorContainer = this.rte.dom.findCommonAncestor(this.startContainer, this.endContainer);
}
}
/**
* Устанавливает конец выделения на указаную ноду
*
* @param Element node нода
* @param Number offset отступ от конца ноды
* @return void
**/
this.setEnd = function(node, offset) {
this.endContainer = node;
this.endOffset = offset;
if (this.startContainer) {
this.commonAncestorContainer = this.rte.dom.findCommonAncestor(this.startContainer, this.endContainer);
}
}
/**
* Устанавливает начaло выделения перед указаной нодой
*
* @param Element node нода
* @return void
**/
this.setStartBefore = function(n) {
if (n.parentNode) {
this.setStart(n.parentNode, this.rte.dom.indexOf(n));
}
}
/**
* Устанавливает начaло выделения после указаной ноды
*
* @param Element node нода
* @return void
**/
this.setStartAfter = function(n) {
if (n.parentNode) {
this.setStart(n.parentNode, this.rte.dom.indexOf(n)+1);
}
}
/**
* Устанавливает конец выделения перед указаной нодой
*
* @param Element node нода
* @return void
**/
this.setEndBefore = function(n) {
if (n.parentNode) {
this.setEnd(n.parentNode, this.rte.dom.indexOf(n));
}
}
/**
* Устанавливает конец выделения после указаной ноды
*
* @param Element node нода
* @return void
**/
this.setEndAfter = function(n) {
if (n.parentNode) {
this.setEnd(n.parentNode, this.rte.dom.indexOf(n)+1);
}
}
/**
* Устанавливает новое выделение после изменений
*
* @return void
**/
this.select = function() {
// thanks tinymice authors
function getPos(n, o) {
if (n.nodeType != 3) {
return -1;
}
var c ='\uFEFF';
var val = n.nodeValue;
var r = self.rte.doc.body.createTextRange();
n.nodeValue = val.substring(0, o) + c + val.substring(o);
r.moveToElementText(n.parentNode);
r.findText(c);
var p = Math.abs(r.moveStart('character', -0xFFFFF));
n.nodeValue = val;
return p;
};
this.r = this.rte.doc.body.createTextRange();
var so = this.startOffset;
var eo = this.endOffset;
var s = this.startContainer.nodeType == 1
? this.startContainer.childNodes[Math.min(so, this.startContainer.childNodes.length - 1)]
: this.startContainer;
var e = this.endContainer.nodeType == 1
? this.endContainer.childNodes[Math.min(so == eo ? eo : eo - 1, this.endContainer.childNodes.length - 1)]
: this.endContainer;
if (this.collapsed) {
if (s.nodeType == 3) {
var p = getPos(s, so);
this.r.move('character', p);
} else {
this.r.moveToElementText(s);
this.r.collapse(true);
}
} else {
var r = this.rte.doc.body.createTextRange();
var sp = getPos(s, so);
var ep = getPos(e, eo);
if (s.nodeType == 3) {
this.r.move('character', sp);
} else {
this.r.moveToElementText(s);
}
if (e.nodeType == 3) {
r.move('character', ep);
} else {
r.moveToElementText(e);
}
this.r.setEndPoint('EndToEnd', r);
}
try {
this.r.select();
} catch(e) {
}
if (r) {
r = null;
}
}
this.dump = function() {
this.rte.log('collapsed: '+this.collapsed);
//this.rte.log('commonAncestorContainer: '+this.commonAncestorContainer.nodeName||'#text')
this.rte.log('startContainer: '+(this.startContainer ? this.startContainer.nodeName : 'non'));
this.rte.log('startOffset: '+this.startOffset);
this.rte.log('endContainer: '+(this.endContainer ? this.endContainer.nodeName : 'none'));
this.rte.log('endOffset: '+this.endOffset);
}
}
})(jQuery);

View file

@ -0,0 +1,216 @@
/*
* WARNING! Use this file only if you want to make translation
* Please submit your translation to the project by creating new issue at:
* http://elrte.org/redmine/projects/elrte/issues/new
*/
/*
* YOUR_LANGUAGE_TRANSLATION translation
* @author NAME <EMAIL>
* @version 201x-xx-xx
*/
(function($) {
// LANG_CODE can be 2-letter "en", "fr" or 5-letter "pt_BR", "zh_CN"
elRTE.prototype.i18Messages.LANG_CODE = {
'_translator' : 'YOUR_NAME &lt;YOUR_EMAIL&gt;',
'_translation' : 'YOUR_TRANSLATION NAME', // will be seen in about dialog
'Editor' : '',
'Source' : '',
// panels names
'Copy/Pase' : '',
'Undo/Redo' : '',
'Text styles' : '',
'Colors' : '',
'Alignment' : '',
'Indent/Outdent' : '',
'Text format' : '',
'Lists' : '',
'Misc elements' : '',
'Links' : '',
'Images' : '',
'Media' : '',
'Tables' : '',
'File manager (elFinder)' : '',
// buttons names
'About this software' : '',
'Save' : '',
'Copy' : '',
'Cut' : '',
'Paste' : '',
'Paste only text' : '',
'Paste formatted text' : '',
'Clean format' : '',
'Undo last action' : '',
'Redo previous action' : '',
'Bold' : '',
'Italic' : '',
'Underline' : '',
'Strikethrough' : '',
'Superscript' : '',
'Subscript' : '',
'Align left' : '',
'Ailgn right' : '',
'Align center' : '',
'Align full' : '',
'Font color' : '',
'Background color' : '',
'Indent' : '',
'Outdent' : '',
'Format' : '',
'Font size' : '',
'Font' : '',
'Ordered list' : '',
'Unordered list' : '',
'Horizontal rule' : '',
'Blockquote' : '',
'Block element (DIV)' : '',
'Link' : '',
'Delete link' : '',
'Bookmark' : '',
'Image' : '',
'Table' : '',
'Delete table' : '',
'Insert row before' : '',
'Insert row after' : '',
'Delete row' : '',
'Insert column before' : '',
'Insert column after' : '',
'Delete column' : '',
'Merge table cells' : '',
'Split table cell' : '',
'Toggle display document structure' : '',
'Table cell properties' : '',
'Table properties' : '',
'Toggle full screen mode' : '',
'Open file manager' : '',
'Non breakable space' : '',
'Stop element floating' : '',
// dialogs
'Warning' : '',
'Properies' : '',
'Popup' : '',
'Advanced' : '',
'Events' : '',
'Width' : '',
'Height' : '',
'Left' : '',
'Center' : '',
'Right' : '',
'Border' : '',
'Background' : '',
'Css class' : '',
'Css style' : '',
'No' : '',
'Title' : '',
'Script direction' : '',
'Language' : '',
'Charset' : '',
'Not set' : '',
'Left to right' : '',
'Right to left' : '',
'In this window' : '',
'In new window (_blank)' : '',
'In new parent window (_parent)' : '',
'In top frame (_top)' : '',
'URL' : '',
'Open in' : '',
'Open file manger' : '',
// copy
'This operation is disabled in your browser on security reason. Use shortcut instead.' : '',
// format
'Heading 1' : '',
'Heading 2' : '',
'Heading 3' : '',
'Heading 4' : '',
'Heading 5' : '',
'Heading 6' : '',
'Paragraph' : '',
'Address' : '',
'Preformatted' : '',
// font size
'Small (8pt)' : '',
'Small (10px)' : '',
'Small (12pt)' : '',
'Normal (14pt)' : '',
'Large (18pt)' : '',
'Large (24pt)' : '',
'Large (36pt)' : '',
// bookmark
'Bookmark name' : '',
// link
'Link URL' : '',
'Target' : '',
'Select bookmark' : '',
'Open link in popup window' : '',
'Window name' : '',
'Window size' : '',
'Window position' : '',
'Location bar' : '',
'Menu bar' : '',
'Toolbar' : '',
'Scrollbars' : '',
'Status bar' : '',
'Resizable' : '',
'Depedent' : '',
'Add return false' : '',
'Target MIME type' : '',
'Relationship page to target (rel)' : '',
'Relationship target to page (rev)' : '',
'Tab index' : '',
'Access key' : '',
// image
'Size' : '',
'Preview' : '',
'Margins' : '',
'Alt text' : '',
'Image URL' : '',
// table
'Spacing' : '',
'Padding' : '',
'Rows' : '',
'Columns' : '',
'Groups' : '',
'Cells' : '',
'Caption' : '',
'Inner borders' : '',
// table cell
'Table cell type' : '',
'Data' : '',
'Header' : '',
'Justify' : '',
'Paddings' : '',
'Apply to' : '',
'Current cell' : '',
'All cells in row' : '',
'All cells in column' : '',
'All cells in table' : '',
// about
'About elRTE' : '',
'Version' : '',
'Licence' : '',
'elRTE is an open-source JavaScript based WYSIWYG HTML-editor.' : '',
'Main goal of the editor - simplify work with text and formating (HTML) on sites, blogs, forums and other online services.' : '',
'You can use it in any commercial or non-commercial projects.' : '',
'Authors' : '',
'Chief developer' : '',
'Developer, tech support' : '',
'Developer' : '',
'Interface designer' : '',
'Spanish localization' : '',
'Czech localization' : '',
'Japanese localization' : '',
'Latvian localization' : '',
'German localization' : '',
'Ukranian localization' : '',
'Persian (farsi) localization' : '',
'Arabic localization' : '',
'RTL support' : '',
'French localization' : '',
'Dutch localization' : '',
'Hungarian localization' : '',
'Polish localization' : '',
'Italian localization' : '',
'Traditional Chinese localization' : '',
'For more information about this software visit the' : '',
'elRTE website' : 'на сайте elRTE'
}
})(jQuery);

View file

@ -0,0 +1,168 @@
/**
* Arabic translation
* @author tawfek daghistani <tawfekov@gmail.com>
* @version 2010-09-21
*/
(function($) {
elRTE.prototype.i18Messages.ar = {
'_translator' : 'Tawfek Daghistani &lt;tawfekov@gmail.com&gt;',
'_translation' : 'Arabic translation',
'Editor' : 'التصميم',
'Source' : 'المصدر',
// Panel Name
'Copy/Pase' : 'نسخ/لصق',
'Undo/Redo' : 'تراجع/تكرار',
'Text styles' : 'تنسيق النص',
'Colors' : 'الألوان',
'Alignment' : 'المحاذاة',
'Indent/Outdent' : 'مسافة بادئة / مسافة خاتمة',
'Text format' : 'التنسيق',
'Lists' : 'قوائم',
'Misc elements' : 'عناصر متنوعة',
'Links' : 'رابط تشعبي',
'Images' : 'صورة',
'Media' : 'عنصر صوت أو فيديو',
'Tables' : 'جدول',
'File manager (elFinder)' : 'مستعرض الملفات',
// button names
'Save' : 'حفظ',
'Copy' : 'نسخ',
'Cut' : 'قص',
'Paste' : 'لصق',
'Paste only text' : 'لصق النصوص فقط',
'Paste formatted text' : 'لصق النصوص المنسقة',
'Clean format' : 'إزالة التنسيقات',
'Undo last action' : 'التراجع عن أخر فعل',
'Redo previous action' : 'تكرار أخر فعل ',
'Bold' : 'عريض',
'Italic' : 'مائل',
'Underline' : 'تحته خط',
'Strikethrough' : 'يتوسطه خط',
'Superscript' : 'يعلوه خط',
'Subscript' : 'تحته خط',
'Align left' : 'محاذاة إلى اليسار',
'Ailgn right' : 'محاذاة إلى اليمين ',
'Align center' : 'محاذاة إلى المنتصف',
'Align full' : 'محاذاة بعرض الصفحة',
'Font color' : 'لون الخط',
'Background color' : 'لون الخلفية',
'Indent' : 'مسافة بادئة',
'Outdent' : 'مسافة خاتمة',
'Format' : 'النتسيق',
'Font size' : 'قياس الخط',
'Font' : 'الخط',
'Ordered list' : 'تعداد رقمي',
'Unordered list' : 'تعداد',
'Horizontal rule' : 'خط افقي',
'Blockquote' : 'اقتباس',
'Block element (DIV)' : 'اقتباس (DIV)',
'Link' : 'رابط',
'Delete link' : 'حذف الرابط',
'Bookmark' : 'حفظ كعلامة',
'Image' : 'صورة',
'Table' : 'جدول',
'Delete table' : 'حذف الجدول',
'Insert row before' : 'إدراج الصف قبل ',
'Insert row after' : 'إدراج الصف بعده',
'Delete row' : 'حذف الصف',
'Insert column before' : 'إدراج عمود قبل ',
'Insert column after' : 'إدراج عمود بعد ',
'Delete column' : 'حذف العمود',
'Merge table cells' : 'دمج الخلايا',
'Split table cell' : 'تقسيم الخلية',
'Toggle display document structure' : 'إخفاء/ إظهار ',
'Table cell properties' : 'خصائص الخلايا',
'Table properties' : 'خصائص الجدول',
'Toggle full screen mode' : 'عرض بكامل الشاشة',
'Open file manager' : 'افتح مستعرض الملفات',
'Non breakable space' : '',
'Stop element floating' : '',
// dialogs
'Warning' : 'تنبيه',
'Properies' : 'خصائص',
'Popup' : 'نافذة منبثقة',
'Advanced' : 'متقدم',
'Events' : 'الأحداث',
'Width' : 'العرض',
'Height' : 'الارتفاع',
'Left' : 'اليسار',
'Center' : 'المنتصف',
'Right' : 'اليمين',
'Border' : 'حدود',
'Background' : 'الخلفية',
'Css class' : 'Css نمط',
'Css style' : 'Css تنسيق',
'No' : 'لا',
'Title' : 'العنوان',
'Script direction' : 'اتجاه النص',
'Language' : 'اللغة',
'Charset' : 'الترميز',
'Not set' : 'غير محدد',
'Left to right' : 'من اليسار إلى اليمين',
'Right to left' : 'من اليمين إلى اليسار',
'In this window' : '(_self)',
'In new window (_blank)' : '(_blank)',
'In new parent window (_parent)' : '(_parent)',
'In top frame (_top)' : '(_top)',
'URL' : '',
'Open in' : '',
// copy
'This operation is disabled in your browser on security reason. Use shortcut instead.' : 'هذه العملية معطلة لأسباب أمنية , استخدم الاختصار بدلاً عنها',
// format
'Heading 1' : 'عنوان رئيسي 1',
'Heading 2' : 'عنوان رئيسي 2',
'Heading 3' : 'عنوان رئيسي 3',
'Heading 4' : 'عنوان رئيسي 4',
'Heading 5' : 'عنوان رئيسي 5',
'Heading 6' : 'عنوان رئيسي 6',
'Paragraph' : 'مقطع نصي ',
'Address' : 'العنوان',
'Preformatted' : '',
// font size
'Small (8pt)' : '',
'Small (10px)' : '',
'Small (12pt)' : '',
'Normal (14pt)' : '',
'Large (18pt)' : '',
'Large (24pt)' : '',
'Large (36pt)' : '',
// bookmark
'Bookmark name' : 'اسم العلامة',
// link
'Link URL' : 'عنوان الارتباط التشعبي',
'Target' : 'الهدف',
'Open link in popup window' : 'افتح في نافذة صغيرة',
'URL' : 'ارتباط',
'Window name' : 'اسم النافذة',
'Window size' : 'حجم النافذة',
'Window position' : 'الموضع',
'Location bar' : 'العنوان',
'Menu bar' : 'شريط القوائم',
'Toolbar' : 'قائمة الأدوات',
'Scrollbars' : 'شريط التمرير',
'Status bar' : 'شريط المعلومات',
'Resizable' : 'متغير الحجم',
'Depedent' : '',
'Add return false' : 'إضافة (return false)',
'Target MIME type' : 'MIME type',
'Relationship page to target (rel)' : '',
'Relationship target to page (rev)' : '',
'Tab index' : '',
'Access key' : 'زر اختصار',
// image
'Size' : 'الحجم',
'Preview' : 'معاينة',
'Margins' : '',
'Alt text' : 'نص بديل',
'Image URL' : 'رابط صورة',
// table
'Spacing' : 'مسافات (spacing)',
'Padding' : 'الهامش (padding)',
'Rows' : 'الصفوف',
'Columns' : 'الأعمدة',
'Groups' : 'المجموعات',
'Cells' : 'خلايا',
'Caption' : 'العنوان',
'Inner borders' : 'حدود داخلية'
}
})(jQuery);

View file

@ -0,0 +1,167 @@
/**
* Catalan translation
* @author Maria Consuelo Bravo <consolbravo@gmail.com>
* @version 2010-12-21
*/
(function($) {
elRTE.prototype.i18Messages.ca = {
'_translator' : 'Maria Consuelo Bravo &lt;consolbravo@gmail.com&gt;',
'_translation' : 'Catalan translation',
'Editor' : 'Editor',
'Source' : 'Codi font',
// Panel Name
'Copy/Pase' : 'Copia/Enganxa',
'Undo/Redo' : 'Desfés/Restaura',
'Text styles' : 'Estils de text',
'Colors' : 'Colors',
'Alignment' : 'Alineació',
'Indent/Outdent' : 'Augmenta/Redueix el sagnat',
'Text format' : 'Format de text',
'Lists' : 'Llistes',
'Misc elements' : 'Diversos',
'Links' : 'Enllaços',
'Images' : 'Imatges',
'Media' : 'Multimèdia',
'Tables' : 'Taules',
'File manager (elFinder)' : 'Gestor d\'arxius',
// button names
'Save' : 'Desa',
'Copy' : 'Copia',
'Cut' : 'Retalla',
'Paste' : 'Enganxa',
'Paste only text' : 'Enganxa només el text',
'Paste formatted text' : 'Enganxa el text formatat',
'Clean format' : 'Neteja el format',
'Undo last action' : 'Desfés l\'última acció',
'Redo previous action' : 'Restaura l\'última acció',
'Bold' : 'Negreta',
'Italic' : 'Cursiva',
'Underline' : 'Subratllat',
'Strikethrough' : 'Ratllat',
'Superscript' : 'Superíndex',
'Subscript' : 'Subíndex',
'Align left' : 'Alinea a l\'esquerra',
'Ailgn right' : 'Alinea a la dreta',
'Align center' : 'Centra',
'Align full' : 'Justifica',
'Font color' : 'Color del text',
'Background color' : 'Color de fons',
'Indent' : 'Augmenta el sagnat',
'Outdent' : 'Redueix el sagnat',
'Format' : 'Format',
'Font size' : 'Mida de la lletra',
'Font' : 'Font',
'Ordered list' : 'Llista ordenada',
'Unordered list' : 'Llista desordenada',
'Horizontal rule' : 'Línia horitzontal',
'Blockquote' : 'Cita',
'Block element (DIV)' : 'Elements de bloc (DIV)',
'Link' : 'Enllaç',
'Delete link' : 'Elimina l\'enllaç',
'Bookmark' : 'Marcador',
'Image' : 'Imatge',
'Table' : 'Taula',
'Delete table' : 'Elimina la taula',
'Insert row before' : 'Insereix fila abans',
'Insert row after' : 'Insereix fila després',
'Delete row' : 'Elimina la fila',
'Insert column before' : 'Insereix columna abans',
'Insert column after' : 'Insereix columna després',
'Delete column' : 'Elimina la columna',
'Merge table cells' : 'Fusiona les cel·les',
'Split table cell' : 'Divideix la cel·la',
'Toggle display document structure' : 'Pantalla d\'estructura del document',
'Table cell properties' : 'Propietats de la cel·la',
'Table properties' : 'Propietats de la taula',
'Toggle full screen mode' : 'Pantalla completa',
'Open file manager' : 'Obre el gestor d\'arxius',
'Non breakable space' : 'Espai indivisible',
'Stop element floating' : 'Atura l\'element flotant',
// dialogs
'Warning' : 'Advertència',
'Properies' : 'Propietats',
'Popup' : 'Finestra emergent',
'Advanced' : 'Avançat',
'Events' : 'Incidències',
'Width' : 'Amplada',
'Height' : 'Alçada',
'Left' : 'Esquerra',
'Center' : 'Centrat',
'Right' : 'Dreta',
'Border' : 'Vora',
'Background' : 'Fons',
'Css class' : 'Classe CSS',
'Css style' : 'Estil CSS',
'No' : 'No',
'Title' : 'Títol',
'Script direction' : 'Adreça de l\'script',
'Language' : 'Idioma',
'Charset' : 'Charset',
'Not set' : 'No establert',
'Left to right' : 'D\'esquerra a dreta',
'Right to left' : 'De dreta a esquerra',
'In this window' : 'En aquesta finestra (_self)',
'In new window (_blank)' : 'En una finestra nova (_blank)',
'In new parent window (_parent)' : 'En una finestra mare nova (_parent)',
'In top frame (_top)' : 'En un marc superior (_top)',
'URL' : 'URL',
'Open in' : 'Obre a',
// copy
'This operation is disabled in your browser on security reason. Use shortcut instead.' : 'Per raons de seguretat aquesta operació no està disponible en el seu navegador. Utilitzi una drecera de teclat.',
// format
'Heading 1' : 'Encapçalament 1',
'Heading 2' : ' Encapçalament 2',
'Heading 3' : ' Encapçalament 3',
'Heading 4' : ' Encapçalament 4',
'Heading 5' : ' Encapçalament 5',
'Heading 6' : ' Encapçalament 6',
'Paragraph' : 'Paràgraf',
'Address' : 'Adreça',
'Preformatted' : 'Preformatat',
// font size
'Small (8pt)' : 'Petit (8pt)',
'Small (10px)' : 'Petit (10px)',
'Small (12pt)' : 'Petit (12pt)',
'Normal (14pt)' : 'Normal (14pt)',
'Large (18pt)' : 'Gran (18pt)',
'Large (24pt)' : 'Gran (24pt)',
'Large (36pt)' : 'Gran (36pt)',
// bookmark
'Bookmark name' : 'Nom del marcador',
// link
'Link URL' : 'URL de l\'enllaç',
'Target' : 'Objectiu',
'Open link in popup window' : 'Obre l\'enllaç en una finestra emergent',
'Window name' : 'Nom de la finestra',
'Window size' : 'Mida de la finestra',
'Window position' : 'Posició de la finestra',
'Location bar' : 'Barra d\'adreces',
'Menu bar' : 'Barra de menús',
'Toolbar' : 'Barra d\'eines',
'Scrollbars' : 'Barres de desplaçament',
'Status bar' : 'Barra d\'estat',
'Resizable' : 'Redimensionable',
'Depedent' : 'Dependent (Netscape)',
'Add return false' : 'Afegeix (return false)',
'Target MIME type' : 'Destí de tipus MIME',
'Relationship page to target (rel)' : 'Relació de la pàgina amb l\'enllaç (rel)',
'Relationship target to page (rev)' : 'Relació de l\'enllaç amb la pàgina (rev)',
'Tab index' : 'Índex de tabulador',
'Access key' : 'Tecla d\'accés',
// image
'Size' : 'Mida',
'Preview' : 'Previsualització',
'Margins' : 'Marges',
'Alt text' : 'Text alternatiu',
'Image URL' : 'URL de la imatge',
// table
'Spacing' : 'Interlineat (Spacing)',
'Padding' : 'Emplenament (Padding)',
'Rows' : 'Files',
'Columns' : 'Columnes',
'Groups' : 'Grups',
'Cells' : 'Cel·les',
'Caption' : 'Llegenda',
'Inner borders' : 'Vores internes'
}
})(jQuery);

View file

@ -0,0 +1,171 @@
/*
* Czech translation
* @author Michal Marek <mich.marek@gmail.com>
* @version 2010-09-19
*/
(function($) {
elRTE.prototype.i18Messages.cs = {
'_translator' : 'Michal Marek &lt;mich.marek@gmail.com&gt;',
'_translation' : 'Czech translation',
'Editor' : 'Editor',
'Source' : 'Kód',
// Panel Name
'Copy/Pase' : 'Kopírovat/Vložit',
'Undo/Redo' : 'Zpět/Znovu',
'Text styles' : 'Styly',
'Colors' : 'Barvy',
'Alignment' : 'Zarovnání',
'Indent/Outdent' : 'Odsadit / Předsadit',
'Text format' : 'Formát',
'Lists' : 'Seznamy',
'Misc elements' : 'Ostatní elementy',
'Links' : 'Odkazy',
'Images' : 'Obrázky',
'Media' : 'Média',
'Tables' : 'Tabulky',
'File manager (elFinder)' : 'Správce souborů (elFinder)',
'elfinder' : 'Správce souborů',
// button names
'Save' : 'Uložit',
'Copy' : 'Kopírovat',
'Cut' : 'Vyjmout',
'Paste' : 'Vložit',
'Paste only text' : 'Vložit pouze text',
'Paste formatted text' : 'Vložit formátovaný text',
'Clean format' : 'Vyčistit',
'Undo last action' : 'Zpět',
'Redo previous action' : 'Znovu',
'Bold' : 'Tučné',
'Italic' : 'Kurzíva',
'Underline' : 'Podtržené',
'Strikethrough' : 'Škrtnuté',
'Superscript' : 'Horní index',
'Subscript' : 'Dolní index',
'Align left' : 'Zarovnat vlevo',
'Ailgn right' : 'Zarovna vpravo',
'Align center' : 'Zarovnat na střed',
'Align full' : 'Do bloku',
'Font color' : 'Barva písma',
'Background color' : 'Barva pozadí',
'Indent' : 'Odsadit',
'Outdent' : 'Předsadit',
'Format' : 'Formát',
'Font size' : 'Velikost',
'Font' : 'Písmo',
'Ordered list' : 'Číslovaný seznam',
'Unordered list' : 'Seznam',
'Horizontal rule' : 'Vodorovná čára',
'Blockquote' : 'Citát',
'Block element (DIV)' : 'DIV element',
'Link' : 'Odkaz',
'Delete link' : 'Odstranit odkaz',
'Bookmark' : 'Záložka',
'Image' : 'Obrázek',
'Table' : 'Tabulka',
'Delete table' : 'Smazat tabulku',
'Insert row before' : 'Vložit řádek nad',
'Insert row after' : 'Vložit řádek pod',
'Delete row' : 'Smazat řádek',
'Insert column before' : 'Vložit sloupec před',
'Insert column after' : 'Vložit sloupec za',
'Delete column' : 'Smazat sloupec',
'Merge table cells' : 'Sloučit buňky',
'Split table cell' : 'Rozdělit buňku',
'Toggle display document structure' : 'Zobrazit strukturu',
'Table cell properties' : 'Vlastnosti buňky',
'Table properties' : 'Vlastnosti tabulky',
'Toggle full screen mode' : 'Fullscreen',
'Open file manager' : 'Otevřít správce souborů',
'Non breakable space' : 'Nedělitelná mezera',
'Stop element floating' : 'Zrušit obtékání elementu',
// dialogs
'Warning' : 'Pozor',
'Properies' : 'Vlastnosti',
'Popup' : 'Pop-up',
'Advanced' : 'Více',
'Events' : 'Události',
'Width' : 'Šířka',
'Height' : 'Výška',
'Left' : 'Vlevo',
'Center' : 'Na střed',
'Right' : 'Vpravo',
'Border' : 'Rámeček',
'Background' : 'Pozadí',
'Css class' : 'CSS třída',
'Css style' : 'CSS styl',
'No' : 'Ne',
'Title' : 'Titulek',
'Script direction' : 'Pravidla scriptu',
'Language' : 'Jazyk',
'Charset' : 'Znaková sada',
'Not set' : 'Nenastaveno',
'Left to right' : 'Zleva doprava',
'Right to left' : 'Zprava doleva',
'In this window' : 'V tomto okně (_self)',
'In new window (_blank)' : 'V novém okně (_blank)',
'In new parent window (_parent)' : 'V novém rodičovském okně (_parent)',
'In top frame (_top)' : 'V hlavním okně (_top)',
'URL' : 'URL',
'Open in' : 'Otevřít v',
// copy
'This operation is disabled in your browser on security reason. Use shortcut instead.' : 'Tato operace je ve vašem prohlížeči vypnutá kvůli bezpečnosti. Použijte klávesovou zkratku.',
// format
'Heading 1' : 'Nadpis 1',
'Heading 2' : 'Nadpis 2',
'Heading 3' : 'Nadpis 3',
'Heading 4' : 'Nadpis 4',
'Heading 5' : 'Nadpis 5',
'Heading 6' : 'Nadpis 6',
'Paragraph' : 'Odstavec',
'Address' : 'Adresa',
'Preformatted' : 'Předformátováno',
// font size
'Small (8pt)' : 'Malé (8 pt)',
'Small (10px)' : 'Malé (10 pt)',
'Small (12pt)' : 'Malé (12 pt)',
'Normal (14pt)' : 'Normální (14 pt)',
'Large (18pt)' : 'Velké (18 pt)',
'Large (24pt)' : 'Velké (24 pt)',
'Large (36pt)' : 'Velké (36 pt)',
// bookmark
'Bookmark name' : 'Jméno záložky',
// link
'Link URL' : 'URL',
'Target' : 'Cíl',
'Open link in popup window' : 'Otevírat odkaz v popup okně.',
'URL' : 'URL',
'Window name' : 'Jméno okna',
'Window size' : 'Velikost okna',
'Window position' : 'Pozice okna',
'Location bar' : 'Adresní řádek',
'Menu bar' : 'Menu nabídek',
'Toolbar' : 'Lišta nástrojů',
'Scrollbars' : 'Posuvníky',
'Status bar' : 'Stavový řádek',
'Resizable' : 'Změna velikosti',
'Depedent' : '',
'Add return false' : 'Přidat return false',
'Target MIME type' : 'Cílový MIME typ',
'Relationship page to target (rel)' : '',
'Relationship target to page (rev)' : '',
'Tab index' : '',
'Access key' : '',
// image
'Size' : 'Velikost',
'Preview' : 'Náhled',
'Margins' : 'Okraje',
'Alt text' : 'Alternativní text',
'Image URL' : 'URL',
// table
'Spacing' : 'Vnější okraje',
'Padding' : 'Vnitřní okraje',
'Rows' : 'Řádky',
'Columns' : 'Sloupce',
'Groups' : 'Skupiny',
'Cells' : 'Buňky',
'Caption' : 'Popisek',
'Inner borders' : 'Vnitřní rámečky'
}
})(jQuery);

View file

@ -0,0 +1,210 @@
/*
* Danish translation
* @author Steen Rabol <steen.rabol@gmail.com>
* @version 2011-01-05
*/
(function($) {
elRTE.prototype.i18Messages.da = {
'_translator' : 'Steen Rabol &lt;steen.rabol@gmail.com&gt;',
'_translation' : 'Dansk oversættelse', // will be seen in about dialog
'Editor' : 'Editor',
'Source' : 'Kilde',
// panels names
'Copy/Pase' : 'Kopier/Sæt ind',
'Undo/Redo' : 'Fortryd / Gentag',
'Text styles' : 'Tekst stile',
'Colors' : 'Farver',
'Alignment' : 'Justering',
'Indent/Outdent' : 'Indrykning / Udrykning',
'Text format' : 'Tekst formatering',
'Lists' : 'Lister',
'Misc elements' : 'Forsekllign elementer',
'Links' : 'Links',
'Images' : 'Billeder',
'Media' : 'Media',
'Tables' : 'Tabeller',
'File manager (elFinder)' : 'Fil håndtering',
// buttons names
'About this software' : 'Om...',
'Save' : 'Gem',
'Copy' : 'Kopier',
'Cut' : 'Klip',
'Paste' : 'Sæt ind',
'Paste only text' : 'Indsæt kun teskst',
'Paste formatted text' : 'Indsæt formateret tekst',
'Clean format' : 'Fjern formatering',
'Undo last action' : 'Fortryd sidste handling',
'Redo previous action' : 'Gentag sidste handling',
'Bold' : 'Fed',
'Italic' : 'Kursiv',
'Underline' : 'Understreg',
'Strikethrough' : 'Gennemstreget',
'Superscript' : 'Hævet skrift',
'Subscript' : 'Sænket skrift',
'Align left' : 'Venstrejusteret',
'Ailgn right' : 'Højrejusteret',
'Align center' : 'Centreret',
'Align full' : 'Lige margner',
'Font color' : 'Tekst farve',
'Background color' : 'Baggrunds farve',
'Indent' : 'Indryk',
'Outdent' : 'Ryk ud',
'Format' : 'Formatering',
'Font size' : 'Skrift størrelse',
'Font' : 'Skrifttype',
'Ordered list' : 'Nummeret liste',
'Unordered list' : 'Punkt liste',
'Horizontal rule' : 'Horisontal linie',
'Blockquote' : 'Citat',
'Block element (DIV)' : 'Lag (DIV)',
'Link' : 'Link',
'Delete link' : 'Slet link',
'Bookmark' : 'Bogmærke',
'Image' : 'Billed',
'Table' : 'Tabel',
'Delete table' : 'Slet tabel',
'Insert row before' : 'Indsæt række før',
'Insert row after' : 'Indsæt række efter',
'Delete row' : 'Slet række',
'Insert column before' : 'Indsæt kolonne før',
'Insert column after' : 'Indsæt kolone efter',
'Delete column' : 'Slet kolone',
'Merge table cells' : 'Flet tabel celler',
'Split table cell' : 'Del tabel celler',
'Toggle display document structure' : 'Skift visning af dokument struktur',
'Table cell properties' : 'Tabel celler egenskaber',
'Table properties' : 'Tabel egenskaber',
'Toggle full screen mode' : 'Skift fuldskærms tilstand',
'Open file manager' : 'Åben filhåndtering',
'Non breakable space' : 'Ikke ombrydelig mellemrum',
'Stop element floating' : 'Forhindre element forskydning',
// dialogs
'Warning' : 'Advarsel',
'Properies' : 'Egenskaber',
'Popup' : 'Popup',
'Advanced' : 'Avanceret',
'Events' : 'Hændelser',
'Width' : 'Bredde',
'Height' : 'Højde',
'Left' : 'Venstre',
'Center' : 'Centreret',
'Right' : 'Højre',
'Border' : 'Ramme',
'Background' : 'Baggrund',
'Css class' : 'Css klasse',
'Css style' : 'Css stil',
'No' : 'Nej',
'Title' : 'Overskrift',
'Script direction' : 'Script retning',
'Language' : 'Sprog',
'Charset' : 'Karaktersæt',
'Not set' : 'Ikke sat',
'Left to right' : 'Venstre mod højre',
'Right to left' : 'Højre mod venstre',
'In this window' : 'I dette vindue',
'In new window (_blank)' : 'I et nyt vindue',
'In new parent window (_parent)' : 'I ydre ramme (_parent)',
'In top frame (_top)' : 'I øverste ramme (_top)',
'URL' : 'URL',
'Open in' : 'Åbn i',
'Open file manger' : 'Åbn fil håndtering',
// copy
'This operation is disabled in your browser on security reason. Use shortcut instead.' : '',
// format
'Heading 1' : 'Overskrift 1',
'Heading 2' : 'Overskrift 2',
'Heading 3' : 'Overskrift 3',
'Heading 4' : 'Overskrift 4',
'Heading 5' : 'Overskrift 5',
'Heading 6' : 'Overskrift 6',
'Paragraph' : 'Paragraf',
'Address' : 'Adresse',
'Preformatted' : 'Pre-formateret',
// font size
'Small (8pt)' : 'Lille (8pt)',
'Small (10px)' : 'Lille (10px)',
'Small (12pt)' : 'Lille (12pt)',
'Normal (14pt)' : 'Normal (14pt)',
'Large (18pt)' : 'Stor (18pt)',
'Large (24pt)' : 'Stor (24pt)',
'Large (36pt)' : 'Stor (36pt)',
// bookmark
'Bookmark name' : 'Bogmærke navn',
// link
'Link URL' : 'Link URL',
'Target' : 'Destination',
'Select bookmark' : 'Vælg bogmærke',
'Open link in popup window' : 'Åbn link i popup vindue',
'Window name' : 'Title',
'Window size' : 'Størrelse',
'Window position' : 'Position',
'Location bar' : 'Adresselinje',
'Menu bar' : 'Menu bar',
'Toolbar' : 'Værktøjslinie',
'Scrollbars' : 'Vis rullepanel',
'Status bar' : 'Status linie',
'Resizable' : 'Skalebar',
'Depedent' : 'Afh\u00E6ngig (Kun Mozilla/Firefox)',
'Add return false' : 'Inds\u00E6t \'return false\'',
'Target MIME type' : 'Destinations-MIME-type',
'Relationship page to target (rel)' : 'Forholds side til desitnation (rel)',
'Relationship target to page (rev)' : 'Forholds desitination til side (rev)',
'Tab index' : 'Tabindeks',
'Access key' : 'Genvejstast',
// image
'Size' : 'Størrelse',
'Preview' : 'Vis',
'Margins' : 'Margin',
'Alt text' : 'Alternativ teks',
'Image URL' : 'Billed URL',
// table
'Spacing' : 'Celle afstand',
'Padding' : 'Indholds afstand',
'Rows' : 'Rækker',
'Columns' : 'Kolonner',
'Groups' : 'Grupper',
'Cells' : 'Celler',
'Caption' : 'Oversrift',
'Inner borders' : 'Kanter',
// table cell
'Table cell type' : 'Tabel celle type',
'Data' : 'Data',
'Header' : 'Hoved',
'Justify' : 'Lige margin',
'Paddings' : 'Afstand',
'Apply to' : 'Gælder for',
'Current cell' : 'Aktuelle celle',
'All cells in row' : 'Alle celler i rækken',
'All cells in column' : 'Alle celler i kolonnen',
'All cells in table' : 'Alle celler i tabellen',
// about
'About elRTE' : 'Om elRTE',
'Version' : 'Version',
'Licence' : 'Licens',
'elRTE is an open-source JavaScript based WYSIWYG HTML-editor.' : '',
'Main goal of the editor - simplify work with text and formating (HTML) on sites, blogs, forums and other online services.' : '',
'You can use it in any commercial or non-commercial projects.' : '',
'Authors' : 'Forfatere',
'Chief developer' : 'Chef udvikler',
'Developer, tech support' : 'Udvikler, teknisk support',
'Developer' : 'Udvikler',
'Interface designer' : 'Interface designer',
'Spanish localization' : 'Spansk oversættelse',
'Czech localization' : 'Tjekkoslovakisk oversættelse',
'Japanese localization' : 'Japansk oversættelse',
'Latvian localization' : 'Lettisk oversættelse',
'German localization' : 'Tysk oversættelse',
'Ukranian localization' : 'Ukrainsk oversættelse',
'Persian (farsi) localization' : 'Persisk (fasi) oversættelse',
'Arabic localization' : 'Arabisk oversættelse',
'RTL support' : 'RTL understøttelse',
'French localization' : 'Fransk oversættelse',
'Dutch localization' : 'Hollandsk oversættelse',
'Hungarian localization' : 'Ungarsk oversættelse',
'Polish localization' : 'Polsk oversættelse',
'Italian localization' : 'Italiensk oversættelse',
'Traditional Chinese localization' : 'Traditoinel kinesisk oversættelse',
'For more information about this software visit the' : 'For mere information, besøg ',
'elRTE website' : 'elRTE\'s hjemmeside'
}
})(jQuery);

View file

@ -0,0 +1,170 @@
/*
* German translation
* @author Daniel Holzmann <d@velopment.at>
* @version 2011-03-31
*/
(function($) {
elRTE.prototype.i18Messages.de = {
'_translator' : 'Daniel Holzmann &lt;d@velopment.at&gt;',
'_translation' : 'German translation',
'Editor' : 'Editor',
'Source' : 'Quellcode',
// Panel Name
'Copy/Pase' : 'Kopieren/Einfügen',
'Undo/Redo' : 'Rückgängig/Wiederherstellen',
'Text styles' : 'Textstile',
'Colors' : 'Farbe',
'Alignment' : 'Ausrichtung',
'Indent/Outdent' : 'Einrücken / Ausrücken',
'Text format' : 'Format',
'Lists' : 'Listen',
'Misc elements' : 'Sonstige Elemente',
'Links' : 'Link',
'Images' : 'Bild',
'Media' : 'Media Datei',
'Tables' : 'Tabelle',
'File manager (elFinder)' : 'Datei-Manager (elFinder)',
// button names
'Save' : 'Speichern',
'Copy' : 'Ausschneiden',
'Cut' : 'Kopieren',
'Paste' : 'Einfügen',
'Paste only text' : 'nur Text einfügen',
'Paste formatted text' : 'formatierten Text einfügen',
'Clean format' : 'Formatierungen entfernen',
'Undo last action' : 'Rückgängig',
'Redo previous action' : 'Wiederherstellen',
'Bold' : 'Fett',
'Italic' : 'Kursiv',
'Underline' : 'Unterstrichen',
'Strikethrough' : 'Durchgestrichen',
'Superscript' : 'Hochgestellt',
'Subscript' : 'Tiefgestellt',
'Align left' : 'Linksbündig',
'Ailgn right' : 'Rechtsbündig',
'Align center' : 'Zentriert',
'Align full' : 'Blocksatz',
'Font color' : 'Textfarbe',
'Background color' : 'Hintergrundfarbe',
'Indent' : 'Einzug erhöhen',
'Outdent' : 'Einzug verringern',
'Format' : 'Format',
'Font size' : 'Größe',
'Font' : 'Schriftart',
'Ordered list' : 'Nummerierte Liste',
'Unordered list' : 'Liste',
'Horizontal rule' : 'Horizontale Linie',
'Blockquote' : 'Zitatblock',
'Block element (DIV)' : 'Block-Element (DIV)',
'Link' : 'Link',
'Delete link' : 'Link entfernen',
'Bookmark' : 'Lesezeichen einfügen/editieren',
'Image' : 'Bild',
'Table' : 'Tabelle',
'Delete table' : 'Tabelle löschen',
'Insert row before' : 'Zeile oberhalb einfügen',
'Insert row after' : 'Zeile unterhalb einfügen',
'Delete row' : 'Zeile entfernen',
'Insert column before' : 'Spalte links davor einfügen',
'Insert column after' : 'Spalte rechts danach einfügen',
'Delete column' : 'Spalte löschen',
'Merge table cells' : 'Zellen verbinden',
'Split table cell' : 'Zelle teilen',
'Toggle display document structure' : 'Blöcke anzeigen',
'Table cell properties' : 'Zellen-Eigenschaften',
'Table properties' : 'Tabellen-Eigenschaften',
'Toggle full screen mode' : 'Editor maximieren',
'Open file manager' : 'Dateimanager öffnen',
'Non breakable space' : 'Geschütztes Leerzeichen',
'Stop element floating' : 'Floating deaktivieren',
// dialogs
'Warning' : 'ACHTUNG',
'Properies' : 'Einstellungen',
'Popup' : 'Pop-up',
'Advanced' : 'erweitert',
'Events' : 'Veranstaltungen',
'Width' : 'Breite',
'Height' : 'Höhe',
'Left' : 'Links',
'Center' : 'Mitte',
'Right' : 'Rechts',
'Border' : 'Rahmen',
'Background' : 'Hintergrundfarbe',
'Css class' : 'CSS Klasse',
'Css style' : 'CSS Stil',
'No' : 'Nein',
'Title' : 'Titel',
'Script direction' : 'Schreibrichtung',
'Language' : 'Sprache',
'Charset' : 'Zeichensatz',
'Not set' : 'nicht definiert',
'Left to right' : 'Links nach Rechts',
'Right to left' : 'Rechts nach Links',
'In this window' : 'Gleiches Fenster (_self)',
'In new window (_blank)' : 'Neues Fenster (_blank)',
'In new parent window (_parent)' : 'Oberes Fenster (_parent)',
'In top frame (_top)' : 'Oberstes Fenster (_top)',
'URL' : 'URL',
'Open in' : 'öffnen in',
// copy
'This operation is disabled in your browser on security reason. Use shortcut instead.' : 'Dieser Vorgang ist in Ihrem Browser aus Sicherheitsgründen deaktiviert. Benutzen Sie stattessen die Tastenkombination.',
// format
'Heading 1' : 'Überschrift 1',
'Heading 2' : 'Überschrift 2',
'Heading 3' : 'Überschrift 3',
'Heading 4' : 'Überschrift 4',
'Heading 5' : 'Überschrift 5',
'Heading 6' : 'Überschrift 6',
'Paragraph' : 'Absatz',
'Address' : 'Addresse',
'Preformatted' : 'vorformattierter Text',
// font size
'Small (8pt)' : 'Klein (8pt)',
'Small (10px)' : 'Klein (10px)',
'Small (12pt)' : 'Klein (12pt)',
'Normal (14pt)' : 'Normal (14pt)',
'Large (18pt)' : 'Groß (18pt)',
'Large (24pt)' : 'Groß (24pt)',
'Large (36pt)' : 'Groß (36pt)',
// bookmark
'Bookmark name' : 'Lesezeichen-Name',
// link
'Link URL' : 'Link URL',
'Target' : 'Zielfenster',
'Open link in popup window' : 'Link in einem Popup-Fenster öffnen',
'URL' : 'URL',
'Window name' : 'Fenster-Name',
'Window size' : 'Fenstergröße',
'Window position' : 'Fensterposition',
'Location bar' : 'Adressleiste',
'Menu bar' : 'Menüleiste',
'Toolbar' : 'Werkzeugleiste',
'Scrollbars' : 'Scrollbalken',
'Status bar' : 'Statusleiste',
'Resizable' : 'Vergrößerbar',
'Depedent' : 'Abhängig (Netscape)',
'Add return false' : 'return false hinzufügen',
'Target MIME type' : 'MIME-Type',
'Relationship page to target (rel)' : 'Verhältnis Seite zum Ziel (rel)',
'Relationship target to page (rev)' : 'Verhältnis Ziel zur Seite (rev)',
'Tab index' : 'Tab Index',
'Access key' : 'Zugriffstaste',
// image
'Size' : 'Größe',
'Preview' : 'Vorschau',
'Margins' : 'Außenabstände',
'Alt text' : 'Alt-Text',
'Image URL' : 'Bild-URL',
// table
'Spacing' : 'Abstand (spacing)',
'Padding' : 'Abstand (padding)',
'Rows' : 'Zeilen',
'Columns' : 'Spalten',
'Groups' : 'Gruppen',
'Cells' : 'Zellen',
'Caption' : 'Überschrift',
'Inner borders' : 'Innere Ränder'
}
})(jQuery);

View file

@ -0,0 +1,11 @@
/*
* This is dummy file and does nothing.
*
* You do not need to include it for English localization.
*
* Translators!
* If you want to make new localization use 'elrte.YOUR_LANG.js' file
* in this directory as template.
* Please submit your localization by creating new issue:
* http://elrte.org/redmine/projects/elrte/issues/new
*/

View file

@ -0,0 +1,169 @@
/**
* Spanish translation
* @author Ricardo Obregón <robregonm@gmail.com>
* @version 2010-09-18
*/
(function($) {
elRTE.prototype.i18Messages.es = {
'_translator' : 'Ricardo Obregón &lt;robregonm@gmail.com&gt;',
'_translation' : 'Spanish translation',
'Editor' : 'Editor',
'Source' : 'Código Fuente',
// Panel Name
'Copy/Pase' : 'Copiar/Pegar',
'Undo/Redo' : 'Deshacer/Rehacer',
'Text styles' : 'Estilos de Texto',
'Colors' : 'Colores',
'Alignment' : 'Alineación',
'Indent/Outdent' : 'Aumentar/Disminuir Sangría',
'Text format' : 'Formato de texto',
'Lists' : 'Listas',
'Misc elements' : 'Elementos varios',
'Links' : 'Vínculos',
'Images' : 'Imágenes',
'Media' : 'Multimedia',
'Tables' : 'Tablas',
'File manager (elFinder)' : 'Administrador de archivos',
// button names
'Save' : 'Guardar',
'Copy' : 'Copiar',
'Cut' : 'Cortar',
'Paste' : 'Pegar',
'Paste only text' : 'Pegar solo texto',
'Paste formatted text' : 'Pegar texto formateado',
'Clean format' : 'Limpiar formato',
'Undo last action' : 'Deshacer la última acción',
'Redo previous action' : 'Rehacer la última acción',
'Bold' : 'Negrita',
'Italic' : 'Cursiva',
'Underline' : 'Subrayado',
'Strikethrough' : 'Tachado',
'Superscript' : 'Superíndice',
'Subscript' : 'Subíndice',
'Align left' : 'Alinear a la izquierda',
'Ailgn right' : 'Alinear a la derecha',
'Align center' : 'Centrar',
'Align full' : 'Justificado',
'Font color' : 'Color de texto',
'Background color' : 'Color de fondo',
'Indent' : 'Aumentar sangría',
'Outdent' : 'Reducir sangría',
'Format' : 'Formato',
'Font size' : 'Tamaño de letra',
'Font' : 'Fuente',
'Ordered list' : 'Lista ordenada',
'Unordered list' : 'Lista desordenada',
'Horizontal rule' : 'Línea horizontal',
'Blockquote' : 'Cita',
'Block element (DIV)' : 'Bloque de Elementos (DIV)',
'Link' : 'Vínculo',
'Delete link' : 'Eliminar vínculo',
'Bookmark' : 'Marcador',
'Image' : 'Imagen',
'Table' : 'Tabla',
'Delete table' : 'Eliminar tabla',
'Insert row before' : 'Insertar fila antes',
'Insert row after' : 'Insertar fila después',
'Delete row' : 'Eliminar fila',
'Insert column before' : 'Insertar columna antes',
'Insert column after' : 'Insertar columna después',
'Delete column' : 'Eliminar columna',
'Merge table cells' : 'Fundir celdas',
'Split table cell' : 'Dividir celda',
'Toggle display document structure' : 'Pantalla de estructura de documento',
'Table cell properties' : 'Propiedades de celda',
'Table properties' : 'Propiedades de tabla',
'Toggle full screen mode' : 'Modo de pantalla completa',
'Open file manager' : 'Abrir administrador de archivos',
'Non breakable space' : 'Espacio indivisible',
'Stop element floating' : 'Detener elemento flotante',
// dialogs
'Warning' : 'Advertencia',
'Properies' : 'Propiedades',
'Popup' : 'Ventana emergente',
'Advanced' : 'Avanzado',
'Events' : 'Eventos',
'Width' : 'Ancho',
'Height' : 'Alto',
'Left' : 'Izquierda',
'Center' : 'Centrado',
'Right' : 'Derecha',
'Border' : 'Borde',
'Background' : 'Fondo',
'Css class' : 'Clase CSS',
'Css style' : 'Estilo CSS',
'No' : 'No',
'Title' : 'Título',
'Script direction' : 'Dirección del script',
'Language' : 'Idioma',
'Charset' : 'Charset',
'Not set' : 'No establecido',
'Left to right' : 'Izquierda a derecha',
'Right to left' : 'Derecha a izquierda',
'In this window' : 'En esta ventana (_self)',
'In new window (_blank)' : 'En nueva ventana (_blank)',
'In new parent window (_parent)' : 'En nueva ventana padre (_parent)',
'In top frame (_top)' : 'En marco superior (_top)',
'URL' : 'URL',
'Open in' : 'Abrir en',
// copy
'This operation is disabled in your browser on security reason. Use shortcut instead.' : 'Esta operación está desactivada en su navegador por razones de seguridad. Utilice en su lugar un comando de teclado.',
// format
'Heading 1' : 'Encabezado 1',
'Heading 2' : 'Encabezado 2',
'Heading 3' : 'Encabezado 3',
'Heading 4' : 'Encabezado 4',
'Heading 5' : 'Encabezado 5',
'Heading 6' : 'Encabezado 6',
'Paragraph' : 'Párrafo',
'Address' : 'Dirección',
'Preformatted' : 'Preformateado',
// font size
'Small (8pt)' : 'Pequeño (8pt)',
'Small (10px)' : 'Pequeño (10px)',
'Small (12pt)' : 'Pequeño (12pt)',
'Normal (14pt)' : 'Normal (14pt)',
'Large (18pt)' : 'Grande (18pt)',
'Large (24pt)' : 'Grande (24pt)',
'Large (36pt)' : 'Grande (36pt)',
// bookmark
'Bookmark name' : 'Nombre del marcador',
// link
'Link URL' : 'URL del vínculo',
'Target' : 'Objetivo',
'Open link in popup window' : 'Abrir vínculo en ventana emergente',
'Window name' : 'Nombre de la ventana',
'Window size' : 'Tamaño de la ventana',
'Window position' : 'Posición de la ventana',
'Location bar' : 'Barra de dirección',
'Menu bar' : 'Barra de Menú',
'Toolbar' : 'Barra de herramientas',
'Scrollbars' : 'Barras de desplazamiento',
'Status bar' : 'Barra de estado',
'Resizable' : 'Redimensionable',
'Depedent' : 'Dependiente (Netscape)',
'Add return false' : 'Agregar (return false)',
'Target MIME type' : 'Objetivo de Tipo MIME',
'Relationship page to target (rel)' : '',
'Relationship target to page (rev)' : '',
'Tab index' : '',
'Access key' : 'Tecla de acceso',
// image
'Size' : 'Tamaño',
'Preview' : 'Previsualización',
'Margins' : 'Márgenes',
'Alt text' : 'Texto alternativo',
'Image URL' : 'URL de la imagen',
// table
'Spacing' : 'Espaciado (Spacing)',
'Padding' : 'Relleno (Padding)',
'Rows' : 'Filas',
'Columns' : 'Columnas',
'Groups' : 'Grupos',
'Cells' : 'Celdas',
'Caption' : 'Leyenda',
'Inner borders' : 'Bordes internos'
}
})(jQuery);

View file

@ -0,0 +1,170 @@
/**
* Persian (farsi) translation
* @author Saleh soozanchi <info@soozanchi.ir>
* @version 2010-09-18
*/
(function($) {
elRTE.prototype.i18Messages.fa = {
'_translator' : 'Saleh soozanchi &lt;info@soozanchi.ir&gt;',
'_translation' : 'Persian (farsi) translation',
'Editor' : 'ویراستار',
'Source' : 'کد منبع',
// Panel Name
'Copy/Pase' : 'کپی در حافظه موفت/بازگردانی از حافظه',
'Undo/Redo' : 'انجام عمل بعد/برگشت به عمل قبل',
'Text styles' : 'استایل متن',
'Colors' : 'رنگها',
'Alignment' : 'صفحه بندی',
'Indent/Outdent' : 'تو رفتگی/ برون رفتگی',
'Text format' : 'قالب متون',
'Lists' : 'لیست ها',
'Misc elements' : 'عناصر متفرقه',
'Links' : 'پیوندها',
'Images' : 'تصاویر',
'Media' : 'مولتی مدیا',
'Tables' : 'جدول ها',
'File manager (elFinder)' : '(elFinder)مدیریت فایل',
// button names
'Save' : 'ذخیره کردن',
'Copy' : 'کپی کردن',
'Cut' : 'برش دادن',
'Paste' : 'بازگردانی',
'Paste only text' : 'بازگرادنی فقط متنها',
'Paste formatted text' : 'بازگردانی متن های دارای قالب',
'Clean format' : 'حذف قالب ها',
'Undo last action' : 'بازگشتن به آخرین حرکت',
'Redo previous action' : 'تکرار حرکت قبلی',
'Bold' : 'درشت',
'Italic' : 'خوابیده',
'Underline' : 'خط زیر متن',
'Strikethrough' : 'خط روی متن',
'Superscript' : 'بالانویس',
'Subscript' : 'زیرنویس',
'Align left' : 'چپ چین',
'Ailgn right' : 'راست چین',
'Align center' : 'وسط چین',
'Align full' : 'به صورت کشده و کامل',
'Font color' : 'رنگ قلم ها',
'Background color' : 'رنگ ضمینه',
'Indent' : 'تورفتگی',
'Outdent' : 'بیرون رفتگی',
'Format' : 'قالب',
'Font size' : 'اندازه قلم',
'Font' : 'قلم',
'Ordered list' : 'مرتب سازی لیست',
'Unordered list' : 'به هم ریختن لیست',
'Horizontal rule' : 'خط افقی',
'Blockquote' : 'نقل قول',
'Block element (DIV)' : 'عنر نگه دارنده (DIV)',
'Link' : 'پیوند',
'Delete link' : 'حذف لینک',
'Bookmark' : 'نشانه گزاری',
'Image' : 'تصویر',
'Table' : 'جدول',
'Delete table' : 'حذف جدول',
'Insert row before' : 'درج سطر قبل از این',
'Insert row after' : 'درج سطر بعد از این',
'Delete row' : 'حذف سطر',
'Insert column before' : 'درج ستون قبل از',
'Insert column after' : 'درج ستون بعد از',
'Delete column' : 'حذف ستون',
'Merge table cells' : 'ادغام کردن خانه های جدول',
'Split table cell' : 'تقسیم و مجزا کردن خانه های جدول',
'Toggle display document structure' : 'زنجیر شده به ساختار سند در حال نمایش',
'Table cell properties' : 'تنظیمات خونه جدول',
'Table properties' : 'تنظیمات جدول',
'Toggle full screen mode' : 'نمایش و پوشانیدن کل نمایشگر',
'Open file manager' : 'بازکردن مدیریت فایل',
'Non breakable space' : 'فضای غیر قابل شکستن',
'Stop element floating' : 'متوقف ساخت عنر شناور',
// dialogs
'Warning' : 'اخطار',
'Properies' : 'خصوصیات',
'Popup' : 'پنجر بازشو',
'Advanced' : 'پیشرفته',
'Events' : 'رویداد',
'Width' : 'طول',
'Height' : 'عرض',
'Left' : 'چپ',
'Center' : 'وسط',
'Right' : 'راست',
'Border' : 'کادر حایه',
'Background' : 'پشت صحنه/ضمینه',
'Css class' : 'کلاس سی اس اس',
'Css style' : 'استایل سی اس اس',
'No' : 'خیر',
'Title' : 'عنوان',
'Script direction' : 'اسکریپت هم سو',
'Language' : 'ربان',
'Charset' : 'کدپیج زیان',
'Not set' : 'اعمال نشد',
'Left to right' : 'چپ به راست',
'Right to left' : 'راست به چپ',
'In this window' : '(_self) نمایش در همین پنجره',
'In new window (_blank)' : '(_blank) نمایش در پنجره جدید ',
'In new parent window (_parent)' : '(_parent) نمایش در پنجره اصلی',
'In top frame (_top)' : '(_top) نمایش در بالای قاب',
'URL' : '',
'Open in' : 'باز کردن در',
// copy
'This operation is disabled in your browser on security reason. Use shortcut instead.' : 'این عملیات به دلایل امنیتی در مرورگر وب شما مسدود شده ، لطفا از میانبر ها استفاده کنید.',
// format
'Heading 1' : 'سر فصل 1',
'Heading 2' : 'سر فصل 2',
'Heading 3' : 'سر فصل 3',
'Heading 4' : 'سر فصل 4',
'Heading 5' : 'سر فصل 5',
'Heading 6' : 'سر فصل 6',
'Paragraph' : 'پراگراف',
'Address' : 'آدرس',
'Preformatted' : 'قالب بندی شده',
// font size
'Small (8pt)' : '',
'Small (10px)' : '',
'Small (12pt)' : '',
'Normal (14pt)' : '',
'Large (18pt)' : '',
'Large (24pt)' : '',
'Large (36pt)' : '',
// bookmark
'Bookmark name' : 'نام نشانه',
// link
'Link URL' : '(URL) پیوند',
'Target' : 'مقصد',
'Open link in popup window' : 'باز کردن پیوند در یک پنجره بازشو',
'URL' : '',
'Window name' : 'نام پنجره',
'Window size' : 'سایز پنجره',
'Window position' : 'موقعیت پنجره',
'Location bar' : 'محل نگه دارنده',
'Menu bar' : 'نگه دارنده منو',
'Toolbar' : 'جعبه ابزار',
'Scrollbars' : 'محل اسکرول',
'Status bar' : 'محل وضعیت',
'Resizable' : 'تغییر ساز پذیر بودن',
'Depedent' : 'محتاج',
'Add return false' : '(return false) افزودن',
'Target MIME type' : 'MIME type',
'Relationship page to target (rel)' : '',
'Relationship target to page (rev)' : '',
'Tab index' : '',
'Access key' : 'کیلید دسترسی',
// image
'Size' : 'سایز',
'Preview' : 'پیش نمایش',
'Margins' : 'حاشیه ها',
'Alt text' : 'Alt',
'Image URL' : 'URL',
// table
'Spacing' : '(spacing)فاصه های میانی',
'Padding' : '(padding) حاشیه ها درونی',
'Rows' : 'سطرها',
'Columns' : 'ستون ها',
'Groups' : 'گروه هاس',
'Cells' : 'خانه هاس',
'Caption' : 'عنوان',
'Inner borders' : 'کادر درونی'
}
})(jQuery);

View file

@ -0,0 +1,169 @@
/**
* French translation
* @author Francois Mazerolle <fmaz008@gmail.com>
* @version 2010-09-18
*/
(function($) {
elRTE.prototype.i18Messages.fr = {
'_translator' : 'Francois Mazerolle &lt;fmaz008@gmail.com&gt;',
'_translation' : 'French translation',
'Editor' : 'Editeur',
'Source' : 'Code Source',
// Panel Name
'Copy/Pase' : 'Copier/Coller',
'Undo/Redo' : 'Annuler/Répéter',
'Text styles' : 'Styles de texte',
'Colors' : 'Couleurs',
'Alignment' : 'Alignement',
'Indent/Outdent' : 'Augmenter/Diminuer l\'incrément',
'Text format' : 'Format de texte',
'Lists' : 'Listes',
'Misc elements' : 'Éléments divers',
'Links' : 'Liens',
'Images' : 'Images',
'Media' : 'Multimédia',
'Tables' : 'Tableaux',
'File manager (elFinder)' : 'Gestionnaire de fichiers',
// button names
'Save' : 'Enregistrer',
'Copy' : 'Copier',
'Cut' : 'Couper',
'Paste' : 'Coller',
'Paste only text' : 'Coller seulement le texte',
'Paste formatted text' : 'Coller le texte formaté',
'Clean format' : 'Effacer le formatage',
'Undo last action' : 'Annuler la dernière action',
'Redo previous action' : 'Répéter la dernière action',
'Bold' : 'Gras',
'Italic' : 'Italique',
'Underline' : 'Souligner',
'Strikethrough' : 'Barré',
'Superscript' : 'Exposant',
'Subscript' : 'Indice',
'Align left' : 'Aligner à gauche',
'Ailgn right' : 'Aligner à droite',
'Align center' : 'Centrer',
'Align full' : 'Justifier',
'Font color' : 'Couleur de texte',
'Background color' : 'Couleur d\'arrière plan',
'Indent' : 'Aumenter la marge',
'Outdent' : 'Réduire la marge',
'Format' : 'Formater',
'Font size' : 'Taille de police',
'Font' : 'Police',
'Ordered list' : 'Liste ordonnée',
'Unordered list' : 'Liste désordonnée',
'Horizontal rule' : 'Ligne horizontale',
'Blockquote' : 'Citation',
'Block element (DIV)' : 'Bloc élément (DIV)',
'Link' : 'Lien',
'Delete link' : 'Supprimer le lien',
'Bookmark' : 'Marque page',
'Image' : 'Image',
'Table' : 'Tableau',
'Delete table' : 'Supprimer tableau',
'Insert row before' : 'Insérer une ligne avant',
'Insert row after' : 'Insérer une ligne après',
'Delete row' : 'Supprimer une ligne',
'Insert column before' : 'Insérer une colone avant',
'Insert column after' : 'Insérer une colone après',
'Delete column' : 'Supprimer une colone',
'Merge table cells' : 'Fusionner les cellules',
'Split table cell' : 'Diviser la cellule',
'Toggle display document structure' : 'Alterner la vue du document',
'Table cell properties' : 'Propriété de la cellule',
'Table properties' : 'Propriété du tableau',
'Toggle full screen mode' : 'Alterner la vue plein écran',
'Open file manager' : 'Ouvrir le gestionnaire de fichiers',
'Non breakable space' : 'Espace insécable',
'Stop element floating' : 'Interrompre le flottement de l\'élément',
// dialogs
'Warning' : 'Attention',
'Properies' : 'Propriété',
'Popup' : 'Nouvelle fenêtre',
'Advanced' : 'Avancé',
'Events' : 'Évènements',
'Width' : 'Largeur',
'Height' : 'Hauteur',
'Left' : 'Gauche',
'Center' : 'Centre',
'Right' : 'Droite',
'Border' : 'Bordure',
'Background' : 'Arrière plan',
'Css class' : 'Classe CSS',
'Css style' : 'Style CSS',
'No' : 'Non',
'Title' : 'Titre',
'Script direction' : 'Direction de script',
'Language' : 'Langue',
'Charset' : 'Jeu de caractères',
'Not set' : 'No set',
'Left to right' : 'Gauche à droite',
'Right to left' : 'Droite à gauche',
'In this window' : 'Dans cette fenêtre (_self)',
'In new window (_blank)' : 'Dans une nouvelle fenêtre (_blank)',
'In new parent window (_parent)' : 'Dans une nouvelle fenêtre parente (_parent)',
'In top frame (_top)' : 'Dans le cadre maitre (_top)',
'URL' : 'URL',
'Open in' : 'Ouvrir dans',
// copy
'This operation is disabled in your browser on security reason. Use shortcut instead.' : 'Cette opération est désactivée dans votre navigateur pour des raisons de sécurité. Utilisez le raccourci.',
// format
'Heading 1' : 'Entête 1',
'Heading 2' : 'Entête 2',
'Heading 3' : 'Entête 3',
'Heading 4' : 'Entête 4',
'Heading 5' : 'Entête 5',
'Heading 6' : 'Entête 6',
'Paragraph' : 'Paragraphe',
'Address' : 'Adresse',
'Preformatted' : 'Préformaté',
// font size
'Small (8pt)' : 'Petite (8pt)',
'Small (10px)' : 'Petite (10px)',
'Small (12pt)' : 'Petite (12pt)',
'Normal (14pt)' : 'Normale (14pt)',
'Large (18pt)' : 'Grande (18pt)',
'Large (24pt)' : 'Grande (24pt)',
'Large (36pt)' : 'Grande (36pt)',
// bookmark
'Bookmark name' : 'Nom du favori',
// link
'Link URL' : 'Adresse du lien',
'Target' : 'Cible',
'Open link in popup window' : 'Ouvrir dans une nouvelle fenêtre',
'Window name' : 'Nom de la fenêtre',
'Window size' : 'Taille de la fenêtre',
'Window position' : 'Position de la fenêtre',
'Location bar' : 'Barre d\'adresse',
'Menu bar' : 'Barre de menu',
'Toolbar' : 'Barre d\'outils',
'Scrollbars' : 'Barres de défillement',
'Status bar' : 'Barre d\'état',
'Resizable' : 'Redimensionable',
'Depedent' : 'Dépendent (Netscape)',
'Add return false' : 'Ajouter un retour négatif (return false)',
'Target MIME type' : 'Type MIME cible',
'Relationship page to target (rel)' : '',
'Relationship target to page (rev)' : '',
'Tab index' : 'Index de tabulation',
'Access key' : 'Tecla de acceso',
// image
'Size' : 'Taille',
'Preview' : 'Prévisualisation',
'Margins' : 'Marges',
'Alt text' : 'Texte ALT',
'Image URL' : 'URL de l\'image',
// table
'Spacing' : 'Espace (Spacing)',
'Padding' : 'Marge intérieure (Padding)',
'Rows' : 'Lignes',
'Columns' : 'Colones',
'Groups' : 'Groupes',
'Cells' : 'Cellules',
'Caption' : 'Étiquette',
'Inner borders' : 'Bordures intérieures'
}
})(jQuery);

View file

@ -0,0 +1,210 @@
/*
* Croatian translation
* @author Guerilla Team <info@guerilla.com.hr>
* @version 2010-12-28
*/
(function($) {
elRTE.prototype.i18Messages.hr = {
'_translator' : 'Guerilla Team &lt;info@guerilla.com.hr&gt;',
'_translation' : 'Croatian translation',
'Editor' : 'Urednik',
'Source' : 'Izvor',
// panels names
'Copy/Pase' : 'Kopiraj/Zalijepi',
'Undo/Redo' : 'Poništi/Ponovi',
'Text styles' : 'Stilovi teksta',
'Colors' : 'Boje',
'Alignment' : 'Poravnjavanje',
'Indent/Outdent' : 'Uvući/Izvući',
'Text format' : 'Formatiranje teksta',
'Lists' : 'Liste',
'Misc elements' : 'Ostali elementi',
'Links' : 'Veze',
'Images' : 'Slike',
'Media' : 'Mediji',
'Tables' : 'Tablice',
'File manager (elFinder)' : 'Upravitelj datoteka (elFinder)',
// buttons names
'About this software' : 'O ovom softveru',
'Save' : 'Spremi',
'Copy' : 'Kopiraj',
'Cut' : 'Izreži',
'Paste' : 'Zalijepi',
'Paste only text' : 'Zalijepi samo tekst',
'Paste formatted text' : 'Zalijepi formatirani tekst',
'Clean format' : 'Čisti oblik',
'Undo last action' : 'Poništi zadnju radnju',
'Redo previous action' : 'Ponovi prethodnu radnju',
'Bold' : 'Podebljano',
'Italic' : 'Kurziv',
'Underline' : 'Podcrtano',
'Strikethrough' : 'Precrtano',
'Superscript' : 'Natpis',
'Subscript' : 'Potpis',
'Align left' : 'Poravnaj lijevo',
'Ailgn right' : 'Poravnaj desno',
'Align center' : 'Poravnaj u sredinu',
'Align full' : 'Poravnaj potpuno',
'Font color' : 'Boja fonta',
'Background color' : 'Boja podloge',
'Indent' : 'Uvući',
'Outdent' : 'Izvući',
'Format' : 'Format',
'Font size' : 'Veličina fonta',
'Font' : 'Font',
'Ordered list' : 'Pobrojana lsita',
'Unordered list' : 'Nepobrojana lista',
'Horizontal rule' : 'Horizontalna linija',
'Blockquote' : 'Blok citat',
'Block element (DIV)' : 'Blok element (DIV)',
'Link' : 'Veza',
'Delete link' : 'Brisanje veze',
'Bookmark' : 'Zabilješka',
'Image' : 'Slika',
'Table' : 'Tablica',
'Delete table' : 'Brisanje tablice',
'Insert row before' : 'Umetni redak prije',
'Insert row after' : 'Umetni redak poslije',
'Delete row' : 'Obriši redak',
'Insert column before' : 'Umetni stupac prije',
'Insert column after' : 'Umetni stupac poslije',
'Delete column' : 'Obriši stupac',
'Merge table cells' : 'Spoji ćelije tablice',
'Split table cell' : 'Razdvoji ćeliju tablice',
'Toggle display document structure' : 'Uključi / isključi prikaz strukture dokumenta',
'Table cell properties' : 'Svojstva ćelije tablice',
'Table properties' : 'Svojstva tablice',
'Toggle full screen mode' : 'Uključi / isključi cijeli zaslon',
'Open file manager' : 'Otvori upravitelj datoteka',
'Non breakable space' : 'Nelomljiv prostor',
'Stop element floating' : 'Zaustavi plutajući element',
// dialogs
'Warning' : 'Upozorenje',
'Properies' : 'Svojstva',
'Popup' : 'Skočni prozor',
'Advanced' : 'Napredno',
'Events' : 'Događaji',
'Width' : 'Širina',
'Height' : 'Visina',
'Left' : 'Lijevo',
'Center' : 'Sredina',
'Right' : 'Desno',
'Border' : 'Okvir',
'Background' : 'Podloga',
'Css class' : 'Css razred',
'Css style' : 'Css stil',
'No' : 'Ne',
'Title' : 'Naslov',
'Script direction' : 'Smjer skripte',
'Language' : 'Jezik',
'Charset' : 'Skup znakova',
'Not set' : 'Nije postavljen',
'Left to right' : 'S lijeva na desno',
'Right to left' : 'S desna na lijevo',
'In this window' : 'U ovom prozoru',
'In new window (_blank)' : 'U novom prozoru (_blank)',
'In new parent window (_parent)' : 'U novom prozoru (_parent)',
'In top frame (_top)' : 'U gornjem okviru (_top)',
'URL' : 'URL',
'Open in' : 'Otvori u',
'Open file manger' : 'Otvori upravitelj datoteka',
// copy
'This operation is disabled in your browser on security reason. Use shortcut instead.' : 'Ova operacija je onemogućena u vašem pregledniku zbog sigurnosnih razloga. Koristite prečac kao zamjenu.',
// format
'Heading 1' : 'Naslov 1',
'Heading 2' : 'Naslov 2',
'Heading 3' : 'Naslov 3',
'Heading 4' : 'Naslov 4',
'Heading 5' : 'Naslov 5',
'Heading 6' : 'Naslov 6',
'Paragraph' : 'Pasus',
'Address' : 'Adresa',
'Preformatted' : 'Formatiran',
// font size
'Small (8pt)' : 'Mali (8pt)',
'Small (10px)' : 'Mali (10pt)',
'Small (12pt)' : 'Mali (12pt)',
'Normal (14pt)' : 'Normalan (14pt)',
'Large (18pt)' : 'Veliku (18pt)',
'Large (24pt)' : 'Veliki (24pt)',
'Large (36pt)' : 'Veliki (36pt)',
// bookmark
'Bookmark name' : 'Naziv zabilješke',
// link
'Link URL' : 'Veza URL-a',
'Target' : 'Meta',
'Select bookmark' : 'Odaberi zabilješku',
'Open link in popup window' : 'Otvori vezu u skočnom prozoru',
'Window name' : 'Naziv prozora',
'Window size' : 'Veličina prozora',
'Window position' : 'Pozicija prozora',
'Location bar' : 'Traka za lokaciju',
'Menu bar' : 'Izborna traka',
'Toolbar' : 'Traka s alatima',
'Scrollbars' : 'Scroll traka',
'Status bar' : 'Statusna traka',
'Resizable' : 'Promjenjiva veličina',
'Depedent' : 'Zavisan',
'Add return false' : 'Dodaj "return false"',
'Target MIME type' : 'Ciljaj MIME tip',
'Relationship page to target (rel)' : 'Povezanost stranice s ciljem (rel)',
'Relationship target to page (rev)' : 'Povezanost cilja sa stranicom (rev)',
'Tab index' : 'Početni tab',
'Access key' : 'Pristupni ključ',
// image
'Size' : 'Veličina',
'Preview' : 'Pregledaj',
'Margins' : 'Margine',
'Alt text' : 'Alternativni tekst',
'Image URL' : 'URL slike',
// table
'Spacing' : 'Razmak',
'Padding' : 'Ispunjavanje',
'Rows' : 'Redovi',
'Columns' : 'Stupci',
'Groups' : 'Skupine',
'Cells' : 'Ćelije',
'Caption' : 'Naslov',
'Inner borders' : 'Unutrašnji okviri',
// table cell
'Table cell type' : 'Vrsta ćelije tablice',
'Data' : 'Podatak',
'Header' : 'Zaglavlje',
'Justify' : 'Obostrani poravnati',
'Paddings' : 'Ispunjavanja',
'Apply to' : 'Primjeni na',
'Current cell' : 'Trenutna ćelija',
'All cells in row' : 'Sve ćelije u retku',
'All cells in column' : 'Sve ćelije u stupcu',
'All cells in table' : 'Sve ćelije u tablici',
// about
'About elRTE' : 'O elRTE',
'Version' : 'Inačica',
'Licence' : 'Licenca',
'elRTE is an open-source JavaScript based WYSIWYG HTML-editor.' : 'elRTE je open-source JavaScript temeljen WYSIWYG HTML-urednik.',
'Main goal of the editor - simplify work with text and formating (HTML) on sites, blogs, forums and other online services.' : 'Glavni cilj urednika - pojednostavniti rad s tekstom i formatiranje (HTML) na web stranicama, blogovima, forumima i drugim online servisima.',
'You can use it in any commercial or non-commercial projects.' : 'Možete ga koristiti u bilo koje komercijalne ili nekomercijalne projekte.',
'Authors' : 'Autori',
'Chief developer' : 'Glavni graditelj',
'Developer, tech support' : 'Graditelj, tehnička podrška',
'Developer' : 'Graditelj',
'Interface designer' : 'Dizajner sučelja',
'Spanish localization' : 'Španjolska lokalizacija',
'Czech localization' : 'Češka lokalizacija',
'Japanese localization' : 'Japanska lokalizacija',
'Latvian localization' : 'Letonska lokalizacija',
'German localization' : 'Njemačka lokalizacija',
'Ukranian localization' : 'Ukrajinska lokalizacija',
'Persian (farsi) localization' : 'Perzijska (farsi) lokalizacija',
'Arabic localization' : 'Arapska lokalizacija',
'RTL support' : 'RTL podrška',
'French localization' : 'Francuska lokalizacija',
'Dutch localization' : 'Nizizemska lokalizacija',
'Hungarian localization' : 'Mađarska lokalizacija',
'Polish localization' : 'Poljska lokalizacija',
'Italian localization' : 'Talijanska lokalizacija',
'Traditional Chinese localization' : 'Tradicionalna kineska lokalizacija',
'For more information about this software visit the' : 'Za više informacija o ovom softveru posjetite',
'elRTE website' : 'elRTE web stranica'
}
})(jQuery);

View file

@ -0,0 +1,203 @@
/**
* Hungarian translation
* @author Viktor Tamas <tamas.viktor@totalstudio.hu>
* @version 2010-09-18
*/
(function($) {
elRTE.prototype.i18Messages.hu = {
'_translator' : 'Viktor Tamas &lt;tamas.viktor@totalstudio.hu&gt;',
'_translation' : 'Hungarian translation',
'Editor' : 'Szerkesztő',
'Source' : 'Forrás',
// названия панелей
'Copy/Pase' : 'Másolás/Beillesztés',
'Undo/Redo' : 'Visszavonás/Ismét',
'Text styles' : 'Szöveg stílus',
'Colors' : 'Színek',
'Alignment' : 'Elrendezés',
'Indent/Outdent' : 'Отступы',
'Text format' : 'Szöveg forma',
'Lists' : 'Listák',
'Misc elements' : 'Egyéb elemek',
'Links' : 'Linkek',
'Images' : 'Képek',
'Media' : 'Média',
'Tables' : 'Táblázatok',
'File manager (elFinder)' : 'Fájl kezelő (elFinder)',
// названия кнопок
'About this software' : 'A szoftverről',
'Save' : 'Mentés',
'Copy' : 'Másolás',
'Cut' : 'Kivágás',
'Paste' : 'Beillesztés',
'Paste only text' : 'Beillesztés csak szövegként',
'Paste formatted text' : 'Beillesztés formázott szövegként',
'Clean format' : 'Formázás törlése',
'Undo last action' : 'Utolsó művelet visszavonása',
'Redo previous action' : 'Előző művelet újra',
'Bold' : 'Félkövér',
'Italic' : 'Dőlt',
'Underline' : 'Aláhúzott',
'Strikethrough' : 'Áthúzott',
'Superscript' : 'Felső index',
'Subscript' : 'Alsó index',
'Align left' : 'Balra igazítás',
'Ailgn right' : 'Jobbra igazítás',
'Align center' : 'Középre igazítás',
'Align full' : 'Sórkizárt igazítás',
'Font color' : 'Betűszín',
'Background color' : 'Háttér szín',
'Indent' : 'Behúzás',
'Outdent' : 'Kihúzás',
'Format' : 'Formátum',
'Font size' : 'Betű méret',
'Font' : 'Betű típus',
'Ordered list' : 'Számozott lista',
'Unordered list' : 'Lista',
'Horizontal rule' : 'Vízszintes vonal',
'Blockquote' : 'Idézet',
'Block element (DIV)' : 'Blokk elem (DIV)',
'Link' : 'Link',
'Delete link' : 'Link törlése',
'Bookmark' : 'Horgony',
'Image' : 'Kép',
'Table' : 'Táblázat',
'Delete table' : 'Táblázat törlése',
'Insert row before' : 'Sor beszúrása sor elé',
'Insert row after' : 'Sor beszúrása sor mögé',
'Delete row' : 'Sor törlése',
'Insert column before' : 'Oszlop beszúrása oszlop elé',
'Insert column after' : 'Oszlop beszúrása oszlop mögé',
'Delete column' : 'Oszlop törlése',
'Merge table cells' : 'Cellák összevonása',
'Split table cell' : 'Cellák szétávlasztása',
'Toggle display document structure' : 'Dokumentum szerkezet megtekintése',
'Table cell properties' : 'Táblázat cella tulajdonságai',
'Table properties' : 'Tábla tulajdonságok',
'Toggle full screen mode' : 'Teljes képernyős mód',
'Open file manager' : 'Fájl kezelő megnyitása',
'Non breakable space' : 'Szóköz',
'Stop element floating' : 'Elem elrendezések törlése',
// dialogs
'Warning' : 'Figyelmeztetés',
'Properies' : 'Tulajdonságok',
'Popup' : 'Popup',
'Advanced' : 'Egyéni',
'Events' : 'Események',
'Width' : 'Szélesség',
'Height' : 'Magasság',
'Left' : 'Bal',
'Center' : 'Közép',
'Right' : 'Jobb',
'Border' : 'Keret',
'Background' : 'Háttér',
'Css class' : 'Css class',
'Css style' : 'Css stílus',
'No' : 'Nem',
'Title' : 'Cím',
'Script direction' : 'Script hivatkozás',
'Language' : 'Nyelv',
'Charset' : 'Karaktertábla',
'Not set' : 'Nincs beállítva',
'Left to right' : 'Balról jobbra',
'Right to left' : 'Jobbról balra',
'In this window' : 'Ebbe az ablakba',
'In new window (_blank)' : 'Új ablakba (_blank)',
'In new parent window (_parent)' : 'Egy új ablakba (_parent)',
'In top frame (_top)' : 'A top frame-be (_top)',
'URL' : '',
'Open in' : 'Megnyitás',
'Open file manger' : 'Fájlkezelő megnyitása',
// copy
'This operation is disabled in your browser on security reason. Use shortcut instead.' : 'Ez a művelet le van tiltva a böngészőjében a biztonsági okból. Használja a parancsikont ehelyett.',
// format
'Heading 1' : 'Címsor 1',
'Heading 2' : 'Címsor 2',
'Heading 3' : 'Címsor 3',
'Heading 4' : 'Címsor 4',
'Heading 5' : 'Címsor 5',
'Heading 6' : 'Címsor 6',
'Paragraph' : 'Bekezdés',
'Address' : 'Cím',
'Preformatted' : 'Előre formázott',
// font size
'Small (8pt)' : 'Kicsi (8pt)',
'Small (10px)' : 'Kicsi (10px)',
'Small (12pt)' : 'Kicsi (12pt)',
'Normal (14pt)' : 'Normál (14pt)',
'Large (18pt)' : 'Nagy (18pt)',
'Large (24pt)' : 'Nagy (24pt)',
'Large (36pt)' : 'Nagy (36pt)',
// bookmark
'Bookmark name' : 'Horgony neve',
// link
'Link URL' : 'Link címe (URL)',
'Target' : 'Cél',
'Select bookmark' : 'Horgony választása',
'Open link in popup window' : 'Hivatkozás megnyitása új popup ablakban',
'URL' : '',
'Window name' : 'Ablak neve',
'Window size' : 'Ablak mérete',
'Window position' : 'Ablak pozíciója',
'Location bar' : 'Címsor',
'Menu bar' : 'Menüsor',
'Toolbar' : 'Eszköztár',
'Scrollbars' : 'Görgősáv',
'Status bar' : 'Státusz sor',
'Resizable' : 'Átméretezhető',
'Depedent' : '',
'Add return false' : 'Hozzáadás (return false)',
'Target MIME type' : 'MIME típusú cél',
'Relationship page to target (rel)' : 'Célhoz kapcsolódó lap (rel)',
'Relationship target to page (rev)' : 'Laphoz kapcsolódó cél (rev)',
'Tab index' : 'Tabulátor index',
'Access key' : 'Hozzáférési kulcs',
// image
'Size' : 'Méret',
'Preview' : 'Előnézet',
'Margins' : 'Margók',
'Alt text' : 'Alt szöveg',
'Image URL' : 'Kép URL',
// table
'Spacing' : 'Cellaköz',
'Padding' : '',
'Rows' : 'Sorok',
'Columns' : 'Oszlopok',
'Groups' : 'Csoportok',
'Cells' : 'Cellák',
'Caption' : 'Felirat',
'Inner borders' : 'Belső keret',
// table cell
'Table cell type' : 'Táblázat cella típus',
'Data' : 'Adat',
'Header' : 'Címsor',
'Justify' : 'Sorkizárt',
'Paddings' : 'Padding',
'Apply to' : 'Alkalmazás a',
'Current cell' : 'Jelenlegi cella',
'All cells in row' : 'Összes cella a sorban',
'All cells in column' : 'Összes cella az oszlopban',
'All cells in table' : 'Összes cella a táblázatban',
// about
'About elRTE' : 'Az elRTE-ről',
'Version' : 'Verzió',
'Licence' : 'Liszensz',
'elRTE is an open-source JavaScript based WYSIWYG HTML-editor.' : 'Az elRTE egy nyíltforráskódú JavaScript alapú WYSIWYG HTML-szerkesztő.',
'Main goal of the editor - simplify work with text and formating (HTML) on sites, blogs, forums and other online services.' : 'A szerkesztő fő célja, hogy egyszerűsítse a munkát és a szöveg formázást (HTML) az oldalakon, blogokon, fórumokon illetve más online szolgáltatásokban.',
'You can use it in any commercial or non-commercial projects.' : 'Használhatod bármilyen kereskedelni vagy nem-kereskedelmi célú projektben.',
'Authors' : 'Készítők',
'Chief developer' : 'Fő fejlesztő',
'Developer, tech support' : 'Fejelsaztő, tech kapcsolat',
'Interface designer' : 'Interface tervező',
'Spanish localization' : 'Spanyol fordító',
'Japanese localization' : 'Japán fordító',
'Latvian localization' : 'Litván fordító',
'German localization' : 'Német fordító',
'Ukranian localization' : 'Ukrán fordító',
'Magyar localization' : 'Magyar fordító',
'For more information about this software visit the' : 'További információkért a szoftverről keresse fel a ',
'elRTE website' : 'elRTE honlapját'
}
})(jQuery);

View file

@ -0,0 +1,169 @@
/**
* Italian translation
* @author Ugo Punzolo <sadraczerouno@gmail.com>
* @version 2010-09-20
*/
(function($) {
elRTE.prototype.i18Messages.it = {
'_translator' : 'Ugo Punzolo &lt;sadraczerouno@gmail.com&gt;',
'_translation' : 'Italian translation',
'Editor' : 'Editor',
'Source' : 'Codice Sorgente',
// Panel Name
'Copy/Pase' : 'Copia/Incolla',
'Undo/Redo' : 'Annulla/Ripristina',
'Text styles' : 'Stile del testo',
'Colors' : 'Colori',
'Alignment' : 'Allineamento',
'Indent/Outdent' : 'Aumenta/Riduci indentazione',
'Text format' : 'Formato del testo',
'Lists' : 'Liste',
'Misc elements' : 'Elementi vari',
'Links' : 'Collegamenti',
'Images' : 'Immagini',
'Media' : 'Multimedia',
'Tables' : 'Tabelle',
'File manager (elFinder)' : 'File manager (elFinder)',
// button names
'Save' : 'Salva',
'Copy' : 'Copia',
'Cut' : 'Taglia',
'Paste' : 'Incolla',
'Paste only text' : 'Incolla solo testo',
'Paste formatted text' : 'Incolla testo formattato',
'Clean format' : 'Pulisci formato',
'Undo last action' : 'Annulla ultima azione',
'Redo previous action' : 'Ripristina ultima azione',
'Bold' : 'Neretto',
'Italic' : 'Corsivo',
'Underline' : 'Sottolineato',
'Strikethrough' : 'Barrato',
'Superscript' : 'Indice',
'Subscript' : 'Pedice/Deponente',
'Align left' : 'Allinea a sinistra',
'Ailgn right' : 'Allinea a destra',
'Align center' : 'Centra',
'Align full' : 'Giustifica',
'Font color' : 'Colore del testo',
'Background color' : 'Colore di sfondo',
'Indent' : 'Aumenta indentazione',
'Outdent' : 'Riduci indentazione',
'Format' : 'Formato',
'Font size' : 'Grandezza caratteri',
'Font' : 'Carattere',
'Ordered list' : 'Lista ordinata',
'Unordered list' : 'Lista non ordinata',
'Horizontal rule' : 'Linea orizzontale',
'Blockquote' : 'Citazione',
'Block element (DIV)' : 'Blocco elemento (DIV)',
'Link' : 'Collegamento',
'Delete link' : 'Elimina collegamento',
'Bookmark' : 'Segnalibro',
'Image' : 'Immagine',
'Table' : 'Tabella',
'Delete table' : 'Elimina tabella',
'Insert row before' : 'Inserisci riga sopra',
'Insert row after' : 'Inserisci riga sotto',
'Delete row' : 'Elimina riga',
'Insert column before' : 'Inserisci colonna a sinistra',
'Insert column after' : 'Inserisci colonna a destra',
'Delete column' : 'Elimina colonna',
'Merge table cells' : 'Unisci celle',
'Split table cell' : 'Separa celle',
'Toggle display document structure' : 'Passa alla modalit&agrave; "visualizzazione struttura del documento"',
'Table cell properties' : 'Propriet&agrave; celle',
'Table properties' : 'Propriet&agrave; tabella',
'Toggle full screen mode' : 'Passa alla modalit&agrave; "schermo intero"',
'Open file manager' : 'Apri il file manager',
'Non breakable space' : 'Spazio non divisibile',
'Stop element floating' : 'Blocca elemento fluttuante',
// dialogs
'Warning' : 'Attenzione',
'Properies' : 'Propriet&agrave;',
'Popup' : 'Popup',
'Advanced' : 'Avanzate',
'Events' : 'Eventi',
'Width' : 'Larghezza',
'Height' : 'Altezza',
'Left' : 'Sinistra',
'Center' : 'Centro',
'Right' : 'Destra',
'Border' : 'Bordo',
'Background' : 'Sfondo',
'Css class' : 'Classe CSS',
'Css style' : 'Stile CSS',
'No' : 'No',
'Title' : 'Titolo',
'Script direction' : 'Direzione dello script',
'Language' : 'Lingua',
'Charset' : 'Charset',
'Not set' : 'Non settato',
'Left to right' : 'Da sinistra a destra',
'Right to left' : 'Da destra a sinistra',
'In this window' : 'In questa finestra (_self)',
'In new window (_blank)' : 'In una nuova finestra (_blank)',
'In new parent window (_parent)' : 'In una nuova finestra madre (_parent)',
'In top frame (_top)' : 'In alto al frame (_top)',
'URL' : 'URL',
'Open in' : 'Apri in',
// copy
'This operation is disabled in your browser on security reason. Use shortcut instead.' : 'Questa operazione &egrave; disabilitata nel tuo browser per motivi di sicurezza. Puoi comunque utilizzare un comando da tastiera.',
// format
'Heading 1' : 'Intestazione 1',
'Heading 2' : 'Intestazione 2',
'Heading 3' : 'Intestazione 3',
'Heading 4' : 'Intestazione 4',
'Heading 5' : 'Intestazione 5',
'Heading 6' : 'Intestazione 6',
'Paragraph' : 'Paragrafo',
'Address' : 'Indirizzo',
'Preformatted' : 'Preformattato',
// font size
'Small (8pt)' : 'Piccolo (8pt)',
'Small (10px)' : 'Piccolo (10px)',
'Small (12pt)' : 'Piccolo (12pt)',
'Normal (14pt)' : 'Normale (14pt)',
'Large (18pt)' : 'Grande (18pt)',
'Large (24pt)' : 'Grande (24pt)',
'Large (36pt)' : 'Grande (36pt)',
// bookmark
'Bookmark name' : 'Nome del segnalibro',
// link
'Link URL' : 'URL del collegamento',
'Target' : 'Target',
'Open link in popup window' : 'Apri il link in una finestra popup',
'Window name' : 'Nome della finestra',
'Window size' : 'Dimensioni della finestra',
'Window position' : 'Posizione della finestra',
'Location bar' : 'Barra direzionale',
'Menu bar' : 'Barra del menu',
'Toolbar' : 'Barra degli strumenti',
'Scrollbars' : 'Barra di scorrimento',
'Status bar' : 'Barra di stato',
'Resizable' : 'Ridimensionabile',
'Depedent' : 'Dipendente (Netscape)',
'Add return false' : 'Aggiungi condizione falsa (return false)',
'Target MIME type' : 'Obiettivo del tipo di MIME (MIME type)',
'Relationship page to target (rel)' : 'Dalla pagina correlata all\'obiettivo',
'Relationship target to page (rev)' : 'Dall\'obiettivo alla pagina correlata',
'Tab index' : 'Indice di tabulazione',
'Access key' : 'Chiave di accesso',
// image
'Size' : 'Dimensione',
'Preview' : 'Anteprima',
'Margins' : 'Margini',
'Alt text' : 'Testo alternativo',
'Image URL' : 'URL dell\'immagine',
// table
'Spacing' : 'Spaziatura (Spacing)',
'Padding' : 'Riempimento (Padding)',
'Rows' : 'Righe',
'Columns' : 'Colonne',
'Groups' : 'Gruppi',
'Cells' : 'Celle',
'Caption' : 'Didascalia',
'Inner borders' : 'Bordi interni'
}
})(jQuery);

View file

@ -0,0 +1,189 @@
/**
* Japanese translation
* @author Tomoaki Yoshida <info@yoshida-studio.jp>
* @version 2010-09-18
*/
(function($) {
elRTE.prototype.i18Messages.jp = {
'_translator' : 'Tomoaki Yoshida &lt;info@yoshida-studio.jp&gt;',
'_translation' : 'Japanese translation',
'Editor' : 'エディター',
'Source' : 'ソース',
// Panel Name
'Copy/Pase' : 'コピー/ペースト',
'Undo/Redo' : '元に戻す/やり直し',
'Text styles' : 'テキストスタイル',
'Colors' : '色',
'Alignment' : '行揃え',
'Indent/Outdent' : 'インデント/アウトデント',
'Text format' : 'テキストフォーマット',
'Lists' : 'リスト',
'Misc elements' : 'その他',
'Links' : 'リンク',
'Images' : '画像',
'Media' : 'メディア',
'Tables' : 'テーブル',
'File manager (elFinder)' : 'ファイルマネージャ(elFinder)',
// button names
'About this software' : 'このソフトウェアについて',
'Save' : '保存',
'Copy' : 'コピー',
'Cut' : '切り取り',
'Paste' : '貼り付け',
'Paste only text' : 'テキストのみ貼り付け',
'Paste formatted text' : 'フォーマットされたテキストの貼り付け',
'Clean format' : 'フォーマット消去',
'Undo last action' : '元に戻す',
'Redo previous action' : 'やり直し',
'Bold' : '太字',
'Italic' : '斜体',
'Underline' : '下線',
'Strikethrough' : '打ち消し線',
'Superscript' : '上付き文字',
'Subscript' : '添え字',
'Align left' : '左揃え',
'Ailgn right' : '右揃え',
'Align center' : '中央揃え',
'Align full' : '両端揃え',
'Font color' : 'テキスト色',
'Background color' : '背景色',
'Indent' : 'インデント',
'Outdent' : 'アウトデント',
'Format' : 'フォーマット',
'Font size' : 'サイズ',
'Font' : 'フォント',
'Ordered list' : '段落番号',
'Unordered list' : '箇条書き',
'Horizontal rule' : '横罫線',
'Blockquote' : 'ブロック引用',
'Block element (DIV)' : 'ブロック要素 (DIV)',
'Link' : 'リンク',
'Delete link' : 'リンク削除',
'Bookmark' : 'アンカー挿入/編集',
'Image' : 'イメージ',
'Table' : 'テーブル',
'Delete table' : 'テーブル削除',
'Insert row before' : '前に行を挿入',
'Insert row after' : '後ろに行を挿入',
'Delete row' : '行を削除',
'Insert column before' : '前に列を挿入',
'Insert column after' : '後ろに列を挿入',
'Delete column' : '列を削除',
'Merge table cells' : 'セルを結合する',
'Split table cell' : 'セルを分割する',
'Toggle display document structure' : '構成要素の表示',
'Table cell properties' : 'テーブルセルプロパティ',
'Table properties' : 'テーブルプロパティ',
'Toggle full screen mode' : '最大化',
'Open file manager' : 'ファイルマネージャを開く',
'Non breakable space' : '改行なしスペース',
'Stop element floating' : 'フロートの解除',
// dialogs
'Warning' : '警告',
'Properies' : 'プロパティ',
'Popup' : 'ポップアップ',
'Advanced' : 'アドバンス',
'Events' : 'イベント',
'Width' : '幅',
'Height' : '高さ',
'Left' : '左',
'Center' : '中央',
'Right' : '右',
'Border' : 'ボーダー',
'Background' : '背景',
'Css class' : 'CSS class',
'Css style' : 'CSS style',
'No' : 'No',
'Title' : 'タイトル',
'Script direction' : '文字表記方向',
'Language' : '言語',
'Charset' : 'Charset',
'Not set' : '設定しない',
'Left to right' : '左から右',
'Right to left' : '右から左',
'In this window' : '同じウィンドウ (_self)',
'In new window (_blank)' : '新しいウィンドウ (_blank)',
'In new parent window (_parent)' : '新しい親ウィンドウ (_parent)',
'In top frame (_top)' : 'トップフレーム (_top)',
'URL' : 'URL',
'Open in' : 'Open in',
// copy
'This operation is disabled in your browser on security reason. Use shortcut instead.' : 'この機能はお使いのブラウザではセキュリティの観点からご利用できません。ショートカットをご利用ください。',
// format
'Heading 1' : '見出し1',
'Heading 2' : '見出し2',
'Heading 3' : '見出し3',
'Heading 4' : '見出し4',
'Heading 5' : '見出し5',
'Heading 6' : '見出し6',
'Paragraph' : '段落',
'Address' : 'アドレス',
'Preformatted' : '',
// font size
'Small (8pt)' : '小(8pt)',
'Small (10px)' : '小(10pt)',
'Small (12pt)' : '小(12pt)',
'Normal (14pt)' : '中(14pt)',
'Large (18pt)' : '大(18pt)',
'Large (24pt)' : '大(24pt)',
'Large (36pt)' : '大(36pt)',
// bookmark
'Bookmark name' : 'アンカー名',
// link
'Link URL' : '(URL)',
'Target' : 'ターゲット',
'Open link in popup window' : 'リンク先をポップアップで開く',
'URL' : 'URL',
'Window name' : 'ウィンドウ名',
'Window size' : 'ウィンドウサイズ',
'Window position' : 'ウィンドウ位置',
'Location bar' : 'ロケーションバー',
'Menu bar' : 'メニューバー',
'Toolbar' : 'ツールバー',
'Scrollbars' : 'スクロールバー',
'Status bar' : 'ステータスバー',
'Resizable' : 'サイズ可変',
'Depedent' : 'ウィンドウ連動',
'Add return false' : 'return falseを加える',
'Target MIME type' : 'Target MIME type',
'Relationship page to target (rel)' : 'ページからターゲットの関係 (rel)',
'Relationship target to page (rev)' : 'ターゲットからページの関係 (rev)',
'Tab index' : 'タブインデックス',
'Access key' : 'アクセスキー',
// image
'Size' : 'サイズ',
'Preview' : 'プレビュー',
'Margins' : 'マージン',
'Alt text' : '代替テキスト',
'Image URL' : '画像URL',
// table
'Spacing' : 'セル間隔 (spacing)',
'Padding' : 'セル内余白 (padding)',
'Rows' : '行',
'Columns' : '列',
'Groups' : 'グループ',
'Cells' : 'セル',
'Caption' : 'キャプション',
'Inner borders' : '内部ボーダー',
// about
'About elRTE' : 'elRTEについて',
'Version' : 'バージョン',
'Licence' : 'ライセンス',
'elRTE is an open-source JavaScript based WYSIWYG HTML-editor.' : 'elRTEはJavascriptベースのオープンソースWYSIWYG HTMLエディタです。',
'Main goal of the editor - simplify work with text and formating (HTML) on sites, blogs, forums and other online services.' : 'このエディタの主な目的は、ウェブサイト、ブログ、フォーラムやその他のオンラインサービスのテキストとHTMLフォーマット入力作業をシンプルにすることです。',
'You can use it in any commercial or non-commercial projects.' : '商用・非商用に関わらずご利用いただけます。',
'Authors' : '著作者',
'Chief developer' : 'チーフデベロッパー',
'Developer, tech support' : 'デベロッパー・テクニカルサポート',
'Interface designer' : 'インターフェイスデザイナー',
'Spanish localization' : 'スペイン語化ローカライゼーション',
'Japanese localization' : '日本語化ローカライゼーション',
'Latvian localization' : 'ラトビア語化ローカライゼーション',
'German localization' : 'ドイツ語化ローカライゼーション',
'Ukranian localization' : 'ウクライナ語化ローカライゼーション',
'For more information about this software visit the' : '次のURLにてこのソフトウェアのより詳しい情報を公開しています。',
'elRTE website' : 'elRTE ウェブサイト'
}
})(jQuery);

View file

@ -0,0 +1,210 @@
/*
* Korean translation
* @author DominicKesler <DominicKesler@gmail.com>
* @version 2010-10-13
*/
(function($) {
elRTE.prototype.i18Messages.ko = {
'_translator' : 'DominicKesler &lt;DominicKesler@gmail.com&gt;',
'_translation' : 'Korean translation',
'Editor' : '편집기',
'Source' : '소스보기',
// panels names
'Copy/Pase' : '복사/붙여넣기',
'Undo/Redo' : '실행취소/다시실행',
'Text styles' : '글자 스타일',
'Colors' : '컬러',
'Alignment' : '정렬',
'Indent/Outdent' : '들여쓰기/내어쓰기',
'Text format' : '글자 서식',
'Lists' : '목록',
'Misc elements' : '기타',
'Links' : '링크',
'Images' : '이미지',
'Media' : '미디어',
'Tables' : '테이블',
'File manager (elFinder)' : '파일 관리자(elFinder)',
// buttons names
'About this software' : '소프트웨어 설명',
'Save' : '저장',
'Copy' : '복사',
'Cut' : '잘라내기',
'Paste' : '붙여넣기',
'Paste only text' : '텍스트만 붙여넣기',
'Paste formatted text' : '텍스트 속성까지 붙여넣기',
'Clean format' : '서식 지우기',
'Undo last action' : '실행취소',
'Redo previous action' : '다시실행',
'Bold' : '굵게',
'Italic' : '이탤릭',
'Underline' : '밑줄',
'Strikethrough' : '취소선',
'Superscript' : '위 첨자',
'Subscript' : '아래 첨자',
'Align left' : '왼쪽 정렬',
'Ailgn right' : '오른쪽 정렬',
'Align center' : '가운데 정렬',
'Align full' : '양쪽 정렬',
'Font color' : '글꼴 색',
'Background color' : '배경 색',
'Indent' : '들여쓰기',
'Outdent' : '내어쓰기',
'Format' : '속성',
'Font size' : '글꼴 크기',
'Font' : '글꼴',
'Ordered list' : '번호 매기기',
'Unordered list' : '기오 매기기',
'Horizontal rule' : '가로줄',
'Blockquote' : '인용구',
'Block element (DIV)' : '블럭요소(DIV)',
'Link' : '링크',
'Delete link' : '링크 삭제',
'Bookmark' : '북마크',
'Image' : '이미지',
'Table' : '표',
'Delete table' : '표 삭제',
'Insert row before' : '앞에 행 삽입',
'Insert row after' : '뒤에 행 삽입',
'Delete row' : '현재 행 삭제',
'Insert column before' : '앞에 열 삽입',
'Insert column after' : '뒤에 열 삽입',
'Delete column' : '열 삭제',
'Merge table cells' : '셀 병합',
'Split table cell' : '셀 나눔',
'Toggle display document structure' : '구성요소 보기',
'Table cell properties' : '표 셀 속성',
'Table properties' : '표 속성',
'Toggle full screen mode' : '전체화면 모드(실행/취소)',
'Open file manager' : '파일 관리자 열기',
'Non breakable space' : '줄바꿈 없애기',
'Stop element floating' : '플로트 해제',
// dialogs
'Warning' : '경고',
'Properies' : '속성',
'Popup' : '팝업',
'Advanced' : '고급',
'Events' : '이벤트',
'Width' : '폭',
'Height' : '높이',
'Left' : '왼쪽',
'Center' : '가운데',
'Right' : '오른쪽',
'Border' : '선',
'Background' : '배경',
'Css class' : 'CSS Class',
'Css style' : 'CSS Style',
'No' : 'No',
'Title' : '제목',
'Script direction' : '문자 표시 방향',
'Language' : '언어',
'Charset' : '언어',
'Not set' : '설정안함',
'Left to right' : '왼쪽에서 오른쪽',
'Right to left' : '오른족에서 왼쪽',
'In this window' : '현재 창(_self)',
'In new window (_blank)' : '새 창(_blank)',
'In new parent window (_parent)' : '새 부모창(_parent)',
'In top frame (_top)' : '최상위 프래임(_top)',
'URL' : 'URL',
'Open in' : 'Open in',
'Open file manger' : '파일 관리자 열기',
// copy
'This operation is disabled in your browser on security reason. Use shortcut instead.' : '이 기능은 현재 사용중인 브라우저의 보안설정으로 인하여 사용할 수 없습니다. 단축키를 이용하시기 바랍니다.',
// format
'Heading 1' : '제목 1',
'Heading 2' : '제목 2',
'Heading 3' : '제목 3',
'Heading 4' : '제목 4',
'Heading 5' : '제목 5',
'Heading 6' : '제목 6',
'Paragraph' : '단락',
'Address' : '주소',
'Preformatted' : '다른설정값',
// font size
'Small (8pt)' : '가나다Abc(8pt)',
'Small (10px)' : '가나다Abc(10px)',
'Small (12pt)' : '가나다Abc(12pt)',
'Normal (14pt)' : '가나다Abc(14pt)',
'Large (18pt)' : '가나다Abc(18pt)',
'Large (24pt)' : '가나다Abc(24pt)',
'Large (36pt)' : '가나다Abc(36pt)',
// bookmark
'Bookmark name' : '북마크 이름',
// link
'Link URL' : 'URL 주소',
'Target' : '타겟',
'Select bookmark' : '북마크 선택',
'Open link in popup window' : '팝업창에서 링크열기',
'Window name' : '창 이름',
'Window size' : '창 크기',
'Window position' : '창 위치',
'Location bar' : '주소',
'Menu bar' : '메뉴',
'Toolbar' : '툴바',
'Scrollbars' : '스크롤바',
'Status bar' : '상태표시줄',
'Resizable' : '리사이즈가능',
'Depedent' : 'Depedent',
'Add return false' : 'return false 추가',
'Target MIME type' : 'MINE type 타겟',
'Relationship page to target (rel)' : '페이지에서 대상 관계(rel)',
'Relationship target to page (rev)' : '대상에서 페이지 관계(rev)',
'Tab index' : '탭 인덱스',
'Access key' : '실행키',
// image
'Size' : '크기',
'Preview' : '미리보기',
'Margins' : '여백',
'Alt text' : '대체 글자',
'Image URL' : '이미지 URL',
// table
'Spacing' : '셀 간격',
'Padding' : '셀 여백',
'Rows' : '행',
'Columns' : '열',
'Groups' : '그룹',
'Cells' : '셀',
'Caption' : '캡션',
'Inner borders' : '내부 선',
// table cell
'Table cell type' : '표 셀 타입',
'Data' : '데이터',
'Header' : '제목',
'Justify' : '양쪽맞춤(Justify)',
'Paddings' : '여백',
'Apply to' : '적용',
'Current cell' : '현재 셀',
'All cells in row' : '행의 모든 셀',
'All cells in column' : '열의 모든 셀',
'All cells in table' : '표의 모든 셀',
// about
'About elRTE' : 'eIRTE에 대하여',
'Version' : '버전',
'Licence' : '라이센스',
'elRTE is an open-source JavaScript based WYSIWYG HTML-editor.' : 'elRTE는 JavaScript기반의 오픈소스 WYSIWYG HTML 편집기 입니다.',
'Main goal of the editor - simplify work with text and formating (HTML) on sites, blogs, forums and other online services.' : '이 편집기의 주 목적은 사이트, 블로그, 포럼 및 기타 온라인 서비스에서 글자와 HTML형식의 입력을 쉽게 하도록 하는 것입니다.',
'You can use it in any commercial or non-commercial projects.' : '상용, 비상용 상관없이 이용할 수 있습니다.',
'Authors' : '저작자',
'Chief developer' : '수석 개발자',
'Developer, tech support' : '개발자, 기술지원',
'Developer' : '개발자',
'Interface designer' : '인터페이스 디자이너',
'Spanish localization' : '스페인어 번역',
'Czech localization' : '체코어 번역',
'Japanese localization' : '일본어 번역',
'Latvian localization' : '라트비아어 번역',
'German localization' : '독일어 번역',
'Ukranian localization' : '우크라이나어 번역',
'Persian (farsi) localization' : '페르시아어 번역',
'Arabic localization' : '아랍어 번역',
'RTL support' : 'RTL 지원',
'French localization' : '프랑스어 번역',
'Dutch localization' : '네덜란드어 번역',
'Hungarian localization' : '헝가리어 번역',
'Polish localization' : '폴란드어 번역',
'Italian localization' : '이탈리아어 번역',
'Traditional Chinese localization' : '중국어(번체) 번역',
'For more information about this software visit the' : '이 소프트웨어의 더 많은 정보를 원하시면 elRTE 웹사이트를 방문해 주세요.',
'elRTE website' : 'elRTE 웹사이트'
}
})(jQuery);

View file

@ -0,0 +1,181 @@
/**
* Latvian translation
* @author Uldis Plotiņš <uldis.plotins@gmail.com>
* @version 2010-09-18
*/
(function($) {
elRTE.prototype.i18Messages.lv = {
'_translator' : 'Uldis Plotiņš &lt;uldis.plotins@gmail.com&gt;',
'_translation' : 'Latvian translation',
'Editor' : 'Redaktors',
'Source' : 'Izejas kods',
// panel names
'Copy/Pase' : 'Kopēt/Ievietot',
'Undo/Redo' : 'Atcelt/Atkārtot darbību',
'Text styles' : 'Teksta stili',
'Colors' : 'Krāsa',
'Alignment' : 'Izlīdzināšana',
'Indent/Outdent' : 'Atkāpes',
'Text format' : 'Formatēšana',
'Lists' : 'Saraksti',
'Misc elements' : 'Dažādi elementi',
'Links' : 'Saites',
'Images' : 'Attēli',
'Media' : 'Mēdiju faili',
'Tables' : 'Tabulas',
'File manager (elFinder)' : 'Failu pārvaldnieks (elFinder)',
// button names
'Save' : 'Saglabāt',
'Copy' : 'Kopēt',
'Cut' : 'Izgriezt',
'Paste' : 'Ievietot',
'Paste only text' : 'Ievietot tikai tekstu',
'Paste formatted text' : 'Ievietot formatētu tekstu',
'Clean format' : 'Atcelt formatēšanu',
'Undo last action' : 'Atcelt pēdējo darbību',
'Redo previous action' : 'Atkārtot pēdējo darbību',
'Bold' : 'Treknraksts',
'Italic' : 'Slīpraksts',
'Underline' : 'Pasvītrots',
'Strikethrough' : 'Izsvītrots',
'Superscript' : 'Augšraksts',
'Subscript' : 'Apakšraksts',
'Align left' : 'Izlīdzināt pa kreiso malu',
'Ailgn right' : 'Izlīdzināt pa labo malu',
'Align center' : 'Centrēt',
'Align full' : 'Izlīdzināt pa malām',
'Font color' : 'Šrifta krāsa',
'Background color' : 'Fona krāsa',
'Indent' : 'Palielināt atkāpi',
'Outdent' : 'Samazināt atkāpi',
'Format' : 'Formatēšana',
'Font size' : 'Šrifta lielums',
'Font' : 'Šrifts',
'Ordered list' : 'Numurēts saraksts',
'Unordered list' : 'Nenumurēts saraksts',
'Horizontal rule' : 'Horizontālā līnija',
'Blockquote' : 'Citāts',
'Block element (DIV)' : 'Bloka elements (DIV)',
'Link' : 'Saite',
'Delete link' : 'Dzēst saiti',
'Bookmark' : 'Grāmatzīme',
'Image' : 'Attēls',
'Table' : 'Tabula',
'Delete table' : 'Dzēst tabulu',
'Insert row before' : 'Ievietot rindu pirms',
'Insert row after' : 'Ievietot rindu pēc',
'Delete row' : 'Dzēst rindu',
'Insert column before' : 'Ievietot kolonnu pirms',
'Insert column after' : 'Ievietot kolonnu pēc',
'Delete column' : 'Dzēst kolonnu',
'Merge table cells' : 'Apvienot ailes',
'Split table cell' : 'Sadalīt aili',
'Toggle display document structure' : 'Rādīt dokumenta struktūru/neredzamos elementus',
'Table cell properties' : 'Ailes iestatījumi',
'Table properties' : 'Tabulas iestatījumi',
'Toggle full screen mode' : 'Pilns ekrāns',
'Open file manager' : 'Atvērt failu pārvaldnieku',
'Non breakable space' : 'Nepārtrauktā atstarpe',
'Stop element floating' : 'Atslēgt elementu apklāšanu ar tekstu',
// dialogs
'Warning' : 'Uzmanību',
'Properies' : 'Iestatījumi',
'Popup' : 'Jauns logs',
'Advanced' : 'Papildus',
'Events' : 'Notikumi',
'Width' : 'Platums',
'Height' : 'Augstums',
'Left' : 'Pa kresi',
'Center' : 'Pa centru',
'Right' : 'Pa labi',
'Border' : 'Mala',
'Background' : 'Fons',
'Css class' : 'Css klase',
'Css style' : 'Css stils',
'No' : 'Nē',
'Title' : 'Virsraksts',
'Script direction' : 'Vēstules virziens',
'Language' : 'Valoda',
'Charset' : 'Kodējums',
'Not set' : 'Nav uzstādī†s',
'Left to right' : 'No kreisās uz labo',
'Right to left' : 'No labās uz kreiso',
'In this window' : 'Dotajā logā',
'In new window (_blank)' : 'Jaunā logā (_blank)',
'In new parent window (_parent)' : 'Vecāku logā (_parent)',
'In top frame (_top)' : 'Augšējā rāmī (_top)',
'URL' : 'URL',
'Open in' : 'Atvērt',
'Open file manger' : 'Atvērt failu pārvaldnieku',
// copy
'This operation is disabled in your browser on security reason. Use shortcut instead.' : 'Dotā darbība jūsu pārlūkam ir liegta saistībā ar drošības aspektiem. Izmantojiet taustiņu kombināciju.',
// format
'Heading 1' : 'Virsraksts 1',
'Heading 2' : 'Virsraksts 2',
'Heading 3' : 'Virsraksts 3',
'Heading 4' : 'Virsraksts 4',
'Heading 5' : 'Virsraksts 5',
'Heading 6' : 'Virsraksts 6',
'Paragraph' : 'Paragrāfs',
'Address' : 'Adrese',
'Preformatted' : '',
// font size
'Small (8pt)' : 'Sīks (8pt)',
'Small (10px)' : 'Mazs (10px)',
'Small (12pt)' : 'Neliels (12pt)',
'Normal (14pt)' : 'Parasts (14pt)',
'Large (18pt)' : 'Liels (18pt)',
'Large (24pt)' : 'Ļoti liels(24pt)',
'Large (36pt)' : 'Milzīgs (36pt)',
// bookmark
'Bookmark name' : 'Grāmatzīmes vārds',
// link
'Link URL' : 'Saites adrese (URL)',
'Target' : 'Mērķis',
'Select bookmark' : 'Izvēlēties grāmatzīmi',
'Open link in popup window' : 'Atvērt saiti jaunā logā',
'URL' : 'URL',
'Window name' : 'Loga nosaukums',
'Window size' : 'Loga izmērs',
'Window position' : 'Loga pozīcija',
'Location bar' : 'Vietas panelis',
'Menu bar' : 'Izvēlnes panelis',
'Toolbar' : 'Instrumentu panelis',
'Scrollbars' : 'Ritjoslas',
'Status bar' : 'Stāvokļa panelis',
'Resizable' : 'Izmēra izmaiņas',
'Depedent' : 'Atkarīgs (Netscape)',
'Add return false' : 'Pievienot (return false)',
'Target MIME type' : 'MIME type mērķi',
'Relationship page to target (rel)' : 'Lapas attiecībaa pret mērķi (rel)',
'Relationship target to page (rev)' : 'Mērķa attiecība pret lapu (rev)',
'Tab index' : '',
'Access key' : 'Pieejas taustiņš',
// image
'Size' : 'Izmērs',
'Preview' : 'Priekšskats',
'Margins' : 'Atkāpes',
'Alt text' : 'Apraksta teksts',
'Image URL' : 'Bildes URL',
// table
'Spacing' : 'Atstarpe',
'Padding' : 'Atkāpe',
'Rows' : 'Rindas',
'Columns' : 'Kolonnas',
'Groups' : 'Grupas',
'Cells' : 'Ailes',
'Caption' : 'Tabulas virsraksts',
'Inner borders' : 'Iekšējās robežas',
// table cell
'Table cell type' : 'Tabulas ailes tips',
'Data' : 'Dati',
'Header' : 'Virsraksts',
'Justify' : 'Pa malām',
'Paddings' : 'Atkāpes',
'Apply to' : 'Pielietot uz',
'Current cell' : 'Izvēlētā aile',
'All cells in row' : 'Visas rindas ailes',
'All cells in column' : 'Visas stabiņa ailes',
'All cells in table' : 'Visas tabulas ailes'
}
})(jQuery);

View file

@ -0,0 +1,201 @@
/**
* Dutch translation
* @author Kurt Aerts
* @link http://ilabsolutions.net/
* @version 2010-09-18
*/
(function($) {
elRTE.prototype.i18Messages.nl = {
'_translator' : 'Kurt Aerts',
'_translation' : 'Dutch translation',
'Editor' : 'Editor',
'Source' : 'Broncode',
// Panel names
'Copy / Pase' : 'Kopieeer / Plakken',
'Undo / Redo' : 'Ongedaan maken / Herhalen typen',
'Text styles' : 'Tekst stijlen',
'Colors': 'Kleuren:',
'Alignment': 'Alinea',
'Indent / Outdent': '',
'Text format': 'Tekst opmaak',
'Lists': 'Lijsten',
'Misc elements': '',
'Links': 'Links',
'Images': 'Afbeeldingen',
'Media': 'Media',
'Tables': 'Tabelllen',
'File manager (elFinder)' : 'Bestandsmanager (elFinder)',
// Button names
'About this software' : 'Over deze software',
'Save': 'Opslaan',
'Copy': 'Kopieer',
'Cut': 'Knip',
'Paste': 'Plak',
'Paste only text': 'Plak alleen tekst',
'Paste formatted text': 'Plak opgemaakte tekst',
'Clean format': 'Opmaak opschonen',
'Undo last action': 'Maak laaste actie ongedaan',
'Redo previous action': 'Herdoe laatst gedane actie',
'Bold': 'Vet',
'Italic': 'Cursief',
'Underline': 'Onderlijnt',
'Strikethrough': 'Doorstreept',
'Superscript': '',
'Subscript': '',
'Align left': 'Links uitlijnen',
'Ailgn right': 'Rechts uitlijnen',
'Align center': 'Centreren',
'Align full': 'Uitvullen',
'Font color': 'Tekst kleur',
'Background color': 'Achtergrond kleur',
'Indent': 'Inspringing vergroten',
'Outdent': 'Inspringing Verkleinen',
'Format': 'Opmaak',
'Font size': 'Tekst grootte',
'Font': 'Lettertype',
'Ordered list': 'Geordende lijst',
'Unordered list': 'Ongeordende lijst',
'Horizontal rule': 'Horizontale regel',
'Blockquote': '',
'Block element (DIV)' : '',
'Link': 'Link',
'Delete link': 'Verwijder mo,l',
'Bookmark': '',
'Image': 'Afbeelding',
'Table': 'Tabel',
'Delete table': 'Verwijder tabel',
'Insert row before': 'Invoegen voor rij',
'Insert row after': 'Invoegen na rij',
'Delete row': 'Verwijder rij',
'Insert column before': 'Invoegen voor kolom',
'Insert column after': 'Invoegen na kolom',
'Delete column': 'Verwijder kolom',
'Merge table cells': 'Samenvoegen tabel cellen',
'Split table cell': '',
'Toggle display document structure': '',
'Table cell properties': '',
'Table properties': '',
'Toggle full screen mode' : '(toggle) Volledig scherm',
'Open file manager' : 'Open bestandsmanager',
'Non breakable space' : '',
'Stop element floating' : '',
// Dialogs
'Warning': 'Waarschuwing',
'Properies': 'Opties',
'Popup': 'Popup',
'Advanced': 'Geavanceerd',
'Events': 'Events',
'Width': 'Breedte',
'Height': 'Hoogte',
'Left' : 'Links',
'Center' : 'Midden',
'Right' : 'Rechts',
'Border': 'Border',
'Background': 'Achtergrond',
'Css class': 'Css Class',
'Css style': 'Css style',
'No': 'Nee',
'Title': 'Titel',
'Script direction': '',
'Language': 'Taal',
'Charset': 'Charset',
'Not set': 'Niet gezet',
'Left to right': 'Links naar rechts',
'Right to left': 'Rechts naar link',
'In this window': 'In dit venster',
'In new window (_blank)': 'In nieuw venster (_blank)',
'In new parent window (_parent)': 'In new parent window (_parent)',
'In top frame (_top)': 'In top frame (_top)',
'URL':'',
'Open in': 'Open in',
// Copy
'This operation is disabled in your browser on security reason. Use shortcut instead. ' : 'Deze operatie is uitgeschakeld in jou browser voor beveiligings redenen. Gebruik de snelkoppeling.',
// Format
'Heading 1' : '',
'Heading 2' : '',
'Heading 3' : '',
'Heading 4' : '',
'Heading 5' : '',
'Heading 6' : '',
'Paragraph' : '',
'Address' : '',
'Preformatted':'',
// Font size
'Small (8pt)': 'Kleinst (8pt)',
'Small (10px)': 'Kleiner (10px)',
'Small (12pt)': 'Klein (12pt)',
'Normal (14pt)': 'Normaal (14pt)',
'Large (18pt)': 'Groot (18pt)',
'Large (24pt)': 'Groter (24pt)',
'Large (36pt)': 'Grootst (36pt)',
// Bookmark
'Bookmark name': '',
// Link
'Link URL': '',
'Target': 'Doel',
'Select bookmark' : '',
'Open link in popup window': '',
'URL':'',
'Window name': 'Venster naam',
'Window size': 'Venster grootte',
'Window position': 'Venster Positie',
'Open link in popup window': 'Open link in een popup enster',
'Location bar': 'Locatie balk',
'Menu bar': 'Menu balk',
'Toolbar': 'Toolbar',
'Scrollbars': 'Scrollbar',
'Status bar': 'Status balk',
'Resizable': 'Schaalbaar',
'Depedent': '',
'Add return false': '',
'Target MIME type': '',
'Relationship page to target (rel)': '',
'Relationship target to page (rev)': '',
'Tab index':'',
'Access key': '',
// Image
'Size': 'Grootte',
'Preview': 'Voorbeeld',
'Margins': '',
'Alt text': 'Alt tekst',
'Image URL': 'Afbeelding URL',
// Table
'Spacing' : '',
'Padding' : '',
'Rows' : '',
'Columns' : '',
'Groups' : '',
'Cells' : '',
'Caption' : '',
'Inner borders' : '' ,
// table cell
'Table cell type' : '',
'Data' : '',
'Header' : '',
'Justify' : '',
'Paddings' : '',
'Apply to' : 'Toepassen op',
'Current cell' : 'Huidige cell',
'All cells in row' : 'Alle cellen in rij',
'All cells in column' : 'Alle cellen in kolom',
'All cells in table' : 'Alle cellen in tabel',
// about
'About elRTE' : 'Over elRTE',
'Version' : 'Versie',
'Licence' : 'Licentie',
'elRTE is an open-source JavaScript based WYSIWYG HTML-editor.' : 'elRTE is een open-source Javascript gebasseerd WYSIWYG HTML-editor.',
'Main goal of the editor - simplify work with text and formating (HTML) on sites, blogs, forums and other online services.' : 'Hoofddoel van de editor - Simpel wekren met tekst en opmaak (HTML) op websites, forums en andere online diensten.',
'You can use it in any commercial or non-commercial projects.' : 'Je kan het gebruiken in commerciele en niet commericiele projecten.',
'Authors' : 'Auteurs',
'Chief developer' : '',
'Developer, tech support' : '',
'Interface designer' : '',
'Spanish localization' : '',
'Japanese localization' : '',
'Latvian localization' : '',
'German localization' : '',
'Ukranian localization' : '',
'For more information about this software visit the' : 'Voor meer informatie over deze software bezoek de',
'elRTE website' : ''
};
})(jQuery);

View file

@ -0,0 +1,170 @@
/**
* Polish translation
* @author Andrzej Borowicz
* @version 2010-09-18
*/
(function($) {
elRTE.prototype.i18Messages.pl = {
'_translator' : 'Andrzej Borowicz',
'_translation' : 'Polish translation',
'Editor' : 'Edytor',
'Source' : 'Kod źródłowy',
// Panel Name
'Copy/Pase' : 'Kopiuj/Wklej',
'Undo/Redo' : 'Cofnij/Ponów',
'Text styles' : 'Style tekstowe',
'Colors' : 'Kolor',
'Alignment' : 'Wyrównanie',
'Indent/Outdent' : 'Wcięcie / wysynięcie',
'Text format' : 'Format',
'Lists' : 'Lista',
'Misc elements' : 'Inne elementy',
'Links' : 'Link',
'Images' : 'Obraz',
'Media' : 'Pliki multimedialne',
'Tables' : 'Tabela',
'File manager (elFinder)' : 'Menadżer plików (elFinder)',
// button names
'Save' : 'Zapisz',
'Copy' : 'Wytnij',
'Cut' : 'Kopiuj',
'Paste' : 'Wklej',
'Paste only text' : 'Wklej tylko tekst',
'Paste formatted text' : 'Wklej tekst sformatowany',
'Clean format' : 'Wyczyść formaty',
'Undo last action' : 'Cofnij',
'Redo previous action' : 'Ponów',
'Bold' : 'Pogróbienie',
'Italic' : 'Kursywa',
'Underline' : 'Podkreślenie',
'Strikethrough' : 'Przekreślenie',
'Superscript' : 'Index górny',
'Subscript' : 'index dolny',
'Align left' : 'Wyrównanie do lewej',
'Ailgn right' : 'Wyrównanie do prawej',
'Align center' : 'Wycentrowanie',
'Align full' : 'Wyjustowanie',
'Font color' : 'Kolor czcionki',
'Background color' : 'Kolor tła',
'Indent' : 'Wcięcie',
'Outdent' : 'Wysunięcie',
'Format' : 'Format',
'Font size' : 'Rozmiar czcionki',
'Font' : 'Czcionka',
'Ordered list' : 'Lista numerowana',
'Unordered list' : 'Lista',
'Horizontal rule' : 'Linia poziomae',
'Blockquote' : 'Cytat',
'Block element (DIV)' : 'Element blokowy (DIV)',
'Link' : 'Link',
'Delete link' : 'Usuń link',
'Bookmark' : 'Wstaw/etytuj kotwicę',
'Image' : 'Obraz',
'Table' : 'Tabela',
'Delete table' : 'Skasuj Tabelę',
'Insert row before' : 'Wstaw wiers przed',
'Insert row after' : 'Wstaw wiers po',
'Delete row' : 'Skasuj wiersz',
'Insert column before' : 'Wstaw kolumnę Spalte przed',
'Insert column after' : 'Wstaw kolumnę po',
'Delete column' : 'Skasuj kolumnę',
'Merge table cells' : 'Połącz komórki',
'Split table cell' : 'Rozłącz komórki',
'Toggle display document structure' : 'Pokaż bloki',
'Table cell properties' : 'Właściwości komórki',
'Table properties' : 'Właściwości tabeli',
'Toggle full screen mode' : 'Pełny ekran',
'Open file manager' : 'Menadźer plików',
'Non breakable space' : 'Twarda spacja',
'Stop element floating' : 'Wyłącz otaczanie elementów',
// dialogs
'Warning' : 'Ostrzeżenie',
'Properies' : 'Właściwości',
'Popup' : 'okienko Pop-up',
'Advanced' : 'Więcej',
'Events' : 'Wydarzenia',
'Width' : 'Szerokość',
'Height' : 'Wysokość',
'Left' : 'Lewy',
'Center' : 'Centrum',
'Right' : 'Prawy',
'Border' : 'Ramka',
'Background' : 'Kolor tła',
'Css class' : 'klasa Css',
'Css style' : 'styl Css',
'No' : 'Nie',
'Title' : 'Tytuł',
'Script direction' : 'Komentarz sktyptu',
'Language' : 'Język',
'Charset' : 'Strona kodowa',
'Not set' : 'nic',
'Left to right' : 'Z lewej do prawej',
'Right to left' : 'Z prawej do lewej',
'In this window' : 'To samo okno (_self)',
'In new window (_blank)' : 'Nowe okno (_blank)',
'In new parent window (_parent)' : 'Okno nadrzędne (_parent)',
'In top frame (_top)' : 'Górna ramka (_top)',
'URL' : '',
'Open in' : 'Otwórz w',
// copy
'This operation is disabled in your browser on security reason. Use shortcut instead.' : 'Ta operacja jest zabroniona w twojej przeglądarce z powodu zabezpieczeń. Pomimo to możesz używać klawiszy skrótów.',
// format
'Heading 1' : 'Nagłówek 1',
'Heading 2' : 'Nagłówek 2',
'Heading 3' : 'Nagłówek 3',
'Heading 4' : 'Nagłówek 4',
'Heading 5' : 'Nagłówek 5',
'Heading 6' : 'Nagłówek 6',
'Paragraph' : 'Paragraf',
'Address' : 'Addresse',
'Preformatted' : '',
// font size
'Small (8pt)' : 'Mały (8pt)',
'Small (10px)' : 'Mały (10pt)',
'Small (12pt)' : 'Mały (12pt)',
'Normal (14pt)' : 'Średni (14pt)',
'Large (18pt)' : 'Duży (18pt)',
'Large (24pt)' : 'Duży (24pt)',
'Large (36pt)' : 'Duży (36pt)',
// bookmark
'Bookmark name' : 'Nazwa kotwicy',
// link
'Link URL' : '(URL)',
'Target' : 'Cel',
'Open link in popup window' : 'Otwórz link w nowym oknie',
'URL' : '',
'Window name' : 'Okienko Pop-up Nazwa',
'Window size' : 'Rozmiar',
'Window position' : 'Pozycja',
'Location bar' : 'pasek adresu',
'Menu bar' : 'Pasek menu',
'Toolbar' : 'Pasek narzędzi',
'Scrollbars' : 'Paski przewijania',
'Status bar' : 'pasek statusy',
'Resizable' : 'Zmiana rozmiaru okna',
'Depedent' : 'Zależne (Netscape)',
'Add return false' : 'dodaj (return false)',
'Target MIME type' : 'MIME type',
'Relationship page to target (rel)' : 'Zależnośc strony do celu (rel)',
'Relationship target to page (rev)' : 'Zależnośc strony do strony (rev)',
'Tab index' : 'Index tab',
'Access key' : 'Klawisz dostepu',
// image
'Size' : 'Rozmiar',
'Preview' : 'Podgląd',
'Margins' : 'Marginesy',
'Alt text' : 'Text alternatywny',
'Image URL' : 'URL',
// table
'Spacing' : 'Dystans (spacing)',
'Padding' : 'Dystans (padding)',
'Rows' : 'Wiersz',
'Columns' : 'Kolumna',
'Groups' : 'Grupa',
'Cells' : 'Komórki',
'Caption' : 'Legenda',
'Inner borders' : 'Wewnętrzne ramki'
}
})(jQuery);

View file

@ -0,0 +1,167 @@
/**
* Brazilian Portuguese translation
* @author Jairo Moreno <master.zion@gmail.com>
* @version 2010-10-18
*/
(function($) {
elRTE.prototype.i18Messages.pt_BR = {
'_translator' : 'Jairo Moreno &lt;master.zion@gmail.com&gt;',
'_translation' : 'Brazilian Portuguese translation',
'Editor' : 'Editor',
'Source' : 'Código Fonte',
// Panel Name
'Copy/Pase' : 'Copiar/Colar',
'Undo/Redo' : 'Desfazer/Refazer',
'Text styles' : 'Folhas de Estilo',
'Colors' : 'Cores',
'Alignment' : 'Alinhamento',
'Indent/Outdent' : 'Aumentar/Diminuir',
'Text format' : 'Formato',
'Lists' : 'Listas',
'Misc elements' : 'Elementos diversos',
'Links' : 'Links',
'Images' : 'Imagens',
'Media' : 'Multimedia',
'Tables' : 'Tabelas',
'File manager (elFinder)' : 'Gerenciador de arquivos',
// button names
'Save' : 'Gravar',
'Copy' : 'Copiar',
'Cut' : 'Cortar',
'Paste' : 'Colar',
'Paste only text' : 'Colar texto',
'Paste formatted text' : 'Colar texto formatado',
'Clean format' : 'Limpar formato',
'Undo last action' : 'Desfazer última ação',
'Redo previous action' : 'Refazer última ação',
'Bold' : 'Negrito',
'Italic' : 'Itálico',
'Underline' : 'Sublinhado',
'Strikethrough' : 'Riscado',
'Superscript' : 'Superíndice',
'Subscript' : 'Subíndice',
'Align left' : 'Alinhar à esquerda',
'Ailgn right' : 'Alinhar à direita',
'Align center' : 'Centralizar',
'Align full' : 'Justificado',
'Font color' : 'Cor de texto',
'Background color' : 'Cor de fundo',
'Indent' : 'Aumentar',
'Outdent' : 'Reduzir',
'Format' : 'Formato',
'Font size' : 'Tamanho de Fonte',
'Font' : 'Fonte',
'Ordered list' : 'Lista ordenada',
'Unordered list' : 'Lista desordenada',
'Horizontal rule' : 'Linha horizontal',
'Blockquote' : 'Comentar',
'Block element (DIV)' : 'Bloco de Elementos (DIV)',
'Link' : 'Link',
'Delete link' : 'Remover link',
'Bookmark' : 'Favoritos',
'Image' : 'Imagem',
'Table' : 'Tabela',
'Delete table' : 'Remover tabela',
'Insert row before' : 'Inserir linha antes',
'Insert row after' : 'Inserir linha depois',
'Delete row' : 'Remover linha',
'Insert column before' : 'Inserir coluna antes',
'Insert column after' : 'Inserir coluna depois',
'Delete column' : 'Remover columna',
'Merge table cells' : 'Unir células',
'Split table cell' : 'Separar célula',
'Toggle display document structure' : 'Extrutura de documento',
'Table cell properties' : 'Propiedades de célula',
'Table properties' : 'Propiedades de tabela',
'Toggle full screen mode' : 'Tela cheia',
'Open file manager' : 'Abrir administrador de arquivos',
'Non breakable space' : 'Espaço indivisivel',
'Stop element floating' : 'Parar elemento flutunte',
// dialogs
'Warning' : 'Advertência',
'Properies' : 'Propriedades',
'Popup' : 'Popup',
'Advanced' : 'Avançado',
'Events' : 'Eventos',
'Width' : 'Largura',
'Height' : 'Altura',
'Left' : 'Esquerda',
'Center' : 'Centralizado',
'Right' : 'Direita',
'Border' : 'Borda',
'Background' : 'Fundo',
'Css class' : 'Classe CSS',
'Css style' : 'Estilo CSS',
'No' : 'Não',
'Title' : 'Título',
'Script direction' : 'Direção do script',
'Language' : 'Idioma',
'Charset' : 'Charset',
'Not set' : 'Não configurado',
'Left to right' : 'Esquerda para Direita',
'Right to left' : 'Direita para Esquerda',
'In this window' : 'Esta janela (_self)',
'In new window (_blank)' : 'Em nova janela (_blank)',
'In new parent window (_parent)' : 'Na janela Pai (_parent)',
'In top frame (_top)' : 'Sem suporte a frames (_top)',
'URL' : 'URL',
'Open in' : 'Abrir em',
// copy
'This operation is disabled in your browser on security reason. Use shortcut instead.' : 'Esta operação está bloqueada em seu navegador. Utilice um atalho.',
// format
'Heading 1' : 'Cabeçalho 1',
'Heading 2' : 'Cabeçalho 2',
'Heading 3' : 'Cabeçalho 3',
'Heading 4' : 'Cabeçalho 4',
'Heading 5' : 'Cabeçalho 5',
'Heading 6' : 'Cabeçalho 6',
'Paragraph' : 'Parágrafo',
'Address' : 'Direção',
'Preformatted' : 'Pré-formatado',
// font size
'Small (8pt)' : 'Pequeno (8pt)',
'Small (10px)' : 'Pequeno (10px)',
'Small (12pt)' : 'Pequeno (12pt)',
'Normal (14pt)' : 'Normal (14pt)',
'Large (18pt)' : 'Grande (18pt)',
'Large (24pt)' : 'Grande (24pt)',
'Large (36pt)' : 'Grande (36pt)',
// bookmark
'Bookmark name' : 'Nome do favoritos',
// link
'Link URL' : 'Link URL',
'Target' : 'Alvo',
'Open link in popup window' : 'Abrir vínculo en janela emergente',
'Window name' : 'Nomw na janela',
'Window size' : 'Tamanho na janela',
'Window position' : 'Posição na janela',
'Location bar' : 'Barra de dirección',
'Menu bar' : 'Barra de Menu',
'Toolbar' : 'Barra de ferramentas',
'Scrollbars' : 'Barras de rolagem',
'Status bar' : 'Barra de status',
'Resizable' : 'Redimensionavel',
'Depedent' : 'Dependente (Netscape)',
'Add return false' : 'Adicionar (return false)',
'Target MIME type' : 'Objeto de Tipo MIME',
'Relationship page to target (rel)' : 'Relacionado a página para alvo(rel)',
'Relationship target to page (rev)' : 'Relacionado a alvo para página (rev)',
'Tab index' : 'Tab index',
'Access key' : 'Tecla de acesso',
// image
'Size' : 'Tamanho',
'Preview' : 'Visualizar',
'Margins' : 'Margens',
'Alt text' : 'Texto alternativo',
'Image URL' : 'URL da imagem',
// table
'Spacing' : 'Espaçamento',
'Padding' : 'Margem',
'Rows' : 'Linha',
'Columns' : 'Colunas',
'Groups' : 'Grupos',
'Cells' : 'Células',
'Caption' : 'Legenda',
'Inner borders' : 'Bordas internas'
}
})(jQuery);

View file

@ -0,0 +1,213 @@
/*
* Russian translation
* @author Dmitry Levashov <dio@std42.ru>
* @version 2010-09-20
*/
(function($) {
elRTE.prototype.i18Messages.ru = {
'_translator' : 'Dmitry (dio) Levashov &lt;dio@std42.ru&gt;',
'_translation' : 'Русский перевод',
'Editor' : 'Редактор',
'Source' : 'Исходник',
// названия панелей
'Copy/Pase' : 'Копирование/Вставка',
'Undo/Redo' : 'Отмена/Повтор действия',
'Text styles' : 'Стили текста',
'Colors' : 'Цвета',
'Alignment' : 'Выравнивание',
'Indent/Outdent' : 'Отступы',
'Text format' : 'Форматирование',
'Lists' : 'Списки',
'Misc elements' : 'Разные элементы',
'Links' : 'Ссылки',
'Images' : 'Изображения',
'Media' : 'Media файлы',
'Tables' : 'Таблицы',
'File manager (elFinder)' : 'Файловый менеджер (elFinder)',
// названия кнопок
'About this software' : 'О программе',
'Save' : 'Сохранить',
'Copy' : 'Копировать',
'Cut' : 'Вырезать',
'Paste' : 'Вставить',
'Paste only text' : 'Вставить только текст',
'Paste formatted text' : 'Вставить форматированый текст',
'Clean format' : 'Удалить форматирование',
'Undo last action' : 'Отменить действие',
'Redo previous action' : 'Повторить действие ',
'Bold' : 'Жирный',
'Italic' : 'Курсив',
'Underline' : 'Подчеркнутый',
'Strikethrough' : 'Перечеркнутый',
'Superscript' : 'Надстрочный текст',
'Subscript' : 'Подстрочный текст',
'Align left' : 'Выровнять налево',
'Ailgn right' : 'Выровнять направо',
'Align center' : 'Выровнять по центру',
'Align full' : 'Выровнять по краям',
'Font color' : 'Цвет шрифта',
'Background color' : 'Цвет заливки',
'Indent' : 'Увеличить отступ',
'Outdent' : 'Уменьшить отступ',
'Format' : 'Форматирование',
'Font size' : 'Размер шрифта',
'Font' : 'Шрифт',
'Ordered list' : 'Нумерованый список',
'Unordered list' : 'Ненумерованый список',
'Horizontal rule' : 'Горизонтальная линия',
'Blockquote' : 'Цитата',
'Block element (DIV)' : 'Блочный элемент (DIV)',
'Link' : 'Ссылка',
'Delete link' : 'Удалить ссылку',
'Bookmark' : 'Закладка',
'Image' : 'Изображение',
'Table' : 'Таблица',
'Delete table' : 'Удалить таблицу',
'Insert row before' : 'Вставить ряд до',
'Insert row after' : 'Вставить ряд после',
'Delete row' : 'Удалить ряд',
'Insert column before' : 'Вставить колонку до',
'Insert column after' : 'Вставить колонку после',
'Delete column' : 'Удалить колонку',
'Merge table cells' : 'Склеить ячейки',
'Split table cell' : 'Разделить ячейку',
'Toggle display document structure' : 'Показать структуру документа/невидимые элементы',
'Table cell properties' : 'Свойство ячейки',
'Table properties' : 'Свойство таблицы',
'Toggle full screen mode' : 'Во весь экран',
'Open file manager' : 'Открыть файловый менеджер',
'Non breakable space' : 'Неразрывный пробел',
'Stop element floating' : 'Отключить обтекание элементов текстом',
// dialogs
'Warning' : 'Внимание',
'Properies' : 'Свойства',
'Popup' : 'Новое окно',
'Advanced' : 'Дополнительно',
'Events' : 'События',
'Width' : 'Ширина',
'Height' : 'Высота',
'Left' : 'Слева',
'Center' : 'По центру',
'Right' : 'Справа',
'Border' : 'Бордюр',
'Background' : 'Фон',
'Css class' : 'Css класс',
'Css style' : 'Css cтиль',
'No' : 'Нет',
'Title' : 'Заголовок',
'Script direction' : 'Направление письма',
'Language' : 'Язык',
'Charset' : 'Кодировка',
'Not set' : 'Не установлено',
'Left to right' : 'Слево направо',
'Right to left' : 'Справа налево',
'In this window' : 'В этом окне',
'In new window (_blank)' : 'В новом окне (_blank)',
'In new parent window (_parent)' : 'В родительском окне (_parent)',
'In top frame (_top)' : 'В верхнем фрейме (_top)',
'URL' : '',
'Open in' : 'Открыть',
'Open file manger' : 'Открыть файловый менеджер',
// copy
'This operation is disabled in your browser on security reason. Use shortcut instead.' : 'Действие запрещено в вашем браузере по соображениям безопастности. Используйте сочетание клавиш',
// format
'Heading 1' : 'Заголовок 1',
'Heading 2' : 'Заголовок 2',
'Heading 3' : 'Заголовок 3',
'Heading 4' : 'Заголовок 4',
'Heading 5' : 'Заголовок 5',
'Heading 6' : 'Заголовок 6',
'Paragraph' : 'Параграф',
'Address' : 'Адрес',
'Preformatted' : '',
// font size
'Small (8pt)' : 'Мелкий (8pt)',
'Small (10px)' : 'Маленький (10px)',
'Small (12pt)' : 'Небольшой (12pt)',
'Normal (14pt)' : 'Обычный (14pt)',
'Large (18pt)' : 'Большой (18pt)',
'Large (24pt)' : 'Крупный (24pt)',
'Large (36pt)' : 'Огромный (36pt)',
// bookmark
'Bookmark name' : 'Имя закладки',
// link
'Link URL' : 'Адрес ссылки (URL)',
'Target' : 'Цель',
'Select bookmark' : 'Выбрать закладку',
'Open link in popup window' : 'Открыть ссылку во всплывающем окне',
'URL' : '',
'Window name' : 'Название окна',
'Window size' : 'Размер окна',
'Window position' : 'Позиция окна',
'Location bar' : 'Панель локации',
'Menu bar' : 'Панель меню',
'Toolbar' : 'Панель инструментов',
'Scrollbars' : 'Полосы прокрутки',
'Status bar' : 'Строка состояния',
'Resizable' : 'Изменение размера',
'Depedent' : 'Зависимый (Netscape)',
'Add return false' : 'Добавить (return false)',
'Target MIME type' : 'MIME type цели',
'Relationship page to target (rel)' : 'Отношение страницы к цели (rel)',
'Relationship target to page (rev)' : 'Отношение цели к странице (rev)',
'Tab index' : '',
'Access key' : 'Клавиша доступа',
// image
'Size' : 'Размер',
'Preview' : 'Предварительный просмотр',
'Margins' : 'Отступы',
'Alt text' : 'Описание (Alt)',
'Image URL' : 'URL',
// table
'Spacing' : 'Промежуток (spacing)',
'Padding' : 'Отступ (padding)',
'Rows' : 'Строки',
'Columns' : 'Колонки',
'Groups' : 'Группы',
'Cells' : 'Ячейки',
'Caption' : 'Заголовок таблицы',
'Inner borders' : 'Внутренний бордюр',
// table cell
'Table cell type' : 'Тип ячейки',
'Data' : 'Данные',
'Header' : 'Заголовок',
'Justify' : 'По краям',
'Paddings' : 'Отступы',
'Apply to' : 'Применить к',
'Current cell' : 'Выбранная ячейка',
'All cells in row' : 'Все ячейки в ряду',
'All cells in column' : 'Все ячейки в столбце',
'All cells in table' : 'Все ячейки таблицы',
// about
'About elRTE' : 'О редакторе elRTE',
'Version' : 'Версия',
'Licence' : 'Лицензия',
'elRTE is an open-source JavaScript based WYSIWYG HTML-editor.' : 'elRTE - это свободный WYSIWYG редактор для сайтов и систем управления контентом (CMS), написанный на JavaScript.',
'Main goal of the editor - simplify work with text and formating (HTML) on sites, blogs, forums and other online services.' : 'Основная цель редактора - максимально упростить работу с текстом и разметкой (HTML) на сайтах, блогах, форумах и прочих online сервисах.',
'You can use it in any commercial or non-commercial projects.' : 'Вы можете использовать его в любых коммерческих и некоммерческих проектах.',
'Authors' : 'Авторы',
'Chief developer' : 'Ведущий разработчик',
'Developer, tech support' : 'Разработчик, техническая поддержка',
'Developer' : 'Разработчик',
'Interface designer' : 'Дизайнер интерфейса',
'Spanish localization' : 'Испанская локализация',
'Czech localization' : 'Чешская локализация',
'Japanese localization' : 'Японская локализация',
'Latvian localization' : 'Латышская локализация',
'German localization' : 'Немецкая локализация',
'Ukranian localization' : 'Украинская локализация',
'Persian (farsi) localization' : 'Персидская (фарси) локализация',
'Arabic localization' : 'Арабская локализация',
'RTL support' : 'Поддержка RTL',
'French localization' : 'Французская локализация',
'Dutch localization' : 'Голландская локализация',
'Hungarian localization' : 'Венгерская локализация',
'Polish localization' : 'Польская локализация',
'Italian localization' : 'Итальянская локализация',
'Traditional Chinese localization' : 'Китайская (традиционная) локализация',
'For more information about this software visit the' : 'Подробная информация и форум тех. поддержки',
'elRTE website' : 'на сайте elRTE'
}
})(jQuery);

View file

@ -0,0 +1,172 @@
/*
* Slovak translation
* @author Lubos Voros <lubos@simpledevelopment.sk>
* @version 2010-09-19
*/
(function($) {
elRTE.prototype.i18Messages.cs = {
'_translator' : 'Lubos Voros &lt;lubos@simpledevelopment.sk&gt;',
'_translation' : 'Slovak translation',
'Editor' : 'Editor',
'Source' : 'Zdroj',
// Panel Name
'Copy/Pase' : 'Kopírovať/Vložiť',
'Undo/Redo' : 'Zpäť/Znova',
'Text styles' : 'Štýly',
'Colors' : 'Farby',
'Alignment' : 'Zarovnanie',
'Indent/Outdent' : 'Odsadiť / Predsadit',
'Text format' : 'Formát',
'Lists' : 'Zoznamy',
'Misc elements' : 'Iné elementy',
'Links' : 'Odkazy',
'Images' : 'Obrázky',
'Media' : 'Média',
'Tables' : 'Tabuľky',
'File manager (elFinder)' : 'Správca súborov (elFinder)',
'elfinder' : 'Správca súborov',
// button names
'Save' : 'Uložiť',
'Copy' : 'Kopírovať',
'Cut' : 'Vystrihnúť',
'Paste' : 'Vložiť',
'Paste only text' : 'Vložiť ako text',
'Paste formatted text' : 'Vložiť formátovaný text',
'Clean format' : 'Vyčistiť',
'Undo last action' : 'Zpäť',
'Redo previous action' : 'Znova',
'Bold' : 'Tučné',
'Italic' : 'Kurzíva',
'Underline' : 'Podčiarknuté',
'Strikethrough' : 'Priečiarknuté',
'Superscript' : 'Horný index',
'Subscript' : 'Dolný index',
'Align left' : 'Zarovnať vľavo',
'Ailgn right' : 'Zarovnať vpravo',
'Align center' : 'Zarovnať na stred',
'Align full' : 'Do bloku',
'Font color' : 'Farba písma',
'Background color' : 'Farba pozadí',
'Indent' : 'Odsadiť',
'Outdent' : 'Predsadiť',
'Format' : 'Formát',
'Font size' : 'Veľkosť',
'Font' : 'Písmo',
'Ordered list' : 'Číslovaný zoznam',
'Unordered list' : 'Zoznam',
'Horizontal rule' : 'Vodorovná čiara',
'Blockquote' : 'Citát',
'Block element (DIV)' : 'DIV element',
'Link' : 'Odkaz',
'Delete link' : 'Odstraniť odkaz',
'Bookmark' : 'Záložka',
'Image' : 'Obrázok',
'Table' : 'Tabuľka',
'Delete table' : 'Smazať tabuľku',
'Insert row before' : 'Vložiť riadok nad',
'Insert row after' : 'Vložiť riadok pod',
'Delete row' : 'Smazať riadok',
'Insert column before' : 'Vložiť stľpec před',
'Insert column after' : 'Vložiť stľpec za',
'Delete column' : 'Smazať stľpec',
'Merge table cells' : 'Zlúčiť bunky',
'Split table cell' : 'Rozděliť bunku',
'Toggle display document structure' : 'Zobraziť štruktúru',
'Table cell properties' : 'Vlastnosti bunky',
'Table properties' : 'Vlastnosti tabuľky',
'Toggle full screen mode' : 'Celá obrazovka',
'Open file manager' : 'Otvoriť správcu súborov',
'Non breakable space' : 'Nerozdeliteľná medzera',
'Stop element floating' : 'Zrušiť obtekanie elementu',
// dialogs
'Warning' : 'Pozor',
'Properies' : 'Vlastnosti',
'Popup' : 'Pop-up',
'Advanced' : 'Viacej',
'Events' : 'Udalosti',
'Width' : 'Šířka',
'Height' : 'Výška',
'Left' : 'Vľavo',
'Center' : 'Na stred',
'Right' : 'Vpravo',
'Border' : 'Rámček',
'Background' : 'Pozadie',
'Css class' : 'CSS trieda',
'Css style' : 'CSS štýl',
'No' : 'Nie',
'Title' : 'Titulka',
'Script direction' : 'Pravidlá scriptu',
'Language' : 'Jazyk',
'Charset' : 'Znaková sada',
'Not set' : 'Nenastavené',
'Left to right' : 'Zľava doprava',
'Right to left' : 'Zprava doľava',
'In this window' : 'V tomto okne (_self)',
'In new window (_blank)' : 'V novom okne (_blank)',
'In new parent window (_parent)' : 'V novom rodičovskom okne (_parent)',
'In top frame (_top)' : 'V hlavnom okne (_top)',
'URL' : 'URL',
'Open in' : 'Otevoriť v',
// copy
'This operation is disabled in your browser on security reason. Use shortcut instead.' : 'Táto operácia je vo vašom prehliadači vypnutá kvôli bezpečnosti. Použite klávesovú skratku.',
// format
'Heading 1' : 'Nadpis 1',
'Heading 2' : 'Nadpis 2',
'Heading 3' : 'Nadpis 3',
'Heading 4' : 'Nadpis 4',
'Heading 5' : 'Nadpis 5',
'Heading 6' : 'Nadpis 6',
'Paragraph' : 'Odstavec',
'Address' : 'Adresa',
'Preformatted' : 'Predformátované',
// font size
'Small (8pt)' : 'Malé (8 pt)',
'Small (10px)' : 'Malé (10 pt)',
'Small (12pt)' : 'Malé (12 pt)',
'Normal (14pt)' : 'Normálne (14 pt)',
'Large (18pt)' : 'Veľké (18 pt)',
'Large (24pt)' : 'Veľké (24 pt)',
'Large (36pt)' : 'Veľké (36 pt)',
// bookmark
'Bookmark name' : 'Názov záložky',
// link
'Link URL' : 'URL',
'Target' : 'Cieľ',
'Open link in popup window' : 'Otvárať odkaz v popup okne.',
'URL' : 'URL',
'Window name' : 'Meno okna',
'Window size' : 'Veľkosť okna',
'Window position' : 'Pozícia okna',
'Location bar' : 'Adresový riadok',
'Menu bar' : 'Ponuky',
'Toolbar' : 'Lišta nástrojov',
'Scrollbars' : 'Posuvníky',
'Status bar' : 'Stavový riadok',
'Resizable' : 'Zmena veľkosti',
'Depedent' : 'Závislý',
'Add return false' : 'Pridat return false',
'Target MIME type' : 'Cieľový MIME typ',
'Relationship page to target (rel)' : '',
'Relationship target to page (rev)' : '',
'Tab index' : '',
'Access key' : '',
// image
'Size' : 'Veľkosti',
'Preview' : 'Náhľad',
'Margins' : 'Okraje',
'Alt text' : 'Alternativny text',
'Image URL' : 'URL',
// table
'Spacing' : 'Vonkajši okraj',
'Padding' : 'Vnútorný okraj',
'Rows' : 'Riadky',
'Columns' : 'Stľpce',
'Groups' : 'Skupiny',
'Cells' : 'Buňky',
'Caption' : 'Titulok',
'Inner borders' : 'Vnútorné rámčeky'
}
})(jQuery);

View file

@ -0,0 +1,210 @@
/*
* Thai translation
* @author Jaideejung007 (Anusuk Sangubon) <jaideejung007@gmail.com>, http://www.thzaa.com
* @version 2010-10-27
*/
(function($) {
elRTE.prototype.i18Messages.th = {
'_translator' : 'Anusuk Sangubon &lt;jaideejung007@gmail.com&gt;',
'_translation' : 'Thai translation',
'Editor' : 'อิดิเตอร์',
'Source' : 'ซอร์ส',
// panels names
'Copy/Pase' : 'คัดลอก/วาง',
'Undo/Redo' : 'เลิกทำ/ทำซ้ำ',
'Text styles' : 'ลักษณะข้อความ',
'Colors' : 'สี',
'Alignment' : 'การจัดตำแหน่ง',
'Indent/Outdent' : 'เพิ่มเยื้อง/ลดเยื้อง',
'Text format' : 'รูปแบบตัวอักษร',
'Lists' : 'รายการ',
'Misc elements' : 'องค์ประกอบอื่นๆ',
'Links' : 'ลิงค์',
'Images' : 'ภาพ',
'Media' : 'มีเดีย',
'Tables' : 'ตาราง',
'File manager (elFinder)' : 'จัดการไฟล์ (elFinder)',
// buttons names
'About this software' : 'เกี่ยวกับซอฟต์แวร์นี้',
'Save' : 'บันทึก',
'Copy' : 'คัดลอก',
'Cut' : 'ตัด',
'Paste' : 'วาง',
'Paste only text' : 'วางข้อความเท่านั้น',
'Paste formatted text' : 'วางข้อความที่จัดรูปแบบ',
'Clean format' : 'ล้างรูปแบบ',
'Undo last action' : 'ยกเลิกการทำงานล่าสุด',
'Redo previous action' : 'ทำซ้ำการกระทำก่อนหน้า',
'Bold' : 'ตัวหนา',
'Italic' : 'ตัวเอียง',
'Underline' : 'ขีดเส้นใต้',
'Strikethrough' : 'ขีดเส้นตรงกลาง',
'Superscript' : 'ตัวยก',
'Subscript' : 'ตัวห้อย',
'Align left' : 'ชิดซ้าย',
'Ailgn right' : 'ชิดขวา',
'Align center' : 'กึ่งกลาง',
'Align full' : 'จัดเต็ม',
'Font color' : 'สีตัวอักษร',
'Background color' : 'สีพื้นหลัง',
'Indent' : 'เพิ่มเยื้อง',
'Outdent' : 'ลดเยื้อง',
'Format' : 'รูปแบบ',
'Font size' : 'ขนาดอักษร',
'Font' : 'แบบอักษร',
'Ordered list' : 'ลำดับรายการ',
'Unordered list' : 'ไม่มีลำดับรายการ',
'Horizontal rule' : 'เส้นคั่น',
'Blockquote' : 'ข้อความย่อหน้า',
'Block element (DIV)' : 'องค์ประกอบ Block (DIV)',
'Link' : 'ลิงค์',
'Delete link' : 'ลบลิงค์',
'Bookmark' : 'บุ๊คมาร์ค',
'Image' : 'ภาพ',
'Table' : 'ตาราง',
'Delete table' : 'ลบตาราง',
'Insert row before' : 'แทรกแถวบน',
'Insert row after' : 'แทรกแถวหลัง',
'Delete row' : 'ลบแถว',
'Insert column before' : 'แทรกคอลัมน์บน',
'Insert column after' : 'แทรกคอลัมน์ล่าง',
'Delete column' : 'ลบคอลัมน์',
'Merge table cells' : 'ผสานเซลล์ตาราง',
'Split table cell' : 'แบ่งเซลล์ของตาราง',
'Toggle display document structure' : 'สลับโครงสร้างของเอกสาร',
'Table cell properties' : 'ตารางคุณสมบัติของเซลล์',
'Table properties' : 'คุณสมบัติของตาราง',
'Toggle full screen mode' : 'โหมดการสลับหน้าจอแบบเต็ม',
'Open file manager' : 'เปิดการจัดการไฟล์',
'Non breakable space' : 'ช่องว่าง',
'Stop element floating' : 'องค์ประกอบหยุดลอย',
// dialogs
'Warning' : 'คำเตือน',
'Properies' : 'Properies',
'Popup' : 'ป๊อปอัพ',
'Advanced' : 'ขั้นสูง',
'Events' : 'เหตุการณ์',
'Width' : 'กว้าง',
'Height' : 'สูง',
'Left' : 'ซ้าย',
'Center' : 'กลาง',
'Right' : 'ขวา',
'Border' : 'เส้นขอบ',
'Background' : 'พื้นหลัง',
'Css class' : 'Css class',
'Css style' : 'Css style',
'No' : 'ไม่',
'Title' : 'ชื่อเรื่อง',
'Script direction' : 'ทิศทางสคริปต์',
'Language' : 'ภาษา',
'Charset' : 'รหัสตัวอักษร',
'Not set' : 'ไม่ได้ตั้งค่า',
'Left to right' : 'ซ้ายไปขวา',
'Right to left' : 'ขวาไปซ้าย',
'In this window' : 'ในหน้าต่างนี้',
'In new window (_blank)' : 'ในหน้าต่างใหม่ (_blank)',
'In new parent window (_parent)' : 'ในหน้าต่างใหม่ (_parent)',
'In top frame (_top)' : 'ในเฟรมด้านบน (_top)',
'URL' : 'URL',
'Open in' : 'เปิดใน',
'Open file manger' : 'เปิดการจัดการไฟล์',
// copy
'This operation is disabled in your browser on security reason. Use shortcut instead.' : 'การดำเนินการนี้จะปิดการใช้งานในเบราว์เซอร์ของคุณในเหตุผลด้านความปลอดภัย กรุณาใช้ทางลัดแทน',
// format
'Heading 1' : 'หัวเรื่อง 1',
'Heading 2' : 'หัวเรื่อง 2',
'Heading 3' : 'หัวเรื่อง 3',
'Heading 4' : 'หัวเรื่อง 4',
'Heading 5' : 'หัวเรื่อง 5',
'Heading 6' : 'หัวเรื่อง 6',
'Paragraph' : 'ย่อหน้า',
'Address' : 'ที่อยู่',
'Preformatted' : 'จัดย่อหน้าอิสระ',
// font size
'Small (8pt)' : 'ขนาดเล็ก (8pt)',
'Small (10px)' : 'ขนาดเล็ก (10px)',
'Small (12pt)' : 'ขนาดเล็ก (12pt)',
'Normal (14pt)' : 'ปกติ (14pt)',
'Large (18pt)' : 'ขนาดใหญ่ (18pt)',
'Large (24pt)' : 'ขนาดใหญ่ (24pt)',
'Large (36pt)' : 'ขนาดใหญ่ (36pt)',
// bookmark
'Bookmark name' : 'ชื่อบุ๊คมาร์ค',
// link
'Link URL' : 'ลิงค์ URL',
'Target' : 'Target',
'Select bookmark' : 'เลือกบุ๊คมาร์ค',
'Open link in popup window' : 'เปิดลิงก์ในหน้าต่างป๊อปอัพ',
'Window name' : 'ชื่อหน้าต่าง',
'Window size' : 'ขนาดหน้าต่าง',
'Window position' : 'ตำแหน่งหน้าต่าง',
'Location bar' : 'แถบที่มา',
'Menu bar' : 'แถบเมนู',
'Toolbar' : 'แถบเครื่องมือ',
'Scrollbars' : 'สกอลล์บาร์',
'Status bar' : 'แถบสถานะ',
'Resizable' : 'ปรับขนาด',
'Depedent' : 'Depedent',
'Add return false' : 'เพิ่ม return false',
'Target MIME type' : 'รูปแบบ Target MIME',
'Relationship page to target (rel)' : 'หน้าความสัมพันธ์ไปยังเป้าหมาย (rel)',
'Relationship target to page (rev)' : 'เป้าหมายความสัมพันธ์ไปยังหน้า (rev)',
'Tab index' : 'ดัชนีแท็บ',
'Access key' : 'คีย์สำหรับเข้าถึง',
// image
'Size' : 'ขนาด',
'Preview' : 'แสดงตัวอย่าง',
'Margins' : 'ขอบ',
'Alt text' : 'ข้อความ Alt',
'Image URL' : 'URL ของรูป',
// table
'Spacing' : 'ระยะห่าง',
'Padding' : 'Padding',
'Rows' : 'แถว',
'Columns' : 'คอลัมน์',
'Groups' : 'กลุ่ม',
'Cells' : 'เซลล์',
'Caption' : 'Caption',
'Inner borders' : 'เส้นขอบด้านใน',
// table cell
'Table cell type' : 'ประเภทของเซลล์ตาราง',
'Data' : 'ข้อมูล',
'Header' : 'หัว',
'Justify' : 'ชิด',
'Paddings' : 'Paddings',
'Apply to' : 'นำไปใช้',
'Current cell' : 'เซลล์ปัจจุบัน',
'All cells in row' : 'เซลล์ทั้งหมดในแถว',
'All cells in column' : 'เซลล์ทั้งหมดในคอลัมน์',
'All cells in table' : 'เซลล์ทั้งหมดในตาราง',
// about
'About elRTE' : 'เกี่ยวกับ elRTE',
'Version' : 'เวอร์ชั่น',
'Licence' : 'ใบอนุญาต',
'elRTE is an open-source JavaScript based WYSIWYG HTML-editor.' : 'elRTE คือ โอเพ้นซอร์ส ภายใต้การทำงานของจาวาสคริปต์บนคำสั่ง WYSIWYG HTML-editor',
'Main goal of the editor - simplify work with text and formating (HTML) on sites, blogs, forums and other online services.' : 'เป้าหมายหลักของโปรแกรมแก้ไข -- ลดความซับซ้อนของการทำงานกับข้อความและรูปแบบ (HTML) ในเว็บไซต์บล็อกฟอรั่มและบริการออนไลน์อื่นๆ',
'You can use it in any commercial or non-commercial projects.' : 'คุณสามารถใช้ในเชิงพาณิชย์หรือโครงการที่ไม่ใช่เชิงพาณิชย์ใดๆ',
'Authors' : 'ผู้เขียน',
'Chief developer' : 'ประธานผู้พัฒนา',
'Developer, tech support' : 'นักพัฒนาสนับสนุนด้านเทคนิค',
'Developer' : 'นักพัฒนา',
'Interface designer' : 'นักออกแบบอินเตอร์เฟซ',
'Spanish localization' : 'แปลภาษาสเปน',
'Czech localization' : 'แปลภาษาเช็ก',
'Japanese localization' : 'แปลภาษาญี่ปุ่น',
'Latvian localization' : 'แปลภาษาลัตเวีย',
'German localization' : 'แปลภาษาเยอรมัน',
'Ukranian localization' : 'แปลภาษายูเครน',
'Persian (farsi) localization' : 'แปลภาษาเปอร์เซีย (farsi)',
'Arabic localization' : 'แปลภาษาอาหรับ',
'RTL support' : 'สนับสนุน RTL',
'French localization' : 'แปลภาษาฝรั่งเศส',
'Dutch localization' : 'แปลภาษาดัตช์',
'Hungarian localization' : 'แปลภาษาฮังการี',
'Polish localization' : 'แปลภาษาโปแลนด์',
'Italian localization' : 'แปลภาษาอิตาลี',
'Traditional Chinese localization' : 'แปลภาษาจีนดั้งเดิม',
'For more information about this software visit the' : 'สำหรับข้อมูลเพิ่มเติมเกี่ยวกับซอฟต์แวร์นี้ เยี่ยมชมได้ที่',
'elRTE website' : 'เว็บไซต์ elRTE'
}
})(jQuery);

View file

@ -0,0 +1,210 @@
/**
* Turkish translation
* @author Özgür Çakırca <dijitalartist@gmail.com>
* @version 2010-10-15
*/
(function($) {
elRTE.prototype.i18Messages.tr = {
'_translator' : 'Özgür Çakırca &lt;dijitalartist@gmail.com&gt;',
'_translation' : 'Turkish translation',
'Editor' : 'Editör',
'Source' : 'Kaynak Kodu',
// panels names
'Copy/Pase' : 'Kopyala/Yapıştır',
'Undo/Redo' : 'Geri Al/Tekrarla',
'Text styles' : 'Yazı Stilleri',
'Colors' : 'Renkler',
'Alignment' : 'Hizalama',
'Indent/Outdent' : 'Girinti/Girintiyi Azalt',
'Text format' : 'Yazı Biçimleri',
'Lists' : 'Liste',
'Misc elements' : 'Misc Elemanları',
'Links' : 'Linkler',
'Images' : 'Resimler',
'Media' : 'Medya',
'Tables' : 'Tablolar',
'File manager (elFinder)' : '',
// buttons names
'About this software' : 'Bu yazılım hakkında',
'Save' : 'Kaydet',
'Copy' : 'Kopyala',
'Cut' : 'Kes',
'Paste' : 'Yapıştır',
'Paste only text' : 'Yalnızca yazıyı yapıştır',
'Paste formatted text' : 'Yazı biçimini yapıştır',
'Clean format' : 'Biçimi temizle',
'Undo last action' : 'Son eylemi geri al',
'Redo previous action' : 'Önceki eylemi geri dön',
'Bold' : 'Kalın',
'Italic' : 'İtalik',
'Underline' : 'Altı çizili',
'Strikethrough' : 'Üstü çizili',
'Superscript' : 'Üst simge',
'Subscript' : 'Alt simge',
'Align left' : 'Sola hizala',
'Ailgn right' : 'Sağa hizala',
'Align center' : 'Ortala',
'Align full' : 'İki yana yasla',
'Font color' : 'Yazı tipi rengi',
'Background color' : 'Arka plan rengi',
'Indent' : 'Girintiyi artır',
'Outdent' : 'Girintiyi azalt',
'Format' : 'Biçim',
'Font size' : 'Yazı tipi boyutu',
'Font' : 'Yazı tipi',
'Ordered list' : 'Numaralı Liste',
'Unordered list' : 'Simgeli Liste',
'Horizontal rule' : 'Yatay çizgi',
'Blockquote' : 'Blok oluştur',
'Block element (DIV)' : 'Blok öğe (DIV)',
'Link' : 'Link ekle düzenle',
'Delete link' : 'Köprü kaldır',
'Bookmark' : 'Bağlantı ekle',
'Image' : 'Resim',
'Table' : 'Tablo ekle',
'Delete table' : 'Tablo sil',
'Insert row before' : 'Satır başına ekle',
'Insert row after' : 'Satır sonuna ekle',
'Delete row' : 'Satır sil',
'Insert column before' : 'Sütun başına ekle',
'Insert column after' : 'Sütun sonuna ekle',
'Delete column' : 'Sütun sil',
'Merge table cells' : 'Tablo hücrelerini birleştir',
'Split table cell' : 'Tablo hücrelerini ayır',
'Toggle display document structure' : 'Belge yapısı görünümünü değiştir',
'Table cell properties' : 'Tablo hücresi özellikleri',
'Table properties' : 'Tablo özellikleri',
'Toggle full screen mode' : 'Tam ekran moduna',
'Open file manager' : 'Dosya yöneticisini aç',
'Non breakable space' : 'Boş karakter ekle',
'Stop element floating' : 'Boşluk aldır (DIV)',
// dialogs
'Warning' : 'Uyarı',
'Properies' : 'Özellik',
'Popup' : 'Açılır',
'Advanced' : 'Gelişmiş',
'Events' : 'Olaylar',
'Width' : 'Genişlik',
'Height' : 'Yükseklik',
'Left' : 'Sol',
'Center' : 'Merkez',
'Right' : 'Sağ',
'Border' : 'Kalınlık',
'Background' : 'Arkaplan',
'Css class' : 'Css sınıfı',
'Css style' : 'Css stili',
'No' : 'Hayır',
'Title' : 'Başlık',
'Script direction' : 'Script yönü',
'Language' : 'Dil',
'Charset' : 'Karakter',
'Not set' : 'Ayarlanmamış',
'Left to right' : 'Soldan sağa',
'Right to left' : 'Sağdan sola',
'In this window' : 'Bu pencerede aç',
'In new window (_blank)' : 'Yeni pencerede aç (_blank)',
'In new parent window (_parent)' : 'Yeni ana pencerede aç (_parent)',
'In top frame (_top)' : 'Üst çerçeve (_top)',
'URL' : 'URL',
'Open in' : 'Açık',
'Open file manger' : 'Dosya yöneticisini aç',
// copy
'This operation is disabled in your browser on security reason. Use shortcut instead.' : 'Bu işlem güvenlik nedeni üzerinde tarayıcınızda devre dışıdır. yerine kısayol kullanın.',
// format
'Heading 1' : 'Başlık 1',
'Heading 2' : 'Başlık 2',
'Heading 3' : 'Başlık 3',
'Heading 4' : 'Başlık 4',
'Heading 5' : 'Başlık 5',
'Heading 6' : 'Başlık 6',
'Paragraph' : 'Paragraf',
'Address' : 'Adres',
'Preformatted' : 'Biçimlendirilmiş',
// font size
'Small (8pt)' : 'Küçük (8pt)',
'Small (10px)' : 'Küçük (10pt)',
'Small (12pt)' : 'Küçük (12pt)',
'Normal (14pt)' : 'Normal (14pt)',
'Large (18pt)' : 'Büyük (18pt)',
'Large (24pt)' : 'Büyük (24pt)',
'Large (36pt)' : 'Büyük (36pt)',
// bookmark
'Bookmark name' : 'Çapa adı',
// link
'Link URL' : 'Link URL',
'Target' : 'Hedef',
'Select bookmark' : 'Bağlantı Seç',
'Open link in popup window' : 'Popup pencerede aç',
'Window name' : 'Pencere adı',
'Window size' : 'Pencere boyutu',
'Window position' : 'Pencere pozisyonu',
'Location bar' : 'Konum çubuğuna',
'Menu bar' : 'Menü çubuğu',
'Toolbar' : 'Araç çubuğu',
'Scrollbars' : 'Kaydırma',
'Status bar' : 'Durum çubuğu',
'Resizable' : 'Yeniden boyutlandır',
'Depedent' : 'Depedent',
'Add return false' : 'Add return false',
'Target MIME type' : 'Hedef MIME tipi',
'Relationship page to target (rel)' : 'Hedef sayfa ilişkisi(rel)',
'Relationship target to page (rev)' : 'Hedef sayfaya ilişkisi (rev)',
'Tab index' : 'Sekme dizini',
'Access key' : 'Erişim tuşu',
// image
'Size' : 'Boyut',
'Preview' : 'Ön izleme',
'Margins' : 'Margins',
'Alt text' : 'Alt metni',
'Image URL' : 'Resim URLsi',
// table
'Spacing' : 'Aralık',
'Padding' : '',
'Rows' : 'Satırları',
'Columns' : 'Sütunlar',
'Groups' : 'Gruplar',
'Cells' : 'Hücreler',
'Caption' : 'Başlık',
'Inner borders' : 'İç sınırları',
// table cell
'Table cell type' : 'Tablo hücre tipi',
'Data' : 'Bilgi',
'Header' : 'Başlık',
'Justify' : 'Satır Uzunluğu',
'Paddings' : 'Başluk',
'Apply to' : 'Uygulamak için',
'Current cell' : 'Geçerli hücre',
'All cells in row' : 'Satırdaki tüm hücreler',
'All cells in column' : 'Sütundaki tüm hücreler',
'All cells in table' : 'Tablodaki tüm hücreler',
// about
'About elRTE' : 'elRTE Hakkında',
'Version' : 'Versiyon',
'Licence' : 'Lisans',
'elRTE is an open-source JavaScript based WYSIWYG HTML-editor.' : 'elRTE açık kodlu WYSIWYG JavaScript tabanlı HTML düzenleyicisidir.',
'Main goal of the editor - simplify work with text and formating (HTML) on sites, blogs, forums and other online services.' : 'Editör ana hedefi - metin ve biçimlendirme (HTML) siteleri, bloglar, forumlar ve diğer online hizmetlerine çalışmayı basitleştirir.',
'You can use it in any commercial or non-commercial projects.' : 'Herhangi bir ticari ve ticari olmayan projelerde de kullanabilirsiniz.',
'Authors' : 'Yazarlar',
'Chief developer' : 'Baş geliştiricisi',
'Developer, tech support' : 'Geliştirici, teknik destek',
'Developer' : 'Geliştirici',
'Interface designer' : 'Interface designer',
'Spanish localization' : 'İspanyolca yerelleştirme',
'Czech localization' : 'Çek yerelleştirme',
'Japanese localization' : 'Japon yerelleştirme',
'Latvian localization' : 'Letonyalı yerelleştirme',
'German localization' : 'Alman yerelleştirme',
'Ukranian localization' : 'Ukrayna yerelleştirme',
'Persian (farsi) localization' : 'Farsça (farsi) yerelleştirme',
'Arabic localization' : 'Arapça yerelleştirme',
'RTL support' : 'RTL destek',
'French localization' : 'Fransız yerelleştirme',
'Dutch localization' : 'Hollandaca yerelleştirme',
'Hungarian localization' : 'Macar yerelleştirme',
'Polish localization' : 'Lehçe yerelleştirme',
'Italian localization' : 'İtalyan yerelleştirme',
'Traditional Chinese localization' : 'Geleneksel Çin yerelleştirme',
'For more information about this software visit the' : 'Bu yazılım hakkında daha fazla bilgi için ziyaret',
'elRTE website' : 'elRTE web sitesi'
}
})(jQuery);

View file

@ -0,0 +1,203 @@
/*
* Ukranian translation
* @author Artem Vasilyev
* @version 2010-09-18
*/
(function($) {
elRTE.prototype.i18Messages.uk = {
'_translator' : 'Artem Vasilyev',
'_translation' : 'Ukranian translation',
'Editor' : 'Редактор',
'Source' : 'Джерело',
// Назви панелей
'Copy / Pase' : 'Копіювання / Вставка',
'Undo / Redo' : 'Скасувати / Повтор дії',
'Text styles' : 'Стилі тексту',
'Colors': 'Кольори',
'Alignment': 'Вирівнювання',
'Indent / Outdent': 'Відступи',
'Text format': 'Форматування',
'Lists': 'Списки',
'Misc elements': 'Різні елементи',
'Links': 'Посилання',
'Images': 'Малюнки',
'Media': 'Media файли',
'Tables': 'Таблиці',
'File manager (elFinder)' : 'Файловый менеджер (elFinder)',
// Назви кнопок
'About this software' : 'О программе',
'Save': 'Зберегти',
'Copy': 'Копіювати',
'Cut': 'Вирізати',
'Paste': 'Вставити',
'Paste only text': 'Вставити тільки текст',
'Paste formatted text': 'Вставити форматування тексту',
'Clean format': 'Видалити форматування',
'Undo last action': 'Скасувати дію',
'Redo previous action': 'Повторити дію',
'Bold': 'Товстий',
'Italic': 'Курсив',
'Underline': 'Підкреслений',
'Strikethrough': 'Перекреслений',
'Superscript': 'Верхній регістр',
'Subscript': 'Нижній регістр',
'Align left': 'Вирівняти ліворуч',
'Ailgn right': 'Вирівняти праворуч',
'Align center': 'Вирівняти по центру',
'Align full': 'Вирівняти по краях',
'Font color': 'Колір тексту',
'Background color': 'Колір залікві',
'Indent': 'Збільшити відступ',
'Outdent': 'Зменшити відступ',
'Format': 'Форматування',
'Font size': 'Розмір шрифту',
'Font': 'Шрифт',
'Ordered list': 'Нумерований список',
'Unordered list': 'Ненумерований список',
'Horizontal rule': 'Горизонтальна лінія',
'Blockquote': 'Цитата',
'Block element (DIV)' : 'Блочный элемент (DIV)',
'Link': 'Посилання',
'Delete link': 'Видалити посилання',
'Bookmark': 'Закладка',
'Image': 'Зображення',
'Table': 'Таблиця',
'Delete table': 'Видалити таблицю',
'Insert row before': 'Вставити ряд до',
'Insert row after': 'Вставити ряд після',
'Delete row': 'Видалити ряд',
'Insert column before': 'Вставити колонку до',
'Insert column after': 'Вставити колонку після',
'Delete column': 'Видалити колонку',
'Merge table cells': 'склеїти осередку',
'Split table cell': 'Розділити клітинку',
'Toggle display document structure': 'Показати структуру документа / невидимі елементи',
'Table cell properties': 'Властивість клітинку',
'Table properties': 'Властивість таблиці',
'Toggle full screen mode' : 'Во весь экран',
'Open file manager' : 'Открыть файловый менеджер',
'Non breakable space' : 'Неразрывный пробел',
'Stop element floating' : 'Отключить обтекание элементов текстом',
//Dialogs
'Warning': 'Увага',
'Properies': 'Властивості',
'Popup': 'Нове вікно',
'Advanced': 'Більше',
'Events': 'Події',
'Width': 'Ширина',
'Height': 'Висота',
'Left' : 'Слева',
'Center' : 'По центру',
'Right' : 'Справа',
'Border': 'Бордюр',
'Background': 'Фон',
'Css class': 'Css клас',
'Css style': 'Css style',
'No': 'Ні',
'Title': 'Заголовок',
'Script direction': 'Направлення письма',
'Language': 'Мова',
'Charset': 'Кодування',
'Not set': 'Не встановлено',
'Left to right': 'Зліва направо',
'Right to left': 'Справа наліво',
'In this window': 'У цьому вікні',
'In new window (_blank)': 'У новому вікні (_blank)',
'In new parent window (_parent)': 'У батьківському вікні (_parent)',
'In top frame (_top)': 'У верхньому фреймі (_top)',
'URL':'',
'Open in': 'Відкрити',
// Copy
'This operation is disabled in your browser on security reason. Use shortcut instead. ' : 'Дія заборонено у вашому браузері з міркувань безпеки. Використовуйте клавіші ',
// Format
'Heading 1' : 'Заголовок 1',
'Heading 2' : 'Заголовок 2',
'Heading 3' : 'Заголовок 3',
'Heading 4' : 'Заголовок 4',
'Heading 5' : 'Заголовок 5',
'Heading 6' : 'Заголовок 6',
'Paragraph' : 'Параграф',
'Address' : 'Адрес',
'Preformatted':'',
// Font size
'Small (8pt)': 'Дрібний (8pt)',
'Small (10px)': 'Маленький (10px)',
'Small (12pt)': 'Невеликий (12pt)',
'Normal (14pt)': 'Звичайний (14pt)',
'Large (18pt)': 'Великий (18pt)',
'Large (24pt)': 'Крупний (24pt)',
'Large (36pt)': 'Величезний (36pt)',
// Bookmark
'Bookmark name': 'Ім&rsquo;я закладки',
// Link
'Link URL': 'Адреса ссиклі (URL)',
'Target': 'Мета',
'Select bookmark' : 'Выбрать закладку',
'Open link in popup window': 'Відкрити посилання у спливаючому вікні',
'URL':'',
'Window name': 'Назва вікна',
'Window size': 'Розмір вікна',
'Window position': 'Позиція вікна',
'Open link in popup window': 'Відкрити посилання у спливаючому вікні',
'Window name': 'Назва вікна',
'Window size': 'Розмір вікна',
'Window position': 'Позиція вікна',
'Location bar': 'Панель локації',
'Menu bar': 'Панель меню',
'Toolbar': 'Панель інструментів',
'Scrollbars': 'Смуги прокрутки',
'Status bar': 'Рядок стану',
'Resizable': 'Зміна розміру',
'Depedent': 'Залежний (Netscape)',
'Add return false': 'Додати (return false)',
'Target MIME type': 'MIME type цілі',
'Relationship page to target (rel)': 'Ставлення сторінки до мети (rel) ',
'Relationship target to page (rev)': 'Відношення мети до сторінки (rev)',
'Tab index':'',
'Access key': 'Клавіша доступу',
// Image
'Size': 'Розмір',
'Preview': 'Попередній перегляд',
'Margins': 'Відступи',
'Alt text': 'Опис (Alt)',
'Image URL': 'URL',
// Table
'Spacing' : 'Проміжок (spacing)',
'Padding' : 'Відступ (padding)',
'Rows' : 'Рядок ',
'Columns' : 'Колонки',
'Groups' : 'Группы',
'Cells' : 'Ячейки',
'Caption' : 'Заголовок таблиці',
'Inner borders' : 'Внутрішній бордюр' ,
// table cell
'Table cell type' : 'Тип ячейки',
'Data' : 'Данные',
'Header' : 'Заголовок',
'Justify' : 'По краям',
'Paddings' : 'Отступы',
'Apply to' : 'Применить к',
'Current cell' : 'Выбранная ячейка',
'All cells in row' : 'Все ячейки в ряду',
'All cells in column' : 'Все ячейки в столбце',
'All cells in table' : 'Все ячейки таблицы',
// about
'About elRTE' : 'О редакторе elRTE',
'Version' : 'Версия',
'Licence' : 'Лицензия',
'elRTE is an open-source JavaScript based WYSIWYG HTML-editor.' : 'elRTE - это свободный WYSIWYG редактор для сайтов и систем управления контентом (CMS), написанный на JavaScript.',
'Main goal of the editor - simplify work with text and formating (HTML) on sites, blogs, forums and other online services.' : 'Основная цель редактора - максимально упростить работу с текстом и разметкой (HTML) на сайтах, блогах, форумах и прочих online сервисах.',
'You can use it in any commercial or non-commercial projects.' : 'Вы можете использовать его в любых коммерческих и некоммерческих проектах.',
'Authors' : 'Авторы',
'Chief developer' : 'Ведущий разработчик',
'Developer, tech support' : 'Разработчик, техническая поддержка',
'Interface designer' : 'Дизайнер интерфейса',
'Spanish localization' : 'Испанская локализация',
'Japanese localization' : 'Японская локализация',
'Latvian localization' : 'Латвийская локализация',
'German localization' : 'Немецкая локализация',
'Ukranian localization' : 'Украинская локализация',
'For more information about this software visit the' : 'Подробная информация и форум тех. поддержки',
'elRTE website' : 'на сайте elRTE'
};
})(jQuery);

View file

@ -0,0 +1,209 @@
/*
* Vietnamese translation
* @author babycntt
* @version 2011-02-01
*/
(function($) {
elRTE.prototype.i18Messages.vi = {
'_translator' : 'babycntt',
'_translation' : 'Vietnamese translation',
'Source' : 'Mã nguồn',
// panels names
'Copy/Pase' : 'Sao chép/Dán',
'Undo/Redo' : 'Khôi phục thao tác/Làm lại thao tác',
'Text styles' : 'Kiểu',
'Colors' : 'Màu sắc',
'Alignment' : 'Canh lề',
'Indent/Outdent' : 'Đẩy sang phải/Đẩy sang trái',
'Text format' : 'Định dạng',
'Lists' : 'Danh sách',
'Misc elements' : 'Chức năng khác',
'Links' : 'Liên kết',
'Images' : 'Hình ảnh',
'Media' : 'Đa phương tiện',
'Tables' : 'Bảng',
'File manager (elFinder)' : 'Quản lí tập tin',
// buttons names
'About this software' : 'Thông tin về phần mềm',
'Save' : 'Lưu',
'Copy' : 'Sao chép',
'Cut' : 'Cắt',
'Paste' : 'Dán',
'Paste only text' : 'Chỉ dán chữ',
'Paste formatted text' : 'Dán theo định dạng văn bản',
'Clean format' : 'Xóa định dạng',
'Undo last action' : 'Khôi phục thao tác',
'Redo previous action' : 'Làm lại thao tác',
'Bold' : 'Đậm',
'Italic' : 'Nghiêng',
'Underline' : 'Gạch chân',
'Strikethrough' : 'Gạch giữa từ',
'Superscript' : 'Chỉ số trên',
'Subscript' : 'Chỉ số dưới',
'Align left' : 'Canh trái',
'Ailgn right' : 'Canh phải',
'Align center' : 'Canh giữa',
'Align full' : 'Canh đều',
'Font color' : 'Màu chữ',
'Background color' : 'Màu nền',
'Indent' : 'Đẩy sang phải',
'Outdent' : 'Đẩy sang trái',
'Format' : 'Định dạng',
'Font size' : 'Cỡ chữ',
'Font' : 'Phông',
'Ordered list' : 'Xếp danh sách theo thứ tự',
'Unordered list' : 'Xếp danh sách không theo thứ tự',
'Horizontal rule' : 'Chèn đường phân cách ngang',
'Blockquote' : 'Khối trích dẫn',
'Block element (DIV)' : 'Tạo khối các thành phần (DIV)',
'Link' : 'Chèn liên kết',
'Delete link' : 'Xóa liên kết',
'Bookmark' : 'Đánh dấu',
'Image' : 'Chèn ảnh',
'Table' : 'Chèn bảng',
'Delete table' : 'Xóa bảng',
'Insert row before' : 'Chèn hàng phía trước',
'Insert row after' : 'Chèn hàng phía sau',
'Delete row' : 'Xóa hàng',
'Insert column before' : 'Chèn cột phía trước',
'Insert column after' : 'Chèn cột phía sau',
'Delete column' : 'Xóa cột',
'Merge table cells' : 'Ghép ô',
'Split table cell' : 'Tách ô',
'Toggle display document structure' : 'Xem cấu trúc của văn bản',
'Table cell properties' : 'Thuộc tính ô',
'Table properties' : 'Thuộc tính bảng',
'Toggle full screen mode' : 'Xem toàn màn hình',
'Open file manager' : 'Quản lí tập tin',
'Non breakable space' : 'Non breakable space',
'Stop element floating' : 'Stop element floating',
// dialogs
'Warning' : 'Cảnh báo',
'Properies' : 'Thuộc tính',
'Popup' : 'Popup',
'Advanced' : 'Nâng cao',
'Events' : 'Sự kiện',
'Width' : 'Rộng',
'Height' : 'Cao',
'Left' : 'Trái',
'Center' : 'Giữa',
'Right' : 'Phải',
'Border' : 'Đậm',
'Background' : 'Nền',
'Css class' : 'Css class',
'Css style' : 'Css style',
'No' : 'Không',
'Title' : 'Tiêu đề',
'Script direction' : 'Script direction',
'Language' : 'Ngôn ngữ',
'Charset' : 'Charset',
'Not set' : 'Không thiết đặt',
'Left to right' : 'Trái qua phải',
'Right to left' : 'Phải qua trái',
'In this window' : 'Trong cửa sổ hiện tại',
'In new window (_blank)' : 'Trong cửa sổ mới (_blank)',
'In new parent window (_parent)' : 'Trong cửa sổ con (_parent)',
'In top frame (_top)' : 'Trong khung cửa sổ đặt trên cùng (_top)',
'URL' : 'Đường dẫn',
'Open in' : 'Mở trong',
'Open file manger' : 'Quản lí tập tin',
// copy
'This operation is disabled in your browser on security reason. Use shortcut instead.' : 'Tính năng này bị khóa trong trình duyệt của bạn vì lí do bảo mật. Dùng tổ hợp phím để thay thế.',
// format
'Heading 1' : 'Tiêu đề 1',
'Heading 2' : 'Tiêu đề 2',
'Heading 3' : 'Tiêu đề 3',
'Heading 4' : 'Tiêu đề 4',
'Heading 5' : 'Tiêu đề 5',
'Heading 6' : 'Tiêu đề 6',
'Paragraph' : 'Đoạn văn',
'Address' : 'Địa chỉ',
'Preformatted' : 'Chưa định dạng',
// font size
'Small (8pt)' : 'Nhỏ (8pt)',
'Small (10px)' : 'Nhỏ (10px)',
'Small (12pt)' : 'Nhỏ (12pt)',
'Normal (14pt)' : 'Bình thường (14pt)',
'Large (18pt)' : 'Lớn (18pt)',
'Large (24pt)' : 'Lớn (24pt)',
'Large (36pt)' : 'Lớn (36pt)',
// bookmark
'Bookmark name' : 'Tên của thẻ làm dấu',
// link
'Link URL' : 'Địa chỉ của liên kết',
'Target' : 'Mở trong',
'Select bookmark' : 'Chọn đánh dấu',
'Open link in popup window' : 'Mở liên kết trong khung cửa sổ đặt trên cùng',
'Window name' : 'Tên cửa sổ',
'Window size' : 'Kích thước cửa sổ',
'Window position' : 'Vị trí cửa sổ',
'Location bar' : 'Hiện thanh định vị',
'Menu bar' : 'Hiện thanh menu',
'Toolbar' : 'Hiện thanh công cụ',
'Scrollbars' : 'Hiện thanh trượt',
'Status bar' : 'Hiện thanh trạng thái',
'Resizable' : 'Có thể điều chỉnh kích thước',
'Depedent' : 'Độc lập',
'Add return false' : 'Add return false',
'Target MIME type' : 'Target MIME type',
'Relationship page to target (rel)' : 'Relationship page to target (rel)',
'Relationship target to page (rev)' : 'Relationship target to page (rev)',
'Tab index' : 'Tab index',
'Access key' : 'Access key',
// image
'Size' : 'Kích thước',
'Preview' : 'Xem trước',
'Margins' : 'Viền',
'Alt text' : 'Chú thích',
'Image URL' : 'Địa chỉ của ảnh',
// table
'Spacing' : 'Khoảng cách',
'Padding' : 'Khoảng đệm',
'Rows' : 'Hàng',
'Columns' : 'Cột',
'Groups' : 'Nhóm',
'Cells' : 'Ô',
'Caption' : 'Tiêu đề',
'Inner borders' : 'Viền bên trong theo',
// table cell
'Table cell type' : 'Kiểu ô',
'Data' : 'Dữ liệu',
'Header' : 'Tiêu đề',
'Justify' : 'Hiệu chỉnh',
'Paddings' : 'Khoảng đệm',
'Apply to' : 'Áp dụng với',
'Current cell' : 'Ô hiện tại',
'All cells in row' : 'Tất cả ô trong một hàng',
'All cells in column' : 'Tất cả ô trong một cột',
'All cells in table' : 'Tất cả ô trong bảng',
// about
'About elRTE' : 'Giới thiệu về elRTE',
'Version' : 'Phiên bản',
'Licence' : 'Bản quyền',
'elRTE is an open-source JavaScript based WYSIWYG HTML-editor.' : 'elRTE là trình soạn thảo mã nguồn mở viết bằng JavaScript dựa trên nền HTML.',
'Main goal of the editor - simplify work with text and formating (HTML) on sites, blogs, forums and other online services.' : 'Mục đích chính của trình soạn thảo là hoạt động tốt với chữ và định dạng (HTML) trên trang web, blog, diễn đàn và những dịch vụ online khác.',
'You can use it in any commercial or non-commercial projects.' : 'Bạn có thể sử dụng với các dự án thương mại hay phi lợi nhuận.',
'Authors' : 'Tác giả',
'Chief developer' : 'Lập trình viên trưởng',
'Developer, tech support' : 'Lập trình, hỗ trợ kĩ thuật',
'Developer' : 'Lập trình viên',
'Interface designer' : 'Thiết kế giao diện',
'Spanish localization' : 'Người dịch ra tiếng Tây Ban Nha',
'Czech localization' : 'Người dịch ra tiếng Cộng hòa Czech',
'Japanese localization' : 'Người dịch ra tiếng Nhật',
'Latvian localization' : 'Người dịch ra tiếng Latvia',
'German localization' : 'Người dịch ra tiếng Đức',
'Ukranian localization' : 'Người dịch ra tiếng U-crai-na',
'Persian (farsi) localization' : 'Người dịch ra tiếng I-ran',
'Arabic localization' : 'Người dịch ra tiếng Ả-rập',
'RTL support' : 'Hỗ trợ RTL',
'French localization' : 'Người dịch ra tiếng Pháp',
'Dutch localization' : 'Người dịch ra tiếng Đức',
'Hungarian localization' : 'Người dịch ra tiếng Hungary',
'Polish localization' : 'Người dịch ra tiếng Ba Lan',
'Italian localization' : 'Người dịch ra tiếng Ý',
'Traditional Chinese localization' : 'Người dịch ra tiếng Trung Quốc',
'For more information about this software visit the' : 'Để biết thêm thông tin, hãy vào',
'elRTE website' : 'website của elRTE'
}
})(jQuery);

View file

@ -0,0 +1,189 @@
/**
* Simplified Chinese translation
* @author Lee Chenhwa <leechenhwa@gmail.com>
* @version 2010-11-01
*/
(function($) {
elRTE.prototype.i18Messages.zh_CN = {
'_translator' : 'Lee Chenhwa &lt;leechenhwa@gmail.com&gt;',
'_translation' : 'Simplified Chinese translation',
'Editor' : '编辑器',
'Source' : '源代码',
// Panel Name
'Copy/Pase' : '复制/粘贴',
'Undo/Redo' : '取消/重做',
'Text styles' : '文字样式',
'Colors' : '颜色',
'Alignment' : '对齐',
'Indent/Outdent' : '缩进/缩回',
'Text format' : '文字格式',
'Lists' : '列单',
'Misc elements' : '其他元素',
'Links' : '链接',
'Images' : '图片',
'Media' : '多媒体',
'Tables' : '表格',
'File manager (elFinder)' : '文件管理(elFinder)',
// button names
'Save' : '保存',
'Copy' : '复制',
'Cut' : '剪切',
'Paste' : '粘贴',
'Paste only text' : '粘贴为纯文字',
'Paste formatted text' : '粘贴为已格式化文字',
'Clean format' : '清除格式',
'Undo last action' : '取消上一个动作',
'Redo previous action' : '重做上一个动作',
'Bold' : '粗体',
'Italic' : '斜体',
'Underline' : '下划线',
'Strikethrough' : '删除线',
'Superscript' : '上标',
'Subscript' : '下标',
'Align left' : '靠左',
'Ailgn right' : '靠右',
'Align center' : '居中',
'Align full' : '左右对齐',
'Font color' : '文字颜色',
'Background color' : '背景颜色',
'Indent' : '增大缩进',
'Outdent' : '减少缩进',
'Format' : '格式',
'Font size' : '字体大小',
'Font' : '字体',
'Ordered list' : '编号',
'Unordered list' : '项目编号',
'Horizontal rule' : '水平线',
'Blockquote' : '引用',
'Block element (DIV)' : '区块 (DIV)',
'Link' : '链接',
'Delete link' : '删除链接',
'Bookmark' : '书签(锚点)',
'Flash' : 'Flash媒体',
'Image' : '图片',
'Table' : '表格',
'Delete table' : '删除表格',
'Insert row before' : '上方增加一行',
'Insert row after' : '下方增加一行',
'Delete row' : '删除列',
'Insert column before' : '左边增加一列',
'Insert column after' : '右边增加一列',
'Delete column' : '删除列',
'Merge table cells' : '合并表格单元',
'Split table cell' : '分割表格单元',
'Toggle display document structure' : '显示文件结构标记',
'Table cell properties' : '表格单元属性',
'Table properties' : '表格属性',
'Toggle full screen mode' : '切换为全屏幕',
'Open file manager' : '打开文件管理',
'Non breakable space' : '空格',
'Smiley' : '笑脸',
'Page break' : '换页符',
'Stop element floating' : '停止元素浮动属性',
// dialogs
'Warning' : '警告',
'Properies' : '属性',
'Popup' : '弹出框',
'Advanced' : '高级',
'Events' : '事件',
'Width' : '宽度',
'Height' : '高度',
'Left' : '靠左',
'Center' : '居中',
'Right' : '靠右',
'Border' : '边框',
'Background' : '背景',
'Css class' : 'CSS类别',
'Css style' : 'CSS样式',
'No' : '不设置',
'Title' : '标题',
'Script direction' : '文字方向',
'Language' : '语言',
'Charset' : '字符编码',
'Not set' : '不设定',
'Left to right' : '从左至右',
'Right to left' : '从右至左',
'In this window' : '在本窗口',
'In new window (_blank)' : '在新窗口 (_blank)',
'In new parent window (_parent)' : '在父窗口 (_parent)',
'In top frame (_top)' : '在顶层 (_top)',
'URL' : '网址',
'Open in' : '打开到',
// copy
'This operation is disabled in your browser on security reason. Use shortcut instead.' : '基于安全考虑,此动作无法在浏览器中进行,请直接按 Ctrl+V 试试。',
// format
'Heading 1' : '标题 1',
'Heading 2' : '标题 2',
'Heading 3' : '标题 3',
'Heading 4' : '标题 4',
'Heading 5' : '标题 5',
'Heading 6' : '标题 6',
'Paragraph' : '段落',
'Address' : '地址',
'Preformatted' : '预格式化的',
// font size
'Small (8pt)' : '极小 (8pt)',
'Small (10px)' : '更小 (10px)',
'Small (12pt)' : '小 (12pt)',
'Normal (14pt)' : '中 (14pt)',
'Large (18pt)' : '大 (18pt)',
'Large (24pt)' : '更大 (24pt)',
'Large (36pt)' : '极大 (36pt)',
// bookmark
'Bookmark name' : '书签名称',
'Select bookmark' : '选择书签',
// link
'Link URL' : '链接地址',
'Target' : '目标',
'Open link in popup window' : '在弹出窗口中打开',
'Window name' : '窗口名称',
'Window size' : '窗口尺寸',
'Window position' : '窗口位置',
'Location bar' : '地址栏',
'Menu bar' : '菜单栏',
'Toolbar' : '工具栏',
'Scrollbars' : '滚动条',
'Status bar' : '状态栏',
'Resizable' : '可否调整尺寸',
'Depedent' : '相关',
'Add return false' : '附加 return false ',
'Target MIME type' : '目标的MIME类型',
'Relationship page to target (rel)' : '关联页到目标 (rel)',
'Relationship target to page (rev)' : '关联目标到页 (rev)',
'Tab index' : 'Tab键顺序',
'Access key' : '访问键',
// image
'Size' : '尺寸',
'Preview' : '预览',
'Margins' : '边界',
'Alt text' : '提示文字',
'Image URL' : '图片网址',
// table
'Spacing' : '表格间距 (Spacing)',
'Padding' : '表格边距 (Padding)',
'Rows' : '行',
'Columns' : '列',
'Groups' : '组',
'Cells' : '单元格',
'Caption' : '标题',
'Inner borders' : '边框',
// table cell
'Table cell type' : '单元格类型',
'Data' : '数据',
'Header' : '标题',
'Justify' : '对齐',
'Paddings' : '边距',
'Apply to' : '应用到',
'Current cell' : '当前单元格',
'All cells in row' : '本行所有单元格',
'All cells in column' : '本列所有单元格',
'All cells in table' : '本表所有单元格',
// about
'About this software' : '关于本软件',
'About elRTE' : '关于elRTE',
'Version' : '版本',
'Licence' : '许可证'
}
})(jQuery);

View file

@ -0,0 +1,212 @@
/*
* Traditional Chinese translation
* @author T.C. Chou <tcchou@tcchou.org>
* @version 2010-12-11
* @author Tad <tad0616@gmail.com>
* @version 2010-09-18
*/
(function($) {
elRTE.prototype.i18Messages.zh_TW = {
'_translator' : 'Tad &lt;tad0616@gmail.com&gt;<br>T.C. Chou &lt;tcchou@tcchou.org&gt;',
'_translation' : 'Traditional Chinese translation',
'Editor' : '編輯',
'Source' : '原始碼',
// panels names
'Copy/Pase' : '複製/貼上',
'Undo/Redo' : '復原/重做',
'Text styles' : '文字樣式',
'Colors' : '顏色',
'Alignment' : '對齊',
'Indent/Outdent' : '縮排/凸排',
'Text format' : '文字格式',
'Lists' : '清單',
'Misc elements' : '其他元件',
'Links' : '連結',
'Images' : '圖檔',
'Media' : '多媒體',
'Tables' : '表格',
'File manager (elFinder)' : '檔案管理',
// buttons names
'About this software' : '關於此軟體',
'Save' : '儲存',
'Copy' : '複製',
'Cut' : '剪下',
'Paste' : '貼上',
'Paste only text' : '貼上純文字',
'Paste formatted text' : '貼上格式化文字',
'Clean format' : '清除格式',
'Undo last action' : '復原最後一個動作',
'Redo previous action' : '重做上一個動作',
'Bold' : '粗體',
'Italic' : '斜體',
'Underline' : '底線',
'Strikethrough' : '刪除線',
'Superscript' : '上標',
'Subscript' : '下標',
'Align left' : '靠左',
'Ailgn right' : '靠右',
'Align center' : '置中',
'Align full' : '左右對齊',
'Font color' : '文字顏色',
'Background color' : '背景顏色',
'Indent' : '縮排',
'Outdent' : '凸排',
'Format' : '格式',
'Font size' : '字型大小',
'Font' : '字型',
'Ordered list' : '編號',
'Unordered list' : '項目符號',
'Horizontal rule' : '水平線',
'Blockquote' : '引用',
'Block element (DIV)' : '區域元件 (DIV)',
'Link' : '連結',
'Delete link' : '移除連結',
'Bookmark' : '書籤',
'Image' : '插圖',
'Table' : '表格',
'Delete table' : '刪除表格',
'Insert row before' : '上方新增一列',
'Insert row after' : '下方新增一列',
'Delete row' : '刪除列',
'Insert column before' : '左邊新增一欄',
'Insert column after' : '右邊新增一欄',
'Delete column' : '刪除欄',
'Merge table cells' : '合併儲存格',
'Split table cell' : '分割儲存格',
'Toggle display document structure' : '切換顯示文件結構',
'Table cell properties' : '表格儲存格屬性',
'Table properties' : '表格屬性',
'Toggle full screen mode' : '切換為全螢幕',
'Open file manager' : '開啟檔案管理',
'Non breakable space' : '不斷行空白',
'Stop element floating' : '停止元件浮動屬性',
// dialogs
'Warning' : '警告',
'Properies' : '屬性',
'Popup' : '跳出框',
'Advanced' : '進階',
'Events' : '事件',
'Width' : '寬度',
'Height' : '高度',
'Left' : '靠左',
'Center' : '置中',
'Right' : '靠右',
'Border' : '邊框',
'Background' : '背景',
'Css class' : 'CSS類別',
'Css style' : 'CSS樣式',
'No' : '不設置',
'Title' : '標題',
'Script direction' : '語言方向',
'Language' : '語言',
'Charset' : '字元編碼',
'Not set' : '不設定',
'Left to right' : '左至右',
'Right to left' : '右到左',
'In this window' : '在此視窗',
'In new window (_blank)' : '在新視窗 (_blank)',
'In new parent window (_parent)' : '在父視窗 (_parent)',
'In top frame (_top)' : '跳出框架 (_top)',
'URL' : '網址',
'Open in' : '開啟至',
'Open file manger' : '開啟檔案管理員',
// copy
'This operation is disabled in your browser on security reason. Use shortcut instead.' : '此動作被你的瀏覽器基於安全理由所禁止,請直接用快捷鍵。',
// format
'Heading 1' : '標題 1',
'Heading 2' : '標題 2',
'Heading 3' : '標題 3',
'Heading 4' : '標題 4',
'Heading 5' : '標題 5',
'Heading 6' : '標題 6',
'Paragraph' : '段落',
'Address' : '位址',
'Preformatted' : '固定格式',
// font size
'Small (8pt)' : '極小 (8pt)',
'Small (10px)' : '更小 (10px)',
'Small (12pt)' : '小 (12pt)',
'Normal (14pt)' : '中 (14pt)',
'Large (18pt)' : '大 (18pt)',
'Large (24pt)' : '更大 (24pt)',
'Large (36pt)' : '極大 (36pt)',
// bookmark
'Bookmark name' : '書籤名稱',
// link
'Link URL' : '連結位址',
'Target' : '目標',
'Select bookmark' : '選擇書籤',
'Open link in popup window' : '在跳出視窗中開啟',
'Window name' : '視窗名稱',
'Window size' : '視窗尺寸',
'Window position' : '視窗位置',
'Location bar' : '位址列',
'Menu bar' : '選單列',
'Toolbar' : '工具列',
'Scrollbars' : '捲軸',
'Status bar' : '狀態列',
'Resizable' : '可否調整尺寸',
'Depedent' : '相關 (Netscape)',
'Add return false' : '加入傳回false (return false)',
'Target MIME type' : '目標物的MIME類型',
'Relationship page to target (rel)' : '定義連結的起點文件與目標文件之間的關係 (rel)',
'Relationship target to page (rev)' : '定義連結的起點文件與目標文件之間的反向關係 (rev)',
'Tab index' : '定位索引',
'Access key' : '快速鍵',
// image
'Size' : '尺寸',
'Preview' : '預覽',
'Margins' : '邊界',
'Alt text' : '提示文字',
'Image URL' : '圖檔網址',
// table
'Spacing' : '儲存格間距 (Spacing)',
'Padding' : '儲存格內距 (Padding)',
'Rows' : '列',
'Columns' : '欄',
'Groups' : '儲存格群組',
'Cells' : '儲存格',
'Caption' : '表格標題',
'Inner borders' : '框線',
// table cell
'Table cell type' : '表格儲存格型態',
'Data' : '資料',
'Header' : '標題',
'Justify' : '排整齊',
'Paddings' : '內距',
'Apply to' : '適用於',
'Current cell' : '目前儲存格',
'All cells in row' : '同列所有儲存格',
'All cells in column' : '同欄所有儲存格',
'All cells in table' : '表格所有儲存格',
// about
'About elRTE' : '關於 elRTE',
'Version' : '版本',
'Licence' : '許可證',
'elRTE is an open-source JavaScript based WYSIWYG HTML-editor.' : 'elRTE 是一個開放源碼 JavaScript 為基礎的所見即所得 HTML 編輯器。',
'Main goal of the editor - simplify work with text and formating (HTML) on sites, blogs, forums and other online services.' : '此編輯器主要目標 - 簡化網站, 部落格, 論壇及許多線上服務在文字處理與編排 (HTML) 的工作。',
'You can use it in any commercial or non-commercial projects.' : '你可用於任何商業或者非商業專案中。',
'Authors' : '作者',
'Chief developer' : '主力開發者',
'Developer, tech support' : '開發者, 技術支援',
'Developer' : '開發者',
'Interface designer' : '介面設計師',
'Spanish localization' : '西班牙翻譯',
'Czech localization' : '捷克翻譯',
'Japanese localization' : '日文翻譯',
'Latvian localization' : '拉脫維亞翻譯',
'German localization' : '德文翻譯',
'Ukranian localization' : '烏克蘭翻譯',
'Persian (farsi) localization' : '波斯翻譯',
'Arabic localization' : '阿拉伯翻譯',
'RTL support' : 'RTL 支援',
'French localization' : '法文翻譯',
'Dutch localization' : '荷蘭翻譯',
'Hungarian localization' : '匈牙利翻譯',
'Polish localization' : '波蘭翻譯',
'Italian localization' : '義大利翻譯',
'Traditional Chinese localization' : '中文翻譯',
'For more information about this software visit the' : '更多關於此軟體的資訊請拜訪',
'elRTE website' : 'elRTE 網站'
}
})(jQuery);

View file

@ -0,0 +1,54 @@
(function($) {
elRTE.prototype.ui.prototype.buttons.about = function(rte, name) {
this.constructor.prototype.constructor.call(this, rte, name);
this.active = true;
this.command = function() {
var opts, d, txt;
opts = {
rtl : rte.rtl,
submit : function(e, d) { d.close(); },
dialog : {
width : 560,
title : this.rte.i18n('About this software'),
buttons : {
Ok : function() { $(this).dialog('destroy'); }
}
}
}
txt = '<div class="elrte-logo"></div><h3>'+this.rte.i18n('About elRTE')+'</h3><br clear="all"/>'
+'<div class="elrte-ver">'+this.rte.i18n('Version')+': '+this.rte.version+' ('+this.rte.build+')</div>'
+'<div class="elrte-ver">jQuery: '+$('<div/>').jquery+'</div>'
+'<div class="elrte-ver">jQueryUI: '+$.ui.version+'</div>'
+'<div class="elrte-ver">'+this.rte.i18n('Licence')+': BSD Licence</div>'
+'<p>'
+this.rte.i18n('elRTE is an open-source JavaScript based WYSIWYG HTML-editor.')+'<br/>'
+this.rte.i18n('Main goal of the editor - simplify work with text and formating (HTML) on sites, blogs, forums and other online services.')+'<br/>'
+this.rte.i18n('You can use it in any commercial or non-commercial projects.')
+'</p>'
+'<h4>'+this.rte.i18n('Authors')+'</h4>'
+'<table class="elrte-authors">'
+'<tr><td>Dmitry (dio) Levashov &lt;dio@std42.ru&gt;</td><td>'+this.rte.i18n('Chief developer')+'</td></tr>'
+'<tr><td>Troex Nevelin &lt;troex@fury.scancode.ru&gt;</td><td>'+this.rte.i18n('Developer, tech support')+'</td></tr>'
+'<tr><td>Valentin Razumnyh &lt;content@std42.ru&gt;</td><td>'+this.rte.i18n('Interface designer')+'</td></tr>'
+'<tr><td>Tawfek Daghistani &lt;tawfekov@gmail.com&gt;</td><td>'+this.rte.i18n('RTL support')+'</td></tr>'
+(this.rte.options.lang != 'en' ? '<tr><td>'+this.rte.i18n('_translator')+'</td><td>'+this.rte.i18n('_translation')+'</td></tr>' : '')
+'</table>'
+'<div class="elrte-copy">Copyright &copy; 2009-2011, <a href="http://www.std42.ru">Studio 42</a></div>'
+'<div class="elrte-copy">'+this.rte.i18n('For more information about this software visit the')+' <a href="http://elrte.org">'+this.rte.i18n('elRTE website')+'.</a></div>'
+'<div class="elrte-copy">Twitter: <a href="http://twitter.com/elrte_elfinder">elrte_elfinder</a></div>';
d = new elDialogForm(opts);
d.append(txt);
d.open();
}
this.update = function() {
this.domElem.removeClass('disabled');
}
}
})(jQuery);

View file

@ -0,0 +1,62 @@
/**
* @class кнопка - Закладка (открывает диалоговое окно)
*
* @param elRTE rte объект-редактор
* @param String name название кнопки
*
* @author: Dmitry Levashov (dio) dio@std42.ru
**/
(function($) {
elRTE.prototype.ui.prototype.buttons.anchor = function(rte, name) {
this.constructor.prototype.constructor.call(this, rte, name);
this.input = $('<input type="text" />').attr('name', 'anchor').attr('size', '16')
var self = this;
this.command = function() {
var opts = {
rtl : this.rte.rtl,
submit : function(e, d) { e.stopPropagation(); e.preventDefault(); d.close(); self.set(); },
dialog : {
title : this.rte.i18n('Bookmark')
}
}
this.anchor = this.rte.dom.selfOrParentAnchor(this.rte.selection.getEnd()) || rte.dom.create('a');
!this.rte.selection.collapsed() && this.rte.selection.collapse(false);
this.input.val($(this.anchor).addClass('elrte-anchor').attr('name'));
this.rte.selection.saveIERange();
var d = new elDialogForm(opts);
d.append([this.rte.i18n('Bookmark name'), this.input], null, true).open();
setTimeout(function() { self.input.focus()}, 20);
}
this.update = function() {
var n = this.rte.selection.getNode();
if (this.rte.dom.selfOrParentLink(n)) {
this.domElem.addClass('disabled');
} else if (this.rte.dom.selfOrParentAnchor(n)) {
this.domElem.removeClass('disabled').addClass('active');
} else {
this.domElem.removeClass('disabled').removeClass('active');
}
}
this.set = function() {
var n = $.trim(this.input.val());
if (n) {
this.rte.history.add();
if (!this.anchor.parentNode) {
this.rte.selection.insertHtml('<a name="'+n+'" title="'+this.rte.i18n('Bookmark')+': '+n+'" class="elrte-anchor"></a>');
} else {
this.anchor.name = n;
this.anchor.title = this.rte.i18n('Bookmark')+': '+n;
}
} else if (this.anchor.parentNode) {
this.rte.history.add();
this.anchor.parentNode.removeChild(this.anchor);
}
}
}
})(jQuery);

View file

@ -0,0 +1,40 @@
/**
* @class кнопка - Цитата
* Если выделение схлопнуто и находится внутри цитаты - она удаляется
* Новые цитаты создаются только из несхлопнутого выделения
*
* @param elRTE rte объект-редактор
* @param String name название кнопки
*
* @author: Dmitry Levashov (dio) dio@std42.ru
* @copyright: Studio 42, http://www.std42.ru
**/
(function($) {
elRTE.prototype.ui.prototype.buttons.blockquote = function(rte, name) {
this.constructor.prototype.constructor.call(this, rte, name);
this.command = function() {
var n, nodes;
this.rte.history.add();
if (this.rte.selection.collapsed() && (n = this.rte.dom.selfOrParent(this.rte.selection.getNode(), /^BLOCKQUOTE$/))) {
$(n).replaceWith($(n).html());
} else {
nodes = this.rte.selection.selected({wrap : 'all', tag : 'blockquote'});
nodes.length && this.rte.selection.select(nodes[0], nodes[nodes.length-1]);
}
this.rte.ui.update(true);
}
this.update = function() {
if (this.rte.selection.collapsed()) {
if (this.rte.dom.selfOrParent(this.rte.selection.getNode(), /^BLOCKQUOTE$/)) {
this.domElem.removeClass('disabled').addClass('active');
} else {
this.domElem.addClass('disabled').removeClass('active');
}
} else {
this.domElem.removeClass('disabled active');
}
}
}
})(jQuery);

View file

@ -0,0 +1,46 @@
/**
* @class кнопки "копировать/вырезать/вставить"
* в firefox показывает предложение нажать Ctl+c, в остальных - копирует
*
* @param elRTE rte объект-редактор
* @param String name название кнопки
*
* @author: Dmitry Levashov (dio) dio@std42.ru
* @copyright: Studio 42, http://www.std42.ru
**/
(function($) {
elRTE.prototype.ui.prototype.buttons.copy = function(rte, name) {
this.constructor.prototype.constructor.call(this, rte, name);
this.command = function() {
if (this.rte.browser.mozilla) {
try {
this.rte.doc.execCommand(this.name, false, null);
} catch (e) {
var s = ' Ctl + C';
if (this.name == 'cut') {
s = ' Ctl + X';
} else if (this.name == 'paste') {
s = ' Ctl + V';
}
var opts = {
dialog : {
title : this.rte.i18n('Warning'),
buttons : { Ok : function() { $(this).dialog('close'); } }
}
}
var d = new elDialogForm(opts);
d.append(this.rte.i18n('This operation is disabled in your browser on security reason. Use shortcut instead.')+': '+s).open();
}
} else {
this.constructor.prototype.command.call(this);
}
}
}
elRTE.prototype.ui.prototype.buttons.cut = elRTE.prototype.ui.prototype.buttons.copy;
elRTE.prototype.ui.prototype.buttons.paste = elRTE.prototype.ui.prototype.buttons.copy;
})(jQuery);

View file

@ -0,0 +1,61 @@
(function($) {
elRTE.prototype.ui.prototype.buttons.css = function(rte, name) {
var self = this;
this.constructor.prototype.constructor.call(this, rte, name);
this.cssStyle = $('<input type="text" size="42" name="style" />');
this.cssClass = $('<input type="text" size="42" name="class" />');
this.elementID = $('<input type="text" size="42" name="id" />');
this.command = function() {
var n = this.node(), opts;
this.rte.selection.saveIERange();
if (n) {
var opts = {
submit : function(e, d) { e.stopPropagation(); e.preventDefault(); d.close(); self.set(); },
dialog : {
title : this.rte.i18n('Style'),
width : 450,
resizable : true,
modal : true
}
}
this.cssStyle.val($(n).attr('style'));
this.cssClass.val($(n).attr('class'));
this.elementID.val($(n).attr('id'));
var d = new elDialogForm(opts);
d.append([this.rte.i18n('Css style'), this.cssStyle], null, true)
d.append([this.rte.i18n('Css class'), this.cssClass], null, true)
d.append([this.rte.i18n('ID'), this.elementID], null, true)
d.open();
setTimeout(function() { self.cssStyle.focus() }, 20)
}
}
this.set = function() {
var n = this.node();
this.rte.selection.restoreIERange();
if (n) {
$(n).attr('style', this.cssStyle.val());
$(n).attr('class', this.cssClass.val());
$(n).attr('id', this.elementID.val());
this.rte.ui.update();
}
}
this.node = function() {
var n = this.rte.selection.getNode();
if (n.nodeType == 3) {
n = n.parentNode;
}
return n.nodeType == 1 && n.nodeName != 'BODY' ? n : null;
}
this.update = function() {
this.domElem.toggleClass('disabled', this.node()?false:true);
}
}
})(jQuery);

View file

@ -0,0 +1,93 @@
(function($) {
/**
* @class button - right to left direction (not work yet with text nodes in body)
*
* @param elRTE rte объект-редактор
* @param String name название кнопки
*
* @author: Dmitry Levashov (dio) dio@std42.ru
* Copyright: Studio 42, http://www.std42.ru
**/
elRTE.prototype.ui.prototype.buttons.rtl = function(rte, name) {
this.constructor.prototype.constructor.call(this, rte, name);
var self = this;
this.command = function() {
var n = this.rte.selection.getNode(), self = this;
if ($(n).attr('dir') == 'rtl' || $(n).parents('[dir="rtl"]').length || $(n).find('[dir="rtl"]').length) {
$(n).removeAttr('dir');
$(n).parents('[dir="rtl"]').removeAttr('dir');
$(n).find('[dir="rtl"]').removeAttr('dir');
} else {
if (this.rte.dom.is(n, 'textNodes') && this.rte.dom.is(n, 'block')) {
$(n).attr('dir', 'rtl');
} else {
$.each(this.rte.dom.parents(n, 'textNodes'), function(i, n) {
if (self.rte.dom.is(n, 'block')) {
$(n).attr('dir', 'rtl');
return false;
}
});
}
}
this.rte.ui.update();
}
this.update = function() {
var n = this.rte.selection.getNode();
this.domElem.removeClass('disabled');
if ($(n).attr('dir') == 'rtl' || $(n).parents('[dir="rtl"]').length || $(n).find('[dir="rtl"]').length) {
this.domElem.addClass('active');
} else {
this.domElem.removeClass('active');
}
}
}
/**
* @class button - left to right direction (not work yet with text nodes in body)
*
* @param elRTE rte объект-редактор
* @param String name название кнопки
*
* @author: Dmitry Levashov (dio) dio@std42.ru
* Copyright: Studio 42, http://www.std42.ru
**/
elRTE.prototype.ui.prototype.buttons.ltr = function(rte, name) {
this.constructor.prototype.constructor.call(this, rte, name);
var self = this;
this.command = function() {
var n = this.rte.selection.getNode(), self = this;
if ($(n).attr('dir') == 'ltr' || $(n).parents('[dir="ltr"]').length || $(n).find('[dir="ltr"]').length) {
$(n).removeAttr('dir');
$(n).parents('[dir="ltr"]').removeAttr('dir');
$(n).find('[dir="ltr"]').removeAttr('dir');
} else {
if (this.rte.dom.is(n, 'textNodes') && this.rte.dom.is(n, 'block')) {
$(n).attr('dir', 'ltr');
} else {
$.each(this.rte.dom.parents(n, 'textNodes'), function(i, n) {
if (self.rte.dom.is(n, 'block')) {
$(n).attr('dir', 'ltr');
return false;
}
});
}
}
this.rte.ui.update();
}
this.update = function() {
var n = this.rte.selection.getNode();
this.domElem.removeClass('disabled');
if ($(n).attr('dir') == 'ltr' || $(n).parents('[dir="ltr"]').length || $(n).find('[dir="ltr"]').length) {
this.domElem.addClass('active');
} else {
this.domElem.removeClass('active');
}
}
}
})(jQuery);

View file

@ -0,0 +1,44 @@
/**
* @class кнопка - DIV
* Если выделение схлопнуто и находится внутри div'a - он удаляется
* Новые div'ы создаются только из несхлопнутого выделения
*
* @param elRTE rte объект-редактор
* @param String name название кнопки
*
* @author: Dmitry Levashov (dio) dio@std42.ru
* copyright: Studio 42, http://www.std42.ru
**/
(function($) {
elRTE.prototype.ui.prototype.buttons.div = function(rte, name) {
this.constructor.prototype.constructor.call(this, rte, name);
this.command = function() {
var n, nodes;
this.rte.history.add();
if (this.rte.selection.collapsed()) {
n = this.rte.dom.selfOrParent(this.rte.selection.getNode(), /^DIV$/);
if (n) {
$(n).replaceWith($(n).html());
}
} else {
nodes = this.rte.selection.selected({wrap : 'all', tag : 'div'});
nodes.length && this.rte.selection.select(nodes[0], nodes[nodes.length-1]);
}
this.rte.ui.update(true);
}
this.update = function() {
if (this.rte.selection.collapsed()) {
if (this.rte.dom.selfOrParent(this.rte.selection.getNode(), /^DIV$/)) {
this.domElem.removeClass('disabled').addClass('active');
} else {
this.domElem.addClass('disabled active');
}
} else {
this.domElem.removeClass('disabled active');
}
}
}
})(jQuery);

View file

@ -0,0 +1,24 @@
/**
* @class кнопка - Включение/выключение показа структуры документа
*
* @param elRTE rte объект-редактор
* @param String name название кнопки
*
* @author: Dmitry Levashov (dio) dio@std42.ru
* @copyright: Studio 42, http://www.std42.ru
**/
(function($) {
elRTE.prototype.ui.prototype.buttons.docstructure = function(rte, name) {
this.constructor.prototype.constructor.call(this, rte, name);
this.command = function() {
this.domElem.toggleClass('active');
$(this.rte.doc.body).toggleClass('el-rte-structure');
}
this.command();
this.update = function() {
this.domElem.removeClass('disabled');
}
}
})(jQuery);

View file

@ -0,0 +1,39 @@
/**
* @class button - open elfinder window (not needed for image or link buttons).Used in ELDORADO.CMS for easy file manipulations.
*
* @param elRTE rte объект-редактор
* @param String name название кнопки
*
* @author: Dmitry Levashov (dio) dio@std42.ru
* @copyright: Studio 42, http://www.std42.ru
**/
(function($) {
elRTE.prototype.ui.prototype.buttons.elfinder = function(rte, name) {
this.constructor.prototype.constructor.call(this, rte, name);
var self = this,
rte = this.rte;
this.command = function() {
if (self.rte.options.fmAllow && typeof(self.rte.options.fmOpen) == 'function') {
self.rte.options.fmOpen( function(url) {
var name = decodeURIComponent(url.split('/').pop().replace(/\+/g, " "));
if (rte.selection.collapsed()) {
rte.selection.insertHtml('<a href="'+url+'" >'+name+'</a>');
} else {
rte.doc.execCommand('createLink', false, url);
}
} );
}
}
this.update = function() {
if (self.rte.options.fmAllow && typeof(self.rte.options.fmOpen) == 'function') {
this.domElem.removeClass('disabled');
} else {
this.domElem.addClass('disabled');
}
}
}
})(jQuery);

View file

@ -0,0 +1,341 @@
(function($) {
elRTE.prototype.ui.prototype.buttons.flash = function(rte, name) {
this.constructor.prototype.constructor.call(this, rte, name);
var self = this;
this.swf = null;
this.placeholder = null;
this.src = {
url : $('<input type="text" name="url" />').css('width', '99%'),
type : $('<select name="type"/>')
.append('<option value="application/x-shockwave-flash">Flash</option>')
.append('<option value="video/quicktime">Quicktime movie</option>')
.append('<option value="application/x-mplayer2">Windows media</option>'),
width : $('<input type="text" />').attr('size', 5).css('text-align', 'right'),
height : $('<input type="text" />').attr('size', 5).css('text-align', 'right'),
wmode : $('<select />')
.append($('<option />').val('').text(this.rte.i18n('Not set', 'dialogs')))
.append($('<option />').val('transparent').text(this.rte.i18n('Transparent'))),
align : $('<select />')
.append($('<option />').val('').text(this.rte.i18n('Not set', 'dialogs')))
.append($('<option />').val('left' ).text(this.rte.i18n('Left')))
.append($('<option />').val('right' ).text(this.rte.i18n('Right')))
.append($('<option />').val('top' ).text(this.rte.i18n('Top')))
.append($('<option />').val('text-top' ).text(this.rte.i18n('Text top')))
.append($('<option />').val('middle' ).text(this.rte.i18n('middle')))
.append($('<option />').val('baseline' ).text(this.rte.i18n('Baseline')))
.append($('<option />').val('bottom' ).text(this.rte.i18n('Bottom')))
.append($('<option />').val('text-bottom').text(this.rte.i18n('Text bottom'))),
margin : $('<div />')
}
this.command = function() {
var n = this.rte.selection.getEnd(), opts, url='', w='', h='', f, a, d, mid, o, wm;
this.rte.selection.saveIERange();
this.src.margin.elPaddingInput({ type : 'margin' });
this.placeholder = null;
this.swf = null;
if ($(n).hasClass('elrte-media') && (mid = $(n).attr('rel')) && this.rte.filter.scripts[mid]) {
this.placeholder = $(n);
o = this.rte.filter.scripts[mid];
url = '';
if (o.embed && o.embed.src) {
url = o.embed.src;
}
if (o.params && o.params.length) {
l = o.params.length;
while (l--) {
if (o.params[l].name == 'src' || o.params[l].name == 'movie') {
url = o.params[l].value;
}
}
}
if (o.embed) {
w = o.embed.width||parseInt(o.embed.style.width)||'';
h = o.embed.height||parseInt(o.embed.style.height)||'';
wm = o.embed.wmode||'';
} else if (o.obj) {
w = o.obj.width||parseInt(o.obj.style.width)||'';
h = o.obj.height||parseInt(o.obj.style.height)||'';
wm = o.obj.wmode||'';
}
if (o.obj) {
f = o.obj.style['float']||'';
a = o.obj.style['vertical-align']||'';
} else if (o.embed) {
f = o.embed.style['float']||'';
a = o.embed.style['vertical-align']||'';
}
this.src.margin.val(n);
this.src.type.val(o.embed ? o.embed.type : '');
}
if ($(n).hasClass('elrte-swf-placeholder')) {
this.placeholder = $(n);
url = $(n).attr('rel');
w = parseInt($(n).css('width'))||'';
h = parseInt($(n).css('height'))||'';
f = $(n).css('float');
a = $(n).css('vertical-align');
this.src.margin.val(n);
this.src.wmode.val($(n).attr('wmode'));
}
this.src.url.val(url);
this.src.width.val(w);
this.src.height.val(h);
this.src.align.val(f||a);
this.src.wmode.val(wm);
var opts = {
rtl : this.rte.rtl,
submit : function(e, d) { e.stopPropagation(); e.preventDefault(); self.set(); d.close(); },
dialog : {
width : 580,
position : 'top',
title : this.rte.i18n('Flash')
}
}
var d = new elDialogForm(opts);
if (this.rte.options.fmAllow && this.rte.options.fmOpen) {
var src = $('<span />').append(this.src.url.css('width', '85%'))
.append(
$('<span />').addClass('ui-state-default ui-corner-all')
.css({'float' : 'right', 'margin-right' : '3px'})
.attr('title', self.rte.i18n('Open file manger'))
.append($('<span />').addClass('ui-icon ui-icon-folder-open'))
.click( function() {
self.rte.options.fmOpen( function(url) { self.src.url.val(url).change(); } );
})
.hover(function() {$(this).addClass('ui-state-hover')}, function() { $(this).removeClass('ui-state-hover')})
);
} else {
var src = this.src.url;
}
d.append([this.rte.i18n('URL'), src], null, true);
d.append([this.rte.i18n('Type'), this.src.type], null, true);
d.append([this.rte.i18n('Size'), $('<span />').append(this.src.width).append(' x ').append(this.src.height).append(' px')], null, true)
d.append([this.rte.i18n('Wmode'), this.src.wmode], null, true);
d.append([this.rte.i18n('Alignment'), this.src.align], null, true);
d.append([this.rte.i18n('Margins'), this.src.margin], null, true);
d.open();
// setTimeout( function() {self.src.url.focus()}, 100)
var fs = $('<fieldset />').append($('<legend />').text(this.rte.i18n('Preview')))
d.append(fs, 'main');
var frame = document.createElement('iframe');
$(frame).attr('src', '#').addClass('el-rte-preview').appendTo(fs);
html = this.rte.options.doctype+'<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style="padding:0;margin:0;font-size:9px"> Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin</body></html>';
frame.contentWindow.document.open();
frame.contentWindow.document.write(html);
frame.contentWindow.document.close();
this.frame = frame.contentWindow.document;
this.preview = $(frame.contentWindow.document.body);
this.src.type.change(function() {
self.src.url.change();
});
this.src.width.change(function() {
if (self.swf) {
var w = parseInt($(this).val())||'';
$(this).val(w);
self.swf.css('width', w);
self.swf.children('embed').css('width', w);
} else {
$(this).val('');
}
});
this.src.height.change(function() {
if (self.swf) {
var h = parseInt($(this).val())||'';
$(this).val(h);
self.swf.css('height', h);
self.swf.children('embed').css('height', h);
} else {
$(this).val('');
}
});
this.src.wmode.change(function() {
if (self.swf) {
var wm = $(this).val();
if (wm) {
self.swf.attr('wmode', wm);
self.swf.children('embed').attr('wmode', wm);
} else {
self.swf.removeAttr('wmode');
self.swf.children('embed').removeAttr('wmode');
}
}
});
this.src.align.change(function() {
var v = $(this).val(), f = v=='left' || v=='right';
if (self.swf) {
self.swf.css({
'float' : f ? v : '',
'vertical-align' : f ? '' : v
});
} else {
$(this).val('');
}
});
this.src.margin.change(function() {
if (self.swf) {
var m = self.src.margin.val();
if (m.css) {
self.swf.css('margin', m.css);
} else {
self.swf.css('margin-top', m.top);
self.swf.css('margin-right', m.right);
self.swf.css('margin-bottom', m.bottom);
self.swf.css('margin-left', m.left);
}
}
});
this.src.url.change(function() {
var url = self.rte.utils.absoluteURL($(this).val()), i, swf;
if (url) {
i = self.rte.utils.mediaInfo(self.src.type.val());
if (!i) {
i = self.rte.util.mediaInfo('application/x-shockwave-flash');
}
swf = '<object classid="'+i.classid+'" codebase="'+i.codebase+'"><param name="src" value="'+url+'" /><embed quality="high" src="'+url+'" type="'+i.type+'"></object>';
self.preview.children('object').remove().end().prepend(swf);
self.swf = self.preview.children('object').eq(0);
} else if (self.swf){
self.swf.remove();
self.swf = null;
}
self.src.width.trigger('change');
self.src.height.trigger('change');
self.src.align.trigger('change');
}).trigger('change');
};
this.set = function() {
self.swf = null
var url = this.rte.utils.absoluteURL(this.src.url.val()),
w = parseInt(this.src.width.val()) || '',
h = parseInt(this.src.height.val()) || '',
wm = this.src.wmode.val(),
a = this.src.align.val(),
f = a == 'left' || a == 'right' ? a : '',
mid = this.placeholder ? this.placeholder.attr('rel') : '', o, _o, c,
m = this.src.margin.val(), margin;
if (!url) {
if (this.placeholder) {
this.placeholder.remove();
delete this.rte.filter.scripts[mid];
}
} else {
i = self.rte.utils.mediaInfo(self.src.type.val());
if (!i) {
i = self.rte.util.mediaInfo('application/x-shockwave-flash');
}
c = this.rte.filter.videoHostRegExp.test(url) ? url.replace(this.rte.filter.videoHostRegExp, "$2") : i.type.replace(/^\w+\/(.+)/, "$1");
o = {
obj : {
classid : i.classid[0],
codebase : i.codebase,
style : {}
},
params :[ { name : 'src', value : url } ],
embed :{
src : url,
type : i.type,
quality : 'high',
wmode : wm,
style : {}
}
};
if (w) {
o.obj.width = w;
o.embed.width = w;
}
if (h) {
o.obj.height = h;
o.embed.height = h;
}
if (f) {
o.obj.style['float'] = f;
} else if (a) {
o.obj.style['vertical-align'] = a;
}
if (m.css) {
margin = { margin : m.css };
} else {
margin = {
'margin-top' : m.top,
'margin-right' : m.right,
'margin-bottom' : m.bottom,
'margin-left' : m.left
};
}
o.obj.style = $.extend({}, o.obj.style, margin);
if (this.placeholder && mid) {
_o = this.rte.filter.scripts[mid]||{};
o = $.extend(true, _o, o);
delete o.obj.style.width;
delete o.obj.style.height;
delete o.embed.style.width;
delete o.embed.style.height;
this.rte.filter.scripts[mid] = o;
this.placeholder.removeAttr('class');
} else {
var id = 'media'+Math.random().toString().substring(2);
this.rte.filter.scripts[id] = o;
this.placeholder = $(this.rte.dom.create('img')).attr('rel', id).attr('src', this.rte.filter.url+'pixel.gif');
var ins = true;
}
this.placeholder.attr('title', this.rte.utils.encode(url)).attr('width', w||150).attr('height', h||100).addClass('elrte-protected elrte-media elrte-media-'+c).css(o.obj.style);
if (f) {
this.placeholder.css('float', f).css('vertical-align', '');
} else if (a) {
this.placeholder.css('float', '').css('vertical-align', a);
} else {
this.placeholder.css('float', '').css('vertical-align', '');
}
if (ins) {
this.rte.window.focus();
this.rte.selection.restoreIERange();
this.rte.selection.insertNode(this.placeholder.get(0));
}
}
}
this.update = function() {
this.domElem.removeClass('disabled');
var n = this.rte.selection.getNode();
this.domElem.toggleClass('active', n && n.nodeName == 'IMG' && $(n).hasClass('elrte-media'))
}
}
})(jQuery);

View file

@ -0,0 +1,64 @@
/**
* @class drop-down menu - font-family for selected text
*
* @param elRTE rte объект-редактор
* @param String name название кнопки
*
* @author: Dmitry Levashov (dio) dio@std42.ru
* @copyright: Studio 42, http://www.std42.ru
**/
(function($) {
elRTE.prototype.ui.prototype.buttons.fontname = function(rte, name) {
this.constructor.prototype.constructor.call(this, rte, name);
var self = this;
var opts = {
tpl : '<span style="font-family:%val">%label</span>',
select : function(v) { self.set(v); },
src : {
'' : this.rte.i18n('Font'),
'andale mono,sans-serif' : 'Andale Mono',
'arial,helvetica,sans-serif' : 'Arial',
'arial black,gadget,sans-serif' : 'Arial Black',
'book antiqua,palatino,sans-serif' : 'Book Antiqua',
'comic sans ms,cursive' : 'Comic Sans MS',
'courier new,courier,monospace' : 'Courier New',
'georgia,palatino,serif' : 'Georgia',
'helvetica,sans-serif' : 'Helvetica',
'impact,sans-serif' : 'Impact',
'lucida console,monaco,monospace' : 'Lucida console',
'lucida sans unicode,lucida grande,sans-serif' : 'Lucida grande',
'tahoma,sans-serif' : 'Tahoma',
'times new roman,times,serif' : 'Times New Roman',
'trebuchet ms,lucida grande,verdana,sans-serif' : 'Trebuchet MS',
'verdana,geneva,sans-serif' : 'Verdana'
}
}
this.select = this.domElem.elSelect(opts);
this.command = function() {
}
this.set = function(size) {
this.rte.history.add();
var nodes = this.rte.selection.selected({filter : 'textContainsNodes'});
$.each(nodes, function() {
$this = /^(THEAD|TFOOT|TBODY|COL|COLGROUP|TR)$/.test(this.nodeName) ? $(this).find('td,th') : $(this);
$(this).css('font-family', size).find('[style]').css('font-family', '');
});
this.rte.ui.update();
}
this.update = function() {
this.domElem.removeClass('disabled');
var n = this.rte.selection.getNode();
if (n.nodeType != 1) {
n = n.parentNode;
}
var v = $(n).css('font-family');
v = v ? v.toString().toLowerCase().replace(/,\s+/g, ',').replace(/'|"/g, '') : '';
this.select.val(opts.src[v] ? v : '');
}
}
})(jQuery);

View file

@ -0,0 +1,52 @@
/**
* @class drop-down menu - font size for selected text
*
* @param elRTE rte объект-редактор
* @param String name название кнопки
*
* @author: Dmitry Levashov (dio) dio@std42.ru
* @copyright: Studio 42, http://www.std42.ru
**/
(function($) {
elRTE.prototype.ui.prototype.buttons.fontsize = function(rte, name) {
this.constructor.prototype.constructor.call(this, rte, name);
var self = this;
var opts = {
labelTpl : '%label',
tpl : '<span style="font-size:%val;line-height:1.2em">%label</span>',
select : function(v) { self.set(v); },
src : {
'' : this.rte.i18n('Font size'),
'xx-small' : this.rte.i18n('Small (8pt)'),
'x-small' : this.rte.i18n('Small (10px)'),
'small' : this.rte.i18n('Small (12pt)'),
'medium' : this.rte.i18n('Normal (14pt)'),
'large' : this.rte.i18n('Large (18pt)'),
'x-large' : this.rte.i18n('Large (24pt)'),
'xx-large' : this.rte.i18n('Large (36pt)')
}
}
this.select = this.domElem.elSelect(opts);
this.command = function() {
}
this.set = function(size) {
this.rte.history.add();
var nodes = this.rte.selection.selected({filter : 'textContainsNodes'});
$.each(nodes, function() {
$this = /^(THEAD|TFOOT|TBODY|COL|COLGROUP|TR)$/.test(this.nodeName) ? $(this).find('td,th') : $(this);
$this.css('font-size', size).find("[style]").css('font-size', '');
});
this.rte.ui.update();
}
this.update = function() {
this.domElem.removeClass('disabled');
var n = this.rte.selection.getNode();
this.select.val((m = this.rte.dom.attr(n, 'style').match(/font-size:\s*([^;]+)/i)) ? m[1] : '');
}
}
})(jQuery);

View file

@ -0,0 +1,56 @@
/**
* @class color pallete for text color and background
*
* @param elRTE rte объект-редактор
* @param String name название кнопки
*
* @author: Dmitry Levashov (dio) dio@std42.ru
* @copyright: Studio 42, http://www.std42.ru
**/
(function($) {
elRTE.prototype.ui.prototype.buttons.forecolor = function(rte, name) {
var self = this;
this.constructor.prototype.constructor.call(this, rte, name);
var opts = {
'class' : '',
palettePosition : 'outer',
color : this.defaultColor,
update : function(c) { self.indicator.css('background-color', c); },
change : function(c) { self.set(c) }
}
this.defaultColor = this.name == 'forecolor' ? '#000000' : '#ffffff';
this.picker = this.domElem.elColorPicker(opts);
this.indicator = $('<div />').addClass('color-indicator').prependTo(this.domElem);
this.command = function() {
}
this.set = function(c) {
if (!this.rte.selection.collapsed()) {
this.rte.history.add();
var nodes = this.rte.selection.selected({collapse : false, wrap : 'text'}),
css = this.name == 'forecolor' ? 'color' : 'background-color';
$.each(nodes, function() {
if (/^(THEAD|TBODY|TFOOT|TR)$/.test(this.nodeName)) {
$(this).find('td,th').each(function() {
$(this).css(css, c).find('*').css(css, '');
})
} else {
$(this).css(css, c).find('*').css(css, '');
}
});
this.rte.ui.update(true);
}
}
this.update = function() {
this.domElem.removeClass('disabled');
var n = this.rte.selection.getNode();
this.picker.val(this.rte.utils.rgb2hex($(n.nodeType != 1 ? n.parentNode : n).css(this.name == 'forecolor' ? 'color' : 'background-color'))||this.defaultColor)
}
}
elRTE.prototype.ui.prototype.buttons.hilitecolor = elRTE.prototype.ui.prototype.buttons.forecolor;
})(jQuery);

View file

@ -0,0 +1,107 @@
/**
* @class drop-down menu - formatting text block
*
* @param elRTE rte объект-редактор
* @param String name название кнопки
*
* @author: Dmitry Levashov (dio) dio@std42.ru
* @copyright: Studio 42, http://www.std42.ru
**/
(function($) {
elRTE.prototype.ui.prototype.buttons.formatblock = function(rte, name) {
this.constructor.prototype.constructor.call(this, rte, name);
var cmd = this.rte.browser.msie
? function(v) { self.val = v; self.constructor.prototype.command.call(self); }
: function(v) { self.ieCommand(v); }
var self = this;
var opts = {
labelTpl : '%label',
tpls : {'' : '%label'},
select : function(v) { self.formatBlock(v); },
src : {
'span' : this.rte.i18n('Format'),
'h1' : this.rte.i18n('Heading 1'),
'h2' : this.rte.i18n('Heading 2'),
'h3' : this.rte.i18n('Heading 3'),
'h4' : this.rte.i18n('Heading 4'),
'h5' : this.rte.i18n('Heading 5'),
'h6' : this.rte.i18n('Heading 6'),
'p' : this.rte.i18n('Paragraph'),
'address' : this.rte.i18n('Address'),
'pre' : this.rte.i18n('Preformatted'),
'div' : this.rte.i18n('Normal (DIV)')
}
}
this.select = this.domElem.elSelect(opts);
this.command = function() {
}
this.formatBlock = function(v) {
function format(n, tag) {
function replaceChilds(p) {
$(p).find('h1,h2,h3,h4,h5,h6,p,address,pre').each(function() {
$(this).replaceWith($(this).html());
});
return p;
}
if (/^(LI|DT|DD|TD|TH|CAPTION)$/.test(n.nodeName)) {
!self.rte.dom.isEmpty(n) && self.rte.dom.wrapContents(replaceChilds(n), tag);
} else if (/^(UL|OL|DL|TABLE)$/.test(n.nodeName)) {
self.rte.dom.wrap(n, tag);
} else {
!self.rte.dom.isEmpty(n) && $(replaceChilds(n)).replaceWith( $(self.rte.dom.create(tag)).html($(n).html()));
}
}
this.rte.history.add();
var tag = v.toUpperCase(),
i, n, $n,
c = this.rte.selection.collapsed(),
bm = this.rte.selection.getBookmark(),
nodes = this.rte.selection.selected({
collapsed : true,
blocks : true,
filter : 'textContainsNodes',
wrap : 'inline',
tag : 'span'
})
l = nodes.length,
s = $(nodes[0]).prev(),
e = $(nodes[nodes.length-1]).next();
while (l--) {
n = nodes[l];
$n = $(n);
if (tag == 'DIV' || tag == 'SPAN') {
if (/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)) {
$n.replaceWith($(this.rte.dom.create('div')).html($n.html()||''));
}
} else {
if (/^(THEAD|TBODY|TFOOT|TR)$/.test(n.nodeName)) {
$n.find('td,th').each(function() { format(this, tag); });
} else if (n.nodeName != tag) {
format(n, tag);
}
}
}
this.rte.selection.moveToBookmark(bm);
this.rte.ui.update(true);
}
this.update = function() {
this.domElem.removeClass('disabled');
var n = this.rte.dom.selfOrParent(this.rte.selection.getNode(), /^(H[1-6]|P|ADDRESS|PRE)$/);
this.select.val(n ? n.nodeName.toLowerCase() : 'span');
}
}
})(jQuery);

View file

@ -0,0 +1,87 @@
/**
* @class button - switch to fullscreen mode and back
*
* @param elRTE rte объект-редактор
* @param String name название кнопки
*
* @author: Dmitry Levashov (dio) dio@std42.ru
* @copyright: Studio 42, http://www.std42.ru
**/
(function($) {
elRTE.prototype.ui.prototype.buttons.fullscreen = function(rte, name) {
var self = this;
this.constructor.prototype.constructor.call(this, rte, name);
this.active = true;
this.editor = rte.editor;
this.wz = rte.workzone;
this.height = 0;
this.delta = 0;
this._class = 'el-fullscreen';
setTimeout(function() {
self.height = self.wz.height();
self.delta = self.editor.outerHeight()-self.height;
}, 50);
/**
* Update editor height on window resize in fullscreen view
*
**/
function resize() {
self.wz.height($(window).height()-self.delta);
self.rte.updateHeight();
}
this.command = function() {
var w = $(window),
e = this.editor,
p = e.parents().filter(function(i, n) { return !/^(html|body)$/i.test(n.nodeName) && $(n).css('position') == 'relative'; }),
wz = this.wz,
c = this._class,
f = e.hasClass(c),
rte = this.rte,
s = this.rte.selection,
m = $.browser.mozilla,
b, h;
function save() {
if (m) {
b = s.getBookmark();
}
}
function restore() {
if (m) {
self.wz.children().toggle();
self.rte.source.focus();
self.wz.children().toggle();
s.moveToBookmark(b);
}
}
save();
p.css('position', f ? 'relative' : 'static');
if (f) {
e.removeClass(c);
wz.height(this.height);
w.unbind('resize', resize);
this.domElem.removeClass('active');
} else {
e.addClass(c).removeAttr('style');
wz.height(w.height() - this.delta).css('width', '100%');
w.bind('resize', resize);
this.domElem.addClass('active');
}
rte.updateHeight();
rte.resizable(f);
restore();
}
this.update = function() {
this.domElem.removeClass('disabled');
}
}
})(jQuery);

View file

@ -0,0 +1,101 @@
/**
* @class button - horizontal rule (open dialog window)
*
* @param elRTE rte объект-редактор
* @param String name название кнопки
*
* @author: Dmitry Levashov (dio) dio@std42.ru
* @copyright: Studio 42, http://www.std42.ru
**/
(function($) {
elRTE.prototype.ui.prototype.buttons.horizontalrule = function(rte, name) {
this.constructor.prototype.constructor.call(this, rte, name);
var self = this;
this.src = {
width : $('<input type="text" />').attr({'name' : 'width', 'size' : 4}).css('text-align', 'right'),
wunit : $('<select />').attr('name', 'wunit')
.append($('<option />').val('%').text('%'))
.append($('<option />').val('px').text('px'))
.val('%'),
height : $('<input type="text" />').attr({'name' : 'height', 'size' : 4}).css('text-align', 'right'),
bg : $('<div />'),
border : $('<div />'),
'class' : $('<input type="text" />').css('width', '100%'),
style : $('<input type="text" />').css('width', '100%')
}
this.command = function() {
this.src.bg.elColorPicker({palettePosition : 'outer', 'class' : 'el-colorpicker ui-icon ui-icon-pencil'});
var n = this.rte.selection.getEnd();
this.hr = n.nodeName == 'HR' ? $(n) : $(rte.doc.createElement('hr')).css({width : '100%', height : '1px'});
this.src.border.elBorderSelect({styleHeight : 73, value : this.hr});
var _w = this.hr.css('width') || this.hr.attr('width');
this.src.width.val(parseInt(_w) || 100);
this.src.wunit.val(_w.indexOf('px') != -1 ? 'px' : '%');
this.src.height.val( this.rte.utils.toPixels(this.hr.css('height') || this.hr.attr('height')) || 1) ;
this.src.bg.val(this.rte.utils.color2Hex(this.hr.css('background-color')));
this.src['class'].val(this.rte.dom.attr(this.hr, 'class'));
this.src.style.val(this.rte.dom.attr(this.hr, 'style'));
var opts = {
rtl : this.rte.rtl,
submit : function(e, d) { e.stopPropagation(); e.preventDefault(); self.set(); d.close(); },
dialog : {
title : this.rte.i18n('Horizontal rule')
}
}
var d = new elDialogForm(opts);
d.append([this.rte.i18n('Width'), $('<span />').append(this.src.width).append(this.src.wunit) ], null, true)
.append([this.rte.i18n('Height'), $('<span />').append(this.src.height).append(' px')], null, true)
.append([this.rte.i18n('Border'), this.src.border], null, true)
.append([this.rte.i18n('Background'), this.src.bg], null, true)
.append([this.rte.i18n('Css class'), this.src['class']], null, true)
.append([this.rte.i18n('Css style'), this.src.style], null, true)
.open();
}
this.update = function() {
this.domElem.removeClass('disabled');
if (this.rte.selection.getEnd().nodeName == 'HR') {
this.domElem.addClass('active');
} else {
this.domElem.removeClass('active');
}
}
this.set = function() {
this.rte.history.add();
!this.hr.parentNode && this.rte.selection.insertNode(this.hr.get(0));
var attr = {
noshade : true,
style : this.src.style.val()
}
var b = this.src.border.val();
var css = {
width : (parseInt(this.src.width.val()) || 100)+this.src.wunit.val(),
height : parseInt(this.src.height.val()) || 1,
'background-color' : this.src.bg.val(),
border : b.width && b.style ? b.width+' '+b.style+' '+b.color : ''
}
this.hr.removeAttr('class')
.removeAttr('style')
.removeAttr('width')
.removeAttr('height')
.removeAttr('align')
.attr(attr)
.css(css);
if (this.src['class'].val()) {
this.hr.attr('class', this.src['class'].val());
}
this.rte.ui.update()
}
}
})(jQuery);

View file

@ -0,0 +1,421 @@
/**
* @class button - insert/edit image (open dialog window)
*
* @param elRTE rte объект-редактор
* @param String name название кнопки
*
* @author: Dmitry Levashov (dio) dio@std42.ru
* Copyright: Studio 42, http://www.std42.ru
**/
(function($) {
elRTE.prototype.ui.prototype.buttons.image = function(rte, name) {
this.constructor.prototype.constructor.call(this, rte, name);
var self = this,
rte = self.rte,
proportion = 0,
width = 0,
height = 0,
bookmarks = null,
reset = function(nosrc) {
$.each(self.src, function(i, elements) {
$.each(elements, function(n, el) {
if (n == 'src' && nosrc) {
return;
}
el.val('');
});
});
},
values = function(img) {
$.each(self.src, function(i, elements) {
$.each(elements, function(n, el) {
var val, w, c, s, border;
if (n == 'width') {
val = img.width();
} else if (n == 'height') {
val = img.height();
} else if (n == 'border') {
val = '';
border = img.css('border') || rte.utils.parseStyle(img.attr('style')).border || '';
if (border) {
w = border.match(/(\d(px|em|%))/);
c = border.match(/(#[a-z0-9]+)/);
val = {
width : w ? w[1] : border,
style : border,
color : rte.utils.color2Hex(c ? c[1] : border)
}
}
} else if (n == 'margin') {
val = img;
} else if (n == 'align') {
val = img.css('float');
if (val != 'left' && val != 'right') {
val = img.css('vertical-align');
}
}else {
val = img.attr(n)||'';
}
if (i == 'events') {
val = rte.utils.trimEventCallback(val);
}
el.val(val);
});
});
},
preview = function() {
var src = self.src.main.src.val();
reset(true);
if (!src) {
self.preview.children('img').remove();
self.prevImg = null;
} else {
if (self.prevImg) {
self.prevImg
.removeAttr('src')
.removeAttr('style')
.removeAttr('class')
.removeAttr('id')
.removeAttr('title')
.removeAttr('alt')
.removeAttr('longdesc');
$.each(self.src.events, function(name, input) {
self.prevImg.removeAttr(name);
});
} else {
self.prevImg = $('<img/>').prependTo(self.preview);
}
self.prevImg.load(function() {
self.prevImg.unbind('load');
setTimeout(function() {
width = self.prevImg.width();
height = self.prevImg.height();
proportion = (width/height).toFixed(2);
self.src.main.width.val(width);
self.src.main.height.val(height);
}, 100);
})
.attr('src', src);
}
},
size = function(e) {
var w = parseInt(self.src.main.width.val())||0,
h = parseInt(self.src.main.height.val())||0;
if (self.prevImg) {
if (w && h) {
if (e.target === self.src.main.width[0]) {
h = parseInt(w/proportion);
} else {
w = parseInt(h*proportion);
}
} else {
w = width;
h = height;
}
self.src.main.height.val(h);
self.src.main.width.val(w);
self.prevImg.width(w).height(h);
self.src.adv.style.val(self.prevImg.attr('style'));
}
}
;
this.img = null;
this.prevImg = null;
this.preview = $('<div class="elrte-image-preview"/>').text('Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin');
this.init = function() {
this.labels = {
main : 'Properies',
link : 'Link',
adv : 'Advanced',
events : 'Events',
id : 'ID',
'class' : 'Css class',
style : 'Css style',
longdesc : 'Detail description URL',
href : 'URL',
target : 'Open in',
title : 'Title'
}
this.src = {
main : {
src : $('<input type="text" />').css('width', '100%').change(preview),
title : $('<input type="text" />').css('width', '100%'),
alt : $('<input type="text" />').css('width', '100%'),
width : $('<input type="text" />').attr('size', 5).css('text-align', 'right').change(size),
height : $('<input type="text" />').attr('size', 5).css('text-align', 'right').change(size),
margin : $('<div />').elPaddingInput({
type : 'margin',
change : function() {
var margin = self.src.main.margin.val();
if (self.prevImg) {
if (margin.css) {
self.prevImg.css('margin', margin.css)
} else {
self.prevImg.css({
'margin-left' : margin.left,
'margin-top' : margin.top,
'margin-right' : margin.right,
'margin-bottom' : margin.bottom
});
}
}
}
}),
align : $('<select />').css('width', '100%')
.append($('<option />').val('').text(this.rte.i18n('Not set', 'dialogs')))
.append($('<option />').val('left' ).text(this.rte.i18n('Left')))
.append($('<option />').val('right' ).text(this.rte.i18n('Right')))
.append($('<option />').val('top' ).text(this.rte.i18n('Top')))
.append($('<option />').val('text-top' ).text(this.rte.i18n('Text top')))
.append($('<option />').val('middle' ).text(this.rte.i18n('middle')))
.append($('<option />').val('baseline' ).text(this.rte.i18n('Baseline')))
.append($('<option />').val('bottom' ).text(this.rte.i18n('Bottom')))
.append($('<option />').val('text-bottom').text(this.rte.i18n('Text bottom')))
.change(function() {
var val = $(this).val(),
css = {
'float' : '',
'vertical-align' : ''
};
if (self.prevImg) {
if (val == 'left' || val == 'right') {
css['float'] = val;
css['vertical-align'] = '';
} else if (val) {
css['float'] = '';
css['vertical-align'] = val;
}
self.prevImg.css(css);
}
})
,
border : $('<div />').elBorderSelect({
name : 'border',
change : function() {
var border = self.src.main.border.val();
if (self.prevImg) {
self.prevImg.css('border', border.width ? border.width+' '+border.style+' '+border.color : '');
}
}
})
},
adv : {},
events : {}
}
$.each(['id', 'class', 'style', 'longdesc'], function(i, name) {
self.src.adv[name] = $('<input type="text" style="width:100%" />');
});
this.src.adv['class'].change(function() {
if (self.prevImg) {
self.prevImg.attr('class', $(this).val());
}
});
this.src.adv.style.change(function() {
if (self.prevImg) {
self.prevImg.attr('style', $(this).val());
values(self.prevImg);
}
});
$.each(
['onblur', 'onfocus', 'onclick', 'ondblclick', 'onmousedown', 'onmouseup', 'onmouseover', 'onmouseout', 'onmouseleave', 'onkeydown', 'onkeypress', 'onkeyup'],
function() {
self.src.events[this] = $('<input type="text" style="width:100%"/>');
});
}
this.command = function() {
!this.src && this.init();
var img,
opts = {
rtl : rte.rtl,
submit : function(e, d) {
e.stopPropagation();
e.preventDefault();
self.set();
dialog.close();
},
close : function() {
bookmarks && rte.selection.moveToBookmark(bookmarks)
},
dialog : {
autoOpen : false,
width : 500,
position : 'top',
title : rte.i18n('Image'),
resizable : true,
open : function() {
$.fn.resizable && $(this).parents('.ui-dialog:first').resizable('option', 'alsoResize', '.elrte-image-preview');
}
}
},
dialog = new elDialogForm(opts),
fm = !!rte.options.fmOpen,
src = fm
? $('<div class="elrte-image-src-fm"><span class="ui-state-default ui-corner-all"><span class="ui-icon ui-icon-folder-open"/></span></div>')
.append(this.src.main.src.css('width', '87%'))
: this.src.main.src;
;
reset();
this.preview.children('img').remove();
this.prevImg = null;
img = rte.selection.getEnd();
this.img = img.nodeName == 'IMG' && !$(img).is('.elrte-protected')
? $(img)
: $('<img/>');
bookmarks = rte.selection.getBookmark();
if (fm) {
src.children('.ui-state-default')
.click( function() {
rte.options.fmOpen( function(url) { self.src.main.src.val(url).change() } );
})
.hover(function() {
$(this).toggleClass('ui-state-hover');
});
}
dialog.tab('main', this.rte.i18n('Properies'))
.append([this.rte.i18n('Image URL'), src], 'main', true)
.append([this.rte.i18n('Title'), this.src.main.title], 'main', true)
.append([this.rte.i18n('Alt text'), this.src.main.alt], 'main', true)
.append([this.rte.i18n('Size'), $('<span />').append(this.src.main.width).append(' x ').append(this.src.main.height).append(' px')], 'main', true)
.append([this.rte.i18n('Alignment'), this.src.main.align], 'main', true)
.append([this.rte.i18n('Margins'), this.src.main.margin], 'main', true)
.append([this.rte.i18n('Border'), this.src.main.border], 'main', true)
dialog.append($('<fieldset><legend>'+this.rte.i18n('Preview')+'</legend></fieldset>').append(this.preview), 'main');
$.each(this.src, function(tabname, elements) {
if (tabname == 'main') {
return;
}
dialog.tab(tabname, rte.i18n(self.labels[tabname]));
$.each(elements, function(name, el) {
self.src[tabname][name].val(tabname == 'events' ? rte.utils.trimEventCallback(self.img.attr(name)) : self.img.attr(name)||'');
dialog.append([rte.i18n(self.labels[name] || name), self.src[tabname][name]], tabname, true);
});
});
dialog.open();
if (this.img.attr('src')) {
values(this.img);
this.prevImg = this.img.clone().prependTo(this.preview);
proportion = (this.img.width()/this.img.height()).toFixed(2);
width = parseInt(this.img.width());
height = parseInt(this.img.height());
}
}
this.set = function() {
var src = this.src.main.src.val(),
link;
this.rte.history.add();
bookmarks && rte.selection.moveToBookmark(bookmarks);
if (!src) {
link = rte.dom.selfOrParentLink(this.img[0]);
link && link.remove();
return this.img.remove();
}
!this.img[0].parentNode && (this.img = $(this.rte.doc.createElement('img')));
this.img.attr('src', src)
.attr('style', this.src.adv.style.val());
$.each(this.src, function(i, elements) {
$.each(elements, function(name, el) {
var val = el.val(), style;
switch (name) {
case 'width':
self.img.css('width', val);
break;
case 'height':
self.img.css('height', val);
break;
case 'align':
self.img.css(val == 'left' || val == 'right' ? 'float' : 'vertical-align', val);
break;
case 'margin':
if (val.css) {
self.img.css('margin', val.css);
} else {
self.img.css({
'margin-left' : val.left,
'margin-top' : val.top,
'margin-right' : val.right,
'margin-bottom' : val.bottom
});
}
break;
case 'border':
if (!val.width) {
val = '';
} else {
val = 'border:'+val.css+';'+$.trim((self.img.attr('style')||'').replace(/border\-[^;]+;?/ig, ''));
name = 'style';
self.img.attr('style', val)
return;
}
break;
case 'src':
case 'style':
return;
default:
val ? self.img.attr(name, val) : self.img.removeAttr(name);
}
});
});
!this.img[0].parentNode && rte.selection.insertNode(this.img[0]);
this.rte.ui.update();
}
this.update = function() {
this.domElem.removeClass('disabled');
var n = this.rte.selection.getEnd(),
$n = $(n);
if (n.nodeName == 'IMG' && !$n.hasClass('elrte-protected')) {
this.domElem.addClass('active');
} else {
this.domElem.removeClass('active');
}
}
}
})(jQuery);

View file

@ -0,0 +1,49 @@
/**
* @class Увеличение отступа
* списки - если выделен один элемент - увеличивается вложенность списка, в остальных случаях - padding у родительского ul|ol
* Если таблица выделена полностью - ей добавляется margin, если частично - увеличивается padding для ячеек
*
* @param elRTE rte объект-редактор
* @param String name название кнопки
*
*
* @author: Dmitry Levashov (dio) dio@std42.ru
* @copyright: Studio 42, http://www.std42.ru
**/
(function($) {
elRTE.prototype.ui.prototype.buttons.indent = function(rte, name) {
this.constructor.prototype.constructor.call(this, rte, name);
var self = this;
this.command = function() {
this.rte.history.add();
var nodes = this.rte.selection.selected({collapsed : true, blocks : true, wrap : 'inline', tag : 'p'});
function indent(n) {
var css = /(IMG|HR|TABLE|EMBED|OBJECT)/.test(n.nodeName) ? 'margin-left' : 'padding-left';
var val = self.rte.dom.attr(n, 'style').indexOf(css) != -1 ? parseInt($(n).css(css))||0 : 0;
$(n).css(css, val+40+'px');
}
for (var i=0; i < nodes.length; i++) {
if (/^(TABLE|THEAD|TFOOT|TBODY|COL|COLGROUP|TR)$/.test(nodes[i].nodeName)) {
$(nodes[i]).find('td,th').each(function() {
indent(this);
});
} else if (/^LI$/.test(nodes[i].nodeName)) {
var n = $(nodes[i]);
$(this.rte.dom.create(nodes[i].parentNode.nodeName))
.append($(this.rte.dom.create('li')).html(n.html()||'')).appendTo(n.html('&nbsp;'));
} else {
indent(nodes[i]);
}
};
this.rte.ui.update();
}
this.update = function() {
this.domElem.removeClass('disabled');
}
}
})(jQuery);

View file

@ -0,0 +1,42 @@
/**
* @class button - justify text
*
* @param elRTE rte объект-редактор
* @param String name название кнопки
*
*
* @author: Dmitry Levashov (dio) dio@std42.ru
* @copyright: Studio 42, http://www.std42.ru
**/
(function($) {
elRTE.prototype.ui.prototype.buttons.justifyleft = function(rte, name) {
this.constructor.prototype.constructor.call(this, rte, name);
this.align = this.name == 'justifyfull' ? 'justify' : this.name.replace('justify', '');
this.command = function() {
var s = this.rte.selection.selected({collapsed:true, blocks : true, tag : 'div'}),
l = s.length;
l && this.rte.history.add();
while (l--) {
this.rte.dom.filter(s[l], 'textNodes') && $(s[l]).css('text-align', this.align);
}
this.rte.ui.update();
}
this.update = function() {
var s = this.rte.selection.getNode(),
n = s.nodeName == 'BODY' ? s : this.rte.dom.selfOrParent(s, 'textNodes')||(s.parentNode && s.parentNode.nodeName == 'BODY' ? s.parentNode : null);
if (n) {
this.domElem.removeClass('disabled').toggleClass('active', $(n).css('text-align') == this.align);
} else {
this.domElem.addClass('disabled');
}
}
}
elRTE.prototype.ui.prototype.buttons.justifycenter = elRTE.prototype.ui.prototype.buttons.justifyleft;
elRTE.prototype.ui.prototype.buttons.justifyright = elRTE.prototype.ui.prototype.buttons.justifyleft;
elRTE.prototype.ui.prototype.buttons.justifyfull = elRTE.prototype.ui.prototype.buttons.justifyleft;
})(jQuery);

Some files were not shown because too many files have changed in this diff Show more