Tingkatkan alat dan aplikasi Anda dengan fitur penyuntingan dokumen menggunakan REST API dan Node.js Cloud SDK.
Mulai Uji Coba GratisGroupDocs.Editor Cloud SDK untuk Node.js mendukung penyuntingan berbagai format dokumen populer pada setiap jenis aplikasi Node.js dengan mengintegrasikan GroupDocs.Editor Cloud SDK untuk Node.js dengan GroupDocs.Editor Cloud REST API. Anda hanya perlu mengunggah format dokumen yang didukung (Microsoft Word, lembar kerja Excel, PowerPoint, TXT, HTML, XML) dalam editor WYSIWYG HTML apa pun dan mengonversinya kembali ke format aslinya sambil mempertahankan tampilan yang sama setelah dokumen diedit.
GroupDocs.Editor Cloud SDK untuk Node.js dibangun sebagai lapisan di atas GroupDocs.Editor Cloud REST API yang menghemat waktu pengembangan berharga dengan mengelola permintaan tingkat rendah dan menangani respons. Pengembang dapat fokus pada menulis kode spesifik hanya sesuai kebutuhan dalam proyek.
Lihat GroupDocs.Editor Cloud SDK for Node.js at GitHub jika Anda mencari kode sumber untuk memberi anotasi file di Cloud.
Anda dapat mencoba GroupDocs.Editor(https://purchase.groupdocs.cloud/trial) Low-Code Node.js APIs tanpa batasan apa pun.
GroupDocs.Editor Cloud juga tersedia sebagai gambar Docker yang dapat digunakan untuk self-host layanan. Atau Anda dapat membangun layanan Anda sendiri menggunakan GroupDocs.Editor High-code APIs yang saat ini menggerakkan REST APIs kami.
//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);