{"id":13658886,"url":"https://github.com/commutatus/cm-page-builder","last_synced_at":"2025-03-24T15:32:06.587Z","repository":{"id":49732195,"uuid":"186761967","full_name":"commutatus/cm-page-builder","owner":"commutatus","description":"Page builder package like notion","archived":false,"fork":false,"pushed_at":"2023-08-31T14:56:41.000Z","size":20154,"stargazers_count":34,"open_issues_count":4,"forks_count":4,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-18T05:34:20.083Z","etag":null,"topics":["editor","medium","notion","reactjs","rich-text-editor"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/commutatus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-05-15T06:21:39.000Z","updated_at":"2024-01-13T23:59:54.000Z","dependencies_parsed_at":"2024-04-09T17:57:34.329Z","dependency_job_id":"bf888cdb-4221-4d04-83b0-750fc6fe11fb","html_url":"https://github.com/commutatus/cm-page-builder","commit_stats":{"total_commits":421,"total_committers":10,"mean_commits":42.1,"dds":0.4798099762470309,"last_synced_commit":"ccde1bed1597816f6132884e2193ce78309dd98b"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commutatus%2Fcm-page-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commutatus%2Fcm-page-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commutatus%2Fcm-page-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commutatus%2Fcm-page-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/commutatus","download_url":"https://codeload.github.com/commutatus/cm-page-builder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245298228,"owners_count":20592565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["editor","medium","notion","reactjs","rich-text-editor"],"created_at":"2024-08-02T05:01:03.492Z","updated_at":"2025-03-24T15:32:01.578Z","avatar_url":"https://github.com/commutatus.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# CM Page Builder\n### A Notion inspired page builder\nCM Page builder is a modern rich text component based page builder inspired from [Notion](https://www.notion.so/). This Component allows you to compose awesome, formatted text in your web application and supports uploading files, pictures, code snippets and even embedding videos.\n\n### Demo:\n[CM Page Builder 📝](http://cm-page-builder.herokuapp.com/)\n\n\n## Download and Install CM Page Builder\n\n### Install from npm\n\n```\nnpm install -s cm-page-builder\n```\n\n### Load CM Page Builder as a Module\n\n```javascript\nimport PageBuilder from 'cm-page-builder'\n```\n\n### Initialization and Usage\n\nAn Example of using page builder component:\n\n```JSX\n\n\u003cPageBuilder\n\tpageComponents={pageComponents}\n\ttypeMapping={TYPE_MAP_COMPONENT}\n\thandleUpdate={this._updatePageComponent}\n\tstatus={this.state.status}\n\trequestHandler={this.requestHandler}\n\toptions={[['Header1','Header2','Olist','Ulist']}\n/\u003e\n```\n\nComponent Props  \t|\n--------------------|\npageComponents \t\t|\ntypeMapping  \t\t|\noptions  \t\t\t|\nhandleUpdate  \t\t|\nstatus  \t\t\t|\n\n\u003cbr/\u003e\n\n##### Page components.\nA list of Page components, to be initialized. They have the following structure\n\n```javascript\n{\n  component_attachment: { content: String, filename: String, url: String}\n  component_type: String\n  content: String\n  position: Number\n}\n```\n\u003cbr/\u003e\n\n##### Status (default: `Edit`):\nHas to be one of `Edit` or `Read`\n\n\u003cbr/\u003e\n\n##### options (default: `['Header1','Header2','Olist','Ulist','Embed','Upload', 'File','Divider','Code']`):\nArray of available components. For example, setting options as `['Header1']` will only render `Header1` component.\n\n\u003cbr/\u003e\n\n##### handleUpdate(id, data, type, key):\nA `function` that gets fired every time something happens with the components of a page. It receives four parameters, `id`, `data`, `type`, `key`\n- `id`: The ID of the component,\n- `data`: The data inside the component.\n- `type`: The kind of change that has happened with the component. It can be any of\n  - `\"createComponent\"`\n  - `\"updateComponent\"`\n  - `\"deleteComponent\"`\n- `key`: `undefined`\n\n\u003cbr/\u003e\n\n##### typeMapping\nA hash that maps snake_cased names of components with cm-page-builder components\nfound inside the src/components folder. Available components are\n- `Header1`: The equivalent of a h1 tag\n- `Header2`: The equivalent of a h2 tag\n- `OList`: An ordered list. Two or more adjacent components of this type will make a group, and the position number will increase sequentially within that group\n- `UList`: An unordered list\n- `Text`: The default component, regular text. It may have HTML formatting\n- `Embed`: A vimeo or youtube video which is meant to be displayed as an embed file\n- `Upload`: A file. `component_attachment` will hold all relevant information. If it is an image, it should be displayed as an embedded image\n- `Divider`: A line divider.\n- `Code`: A code snippet component.\n\n### Crafted with ❤️ by [Commutatus](https://www.commutatus.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommutatus%2Fcm-page-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommutatus%2Fcm-page-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommutatus%2Fcm-page-builder/lists"}