Node.js Documents Editor Cloud SDK

Enhance your tools & applications with document editing features using REST API and Node.js Cloud SDK.

Start Free Trial

GroupDocs.Editor Cloud SDK for Node.js supports editing a wide range of popular document formats in any type of Node.js application by integrating GroupDocs.Editor Cloud SDK for Node.js with GroupDocs.Editor Cloud REST API. You just need to upload supported document formats ((Microsoft Word, Excel spreadsheets, PowerPoint, TXT, HTML, XML) in any WYSIWYG HTML editor and convert it back to its original format keeping the same appearance after the document is edited.

GroupDocs.Editor Cloud SDK for Node.js is built as a layer on top of GroupDocs.Editor Cloud REST API that saves valuable development time by managing low-level requests and handling responses. The developers can focus on writing up the specific code only as needed in the project.

Advanced Document Editor REST API Features

Integrates easily within any WYSIWYG editor

Edit Word documents as a whole or define pages range

Multi-tabbed spreadsheet editing is supported

Optimized memory usage for large CSV or TSV files

Extract document information (type, size, page count etc)

Cloud REST API to be used with any language or platform

Working with WordProcessing Documents - Node.js

    //Get your App SID, App Key and Storage Name at https://dashboard.groupdocs.cloud (free registration is required).
    global.editApi = editor_cloud.EditApi.fromKeys(appSid, appKey);
    global.fileApi = editor_cloud.FileApi.fromKeys(appSid, appKey);
    
    // The document already uploaded into the storage.
    // Load it into editable state      
    let fileInfo = new editor_cloud.FileInfo();
    fileInfo.filePath = "WordProcessing/password-protected.docx";
    fileInfo.password = "password";
    let loadOptions = new editor_cloud.WordProcessingLoadOptions();
    loadOptions.fileInfo = fileInfo;
    loadOptions.outputPath = "output";
    let loadResult = await editApi.load(new editor_cloud.LoadRequest(loadOptions));
    
    // Download html document
    let buf = await fileApi.downloadFile(new editor_cloud.DownloadFileRequest(loadResult.htmlPath));
    let htmlString = buf.toString("utf-8");
    
    // Edit something...
    htmlString = htmlString.replace("Sample test text", "Hello world");
    
    // Upload html back to storage
    await fileApi.uploadFile(new editor_cloud.UploadFileRequest(loadResult.htmlPath, new Buffer(htmlString, "utf-8")));
    
    // Save html back to docx
    let saveOptions = new editor_cloud.WordProcessingSaveOptions();
    saveOptions.fileInfo = fileInfo;
    saveOptions.outputPath = "output/edited.docx";
    saveOptions.htmlPath = loadResult.htmlPath;
    saveOptions.resourcesPath = loadResult.resourcesPath;
    let saveResult = await editApi.save(new editor_cloud.SaveRequest(saveOptions));
    
    // Done.
    console.log("Document edited: " + saveResult.path);

Support and Learning Resources

GroupDocs.Editor offers document viewing APIs for other popular development environments