Vergleich jscripts/bbcodes_sceditor.js - 1.8.6 - 1.8.17

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 78Zeile 78
		format: function($elm, content) {
var fontSize,
sizes = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'],

		format: function($elm, content) {
var fontSize,
sizes = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'],

				size  = $elm.data('scefontsize');

				size = $elm.attr('size');





			if(!size)
{
fontSize = $elm.css('fontSize');

// Most browsers return px value but IE returns 1-7
if(fontSize.indexOf('px') > -1) {
// convert size to an int
fontSize = fontSize.replace('px', '') - 0;
size = 1;

				if (!size) {
fontSize = $elm.css('fontSize');
// Most browsers return px value but IE returns 1-7
if(fontSize.indexOf('px') > -1) {
// convert size to an int
fontSize = fontSize.replace('px', '') - 0;
size = 1;







					if(fontSize > 9)
size = 2;
if(fontSize > 12)
size = 3;
if(fontSize > 15)
size = 4;
if(fontSize > 17)
size = 5;
if(fontSize > 23)
size = 6;
if(fontSize > 31)








						if(fontSize > 9)
size = 2;
if(fontSize > 12)
size = 3;
if(fontSize > 15)
size = 4;
if(fontSize > 17)
size = 5;
if(fontSize > 23)
size = 6;
if(fontSize > 31)
size = 7;
}
else {
size = (~~fontSize) + 1;
}

if(size > 7)

						size = 7;

						size = 7;

 
					if(size < 1)
size = 1;

size = sizes[size-1];

				}

				}

				else
size = (~~fontSize) + 1;










				else {
size = sizes[size-1];
}

return '[size=' + size + ']' + content + '[/size]';
},
html: function(token, attrs, content) {
var sizes = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'],
size = $.inArray(attrs.defaultattr, sizes)+1;
if (!isNaN(attrs.defaultattr)) {
size = attrs.defaultattr;

				if(size > 7)
size = 7;
if(size < 1)
size = 1;

				if(size > 7)
size = 7;
if(size < 1)
size = 1;


size = sizes[size-1];

 
			}

			}


return '[size=' + size + ']' + content + '[/size]';
},
html: function(token, attrs, content) {
return '<span data-scefontsize="' + attrs.defaultattr + '" style="font-size:' + attrs.defaultattr + '">' + content + '</span>';

			if (size < 0) {
size = 0;
}
return '<font data-scefontsize="' + attrs.defaultattr + '" size="' + size + '">' + content + '</font>';


		}
});


		}
});


Zeile 129Zeile 143
					editor.closeDropDown(true);
e.preventDefault();
};

					editor.closeDropDown(true);
e.preventDefault();
};





			for (var i=1; i <= 7; i++)
content.append($('<a class="sceditor-fontsize-option" data-size="' + i + '" href="#"><font size="' + i + '">' + i + '</font></a>').click(clickFunc));

