ONLYOFFICE / DocumentBuilder

ONLYOFFICE Document Builder is powerful text, spreadsheet, presentation and PDF generating tool
https://www.onlyoffice.com/document-builder.aspx
GNU Affero General Public License v3.0
111 stars 54 forks source link

How to set the label or tag for table cell in presentation? #129

Closed Kevin-Loeng closed 1 month ago

Kevin-Loeng commented 4 months ago

Is there a method, let developer can set the label/tag for table cell (or inner paragraph of it) in presentation? I want to set the identification for table cells when create table by using Presentation API.

After that when I get the table data by api, I can also get every table cell's tag/label and text, then can establish a one-to-one mapping relationship for text and tag/label, like a form or json.

If existing api didn't support to achieve above result. Can I add some custom presentation api , by modify the source codes of document builder sdkjs ? For example, add SetLabel and GetLabel api for ApiTableCell or ApiParagraph method.

I also noticed there are SetLabel and GetLabel method for ApiBlockLvlSdt. But ApiBlockLvlSdt is only supported for Text document API, not Presentation API. Whether I can let Presentation API support ApiBlockLvlSdt by modify the source codes.

DocumentBuilder version: 8.0.1

I beg anyone can give me some ideas or advice, thanks.

askonev commented 3 months ago

@Kevin-Loeng Greetings. For an object of the ApiBlockLvlSdt class, the tag is introduced to uniquely identify an object or group of objects in a document, because we cannot strictly determine the sequence and nesting of block content controls. But if we work with a table, we can always uniquely define a cell as the intersection of a column and a row. The table cannot be Multi-dimensional. Based on this, it is not very clear why to enter the label\tag entity for the cell.

Rita-Bubnova commented 1 month ago

This issue was closed due no response.