I had a client request for a footnote insertion button for TinyMCE - so hacked away a bit and came up with the attached tinymce_footnote module. I'll look around into maybe getting it hosted as its own module somwhere, but thought I'd leave this here.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | tinymce_footnotes-6.x-0.2.tgz | 50 KB | hingo |
| #6 | tinymce_footnotes-6.x-0.1.tgz | 10.26 KB | hingo |
| tinymce_footnotes.5.x.0.1.tgz | 10.42 KB | elgreg |
Comments
Comment #1
basanta86 commentedJust what I was looking for!
However, I'm running Drupal 6.13 and can't get your little module to work properly. I tinkered with the .info to get rid of the incompatibility warnings and even got as far as turning on the "Add footnote"-option in the TinyMCE button menu, but the button didn't show up in the editor.
Any ideas how i can solve this issue?
I also tried to work around this problem by simply hijacking one of the pre-installed tinyMCE plugins and replacing its code with the footnotes plugin, but again, no button would show up.
I'm no good with javascript but would really like to implement this function, because there is no point in having a WYSIWYG editor if you have to use tags for footnotes, is there?
Thanks,
Basanta
Comment #2
lopolencastredealmeida commentedPorting this to 6 would be great. Thanks.
Comment #3
hingo commentedHi
Sorry for not paying attention to this before. I always thought this was appropriate to add to tinymce module or something, but now that I think about it, I could have a look at the code with a view of including this in the footnotes.module CVS and downloads. (But as a separate module, as it is now.)
It will take some time for me to get there, maybe Christmas holidays or something.
henrik
Comment #4
hingo commentedHi
I want to try this out and see that the TinyMCE module is being replaced with the Wysiwyg module. Just to make sure, the above code is for the old TinyMCE module?
Comment #5
hingo commentedAh, sorry, I see now it is dependencies[] = wysiwyg
I'll continue looking at it tomorrow!
Comment #6
hingo commentedHad a look and have to say, thanks for implementing this! There has been some requests of this before, but since I never used TinyMCE myself, I didn't bother to look into this. I really like your implementation.
The attached
- works with Drupal 6.x and the newest -dev Wysiwyg (TinyMCE) module
- Weird hack: Had to add
'load' => 1into the array in footnotes_tinymce.module, otherwise the button didn't show up.- added optional field for adding a value="" attribute if you want to specify the footnote number. (This is the only possible attribute for the fn tag.)
Do you have anything against me just committing this as an additional module in Footnotes itself? (I'd be happy to make you a maintainer at the same time.)
Comment #7
basanta86 commentedThanks a lot, hingo! This is exactly what I was looking for.
Three remarks:
1. You misspelled "Enter Foonote Text" in the insert window. Might want to correct that ;)
2. Could you render the few lines of visible text to be translateable?
3. Maybe implement a UI way to turn on/off the "specify label value" field? I simply erased it from footnote.htm because I'm afraid my less intelligent users will be overwhelmed by such an option and mess up my footnotes :D
Comment #8
hingo commentedHi basanta86
1. Corrected.
2. I tried but couldn't get it to work. I will commit it without supporting translation, and open a new bug regarding this issue.
3. I removed the "specify label value" completely. Simple is good.
Attached is a new version. I have now also committed this to CVS, so it should appear over night in the -dev footnotes download.
elgreg: You don't seem to have a drupal CVS account, so I couldn't grant access to you?
Comment #9
hingo commentedThe new bug for tracking i18n for tinymce_footnotes is #672034: Tinymce_footnotes should support translation (by tinymce style langs/[lang].js files)