wobsoriano / lexical-vue

An extensible Vue 3 web text-editor based on Lexical.
https://lexical-vue.vercel.app/
MIT License
263 stars 31 forks source link

Using Lexical Config type directly #21

Closed genu closed 1 year ago

genu commented 1 year ago

Is there a reason why we cannot use the CreatedEditorArgs type directly that is provided bylexical here?

https://github.com/wobsoriano/lexical-vue/blob/8c19a0f5e7ec2f806f03f70322113efdb80cb3c4/src/components/LexicalComposer.vue#L9-L21

If we use the lexical provided type, we wouldn't have to recreate it in the composer as it is now as well as provide more straight forward type safety:

import {  CreateEditorArgs } from 'lexical'

const config: CreateEditorArgs = {
   ...
}
wobsoriano commented 1 year ago

Hey! I think CreateEditorArgs wasn't available at the time this component was written. Would you like to open a PR for that?

wobsoriano commented 1 year ago

Fixed in https://github.com/wobsoriano/lexical-vue/pull/22