Nalika pangembang ngowahi MD dokumen nganggo perpustakaan Swift iki, sing lagi diowahi yaiku Model Obyek Dokumen (DOM). Dadi, meh kabeh owah-owahan bisa ditindakake kanggo MD dokumen sing diwakili minangka DOM. Kanthi Swift SDK sing disedhiyakake, pangembang bisa kanthi gampang nyunting dokumen: ngowahi teks, nganyari tabel, nambah gambar lan liya-liyane. Cukup mbukak MD, gawe owah-owahan sing dibutuhake kanthi program lan ekspor asil menyang format nyimpen sing padha utawa sing didhukung.
Pustaka Swift kita menehi pangembang kemampuan kanggo ngowahi MD dokumen kanthi langsung kanthi nyunting Document Object Model (DOM), tegese ora ana piranti lunak tambahan sing kudu diinstal.
Kasus sing paling populer kanggo nyunting MD file yaiku nyunting teks. Kanthi solusi piranti lunak sing diwenehake, sampeyan bisa nambah, ngowahi utawa mbusak teks nggunakake Swift ing dokumen kasebut.
Pilihan editing MD liyane sing populer yaiku nyunting tabel. Swift SDK kita ngidini sampeyan nggarap tabel lan teks ing sel tabel.
Pangembang Swift bisa nambah utawa mbusak sel tabel lan tabel, uga nambah, ngowahi lan mbusak teks ing njero.
Saliyane nyunting teks lan tabel ing MD, ana pilihan umum liyane: nambahake gambar menyang dokumen ing Swift. Pangembang Swift uga bisa nambah gambar menyang MD file nggunakake DOM.
Coba Swift SDK sing kuat iki lan evaluasi sawetara opsi ing panyuntingan MD dokumen. Nggunakake conto ing ngisor iki, muat MD dokumen lan gawe sawetara owah-owahan: nambah teks, nambah tabel lan sel tabel kanthi teks utawa lebokake gambar menyang MD dokumen:
import AsposeWordsCloud
let config = Configuration(clientId: "####-####-####-####-####",
clientSecret: "##################");
let api = try WordsAPI(configuration: config);
let requestDocument = InputStream(url: URL(string: "Input.md"))!;
let requestParagraph = ParagraphInsert()
.setText(text: "Morbi enim nunc faucibus a.");
let insertParagraphRequest = InsertParagraphOnlineRequest(document: requestDocument,
paragraph: requestParagraph);
let insertParagraph = try api.insertParagraphOnline(request: insertParagraphRequest);
let convertRequest = ConvertDocumentRequest(document: insertParagraph.document.values.first,
format: "md");
let convert = try api.convertDocument(request: convertRequest);
import AsposeWordsCloud
let config = Configuration(clientId: "####-####-####-####-####",
clientSecret: "##################");
let api = try WordsAPI(configuration: config);
let requestDocument = InputStream(url: URL(string: "Input.md"))!;
let requestTable = TableInsert()
.setColumnsCount(columnsCount: 1)
.setRowsCount(rowsCount: 2);
let insertTableRequest = InsertTableOnlineRequest(document: requestDocument,
table: requestTable, nodePath: "");
let insertTable = try api.insertTableOnline(request: insertTableRequest);
let convertRequest = ConvertDocumentRequest(document: insertTable.document.values.first,
format: "md");
let convert = try api.convertDocument(request: convertRequest);
import AsposeWordsCloud
let config = Configuration(clientId: "####-####-####-####-####",
clientSecret: "##################");
let api = try WordsAPI(configuration: config);
let requestDocument = InputStream(url: URL(string: "Input1.md"))!;
let requestDrawingObject = DrawingObjectInsert()
.setHeight(height: 0)
.setLeft(_left: 0)
.setRelativeHorizontalPosition(
relativeHorizontalPosition: DrawingObjectInsert.RelativeHorizontalPosition.margin)
.setRelativeVerticalPosition(
relativeVerticalPosition: DrawingObjectInsert.RelativeVerticalPosition.margin)
.setTop(top: 0)
.setWidth(width: 0)
.setWrapType(wrapType: DrawingObjectInsert.WrapType.inline);
let requestImageFile = InputStream(url: URL(string: "Input2.md"))!;
let insertDrawingObjectRequest = InsertDrawingObjectOnlineRequest(document: requestDocument,
drawingObject: requestDrawingObject, imageFile: requestImageFile, nodePath: "sections/0");
let insertDrawingObject =
try api.insertDrawingObjectOnline(request: insertDrawingObjectRequest);
let convertRequest = ConvertDocumentRequest(
document: insertDrawingObject.document.values.first, format: "md");
let convert = try api.convertDocument(request: convertRequest);
Sampeyan bisa nggunakake manajer paket Swift lan manajer dependensi Cocoapods kanggo nginstal Aspose.Words Cloud SDK for Swift. Informasi rinci babagan nginstal paket diwenehi ing bagean "Installation and Usage".
Minangka alternatif, sampeyan bisa clone Aspose.Words Cloud SDK for Swift saka GitHub lan nggunakake ing project.
Tututi Instructions iki supaya cepet entuk kredensial keamanan sing dibutuhake lan ngakses REST API kita.
Swift 4.2 utawa luwih anyar
Deleng Repository Documentation kanggo ndeleng rincian liyane.
Sampeyan bisa nindakake operasi suntingan kanggo format file liyane: