Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redmine_knowledgebase plugin not support on Visual editor & Preview #135

Closed
kay54068 opened this issue Sep 23, 2021 · 5 comments
Closed

Comments

@kay54068
Copy link

HI
I have install the redmine_knowledgebase plugin , is not support on Visual editor & Preview about this:

Video_2021-09-23_112617

How to do fixed it?

@Thibaut69
Copy link

Thibaut69 commented Oct 1, 2021

I'v also a problem when I drag and drop a PNG file, the image is broken like on your GIF.

If I go to textile mode, I see that the path is not correct, I mean :

My path of the PNG look like :
https://mydns/redmineattachments/download/10667/file.PNG

And it should be :
https://mydns/redmine/attachments/download/10667/file.PNG

Any idea where to fix the code to have this / between redmine and attachments ?

@Thibaut69
Copy link

I'v also a problem when I drag and drop a PNG file, the image is broken like on your GIF.

If I go to textile mode, I see that the path is not correct, I mean :

My path of the PNG look like : https://mydns/redmineattachments/download/10667/file.PNG

And it should be : https://mydns/redmine/attachments/download/10667/file.PNG

Any idea where to fix the code to have this / between redmine and attachments ?

I've found a way to fix this bug, I've modified the file assets/javascripts/redmine_wysiwyg_editor.js, line 758

Before
['attachments', 'download', id, encodeURIComponent(name)].join('/');

After
['/attachments', 'download', id, encodeURIComponent(name)].join('/');

@taqueci
Copy link
Owner

taqueci commented Oct 2, 2021

Hi @kay54068 and @Thibaut69

Can you please try branch issue/135?
I don't know why there is no trailing slash of home path in your Redmine, but I guess this workaround resolves your issues.

@kay54068
Copy link
Author

kay54068 commented Oct 2, 2021

@taqueci

maybe is knowledge base plugin bug , i disable the visual editor the problem still exists ...

I check the textarea html tag ,There are some differences here:

[Wiki]

<textarea name="content[text]" id="content_text" cols="100" rows="25" accesskey="e" class="wiki-edit" data-auto-complete="true">
h1. Wiki

!2021-09-27_213515.png!</textarea>

[knowledge base plugin]

<textarea cols="60" rows="15" class="wiki-edit" name="article[content]" id="article_content">
h1. knowledgebase

!20211002-222642-680.png!</textarea>

@lauer
Copy link

lauer commented May 4, 2023

This is now solved - as it was a bug in the other gem.

alexbevi/redmine_knowledgebase#406

(already merged into master)

@taqueci taqueci closed this as completed May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants