mludlum / MarkdownPreview

MantisBT plugin to preview markdown markup below textarea boxes on report and update forms.
0 stars 0 forks source link

Using images #5

Closed ajtruckle closed 6 years ago

ajtruckle commented 6 years ago

I am not sure how to handle this and where the bug lies with.

When we insert images we have three components:

The first component is alternative text. The second component is the url. The third component is the tooltip.

Now, when I use the preview toolbar it creates the markdown correctly. And I edit the two extra text objects.

And, the preview below shows correctly with the image and the tooltip. But you try clicking Add Note. The image does not show right.

The only way to get the image to show right is the remove the third component with the tooltip text. Then it shows. So is this a MantisBT bug?

ajtruckle commented 6 years ago

Thoughts?

mludlum commented 6 years ago

Give me example markdown markup for this with an absolute URL for the image.

ajtruckle commented 6 years ago

Please watch this video:

https://www.dropbox.com/s/7efrpsyyecb9lm2/Images-MantisBT.mp4?dl=0

I can't give you a direct URL as mantisBT needs you to have the images on your server. I wish it allowed to upload images like on stackoverflow. :(

mludlum commented 6 years ago

I don't need a video. I need the text you're typing into the text field which fails. Can you post that please?

ajtruckle commented 6 years ago

It is easy to repeat. Insert an image with the button. And you end up with:

![Description 1](http://www.publictalksoftware.co.uk/screenshots/AddTalk.png "Tip Text")

That will preview fine but when inserted into MantisBT it will not display.

For it to display you have to remove the tip text:

![Description 1](http://www.publictalksoftware.co.uk/screenshots/AddTalk.png)

mludlum commented 6 years ago

this works for me ![Description 1](images/mantis_logo.png "Tip Text") Right-click on your web page and choose Inspect. Look at the console. You may have cross-site errors that you cannot avoid. Try using https instead of http if you're connected over https.

If you're putting images on the server, put them under your installation folder. If you use the Add File feature, then you need to get the url of that image AFTER you submit and view it. The url will be something like this:

file_download.php?file_id=3&type=bug&show_inline=1&file_show_inline_token=201801089hVQbx8B5SZ7gIeQ9cvdGkx90TNhsa

ajtruckle commented 6 years ago

The issue is not the path to the image. You must have them on your domain or mantisbt. That si not the problem.

The problem is the syntax of "tip text". Did you try it?

![description] (path to image, "tip text")

It is teh "tip text" part in the line. If it is present then mantis will not show the image.


From: mludlum notifications@github.com Sent: 08 January 2018 21:15 To: mludlum/MarkdownPreview Cc: ajtruckle; Author Subject: Re: [mludlum/MarkdownPreview] Using images (#5)

this works for me [Description 1]<images/mantis_logo.png>

Right-click on your web page and choose Inspect. Look at the console. You may have cross-site errors that you cannot avoid. Try using https instead of http if you're connected over https.

If you're putting images on the server, put them under your installation folder. If you use the Add File feature, then you need to get the url of that image AFTER you submit and view it. The url will be something like this:

file_download.php?file_id=3&type=bug&show_inline=1&file_show_inline_token=201801089hVQbx8B5SZ7gIeQ9cvdGkx90TNhsa

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmludlum%2FMarkdownPreview%2Fissues%2F5%23issuecomment-356098656&data=02%7C01%7C%7Ca3cde8f1ad6b476bd00a08d556dce6c9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636510429115023748&sdata=h%2B4gtgayT9xLjf08v0clWBYYJ3bFaSthOQSxqugRKbc%3D&reserved=0, or mute the threadhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAHnYs1eCZHGr3cS6BWgfLl4NMkx_WEWUks5tIoVdgaJpZM4QKDPI&data=02%7C01%7C%7Ca3cde8f1ad6b476bd00a08d556dce6c9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636510429115023748&sdata=Uzwu7xHtT15GTrjmkieJesAxXmQffpJWCjrl7j5KubA%3D&reserved=0.

ajtruckle commented 6 years ago

I have removed the video now but if you had watched it you might have understood better what is happening at my end. I don't consider this a issue with your code or the preview plugin. I actually consider this to be a mantis issue.


From: mludlum notifications@github.com Sent: 08 January 2018 21:15 To: mludlum/MarkdownPreview Cc: ajtruckle; Author Subject: Re: [mludlum/MarkdownPreview] Using images (#5)

this works for me [Description 1]<images/mantis_logo.png>

Right-click on your web page and choose Inspect. Look at the console. You may have cross-site errors that you cannot avoid. Try using https instead of http if you're connected over https.

If you're putting images on the server, put them under your installation folder. If you use the Add File feature, then you need to get the url of that image AFTER you submit and view it. The url will be something like this:

file_download.php?file_id=3&type=bug&show_inline=1&file_show_inline_token=201801089hVQbx8B5SZ7gIeQ9cvdGkx90TNhsa

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmludlum%2FMarkdownPreview%2Fissues%2F5%23issuecomment-356098656&data=02%7C01%7C%7Ca3cde8f1ad6b476bd00a08d556dce6c9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636510429115023748&sdata=h%2B4gtgayT9xLjf08v0clWBYYJ3bFaSthOQSxqugRKbc%3D&reserved=0, or mute the threadhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAHnYs1eCZHGr3cS6BWgfLl4NMkx_WEWUks5tIoVdgaJpZM4QKDPI&data=02%7C01%7C%7Ca3cde8f1ad6b476bd00a08d556dce6c9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636510429115023748&sdata=Uzwu7xHtT15GTrjmkieJesAxXmQffpJWCjrl7j5KubA%3D&reserved=0.

mludlum commented 6 years ago

Did you copy my example and try it? It shows the mantis logo and if you hover over it, you will see "tip text". If you have a bad URL, you'll see "Description 1" which is the alternate text when the image cannot be displayed.

ajtruckle commented 6 years ago

edit1

edit2

edit3

edit4

edit5

Look above. I did try to show you in the video. Paths are not the issue. We are talking about MantisBT parsing the image markdown correctly. Whilst the preview toolbar etc does it OK the final topic doesn't. It becomes clear from my images attached. You shoudl be able to follow my instructiosn and replicate yourself.

mludlum commented 6 years ago

Yes, it could be an issue with the MantisCoreFormatting plugin. Use single quotes as a workaround.

![Description 1](track/images/mantis_logo.png 'test title')