Rich-text editor save to Document Library
Is it possible to save a document from the Rich-Text editor to a Document Library? I don't see any built-in support for it. Is it difficult to write as a custom module?
can you please elaborate a bit more on your requirement?
Maybe you need to export the content that is inside the rich text editor to a document (e.g. Word or PDF) and then import it into a document library? Then this will require some custom coding and overriding the default template of the HTML field element.
Or maybe you just need to upload a file from within the rich text editor - then this is possible via the Document Manager button.
I think your first description is what I'm looking for. I want a front-end user to be able to type in a document via the Rich Text Editor; then I want that user to be able to click a button like "Save to Document Library". The button would invoke some custom code to pull the user's typed text from the Rich Text Editor and pass it to the Documents module (service, provider, whatever the correct nomenclature is - I'm a Sitefinity noob) and cause a new document to be created.
I'm OK with doing any custom coding, but is there an example somewhere that does something similar that I could adapt?
That's an interesting idea. I don't know of any examples of that particular functionality though.
May I ask, what are you planning on doing with the documents? If you don't actually need the information to be stored as documents (just persisted somewhere until you do need it) you could leverage the form builder. Using that, you could store the information as a form response and then do whatever you need to do with the data at a later date. (Even transform the individual form responses into downloadable files on the fly...if you wanted to.)
It's part of a user's spec. I think the idea is that they want to make it possible for a wide variety of people to be able to produce documents without worrying whether they have this or that editor. They want to be able to just train people on the built-in editor.
And yeah, the rub is what exactly they intend to do with these documents? I think the answer is that they want them to be in the document library as first-class citizens beside the normal documents that were uploaded. They also want all uploaded documents (of any kind) to be automatically converted to pdf, but that's another story.
So right, I think the form approach you describe would be a compromise at best because it wouldn't let the documents play nice as regular-old documents. They'd really need to be deposited in a library to fully satisfy the spec.
Okie doke...is it required to allow images, tables and all the other crazy stuff that can be squeezed in the wysiwyg?
Blogged. Save HTML to a Sitefinity Document Library.
Good luck! :)
You rock, bespectacled man. If I could give you a hard-boiled egg, I would! Now hopefully I can make your work, work.