You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the standard notion-to-md library is utilized for parsing any sub-content within a block. For example, if there's a column-list containing blocks of content, these blocks will not be processed by docu-notion according to its configuration. I'm attempting to parse sub-content recursively using docu-notion's context and its custom function named doNotionToMarkdown. This function is supposed to carry the configuration and registered plugins, but for some reason, it's not functioning as expected. As if the context is not being properly passed.
I've also attempted re-registering the plugins within the column plugin's context itself, but this approach hasn't been successful either. Which got me confused.
Has anyone tried similar implementation? I'm trying to avoid re-writing an entire parsing logic within the Column Plugin itself.
asyncfunctionnotionColumnListToTabs(docunotionContext: IDocuNotionContext,getBlockChildren: (id: string)=>Promise<NotionBlock[]>,block: NotionBlock): Promise<string>{const{ id, has_children }=blockasany;if(!has_children)return"";constcolumnListChildren=awaitgetBlockChildren(id);consttabItemsPromises=columnListChildren.map(async(column)=>{constcolumnChildren=awaitgetBlockChildren(column.id);letlabel="Tab";if(columnChildren.length>0&&columnChildren[0].type==='heading_1'){constrichTextItems=columnChildren[0].heading_1.rich_text;if(richTextItems.length>0&&richTextItems[0].type==='text'){label=richTextItems[0].text.content;// Directly accessing the content of the first text item}}// const markdownContent = await Promise.all(// columnChildren.map(// async child => await docunotionContext.notionToMarkdown.blockToMarkdown(child)// )// );// const content = markdownContent.join("\n\n");constcontent=awaitdoNotionToMarkdown(docunotionContext,columnChildren);return`<TabItem value="${label.toLowerCase()}" label="${label}">\n\n${content}\n\n</TabItem>`;});
The text was updated successfully, but these errors were encountered:
Currently, the standard notion-to-md library is utilized for parsing any sub-content within a block. For example, if there's a column-list containing blocks of content, these blocks will not be processed by docu-notion according to its configuration. I'm attempting to parse sub-content recursively using docu-notion's context and its custom function named doNotionToMarkdown. This function is supposed to carry the configuration and registered plugins, but for some reason, it's not functioning as expected. As if the context is not being properly passed.
I've also attempted re-registering the plugins within the column plugin's context itself, but this approach hasn't been successful either. Which got me confused.
Has anyone tried similar implementation? I'm trying to avoid re-writing an entire parsing logic within the Column Plugin itself.
The text was updated successfully, but these errors were encountered: