Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

documenthub-web-components

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

documenthub-web-components

DocumentHub React Components

  • 0.1.66
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

npm version

DocumentHub Web Components

Less is more. Now with DocumentHub Web Components you can use customizable UI features right in your Application.

1. How to...

1.1 React Usage

From the terminal run npm i documenthub-web-components in the root of your application.

Import module via import { Article, ... } from "documenthub-web-components"; where you want the component to be used.

1.1.1 Components
Usage
<Article
	catalogid="your-catalog-id",
	documentid="document-id",
	language="en" , //optional
	headings="false", //optional
	toc="false", //optional
	scrollUp="true", //optional
	token="aaa.bbb.ccc" //optional
/>

1.2 Other Usage

1.2.1 HTML Custom Tags

Create a custom HTML tag which will be automatically handled by the module.

Usage
<documenthub-article
	catalogid="your-catalog-id"
	documentid="document-id"
	language="en"
	headings="false"
	scrollUp="true" 
	token="aaa.bbb.ccc"
></documenthub-article>
Note

This approach can be used in a React Application but also in plane old webpage. For that you will need to include the resources in your page via:

https://unpkg.com/documenthub-web-components@:version/dist/lib/index.css
https://unpkg.com/documenthub-web-components@:version/dist/lib/index.js

Replace :version with the latest one npm version

Or one of older versions:

Usage
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta 
			name="description"
			content="component based app"
		/>
		<link rel="stylesheet" href="https://unpkg.com/documenthub-web-components@latest/dist/lib/index.css">
		<script defer src="https://unpkg.com/documenthub-web-components@latest/dist/lib/index.js"></script>
		<title>Your application</title>
	</head>

	<body>
		<!-- //article instance -->
		<documenthub-article
			catalogid="your-catalog-id"
			documentid="document-id"
			language="en"
			headings="false"
			scrollUp="true" 
			token="aaa.bbb.ccc"
		></documenthub-article>

		<!-- //document instance -->
		<documenthub-document
			catalogid="your-catalog-id"
			documentid="document-id"
			language="en"
			headings="false"
			scrollUp="true" 
			token="aaa.bbb.ccc"
		></documenthub-document>

		<!-- //quiz instance -->
		<documenthub-quiz
			catalogid="your-catalog-id"
			documentid="document-id"
			quiz="quiz"
			resultscatalogid="your-catalog-id""
			language="en"
			token="aaa.bbb.ccc"
		></documenthub-quiz>

		<!-- //form instance -->
		<documenthub-form
			catalogid="your-catalog-id"
			documentid="document-id"
			language="en"
			token="aaa.bbb.ccc"
		></documenthub-form>
	</body>
</html>

1.3 List

1.3.1 Article
1.3.2 Document
1.3.3 Quiz
1.3.4 form

Keywords

FAQs

Package last updated on 14 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc