30.05.2015, 02:09
Hier nun mein Resultat.
MyCode:
Titel *
Auszahlung
Regulärer Ausdruck *
Ersetzung *
codebuttons Template:
Button im Editor:
Kopiere deinen Button in das Verzeichnis -> jscripts/sceditor/editor_themes
Die Größe des Buttons sollte nicht mehr als 23x23px betragen und das Format png haben.
MyCode:
Titel *
Auszahlung
Regulärer Ausdruck *
Code:
\[az\](.*?)\[/az\]
Ersetzung *
Code:
<div style="-moz-border-radius: 6px;-webkit-border-radius: 6px;border-radius: 6px;border: 1px solid #000;padding: 10px;border-bottom: 1px solid #000;witdh:100%;">
<strong>Auszahlung:</strong><hr />
<span style="padding-bottom: 3px;margin: 0 0 10px 0;">$1</span>
</div>
codebuttons Template:
Code:
<link rel="stylesheet" href="{$mybb->asset_url}/jscripts/sceditor/editor_themes/{$theme['editortheme']}" type="text/css" media="all" />
<style type="text/css">
.sceditor-button-az div {
background: url({$mybb->asset_url}/jscripts/sceditor/editor_themes/az.png);
}
</style>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/sceditor/jquery.sceditor.bbcode.min.js"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/bbcodes_sceditor.js?ver=1804"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/sceditor/editor_plugins/undo.js?ver=1804"></script>
<script type="text/javascript">
var partialmode = {$mybb->settings['partialmode']},
opt_editor = {
plugins: "bbcode,undo",
style: "{$mybb->asset_url}/jscripts/sceditor/textarea_styles/jquery.sceditor.{$theme['editortheme']}",
rtl: {$lang->settings['rtl']},
locale: "mybblang",
enablePasteFiltering: true,
emoticonsEnabled: {$emoticons_enabled},
emoticons: {
// Emoticons to be included in the dropdown
dropdown: {
{$dropdownsmilies}
},
// Emoticons to be included in the more section
more: {
{$moresmilies}
},
// Emoticons that are not shown in the dropdown but will still be converted. Can be used for things like aliases
hidden: {
{$hiddensmilies}
}
},
emoticonsCompat: true,
toolbar: "{$basic1}{$align}{$font}{$size}{$color}{$removeformat}{$basic2}image,{$email}{$link}|video{$emoticon}|{$list}{$code}quote,az|maximize,source",
};
{$editor_language}
$(function() {
$("#{$bind}").sceditor(opt_editor);
MyBBEditor = $("#{$bind}").sceditor("instance");
{$sourcemode}
});
$.sceditor.command.set('az', {
exec: function() {
this.wysiwygEditorInsertHtml('<span style="-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;border:1px solid #000;padding:10px;" class="az">', '</span>');
},
txtExec: ['[az]', '[/az]'],
tooltip: "Auszahlung einfügen"
});
$.sceditor.plugins.bbcode.bbcode.set('az', {
tags: {
'span': {
'class': ['az']
}
},
format: '[az]{0}[/az]',
html: '<span style="-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;border:1px solid #000;padding:10px;" class="az">{0}</span>'
});
</script>
Button im Editor:
Kopiere deinen Button in das Verzeichnis -> jscripts/sceditor/editor_themes
Die Größe des Buttons sollte nicht mehr als 23x23px betragen und das Format png haben.