hinzufüge, gehts (besser). Obwohl der Editor total verschoben und versteckt angezeigt wird. Wenn ich dynamisch generiere siehts so aus:
und geht nicht. Mahlzeit.
Code: Alles auswählen
jQuery(document).ready(function($) {
$('.editors').each(function() {
var id = $(this).attr('id');
CKEDITOR.replace(id, {
height: 500,
fillEmptyBlocks: false,
forcePasteAsPlainText: false,
entities: false,
linkShowTargetTab: true,
format_tags: 'p;h1;h2;h3;h4;h5;pre',
removePlugins: '',
extraPlugins: 'rex_help',
allowedContent: true,
removeDialogTabs: '',
toolbar: [
['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'],
['Link', 'Unlink', 'Anchor'],
['Image', 'Table', 'Seperator', 'HorizontalRule', 'SpecialChar'],
['TextColor', 'BGColor'],
['CreateDiv'],
['Maximize'],
['Source'],
['rex_help'],
'/',
['Format', 'Styles'],
['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote']
// no comma after last entry!!!
],
contentsCss: [CKEDITOR.basePath + 'contents.css',
'h1 { font-size:48px; text-transform: uppercase; }' +
'h2 { font-size:36px; text-transform: uppercase; }' +
'h3 { font-size:28px; text-transform: uppercase; }' +
'h4 { font-size:22px; text-transform: uppercase; }' +
'h5 { font-size:18px; text-transform: uppercase; }' +
'.pdflink { background: url(/img/pdf_icon.png)no-repeat; padding-left: 20px; }' +
'.grey { color:#AAACAF; }' +
'.red { color: #cd0032; }' +
'.blue { color:#46A0DC; }' +
'.orange { color:#EBAA46; }' +
'.purple { color:#B90087; }' +
'.green { color: #9BC33C; }' +
'.picleft { float: left; clear: left; margin: 0 10px 5px 0; }' +
'.picright { float: right; clear: right; margin: 0 0 5px 10px; }'
// no plus after last entry!!!
]
// no comma after last entry!!!
});
});
CKEDITOR.stylesSet.add('default', [
{ name: 'pdflink', element: 'span', attributes: { 'class': 'pdflink' } },
{ name: 'grau', element: 'span', attributes: { 'class': 'grey' } },
{ name: 'eyevisrot', element: 'span', attributes: { 'class': 'red' } },
{ name: 'blau', element: 'span', attributes: { 'class': 'blue' } },
{ name: 'orange', element: 'span', attributes: { 'class': 'orange' } },
{ name: 'magenta', element: 'span', attributes: { 'class': 'purple' } },
{ name: 'grün', element: 'span', attributes: { 'class': 'green' } },
{ name: 'Bild linkbündig', element: 'div', attributes: { 'class': 'picleft' } },
{ name: 'Bild rechtsbündig', element: 'div', attributes: { 'class': 'picright' } }
// no comma after last entry!!!
]);
});