Yoopta-Editor icon indicating copy to clipboard operation
Yoopta-Editor copied to clipboard

[FEATURE] - Exporting/importing Yoopta content in different formats (html, md, text)

Open Darginec05 opened this issue 1 year ago • 4 comments

Package @yoopta/exports should be finished with new features in v4. Supported formats for starts: html, md, plaint text

Discussed in https://github.com/Darginec05/Yoopta-Editor/discussions/137

Originally posted by nachog00 May 5, 2024

Thanks for the great plugin! I'm surely be using it a lot. Now my question is: is there any way to export the content as a plain html? I intend on using this as a high quality input in a form, and I need to store the input as HTML. I saw the editor.getEditorValue method returns an object with a tree but i cant really use that as it is. Thanks anyways.

Darginec05 avatar May 11 '24 20:05 Darginec05

This would be so helpful. This is the only feature stopping me from switching over

michaelshimeles avatar May 13 '24 12:05 michaelshimeles

"stopping me from switching over" is the best motivation to work overnight! Let's do it!

maZahaca avatar May 13 '24 12:05 maZahaca

@maZahaca Okay, challenge accepted!

Darginec05 avatar May 13 '24 14:05 Darginec05

I'll swap asap the second it's live :)

michaelshimeles avatar May 13 '24 16:05 michaelshimeles

@Darginec05 Is there an tentative ETA for a 4.x upgrade of exports? In order for rolling it out in prod. we need to import export HTML

chrassendk avatar Jun 17 '24 19:06 chrassendk

Hi @chrassendk 👋
I'm currently working on it, but parts with html and markdown are already done. I have plans to pulbish today @yoopta/exports as -rc version

Darginec05 avatar Jun 18 '24 08:06 Darginec05

Hi @Darginec05 I'm really looking forward to that too, I'm thinking to switch

vlad-svr avatar Jun 18 '24 12:06 vlad-svr

It seems the most wanted feature now! @Darginec05

maZahaca avatar Jun 18 '24 12:06 maZahaca

@vlad-svr Roger that. I ping you when I'll publish -rc version

Darginec05 avatar Jun 18 '24 14:06 Darginec05

@chrassendk @michaelshimeles @vlad-svr @maZahaca Good news, guys!

I finally released the -rc version for @yoopta/exports 🔥 I also worked on examples to make it as convenient as possible for developers to understand how deserializers/serializers work. Check examples below 👇

So, what we have in current time:

  • Version for packages - 4.5.2-rc.1
  • Full docs - https://yoodocs.space/yoopta-editor/yoopta/exportsimports-fUZcaVYc7w
  • Examples - https://yoopta-editor-jt4typuh8-dargos-projects.vercel.app/examples/withExports
    • Example with HTML - https://yoopta-editor-jt4typuh8-dargos-projects.vercel.app/examples/withExports/html
    • Example with Markdown - https://yoopta-editor-jt4typuh8-dargos-projects.vercel.app/examples/withExports/markdown

But this task is still in progress. What missing in current version: - Cut content from editor

  • Copy/cut content from editor in readOnly mode
  • Parsing nested inline marks from markdown

I think these minor bugs will be fixed soon and I'll publish a stable version ASAP.

Darginec05 avatar Jun 23 '24 14:06 Darginec05

Done in v4.6.0 Examples - https://yoopta.dev/examples/withExports

Darginec05 avatar Jun 25 '24 19:06 Darginec05