Hi,
First of all congrats on a great editor + nice work on integration with Linktocontent.
I've just installed the modified version of linktocontent-6.x-2.x that works with fckeditor-6.x-1.3
I'm running drupal-6.10 with Pathauto enabled. All relevant install/setups/permissions have been made for fckeditor and linktocontent.
All works fine except for a small bug: the html code generated by linktonode overwrites the original anchor text
and replaces it by the target node title.
Looking into the linktocontent code had me wonder about the javascript file linktocontent/tinymce_plugins/linktonode/jscripts/functions.js: function insertAction():line 79:elm = tinyMCE.getParentElement(elm, "a");
As I'm using fckeditor instead of tinymce this variable gets ALWAYS replaced by the node title, which seems to be the default behavior when inserting a "Link to Node" with no anchor text selected.
Unfortunately I don't know much about javascript and I have no clue how to patch the insertAction function so it also works in fckeditor.
Other than that the current combination of fckeditor+linktonode works like a charm! Tx.
Comments
Comment #1
zila CreditAttribution: zila commentedSubscribe.
The problem lies in this line (function.js line 88):
I tried to tweak with this ( !== 0) but the result is the same: it overwrites the selected text instead of using it as link text.
Comment #2
zila CreditAttribution: zila commentedArgh :)
The isertAction in function.js is used with tinyMCE (I suppose...). With FCKEditor a solution is:
utils.js line 60-63:
This commented out snippet preserves the selection, so the solution is to remove comments from around the snippet so it looks like:
Then clear all cache, reload, force-reload, whatever :) and Link to node preserves the original selection.
Comment #3
j3ann0t CreditAttribution: j3ann0t commentedThanks a bunch! That was it (that is uncommenting lines 60 and 63 in utils.js). Now all works fine.
Comment #4
j3ann0t CreditAttribution: j3ann0t commentedThanks a bunch! That was it (that is uncommenting lines 60 and 63 in utils.js). Now all works fine.
Comment #5
wwalc CreditAttribution: wwalc commentedFixed in CVS. Thanks!