taqueci / redmine_wysiwyg_editor

Redmine WYSIWYG Editor plugin
GNU General Public License v2.0
116 stars 28 forks source link

Links to anchors are destroyed #103

Open albrechtd opened 4 years ago

albrechtd commented 4 years ago

I noticed that the Visual Editor destroys links to anchors e.g. in a Wiki. Consider the following Textile example (the Wiki page is named Test-Editor):

h1. Test-Editor

h1. Sect. 1

h1. Sect. 2

Link to [[Test-Editor#Sect-1|other section]]

The link in the last line points to “Sect. 1”, which is very useful in lager documents (and which I use pretty much).

Now edit this Wiki page using the Visual Editor, edit something without touching the last line, and save it. Now the last line reads

Link to [[#Sect-1|other section]]

which is broken at least with Redmine 3.3.1 (still using Debian Oldstable…).

Would it be possible to preserve the Links to anchors?

BTW, a possibility to add Links to anchors using the Wiki Link dialogue would be really cool, too…

taqueci commented 4 years ago

Note to self: Simple link syntax has been implemented by: 16313 Allow to link to an anchor of the current wikipage

taqueci commented 4 years ago

Note to self: Wiki link implementation is changed by #72.

albrechtd commented 4 years ago

Note to self: Simple link syntax has been implemented by: 16313 Allow to link to an anchor of the current wikipage

I wasn't aware of that patch, sorry… With it, the anchor links produced by the visual editor work perfectly! So, IMHO, you might consider this issue solved; please just add a remark to the Redmine issue above in your Readme. However, as a feature request, a possibility to add more kinds of links from a selection dialogue would be extremely useful, including

taqueci commented 4 years ago

Hi @albrechtd

Thank you for your reporting.

I'm thinking about whether to fix this issue. Please give me some time.

taqueci commented 3 years ago

Note to self:

Because of no suitable APIs, it may be difficult to implement: