Vergleich jscripts/editor.js - 1.2.4 - 1.2.9

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 41Zeile 41
		this.sizes["xx-small"] = this.options.lang.size_xx_small;
this.sizes["x-small"] = this.options.lang.size_x_small;
this.sizes["small"] = this.options.lang.size_small;

		this.sizes["xx-small"] = this.options.lang.size_xx_small;
this.sizes["x-small"] = this.options.lang.size_x_small;
this.sizes["small"] = this.options.lang.size_small;

		this.sizes["medium"] = this.options.lang.size_medium


		this.sizes["medium"] = this.options.lang.size_medium;
this.sizes["large"] = this.options.lang.size_large;

		this.sizes["x-large"] = this.options.lang.size_x_large;
this.sizes["xx-large"] = this.options.lang.size_xx_large;

// An array of colours to be shown.
this.colors = new Array();

		this.sizes["x-large"] = this.options.lang.size_x_large;
this.sizes["xx-large"] = this.options.lang.size_xx_large;

// An array of colours to be shown.
this.colors = new Array();

		this.colors["white"] = this.options.lang.color_white;
this.colors["black"] = this.options.lang.color_black;
this.colors["red"] = this.options.lang.color_red;
this.colors["yellow"] = this.options.lang.color_yellow;
this.colors["pink"] = this.options.lang.color_pink;
this.colors["green"] = this.options.lang.color_green;
this.colors["orange"] = this.options.lang.color_orange;
this.colors["purple"] = this.options.lang.color_purple;
this.colors["blue"] = this.options.lang.color_blue;
this.colors["beige"] = this.options.lang.color_beige;
this.colors["brown"] = this.options.lang.color_brown;
this.colors["teal"] = this.options.lang.color_teal;
this.colors["navy"] = this.options.lang.color_navy;
this.colors["maroon"] = this.options.lang.color_maroon;
this.colors["limegreen"] = this.options.lang.color_limegreen;


		this.colors["#ffffff"] = this.options.lang.color_white;
this.colors["#000000"] = this.options.lang.color_black;
this.colors["#FF0000"] = this.options.lang.color_red;
this.colors["#FFFF00"] = this.options.lang.color_yellow;
this.colors["#FFC0CB"] = this.options.lang.color_pink;
this.colors["#008000"] = this.options.lang.color_green;
this.colors["#FFA500"] = this.options.lang.color_orange;
this.colors["#800080"] = this.options.lang.color_purple;
this.colors["#0000FF"] = this.options.lang.color_blue;
this.colors["#F5F5DC"] = this.options.lang.color_beige;
this.colors["#A52A2A"] = this.options.lang.color_brown;
this.colors["#008080"] = this.options.lang.color_teal;
this.colors["#000080"] = this.options.lang.color_navy;
this.colors["#800000"] = this.options.lang.color_maroon;
this.colors["#32CD32"] = this.options.lang.color_limegreen;


		// Here we get the ID of the textarea we're replacing and store it.
this.textarea = textarea;


		// Here we get the ID of the textarea we're replacing and store it.
this.textarea = textarea;


Zeile 121Zeile 122
		editor.style.width = w;
editor.style.height = h;
editor.style.padding = "3px";

		editor.style.width = w;
editor.style.height = h;
editor.style.padding = "3px";





		// Create the first toolbar
toolBar = document.createElement("div");
toolBar.style.height = "26px";

		// Create the first toolbar
toolBar = document.createElement("div");
toolBar.style.height = "26px";

Zeile 130Zeile 131
		// Create text font/color/size toolbar
textFormatting = document.createElement("div");
textFormatting.style.position = "absolute";

		// Create text font/color/size toolbar
textFormatting = document.createElement("div");
textFormatting.style.position = "absolute";

 
		textFormatting.style.width = "100%";


		
if(this.options.rtl == 1)
{

		
if(this.options.rtl == 1)
{

Zeile 278Zeile 281

// Set the width/height of the area
subtract = subtract2 = 0;


// Set the width/height of the area
subtract = subtract2 = 0;

		if(MyBB.browser == "mozilla")

		if(MyBB.browser != "ie" || (MyBB.browser == "ie" && MyBB.useragent.indexOf('msie 7.') != -1))

		{
subtract = subtract2 = 8;
}

		{
subtract = subtract2 = 8;
}

Zeile 611Zeile 614
							{
$(this.openTags[i]).className = "toolbar_normal";
}

							{
$(this.openTags[i]).className = "toolbar_normal";
}

 
							
if($(exploded_tag[0]) && $(exploded_type[0]).type == "select-one")
{
$(exploded_tag[0]).selectedIndex = 0;
}

							
if(this.openTags[i] == full_tag)
{
no_insert = true;
}

							
if(this.openTags[i] == full_tag)
{
no_insert = true;
}

						}

						}

						else
{
newTags[newTags.length] = this.openTags[i];
}

						else
{
newTags[newTags.length] = this.openTags[i];
}

					}
}


					}
}


				this.openTags = newTags;
var do_insert = false;

if(extra != "" && extra != "-" && no_insert == false)
{
start_tag = "["+code+"="+extra+"]";

				this.openTags = newTags;
var do_insert = false;

if(extra != "" && extra != "-" && no_insert == false)
{
start_tag = "["+code+"="+extra+"]";

					end_tag = "[/"+code+"]";
do_insert = true;

					end_tag = "[/"+code+"]";
do_insert = true;

				}
else if(!extra && already_open == false)

				}
else if(!extra && already_open == false)

				{

				{

					start_tag = "["+code+"]";
end_tag = "[/"+code+"]";
do_insert = true;

					start_tag = "["+code+"]";
end_tag = "[/"+code+"]";
do_insert = true;

				}

				}


if(do_insert == true)
{


if(do_insert == true)
{

Zeile 651Zeile 659
					{
DomLib.removeClass($(full_tag), "toolbar_clicked");
}

					{
DomLib.removeClass($(full_tag), "toolbar_clicked");
}

 
					else if($(code) && $(code).type == "select-one")
{
$(code).selectedIndex = 0;
}


				}
}

				}
}

 
		
if(this.openTags.length == 0)
{
$('close_tags').style.visibility = 'hidden';
}

	},

getSelectedText: function(element)

	},

getSelectedText: function(element)

Zeile 798Zeile 816
				tag = MyBB.arrayPop(this.openTags);
exploded_tag = tag.split("_");
this.performInsert("[/"+exploded_tag[0]+"]", "", false);

				tag = MyBB.arrayPop(this.openTags);
exploded_tag = tag.split("_");
this.performInsert("[/"+exploded_tag[0]+"]", "", false);

				

 
				if($(exploded_tag[0]))
{
tag = $(exploded_tag[0]);

				if($(exploded_tag[0]))
{
tag = $(exploded_tag[0]);

 
				}
if($(tag))
{

					if(tag.type == "select-one")
{
tag.selectedIndex = 0;

					if(tag.type == "select-one")
{
tag.selectedIndex = 0;

Zeile 811Zeile 831
						DomLib.removeClass($(tag), "toolbar_clicked");
}
}

						DomLib.removeClass($(tag), "toolbar_clicked");
}
}

 
				

			}
}
$(this.textarea).focus();

			}
}
$(this.textarea).focus();