Warm tip: This article is reproduced from stackoverflow.com, please click
node.js pdf sapui5 tinymce tinymce-4

TinyMCE

发布于 2020-04-11 22:50:05

In my SAPUI5 application I am using RichTextEditor which is based on TinyMCE. The problem is that there is no supported way to export the document to PDF or any other file.

When in Chrome and focused inside RichTextEditor element, after pressing Ctrl+P (print) I am able to print the content of the TinyMCE into a PDF file using native chrome pdf printer.

My question is: Is it somehow possible to simulate this in nodejs app to avoid user interaction at all? I am asking for some pointers how this could be done.

Questioner
miskohut
Viewed
52
Samleijenhorst 2020-02-03 18:14

Calling the getValue method on your RichTextEditor control, you can export the current content as an html string.

If you send this to your nodejs layer, you should be able to convert this to a pdf, using a converter, such as this one.