If you use the CKeditor module instead of Wysiwyg, feat not, you can still use the plugin!
All you need to do is add the following in modules/ckeditor/ckeditor.config.js :
config.extraPlugins += (config.extraPlugins ? ',footnotes' : 'footnotes' );
CKEDITOR.plugins.addExternal('footnotes', Drupal.settings.ckeditor.module_path + '/../footnotes/footnotes_wysiwyg/ckeditor_plugin/');| Comment | File | Size | Author |
|---|---|---|---|
| #4 | footnotes-ckeditor-1152264-4.patch | 2.36 KB | rooby |
Comments
Comment #1
hingo commentedSame comment here, don't hesitate to commit enhancements (this one in README, perhaps?) yourself, either with or without having them discussed and reviewed, as you feel appropriate.
Comment #2
rooby commentedI'm doing a patch for integration with the CKEditor, is this something you would commit to this module or are you only going support WYSIWYG and let the CKEditor module implement the integration?
Comment #3
rooby commentedOh, and this is the existing CKEditor issue - #1121470: Integration with Footnotes module
Comment #4
rooby commentedHere is a patch that adds support for CKEditor module.
It adds the support to the footnotes_wysiwyg module (removing that modules dependency for the WYSIWYG module).
TinyMCE module support could also be added to the footnotes_wysiwyg module in this way. There isn't really a need to make it dependent on the WYSIWYG module.
Comment #5
rooby commentedAs a side note, I am using a newer version of CKEditor and needed lavamind's patch from #1124454-2: Unable to edit footnotes via wysiwyg (ckeditor 3.5.2) (manual find and replace, not the actual patch).
Comment #6
hingo commentedis this something you would commit to this module
I would, especially since what we have now seems to constantly break. (Due to no fault of Footnotes, but CKEditor seems to change it's behavior with each release and then loose our Wysiwyg exported functionality.)
But note that I'm looking to pass forward the maintainership of this module (see project page). Hence I am not committing anything anymore, rather being deliberately quite passive.
So all I'm saying is this seems like a good idea. If you want to push this yourself, I will give you rights to commit, let me know.
Comment #7
hingo commentedOk, you have commit rights now.
Looking at the patch: Why do you remove dependency on wysiwyg? I would've expected you to add dependency on ckeditor?
I have no other comments.
Comment #8
rooby commentedIf you just add a dependency on ckeditor it would mean users have to have both the ckeditor and wysiwyg modules installed. Unfortunately drupal has no concept of OR in it's dependencies yet, although that would be great.
So the simplest way was to remove the wysiwyg dependency and make a note in the readme that you have to have one of the two modules installed. It might be a good idea to also add a message when you enable the module so that if the user doesn't have one of the modules installed it promts them to install one.
Seeing as there are no calls to wysiwyg functions and all there is are hooks, no errors will result, it is just that the module will do nothing without one of the parent modules.
The alternative is to have separate modules like footnotes_ckeditor, footnotes_tinymce and footnotes_wysiwyg each with their own dependencies, in which case you have to either duplicate the plugins (bad idea) or move the plugins from the sub modules into the main module in a plugins directory and have the sub modules all reference them there (not as bad an idea but I'm not convinced it is the best idea).
This way with no dependencies has also been adopted by the CKEditor Link module.
I thought about the options for a while but I'm open to other opinions on the matter.
Comment #9
hingo commentedYou're right :-)
Comment #10
julien.reulos commentedThanks for the patch, it is working fine.
I am using ckeditor-7.x-1.x-dev.tar.gz (15 dec 2011), the ckeditor_3.6.2.tar.gz plugin and footnotes-7.x-2.5.tar.gz.
Comment #11
rooby commentedThanks for the review, I will have time to commit this in the next day or two.
Comment #12
rooby commentedCommitted to D7 - http://drupalcode.org/project/footnotes.git/commit/4cd9340
Stupidly I didn't have the commit author properly set but I have fixed that for future commits.
Needs backport to drupal 6.
Comment #13
rooby commentedComment #14
rooby commentedCommitted to D6.
http://drupalcode.org/project/footnotes.git/commit/b2ee4dc
Comment #15
RedRat commentedI have applied this patch to the 6.x-2.5 version, and now I can add Footnotes button to the CKEditor toolbar. When I press it, dialog with preentered text [object Object] appears, but when I press OK I got this error in IE 8 (reverse translation from Russian):
Message: Object doesn't support this property or method
Line: 45
Symbol: 11
Code: 0
URI-code: http://test.istmat.info/sites/all/modules/footnotes/footnotes_wysiwyg/ck...
Message: 'getFirst()' - is null or not a object
Line: 16
Symbol: 181
Code: 0
URI-code: http://test.istmat.info/sites/all/libraries/ckeditor/ckeditor.js?7
and dialog stay on screen.
P.S. Drupal 6.25, CKEditor 3.6.2, CKEditor module 6.x-1.8, Footnotes 6.x-2.5 with patch from #14.
Comment #16
rooby commentedSorry, I rarely use IE, I will investigate it.
I would guess though it is not specific to the CKEditor module but the plugin and I would say the issue is more relevant to #1124454: Unable to edit footnotes via wysiwyg (ckeditor 3.5.2).
That maybe what #1124454-7: Unable to edit footnotes via wysiwyg (ckeditor 3.5.2) was referring to.
I'll check it out.
Comment #17
rooby commentedIf you can try the patch in #1124454-7: Unable to edit footnotes via wysiwyg (ckeditor 3.5.2) I'd be interested in whether or not it fixes your problem.
If it does can you please report back there.
Thanks.
Comment #18
RedRat commentedI have tried aforementioned patch but it doesn't fix error. In FF all works fine, but in IE I got JS errors and footnotes dialog not working at all. :-(
BTW, should I fill separate issue for this bug or just change status of this? And could you, please, release a dev-version for 6.x so we can have the same starting point to make patches? I defenitely want to solve this problem 'cos I plan to use this module in my project.
Comment #19
RedRat commentedI think this bug definitely have to be fixed because almost half of netizens still use a different versions of Internet Explorer.
Comment #20
pyrojonc commentedI'm using CKEditor 4.1.1 and this patch worked for me except I still had to implement the change from here: http://drupal.org/node/1589130#comment-6983100 changing 'editor' to 'CKEDITOR' in plugin.js line 26. Then all works perfect. Thanks all.
Comment #23
scott_euser commented