+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Rich-text editor save to Document Library

Rich-text editor save to Document Library

8 posts, 1 answered
  1. Kevin
    Kevin avatar
    4 posts
    Registered:
    01 Mar 2012
    11 Jun 2013
    Link to this post
    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?
  2. Veselin Vasilev
    Veselin Vasilev avatar
    23 posts
    Registered:
    27 Jul 2015
    12 Jun 2013
    Link to this post
    Hi Kevin,

    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.
     

    Regards,
    Veselin Vasilev
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Kevin
    Kevin avatar
    4 posts
    Registered:
    01 Mar 2012
    14 Jun 2013 in reply to Veselin Vasilev
    Link to this post
    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?

    kd
  4. Tim
    Tim avatar
    258 posts
    Registered:
    22 Jun 2011
    15 Jun 2013 in reply to Kevin
    Link to this post
    Kevin,

    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.)
  5. Kevin
    Kevin avatar
    4 posts
    Registered:
    01 Mar 2012
    15 Jun 2013 in reply to Tim
    Link to this post
    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.
  6. Tim
    Tim avatar
    258 posts
    Registered:
    22 Jun 2011
    15 Jun 2013 in reply to Kevin
    Link to this post
    Kevin,

    Okie doke...is it required to allow images, tables and all the other crazy stuff that can be squeezed in the wysiwyg?
  7. Tim
    Tim avatar
    258 posts
    Registered:
    22 Jun 2011
    15 Jun 2013 in reply to Kevin
    Link to this post
    Kevin,

    Blogged. Save HTML to a Sitefinity Document Library.

    Good luck! :)
  8. Kevin
    Kevin avatar
    4 posts
    Registered:
    01 Mar 2012
    15 Jun 2013 in reply to Tim
    Link to this post
    You rock, bespectacled man.  If I could give you a hard-boiled egg, I would!  Now hopefully I can make your work, work.

    kd
    Answered
8 posts, 1 answered