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

For image inside tables <img src = ":/idtoimagebalabala" alt="imagename"> instead of [!imagename](:/idtoimagebalabala) #54

Closed
TIE666 opened this issue Jan 23, 2022 · 3 comments

Comments

@TIE666
Copy link

TIE666 commented Jan 23, 2022

Hi,

I personally use image inside table to get my note organised, however after converting, the markdown notion does not render correctly, I try changing it to the tag version and it worked. So whether the converting process could be change a bit, so whenever there's a image inside table, use <img src = ":/idtoimagebalabala" alt="imagename"> instead of [!imagename](:/idtoimagebalabala) .

Huge thanks

@alxnbl
Copy link
Owner

alxnbl commented Jan 25, 2022

Hello @TIE666 and thank you for the feedback, the issue is already identified here #48 .

As a workaround, you may be interested to set the setting "PostProcessingMdImgRef" to false to disable the replacement of IMG tag by markdown references. Note it will affect all IMG tag, not only the ones nested in tables.

@TIE666 TIE666 closed this as completed May 17, 2022
@TIE666 TIE666 reopened this May 18, 2022
@TIE666
Copy link
Author

TIE666 commented May 18, 2022

Hi,

I find a time to come back to this issue, and figure out a trick to allow images in the tables, while it seems have no side effect on others.

So I modify line 301 in OneNoteMdExporter\Services\Export\ExportServiceBase.cs
return $"![{refLabel}]({attachRef})";
to
return $"<img src=\"{attachRef}\" alt=\"{refLabel}\">";

Please feel free to use it in the next version if this help.
Now only extra thing to make my conversion perfect (like what it look like in Onenote) is to handle the resized image in Onenote, as the current conversion ignores the resize done in Onenote.

@TIE666 TIE666 closed this as completed May 18, 2022
@alxnbl
Copy link
Owner

alxnbl commented May 18, 2022

Thank you for the feedback! I opened a feature request for image resize : #64 .

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

2 participants