editor.createDropDown(caller, 'fontsize-picker', content);
},
exec: function (caller) {

			for (var i=1; i <= 7; i++)
content.append($('<a class="sceditor-fontsize-option" data-size="' + i + '" href="#"><font size="' + i + '">' + i + '</font></a>').click(clickFunc));

editor.createDropDown(caller, 'fontsize-picker', content);
},
exec: function (caller) {

			var	editor = this,
sizes = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'];

			var	editor = this;



$.sceditor.command.get('size')._dropDown(
editor,
caller,
function(fontSize) {


$.sceditor.command.get('size')._dropDown(
editor,
caller,
function(fontSize) {

					editor.wysiwygEditorInsertHtml('<span data-scefontsize=' + sizes[fontSize-1] + ' style="font-size:' + sizes[fontSize-1] + '">', '</span>');

					editor.execCommand('fontsize', fontSize);

				}
);
},
txtExec: function(caller) {
var editor = this,
sizes = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'];

				}
);
},
txtExec: function(caller) {
var editor = this,
sizes = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'];





			$.sceditor.command.get('size')._dropDown(
editor,
caller,

			$.sceditor.command.get('size')._dropDown(
editor,
caller,

Zeile 196Zeile 209
				author += " dateline='" + $elm.data('dateline') + "'";

return '[quote' + author + ']' + content + '[/quote]';

				author += " dateline='" + $elm.data('dateline') + "'";

return '[quote' + author + ']' + content + '[/quote]';

		},
html: function(token, attrs, content) {

		},
html: function(token, attrs, content) {

			var data = '';

if(attrs.pid)

			var data = '';

if(attrs.pid)

Zeile 288Zeile 301
					before = '[php]',
end = '[/php]';


					before = '[php]',
end = '[/php]';


				if (val) {
before = before + val + end;
end = null;
}


				if (val) {
before = before + val + end;
end = null;
}


				editor.insert(before, end);
editor.closeDropDown(true);
e.preventDefault();

				editor.insert(before, end);
editor.closeDropDown(true);
e.preventDefault();

Zeile 450Zeile 463
					metacafe: '<iframe src="{url}" width="440" height="248" frameborder=0 data-mybb-vt="{type}" data-mybb-vsrc="{src}"></iframe>',
veoh: '<iframe src="{url}" width="410" height="341" frameborder="0" data-mybb-vt="{type}" data-mybb-vsrc="{src}"></iframe>',
vimeo: '<iframe src="{url}" width="500" height="281" frameborder="0" data-mybb-vt="{type}" data-mybb-vsrc="{src}"></iframe>',

					metacafe: '<iframe src="{url}" width="440" height="248" frameborder=0 data-mybb-vt="{type}" data-mybb-vsrc="{src}"></iframe>',
veoh: '<iframe src="{url}" width="410" height="341" frameborder="0" data-mybb-vt="{type}" data-mybb-vsrc="{src}"></iframe>',
vimeo: '<iframe src="{url}" width="500" height="281" frameborder="0" data-mybb-vt="{type}" data-mybb-vsrc="{src}"></iframe>',

					youtube: '<iframe width="560" height="315" src="{url}" frameborder="0" data-mybb-vt="{type}" data-mybb-vsrc="{src}"></iframe>'


					youtube: '<iframe width="560" height="315" src="{url}" frameborder="0" data-mybb-vt="{type}" data-mybb-vsrc="{src}"></iframe>',
twitch: '<iframe src="{url}" frameborder="0" scrolling="no" height="378" width="620" data-mybb-vt="{type}" data-mybb-vsrc="{src}"></iframe>'

				};

if(html[attrs.defaultattr])

				};

if(html[attrs.defaultattr])

Zeile 458Zeile 472
				switch(attrs.defaultattr)
{
case 'dailymotion':

				switch(attrs.defaultattr)
{
case 'dailymotion':

						matches = content.match(/dailymotion\.com\/video\/([^_]+)/);
url = matches ? 'http://www.dailymotion.com/embed/video/' + matches[1] : false;

						matches = content.match(/(dailymotion\.com\/video\/|dai\.ly\/)([^\/]+)/);
url = matches ? '//www.dailymotion.com/embed/video/' + matches[2] : false;

						break;
case 'facebook':
matches = content.match(/facebook\.com\/(?:photo.php\?v=|video\/video.php\?v=|video\/embed\?video_id=|v\/?)(\d+)/);

						break;
case 'facebook':
matches = content.match(/facebook\.com\/(?:photo.php\?v=|video\/video.php\?v=|video\/embed\?video_id=|v\/?)(\d+)/);

Zeile 484Zeile 498
					case 'youtube':
matches = content.match(/(?:v=|v\/|embed\/|youtu\.be\/)(.{11})/);
url = matches ? '//www.youtube.com/embed/' + matches[1] : false;

					case 'youtube':
matches = content.match(/(?:v=|v\/|embed\/|youtu\.be\/)(.{11})/);
url = matches ? '//www.youtube.com/embed/' + matches[1] : false;

 
						break;
case 'twitch':
matches = content.match(/twitch\.tv\/(?:[\w+_-]+)\/v\/(\d+)/);
url = matches ? '//player.twitch.tv/?video=v' + matches[1] : false;

						break;
}


						break;
}


Zeile 516Zeile 534
						'<option value="veoh">' + editor._('Veoh') + '</option>' +
'<option value="vimeo">' + editor._('Vimeo') + '</option>' +
'<option value="youtube">' + editor._('Youtube') + '</option>' +

						'<option value="veoh">' + editor._('Veoh') + '</option>' +
'<option value="vimeo">' + editor._('Vimeo') + '</option>' +
'<option value="youtube">' + editor._('Youtube') + '</option>' +

 
						'<option value="twitch">' + editor._('Twitch') + '</option>' +

					'</select>'+
'</div>' +
'<div>' +

					'</select>'+
'</div>' +
'<div>' +