Zeile 78 | Zeile 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 129 | Zeile 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 196 | Zeile 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 287 | Zeile 300 |
---|
var val = $content.find('#php').val(), before = '[php]', end = '[/php]';
|
var val = $content.find('#php').val(), 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 304 | Zeile 317 |
---|
if ($.trim(this.getRangeHelper().selectedRange())) { this.insert('[php]', '[/php]'); return;
|
if ($.trim(this.getRangeHelper().selectedRange())) { this.insert('[php]', '[/php]'); return;
|
}
| }
|
$.sceditor.command.get('php')._dropDown(this, caller); }, txtExec: ['[php]', '[/php]'], tooltip: "PHP"
|
$.sceditor.command.get('php')._dropDown(this, caller); }, txtExec: ['[php]', '[/php]'], tooltip: "PHP"
|
});
| });
|
/******************************
|
/******************************
|
Zeile 340 | Zeile 353 |
---|
'<div>' + '<label for="code">' + editor._('Code') + ':</label> ' + '<textarea type="text" id="code" />' +
|
'<div>' + '<label for="code">' + editor._('Code') + ':</label> ' + '<textarea type="text" id="code" />' +
|
'</div>' +
| '</div>' +
|
'<div><input type="button" class="button" value="' + editor._('Insert') + '" /></div>' );
| '<div><input type="button" class="button" value="' + editor._('Insert') + '" /></div>' );
|
Zeile 450 | Zeile 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 484 | Zeile 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 516 | Zeile 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>' +
|