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

Any plan for adding the "Inline source" support ? #55

Open
XiangYyang opened this issue Nov 10, 2023 · 1 comment
Open

Any plan for adding the "Inline source" support ? #55

XiangYyang opened this issue Nov 10, 2023 · 1 comment
Labels
feature request New feature or request

Comments

@XiangYyang
Copy link
Contributor

The document Inline source described a feature called inline source but it has not been implemented yet.

Do you have any plans to add this feature?

It's useful for custom rendering such as Gitea. We can echo the sources into HTML and import kicanvas.js, and the file will be rendered.

A possible implementation

I found a possible implementation for this feature. The HTML tag was processed in the file src/kicanvas/elements/kicanvas-embed.ts. And all src attributes will be appended to a list. Then, FetchFileSystem will load them. Finally, they were converted to File objects.

So a simple way is changing the KiCanvasEmbedElement.load_src and FetchFileSystem in vfs.ts to implement the creation of File objects from the inline text.

I'm trying implementing it. If that is possible, I will create a pull request later.

@XiangYyang XiangYyang added the feature request New feature or request label Nov 10, 2023
@theacodes
Copy link
Owner

theacodes commented Nov 10, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants