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

MarkdownPanel no longer works on MatLab 2021 or older. #1

Open
DoHaiSon opened this issue Jun 6, 2023 · 7 comments
Open

MarkdownPanel no longer works on MatLab 2021 or older. #1

DoHaiSon opened this issue Jun 6, 2023 · 7 comments

Comments

@DoHaiSon
Copy link

DoHaiSon commented Jun 6, 2023

Dear author,

I'm happy to find out your repo.
However, from what I have, your util is not working on MatLab 2021 and 2022.

I check that It's working on MatLab 2018,
But on MatLab 2021, MarkdownPanel.demo() is stuck at rendering HTML output.
On MatLab 2022, this error appears instantly:

Error using MarkdownPanel/refresh
Java exception occurred:
java.lang.UnsupportedOperationException

	at com.mathworks.mlwidgets.html.HTMLRendererSupport.executeScript(HTMLRendererSupport.java:49)

	at com.mathworks.mlwidgets.html.HTMLRenderer.executeScript(HTMLRenderer.java:875)

	at com.mathworks.mlwidgets.html.HtmlComponentAdapter.executeScript(HtmlComponentAdapter.java:143)


Error in MarkdownPanel/set.Options (line 327)
            self.refresh(true);

Error in MarkdownPanel (line 158)
            self.Options = struct(...

Error in MarkdownPanel.demo (line 405)
            panel = MarkdownPanel( ...

The error caused by self.htmlComponent.executeScript(jscript);, the method executeScript no longer exists on MatLab 2022.

So could you please update your script, I found a new uihtml that intro by MatLab (Introduced in R2019b): https://www.mathworks.com/help/matlab/ref/uihtml.html

But I need something like your script which is written in Java and support from 2014 and older.

@suever
Copy link
Owner

suever commented Jun 19, 2024

I just released v2.0.0 which should work on newer versions of MATLAB. Let me know if it works for you, thanks!

@DoHaiSon
Copy link
Author

I just released v2.0.0 which should work on newer versions of MATLAB. Let me know if it works for you, thanks!

It's working on my R2022a. Thx u for that.
However, the performance of this script seems to not good compared to GUIDE.

@suever
Copy link
Owner

suever commented Jun 21, 2024

Thanks for the feedback, I'm working on a GUIDE version now and should have one to test out in the next day or two. Ideally it will allow the user of either uifigure or figure. I will let you know what I have that on a branch for testing

@suever
Copy link
Owner

suever commented Jun 25, 2024

@DoHaiSon I just pushed v2.2.0 to the File Exchange which reverts to using GUIDE but also ensures support for recent versions of MATLAB. If you can try it out and let me know how it works for you, I would appreciate the feedback. Thanks

@DoHaiSon
Copy link
Author

@DoHaiSon I just pushed v2.2.0 to the File Exchange which reverts to using GUIDE but also ensures support for recent versions of MATLAB. If you can try it out and let me know how it works for you, I would appreciate the feedback. Thanks

Thx Jonathan,
I tested the new script on both R2022a (Windows) and R2015b (Ubuntu).

For R2022a, the new version seems to clearly improve the performance when it loads the demo function. At least two times faster.
For R2015b, I faced an error: "Error downloading URL. Your network connection may be down or your proxy settings improperly configured."

@suever
Copy link
Owner

suever commented Jun 25, 2024

On that machine are you able to download the following file? https://cdn.rawgit.com/showdownjs/showdown/1.3.0/dist/showdown.min.js

@DoHaiSon
Copy link
Author

On that machine are you able to download the following file? https://cdn.rawgit.com/showdownjs/showdown/1.3.0/dist/showdown.min.js

Oh, I see. That machine cannot automatically download the .js file from the internet like R2022 can do.
I downloaded this file and put it into this folder. The script worked.

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