Nâng cao công cụ và ứng dụng của bạn bằng các tính năng chỉnh sửa tài liệu bằng REST API và Node.js Cloud SDK.
Bắt đầu dùng thử miễn phíGroupDocs.Editor Cloud SDK cho Node.js hỗ trợ chỉnh sửa nhiều định dạng tài liệu phổ biến trong bất kỳ loại ứng dụng Node.js nào bằng cách tích hợp GroupDocs.Editor Cloud SDK cho Node.js với GroupDocs.Editor Cloud REST API. Bạn chỉ cần tải lên các định dạng tài liệu được hỗ trợ ((Microsoft Word, bảng tính Excel, PowerPoint, TXT, HTML, XML) trong bất kỳ trình soạn thảo HTML WYSIWYG nào và chuyển đổi trở lại định dạng ban đầu, giữ nguyên giao diện sau khi chỉnh sửa tài liệu.
GroupDocs.Editor Cloud SDK cho Node.js được xây dựng dưới dạng một lớp trên GroupDocs.Editor Cloud REST API giúp tiết kiệm thời gian phát triển đáng kể bằng cách quản lý các yêu cầu cấp thấp và xử lý phản hồi. Các nhà phát triển có thể tập trung vào việc viết mã cụ thể chỉ khi cần thiết trong dự án.
Hãy xem GroupDocs.Editor Cloud SDK cho Node.js tại GitHub nếu bạn đang tìm kiếm mã nguồn để chú thích tệp trong Đám mây.
Bạn có thể dùng thử GroupDocs.Editor API Node.js mã nguồn thấp mà không có bất kỳ hạn chế nào.
GroupDocs.Editor Cloud cũng có sẵn dưới dạng hình ảnh Docker có thể được sử dụng để tự lưu trữ dịch vụ. Hoặc bạn có thể xây dựng dịch vụ của riêng mình bằng cách sử dụng GroupDocs.Editor High-code APIs hiện đang điều khiển REST API của chúng tôi.
//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);