1.0.2 • Published 3 years ago

@editorjs/opensea v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

OpenSea Tool for Editor.js

Parses the pasted link to OpenSea item and inserts the embed block.

Opensea Tool example card

Installation

Use your package manager to install the @editorjs/opensea package.

npm install -D @editorjs/opensea

yarn add -D @editorjs/opensea

Usage

Import and add the Tool to Editor.js tools config.

import OpenseaTool from '@editorjs/opensea';

const editor = new EditorJS({
  tools: {
    opensea: {
      class: OpenseaTool
    },
  },

  // ...
});

Check out the example page.

Output Data

Check the OpenseaToolData interface in src/types/index.ts file with types.

Render Template

Use the following HTML to render the block.

<nft-card contractAddress="{ data.contractAddress }" tokenId="{ data.tokenId }"></nft-card>

<script src="https://unpkg.com/embeddable-nfts/dist/nft-card.min.js"></script>

Development

This tool uses Vite as builder.

npm run dev — run development environment with hot reload

npm run build — build the tool for production to the dist folder

Links

Editor.jsCreate Tool

About CodeX

CodeX is a team of digital specialists around the world interested in building high-quality open source products on a global market. We are open for young people who want to constantly improve their skills and grow professionally with experiments in cutting-edge technologies.

🌐Join 👋TwitterInstagram
codex.socodex.so/join@codex_team@codex_team