Is it possible to call methods in another package from my own package?
I want to call another package’s methods from inside of my plugin.
I developed and maintain package called ‘MarkdownTOC’ which enables to create and add ‘Table of Contents’ in markdown documents.
Some user use my plugin with another plugin called ‘MarkdownPreview’. And they pointed out that there are differences between anchors of headings generated by my plugin and generated by MarkdownPreview. And links didn’t work because of these differences.
I think it’s ok if I write same implementation as MarkdownPreview’s. But I found something wrong with its implementation (I think It’s not perfect). And it’s not good for thinking about maintenance in the future.
So I’m wondering if I could call MarkdownPreview’s methods inside of my plugin. And I have to confirm that MarkdownPreview package existed in user’s installed packages or not at first.
Is it possible? or any idea?
Is there any examples about communication between two packages?
Thank you for reading