Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import HTML into LexicalView/Editor #60

Open
khurram18 opened this issue Apr 11, 2024 · 0 comments
Open

Import HTML into LexicalView/Editor #60

khurram18 opened this issue Apr 11, 2024 · 0 comments

Comments

@khurram18
Copy link

khurram18 commented Apr 11, 2024

Currently there is no way to import simple HTML content into LexicalView/Editor. I am using the below code to export the HTML from editor using the sample code from LexicalPlayground app

try? editor.read {
      do {
        self.output = try generateHTMLFromNodes(editor: editor, selection: nil)
      } catch let error {
        self.output = error.localizedDescription
      }
    }

Can anyone please suggest the best way to import this generated output back into LexicalView/Editor?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant