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

Custom rules #217

Open
amorimcode opened this issue Jun 4, 2024 · 1 comment
Open

Custom rules #217

amorimcode opened this issue Jun 4, 2024 · 1 comment

Comments

@amorimcode
Copy link

Am i able to add custom rules?

  const rules = {
    video: (node, children, parent, styles) => {
      const { src } = node.attributes;

      console.log("node", node);
      return (
        <View
          key={node.key}
          style={{
            height: 210,
            marginBottom: 20,
          }}>
          <Text type="h5Bold" style={{ marginBottom: 10 }}>
            teste
          </Text>
          <YoutubePlayer height={210} videoId={"FfCp4t6jiyc"} />
        </View>
      );
    },
  };

if yes, how can i use it? what is the markdown example?

@vccoffey
Copy link

You can do it with a plugin. See the Plugins and Extensions section of the documentation.

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