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

Allow plugin to add shortcode like peertube components in markdown #5327

Open
Nalem14 opened this issue Oct 5, 2022 · 0 comments
Open

Allow plugin to add shortcode like peertube components in markdown #5327

Nalem14 opened this issue Oct 5, 2022 · 0 comments
Labels
Component: Custom Markdown Component: PeerTube Plugin 📦 Features that can be developed in a plugin, but require PeerTube plugin API development Type: Feature Request ✨

Comments

@Nalem14
Copy link

Nalem14 commented Oct 5, 2022

Describe the problem to be solved

It can be cool to can add shortcode like peertube components we can already add in markdown editor
So users can customize a custom page or homepage with these shortcodes added by some plugins

Describe the solution you would like

Using a method like registerSettings, we can do registerComponent or registerShortcode, and attach a handler with all params passed as an object ( data = {} )

Example using <my-custom-component name="john"> or [my-custom-component name="john"]

Example declaration :


registerComponent({
    name: "my-custom-component",
    handler: (params) => {
        return '<p>Hey ${params?.name}</p>';
    }
});

@Chocobozzz Chocobozzz added Type: Feature Request ✨ Component: PeerTube Plugin 📦 Features that can be developed in a plugin, but require PeerTube plugin API development Component: Custom Markdown labels Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Custom Markdown Component: PeerTube Plugin 📦 Features that can be developed in a plugin, but require PeerTube plugin API development Type: Feature Request ✨
2 participants