Option for HTML Fragment generation?

未關閉
#219 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
powershell
領域
web-dev

研究方向

從 New-Html 和 New-HTMLContainer.ps1 開始,接著檢查 HTML schema 的初始化方式,然後查看 New-HTMLHeading.ps1 和容器程式碼如何存取其功能以及 CustomHeaderCSS。將產生的輸出與要求的 Confluence 使用案例進行比較;完成的標準是能夠產生受支援的片段,且不包含 html 標籤,也不會出現所回報的 schema 錯誤。

由索引模型根據 Issue 內容生成。

描述

enhancement help wanted

Is there an option to generate HTML as a fragment that can be inserted into another HTML document? The scenario I am trying to solve is generation of HTML content to go into a Confluence page, so I need HTML that is just a fragment and doesn't include the tags and could probably all be contained within a

tag.

I didn't see an option on New-Html for that kind of generation. I looked for a New-Html* function that might server as a parent, but I didn't see anything. I tried using New-HtmlContainer as the root object and it does generate some HTML, but it also throws some errors.

Does this capability exist?

InvalidOperation: C:\Users\rob\src\GitHub\PSWriteHTML\Public\New-HTMLContainer.ps1:10:5
Line |
10 | $Script:HTMLSchema.Features.MainFlex = $true
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| The property 'MainFlex' cannot be found on this object. Verify that the property exists and can be set.

InvalidOperation: C:\Users\rob\src\GitHub\PSWriteHTML\Public\New-HTMLContainer.ps1:23:9
Line |
23 | $Script:HTMLSchema.CustomHeaderCSS[$AnchorName] = $Css
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot index into a null array.

InvalidOperation: C:\Users\rob\src\GitHub\PSWriteHTML\Public\New-HTMLHeading.ps1:9:5
Line |
9 | $Script:HTMLSchema.Features.DefaultHeadings = $true
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| The property 'DefaultHeadings' cannot be found on this object. Verify that the property exists and can be set.

主要語言
PowerShell
星號
1k
分支
115
平均合併
4 小時 41 分鐘
30 天內合併 PR
4

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

EvotecIT/PSWriteHTML 的其他 Issue

查看 EvotecIT/PSWriteHTML 的全部 Issue

相似的 Issue

更多 Web Dev Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。