{"id":30612625,"url":"https://github.com/evolvedbinary/prosemirror-lwdita","last_synced_at":"2025-10-14T20:12:13.910Z","repository":{"id":39612691,"uuid":"304266507","full_name":"evolvedbinary/prosemirror-lwdita","owner":"evolvedbinary","description":"LwDITA and ProseMirror Integration","archived":false,"fork":false,"pushed_at":"2025-07-31T14:45:42.000Z","size":2888,"stargazers_count":3,"open_issues_count":14,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-08-08T16:06:13.551Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evolvedbinary.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-10-15T08:54:51.000Z","updated_at":"2025-07-11T07:04:24.000Z","dependencies_parsed_at":"2023-12-11T11:29:46.806Z","dependency_job_id":"a0ba6e25-8775-4499-a0a3-ef10d58d5d68","html_url":"https://github.com/evolvedbinary/prosemirror-lwdita","commit_stats":null,"previous_names":["evolvedbinary/prosemirror-lwdita"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/evolvedbinary/prosemirror-lwdita","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evolvedbinary%2Fprosemirror-lwdita","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evolvedbinary%2Fprosemirror-lwdita/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evolvedbinary%2Fprosemirror-lwdita/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evolvedbinary%2Fprosemirror-lwdita/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evolvedbinary","download_url":"https://codeload.github.com/evolvedbinary/prosemirror-lwdita/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evolvedbinary%2Fprosemirror-lwdita/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272808934,"owners_count":24996603,"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","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-08-30T05:34:43.898Z","updated_at":"2025-10-14T20:12:08.877Z","avatar_url":"https://github.com/evolvedbinary.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ProseMirror LwDITA\n\n[![Node.js Version](https://img.shields.io/node/v-lts/@evolvedbinary/prosemirror-lwdita)](https://nodejs.org)\n[![Npm Package Version](https://img.shields.io/npm/v/@evolvedbinary/prosemirror-lwdita)](https://www.npmjs.com/package/@evolvedbinary/prosemirror-lwdita)\n[![Build Status](https://circleci.com/gh/evolvedbinary/prosemirror-lwdita.svg?style=svg)](https://circleci.com/gh/evolvedbinary/prosemirror-lwdita)\n[![Coverage Status](https://coveralls.io/repos/github/evolvedbinary/prosemirror-lwdita/badge.svg?branch=main)](https://coveralls.io/github/evolvedbinary/prosemirror-lwdita?branch=main)\n\nThis tool generates ProseMirror documents from JDITA objects. It also provides Schema Definition for proper display and editing of JDITA data.\n\n## Schema\n\nThe implemented schema complies with the LwDITA specs v0.3.0.2, see: [https://github.com/oasis-tcs/dita-lwdita/releases/tag/v0.3.0.2](https://github.com/oasis-tcs/dita-lwdita/releases/tag/v0.3.0.2)\n\n## Connecting your documentation page to Petal\nPetal offers an way to directly edit your documentation via our API, as show in our [Declarative Amsterdam presentation](https://www.youtube.com/watch?v=Ia5Vb-aA2jk)\n\n\nPlease follow these [instructions](./install-guide-for-documentation-owners.md)\n## Usage\n\nAdd the library to your project using Yarn or Npm:\n\n```shell\nyarn add @evolvedbinary/prosemirror-lwdita\n```\n\n```shell\nnpm install @evolvedbinary/prosemirror-lwdita\n```\n\nInclude the Library:\n\n```javascript\n// SCHEMA builder\nimport { schema } from \"@evolvedbinary/prosemirror-lwdita\";\n//PLUGINS\nimport { menu, shortcuts } from \"@evolvedbinary/prosemirror-lwdita\";\nimport { document } from \"@evolvedbinary/prosemirror-lwdita\";\n//Transform library\nimport { xditaToJson } from \"lwdita\";\n```\n\nThis is a minimal example of how to use prosemirror-lwdita.\nYou can check the [included demo](prosemirror-lwdita-demo/src/) for a full example:\n\n```javascript\n// Please use a valid XDITA sample,\n// e.g. pick one from https://github.com/oasis-tcs/dita-lwdita/tree/spec/org.oasis.xdita/samples/xdita\nlet xdita = `Insert your XDITA example here`\n\n// Transform the XDITA to JDITA\nlet jDita = await xditaToJson(xdita,true);\n// transform the jdita to Schema compliant Document\nlet document = await document(jDita);\n\n// create the schema object\nconst schemaObject = schema();\n\n// build the prosemirror document\nconst doc = Node.fromJSON(schemaObject, jsonDoc);\n\n// create a new prosemirror state check https://prosemirror.net/docs/ref/#state for more info\nconst state = EditorState.create({\n  doc,\n  plugins: [\n    shortcuts(schemaObject),\n    menu(schemaObject, {}),\n  ]\n})\n\n//Grab the HTML Dom element to render the editor in\nconst domEl = document.querySelector(\"#editor\");\n\n// create a new EditorView\nnew EditorView(domEl, {\n  state,\n});\n```\n\n## Demo\n\nWe provide a [small demo](prosemirror-lwdita-demo/src/) to showcase features and as a playground to test all of the features.\n\n```shell\n# clone project and install dependencies\ngit clone https://github.com/evolvedbinary/prosemirror-lwdita.git\ncd prosemirror-lwdita\nyarn install\n# build the project libraries\nyarn build\n\n# start the demo\nyarn start:demo\n```\n\nThis will start a demo on `http://localhost:1234`.\nIf this port is already in use, `parcel` will assign a random port that you can see in the terminal logs.\n\n## Development\n\n### Prerequisites\n\nFor development, you will need Node.js and a node package manager, like Yarn, to be installed in your environment.\n\n* Minimal Node version: v20.10.0\n* Optional: This project uses Yarn as its build system. Although we don't support it, if you prefer, it should also be possible to use npm instead of Yarn. The version of Yarn that we have used is v4.2.2.\n\n### Installation\n\nClone the prosemirror-lwdita repository:\n\n```shell\ngit clone https://github.com/evolvedbinary/prosemirror-lwdita.git\n```\n\nChange to the prosemirror-lwdita directory:\n\n```shell\ncd prosemirror-lwdita\n```\n\nInstall all packages:\n\n```shell\nyarn install\n```\n\n### Build\n\n#### Build the Project\n\n```shell\nyarn build\n```\n\n#### Build the Demo\n\n```shell\nyarn build:demo\n```\n\n### Generate the TSDoc Documentation\n\n```shell\nyarn run generate-docs\n```\n\nThis will generate a new folder `generated-docs` containing an HTML file with the entire TSDoc prosemirror-lwdita documentation.\nOpen this file in a browser to navigate through the documentation.\n\n### Test\n\nThis project also has tests which are written using the Mocha framework.\nTo execute the test suite and view the code coverage, run:\n\n```shell\nyarn test # run unit tests\n\nyarn coverage # get coverage\n```\n\n## Flow Diagram of prosemirror-lwdita\n\n\nThis diagram demonstrates the library and the internal flow:\n\n![Diagram of the prosemirror-lwdita application flow](diagrams/prosemirror-lwdita-app-flow.svg \"Diagram of the prosemirror-lwdita application flow\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevolvedbinary%2Fprosemirror-lwdita","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevolvedbinary%2Fprosemirror-lwdita","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevolvedbinary%2Fprosemirror-lwdita/lists"}