Page 4 of 12
Re: new WYSIWYG-Editor event Plugin: CKEDITOR!
Posted: Wed Aug 07, 2013 7:43 pm
by Timbalu
What about the embedded question? Or do your plugins not live in your blogs plugins directory?
In the ckeditor config you should have something like this:
rel path: plugins/serendipity_event_ckeditor/ckeditor/
HTTP path: /serendipity/plugins/
Re: new WYSIWYG-Editor event Plugin: CKEDITOR!
Posted: Wed Aug 07, 2013 8:05 pm
by ICE
My blog is a completely normal blog, without embedding or other odd configurations.
rel path: plugins/serendipity_event_ckeditor/ckeditor/
HTTP path: /plugins/
My full Document root path is: /cold-ice/blog/plugins/serendipity_event_ckeditor
My Domain cold-ice.de is rooted into /cold-ice/blog/ , which means, cold-ice.de sees only the directory /cold-ice/blog as /
Re: new WYSIWYG-Editor event Plugin: CKEDITOR!
Posted: Wed Aug 07, 2013 8:14 pm
by Timbalu
Yes, very strange!
Please paste some source code of backends entry forms page, eg this part (start 2 stop):
Code: Select all
<script type="text/javascript">
CKEDITOR.replace('serendipity[body]', {});
// everything here until
</script>
Re: new WYSIWYG-Editor event Plugin: CKEDITOR!
Posted: Wed Aug 07, 2013 8:24 pm
by ICE
Code: Select all
<script type="text/javascript">
CKEDITOR_BASEPATH = 'plugins/serendipity_event_ckeditor/ckeditor/';
CKEDITOR_PLUGPATH = '/plugins/';
KCFINDER_UPLOADPATH = '/uploads/';
</script>
<script language="javascript" type="text/javascript" src="plugins/serendipity_event_ckeditor/ckeditor/ckeditor.js"></script>
<script type="text/javascript">
CKEDITOR.config['skin'] = 'moono';
CKEDITOR.config['height'] = 400;
//CKEDITOR.config.removePlugins = 'flash,iframe';
CKEDITOR.config.allowedContent = false;
CKEDITOR.config.removeButtons = 'Styles';
CKEDITOR.config.toolbarGroups = [
{ name: 'styles' },
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
{ name: 'paragraph', groups: [ 'list', /*'indent', */'blocks', 'align', 'bidi' ] },
{ name: 'links' },
{ name: 'insert' },
'/',
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] },
{ name: 'others' },
{ name: 'mediaembed' },
{ name: 'tools' },
{ name: 'about' }
];
</script>
Code: Select all
<script type="text/javascript">
CKEDITOR.replace('serendipity[body]', {});
</script>
<script type="text/javascript">
CKEDITOR.replace('serendipity[extended]', {});
</script>
<script type="text/javascript">
CKEDITOR.on( 'instanceReady', function( event ) {
event.editor.on( 'focus', function() {
//console.log( 'focused', this );
isinstance = this;
});
});
function Spawnnuggets(item) {
if (document.getElementById('nuggets' + item)) {
CKEDITOR.replace('nuggets' + item, {
// Reset toolbar Groups settings
// toolbarGroups: null
});
}
}
function serendipity_imageSelector_addToBody (str, textarea) {
var oEditor = isinstance; // WHOW this was easy...!!!!
//console.log(oEditor);
if (oEditor.mode == "wysiwyg") {
oEditor.insertHtml(str);
}
}
</script>
Re: new WYSIWYG-Editor event Plugin: CKEDITOR!
Posted: Wed Aug 07, 2013 8:51 pm
by Timbalu
You definitely found a bug!
Thank you!
Why in hell didn't we notice this before...!
Total sorry, I always tested this in extended hooked-in views only, since starting this plugin officially.
Now we will have to do it this way:
Wait until our sync will work again, to get an updated 1.3.1 next week via Spartacus.
If you have already the 1.3.1 version, just replace serendipity_event_ckeditor.php with this file:
https://raw.github.com/s9y/additional_p ... editor.php
PS. @ICE, could you downsize you pasted images to fit into a standard or smaller screen view, please? Thanks!
Re: new WYSIWYG-Editor event Plugin: CKEDITOR!
Posted: Wed Aug 07, 2013 8:56 pm
by ICE
Okay, now it had changed ... but not similar with your screenshot:
Re: new WYSIWYG-Editor event Plugin: CKEDITOR!
Posted: Wed Aug 07, 2013 9:00 pm
by Timbalu
Does that evening never end...
Again, paste the code part (and this only)
Code: Select all
<script type="text/javascript">
CKEDITOR.replace('serendipity[body]', {});
...everything IN here, until this ending...
</script>
Now this lacks to be the right file path
Re: new WYSIWYG-Editor event Plugin: CKEDITOR!
Posted: Wed Aug 07, 2013 9:03 pm
by ICE
sorry ...
Code: Select all
<script type="text/javascript">
CKEDITOR.replace('serendipity[body]', {});
CKEDITOR.config.extraPlugins = 'entryformsbody,mediaembed'; // no spaces allowed!
CKEDITOR.plugins.add('entryformsbody', {
init: function(editor) {
editor.addCommand( 'openML', {
exec : function( editor ) {
window.open('serendipity_admin_image_selector.php', 'ImageSel', 'width=800,height=600,toolbar=no,scrollbars=1,scrollbars,resize=1,resizable=1');
}
});
editor.ui.addButton('openML', {
label: 'S9yMedia',
title: 'Serendipity Media Library',
command: 'openML',
icon: 'http://www.cold-ice.de/index.php?/plugins/serendipity_event_ckeditor/img/mls9y.png'
});
}
});
</script>
Re: new WYSIWYG-Editor event Plugin: CKEDITOR!
Posted: Wed Aug 07, 2013 9:26 pm
by Timbalu
That is odd!
Please change this line here
https://github.com/s9y/additional_plugi ... r.php#L395
to this:
Code: Select all
icon: '<?php echo ($serendipity['rewrite'] == 'rewrite' ? serendipity_rewriteURL('plugins/serendipity_event_ckeditor/img/mls9y.png') : 'plugins/serendipity_event_ckeditor/img/mls9y.png'); ?>'
This is for testing purposes only, since we have more occurrences of the serendipity_rewriteURL() usage. This does not seem to fit in plugins as everywhere else. And I do not know if this tweak fits both 'none' and 'errormode'.
Which is your personal MOD REWRITE setting in the Serendipity Configuration - Design and Options?
Re: new WYSIWYG-Editor event Plugin: CKEDITOR!
Posted: Wed Aug 07, 2013 9:39 pm
by ICE
Sorry, was to fast ...
URL Rewriting is off in Settings.
Nevertheless, it does not show the icon ...
Code: Select all
<script type="text/javascript">
CKEDITOR.replace('serendipity[body]', {});
CKEDITOR.config.extraPlugins = 'entryformsbody,mediaembed'; // no spaces allowed!
CKEDITOR.plugins.add('entryformsbody', {
init: function(editor) {
editor.addCommand( 'openML', {
exec : function( editor ) {
window.open('serendipity_admin_image_selector.php', 'ImageSel', 'width=800,height=600,toolbar=no,scrollbars=1,scrollbars,resize=1,resizable=1');
}
});
editor.ui.addButton('openML', {
label: 'S9yMedia',
title: 'Serendipity Media Library',
command: 'openML',
icon: 'plugins/serendipity_event_ckeditor/img/mls9y.png'
});
}
});
</script>
Re: new WYSIWYG-Editor event Plugin: CKEDITOR!
Posted: Wed Aug 07, 2013 9:46 pm
by ICE
Ah, if I change URL Rewriting to apache mod_replace, then it works!!! If it is disabled, then the icon disappears.
Code: Select all
<script type="text/javascript">
CKEDITOR.replace('serendipity[extended]', {});
CKEDITOR.config.extraPlugins = 'entryformsextended,mediaembed'; // no spaces allowed!
CKEDITOR.plugins.add('entryformsextended', {
init: function(editor) {
editor.addCommand( 'openML', {
exec : function( editor ) {
window.open('serendipity_admin_image_selector.php', 'ImageSel', 'width=800,height=600,toolbar=no,scrollbars=1,scrollbars,resize=1,resizable=1');
}
});
editor.ui.addButton('openML', {
label: 'S9yMedia',
title: 'Serendipity Media Library',
command: 'openML',
icon: 'http://www.cold-ice.de/plugins/serendipity_event_ckeditor/img/mls9y.png'
});
}
});
</script>
Re: new WYSIWYG-Editor event Plugin: CKEDITOR!
Posted: Wed Aug 07, 2013 9:57 pm
by Timbalu
Sorry my fault! It should be:
Code: Select all
icon: '<?php echo ($serendipity['rewrite'] == 'rewrite' ? serendipity_rewriteURL('plugins/serendipity_event_ckeditor/img/mls9y.png') : $serendipity['serendipityHTTPPath'] . 'plugins/serendipity_event_ckeditor/img/mls9y.png'); ?>'
Could you please check for me, if this is also working with: "Use apache errohandling" too?
I'll check this tomorrow then, to update all occurrences properly.
Sorry for this late night scripting!
Re: new WYSIWYG-Editor event Plugin: CKEDITOR!
Posted: Wed Aug 07, 2013 10:02 pm
by ICE
no problem, CKEditor is great!
The icon appears in every situation (disabled, errorhandling, mod_rewrite).
Now I'm happy! It's a new blogging feeling! Thanks for your help!
Re: new WYSIWYG-Editor event Plugin: CKEDITOR!
Posted: Wed Aug 07, 2013 10:05 pm
by Timbalu
Fine! Thanks for testing.
I'll do that tomorrow.
Good night!
Re: new WYSIWYG-Editor event Plugin: CKEDITOR!
Posted: Wed Aug 07, 2013 10:10 pm
by ICE
Good night!