@infonomic/payload-alternative-lexical-editor 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +18 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -11,8 +11,7 @@ NOTE: 2025-12-29 - the Lexical editor/adapter has been moved into `packages/payl
11
11
  It's also important to mention that creating a generalized and extensible editor with a 'pluggable' feature system - such as the one currently being developed by Alessio and the team at Payload, is an order of magnitude more difficult than creating an 'opinionated' adapter with zero extensibility. The Payload team are doing amazing work - and this repo and our editor is in no way a criticism of the work being done at Payload.
12
12
 
13
13
  ## Our Lexical Editor
14
-
15
- ![Lexical Editor](/lexical-editor-screenshot.png "Lexical Editor")
14
+ <img style="width: 100%" alt="lexical-editor-screenshot" src="https://github.com/user-attachments/assets/a41060c9-6f28-4b64-a045-c3fdd411d9af" />
16
15
 
17
16
  ## Background
18
17
 
@@ -91,11 +90,28 @@ The configuration in this repo is using the `beforeChange` strategy, although th
91
90
 
92
91
  ## Getting Started
93
92
 
93
+ ### To run the editor examples from within this repo:
94
+
94
95
  1. Clone this repo
95
96
  2. If you don't already have an instance of MongoDB running locally we've provided a docker composer file and a shell start script. To start `cd mongodb` from the project root. `mkdir data` and then `./mongo.sh up` to start a local instance of MongoDB with a fresh database.
96
97
  3. In the `apps/next` directory - copy `.env.example` to `.env` (Note: Don't deploy this to production or a public service without changing your PAYLOAD_SECRET).
97
98
  4. From the root - run `pnpm install` followed by `pnpm dev`.
98
99
  5. To run a production build - from the root run `pnpm build` followed by `pnpm start`.
99
100
 
101
+ ### To install and run the editor in your own project.
102
+
103
+ 1. `pnpm add @infonomic/payload-alternative-lexical-editor` or `npm install @infonomic/payload-alternative-lexical-editor`
104
+ 2. Configure the editor in `payload.config.ts`
105
+
106
+ ```ts
107
+ import { lexicalEditor } from '@infonomic/payload-alternative-lexical-editor'
108
+
109
+ ...
110
+ // @ts-expect-error: our return type for editorConfig is different
111
+ editor: lexicalEditor(),
112
+ ...
113
+ ```
114
+ Follow the examples in this repo under apps/next for configuration options and settings for the editor (turning editor features on or off).
115
+
100
116
  Thoughts, suggestions or contributions more than welcome. We hope that some of this helps.
101
117
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infonomic/payload-alternative-lexical-editor",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "type": "module",