Ngonversi sawetara HTML dadi MD ing JavaScript

Dhuwur-kacepetan Node.js pustaka kanggo nggabungaké file HTML menyang MD

Pustaka Node.js sing cepet lan efisien kanggo nggabungake pirang-pirang file HTML dadi MD. Coba online gratis!

Ndeleng potongan kode

Gabungke HTML dadi siji MD nggunakake JavaScript

Modern JavaScript perpustakaan ngijini Node.js via .NET gawe kanggo nggabungaken HTML menyang siji MD karo sawetara garis saka kode. Mesin konversi HTML nganalisa tata letak lan struktur HTML konten gabungan menyang MD format.

Gunakake JavaScript kanggo ngowahi HTML dadi MD kanthi keluwesan lan kacepetan maksimal. Jalanake demo online lan priksa MD paling dhuwur ing browser. HTML Conversion API ndhukung akeh opsi migunani.

Gabungke HTML menyang MD

Kanggo ngowahi sawetara HTML menyang MD mung nggunakake JavaScript sing nangani kabeh rincian tingkat rendah.

Ngonversi pirang-pirang HTML lan simpen asil minangka file siji MD. Yen sampeyan ngembangake kode nggunakake JavaScript, iki bakal luwih gampang tinimbang sing katon. Deleng JavaScript sing ngulang dokumen lan ngowahi dadi MD format:

Tuladha kode ing JavaScript kanggo nggabungake pirang-pirang HTML dadi MD
Unggah file sing pengin digabung
Kode roto
Unggah file sing pengin digabung
Pilih format target saka dhaptar
npm install @aspose/words
Nyalin
const aw = require('@aspose/words');

var fileNames = [ "Input1.html", "Input2.html" ]

var output = new aw.Document()
// Mbusak kabeh content saka dokumen tujuan sadurunge nambah.
output.removeAllChildren()

fileNames.forEach(fileName => {
    var input = new aw.Document(fileName);    
    // Tambahake dokumen sumber menyang pungkasan dokumen tujuan.
    output.appendDocument(input, aw.ImportFormatMode.KeepSourceFormatting);
});

output.save("Output.md");
Kode roto

Carane ngowahi sawetara HTML dadi MD

  1. Pasang Aspose.Words for Node.js via .NET.
  2. Tambah referensi perpustakaan (ngimpor perpustakaan) menyang proyek JavaScript
  3. Bukak HTML berkas JavaScript.
  4. Ngonversi sawetara HTML file menyang MD ing sawetara detik.
  5. Nelpon metode appendDocument(), menehi jeneng file output nganggo ekstensi MD
  6. Entuk asil konversi HTML dadi MD.

JavaScript kanggo ngowahi HTML dadi MD

We host our Node.js via .Net packages in NPM repositories. Please follow the step-by-step instructions on how to install "Aspose.Words for Node.js via .NET" to your developer environment.

System Requirements

This package is compatible with Node.js 14.17.0 or higher.

Operasi HTML Liyane sing Didhukung

Sampeyan bisa nggabungake HTML menyang akeh format file liyane:

5%

Langganan kanggo Aspose Update Product

Entuk buletin saben wulan lan tawaran langsung dikirim menyang kothak layang.

© Aspose Pty Ltd 2001-2024. Kabeh hak dilindhungi undhang-undhang.