Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
@commutatus/cm-page-builder-test
Advanced tools
Now with Next.js support
CM Page builder is a modern rich text component based page builder inspired from Notion. This Component allows you to compose awesome, formatted text in your web application and supports uploading files, pictures, code snippets and even embedding videos.
npm install -s @commutatus/cm-page-builder
Add your font's link
tag in index.html
.
For example: <link rel="stylesheet" href="https://d1azc1qln24ryf.cloudfront.net/120939/EXPAV3/style-cf.css?crxvf0">
import PageBuilder from '@commutatus/cm-page-builder'
An Example of using page builder component:
<PageBuilder
pageComponents={pageComponents}
typeMapping={TYPE_MAP_COMPONENT}
handleUpdate={this._updatePageComponent}
status={this.state.status}
requestHandler={this.requestHandler}
options={[['Header1','Header2','Olist','Ulist']}
/>
Component Props |
---|
pageComponents |
typeMapping |
options |
handleUpdate |
status |
A list of Page components, to be initialized. They have the following structure
{
component_attachment: { content: String, filename: String, url: String}
component_type: String
content: String
position: Number
}
Edit
):Has to be one of Edit
or Read
['Header1','Header2','Olist','Ulist','Embed','Upload', 'File','Divider','Code']
):Array of available components. For example, setting options as ['Header1']
will only render Header1
component.
A function
that gets fired every time something happens with the components of a page. It receives four parameters, id
, data
, type
, key
id
: The ID of the component,data
: The data inside the component.type
: The kind of change that has happened with the component. It can be any of
"createComponent"
"updateComponent"
"deleteComponent"
key
: undefined
A hash that maps snake_cased names of components with cm-page-builder components found inside the src/components folder. Available components are
Header1
: The equivalent of a h1 tagHeader2
: The equivalent of a h2 tagOList
: An ordered list. Two or more adjacent components of this type will make a group, and the position number will increase sequentially within that groupUList
: An unordered listText
: The default component, regular text. It may have HTML formattingEmbed
: A vimeo or youtube video which is meant to be displayed as an embed fileUpload
: A file. component_attachment
will hold all relevant information. If it is an image, it should be displayed as an embedded imageDivider
: A line divider.Code
: A code snippet component.FAQs
Page builder package like notion
The npm package @commutatus/cm-page-builder-test receives a total of 0 weekly downloads. As such, @commutatus/cm-page-builder-test popularity was classified as not popular.
We found that @commutatus/cm-page-builder-test demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.