fix ckeditor not inserting media in the right textarea
This commit is contained in:
parent
070fdb7275
commit
f87121f42d
@ -1,8 +1,9 @@
|
||||
{if $init}
|
||||
<script src="{$serendipityHTTPPath}htmlarea/ckeditor/ckeditor.js"></script>
|
||||
<script>
|
||||
{/if}
|
||||
<script>
|
||||
$('document').ready(function() {
|
||||
CKEDITOR.plugins.add('s9y_medialibrary', {
|
||||
CKEDITOR.plugins.add('s9y_medialibrary{$item}', {
|
||||
init: function( editor ) {
|
||||
editor.addCommand( 'openML', {
|
||||
exec : function( editor ) {
|
||||
@ -11,27 +12,22 @@
|
||||
'width=800,height=600,toolbar=no,scrollbars=1,scrollbars,resize=1,resizable=1');
|
||||
}
|
||||
});
|
||||
editor.ui.addButton('s9y_medialibrary', {
|
||||
editor.ui.addButton('s9y_medialibrary{$item}', {
|
||||
label: 'Media',
|
||||
command: 'openML',
|
||||
icon: '{serendipity_getFile file="admin/img/thumbnail.png"}'
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/if}
|
||||
<script>
|
||||
$('document').ready(function() {
|
||||
CKEDITOR.replace($('#'+serendipity.escapeBrackets('{$item}')).get(0), {
|
||||
extraPlugins : 's9y_medialibrary',
|
||||
extraPlugins : 's9y_medialibrary{$item}',
|
||||
toolbar: [
|
||||
{ name: 'tools', items: [ 'Maximize' ] },
|
||||
{ name: 'styles', items: [ 'Format' ] },
|
||||
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'RemoveFormat' ] },
|
||||
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align' ], items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote' ] },
|
||||
{ name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] },
|
||||
{ name: 'insert', items: [ 'Image', 's9y_medialibrary', 'Table', 'HorizontalRule', 'SpecialChar' ] },
|
||||
{ name: 'insert', items: [ 'Image', 's9y_medialibrary{$item}', 'Table', 'HorizontalRule', 'SpecialChar' ] },
|
||||
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'Cut', 'Copy', 'Paste', 'PasteText', '-', 'Undo', 'Redo' ] },
|
||||
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ], items: [ 'Scayt' ] },
|
||||
{ name: 'others', items: [ '-' ] },
|
||||
|
Loading…
x
Reference in New Issue
Block a user