hrntsm / HoaryFox

Grasshopper component for handling ST-Bridge data, and exchange between Karamba3D and ST-Bridge
https://hiron.dev/HoaryFox/
MIT License
8 stars 2 forks source link

Add HtmlHelp_Source #230

Open hrntsm opened 2 years ago

hrntsm commented 2 years ago

HtmlHelp_Source を付ける

https://github.com/mcneel/compute.rhino3d/blob/master/src/hops/HopsComponent.cs#L65

hrntsm commented 2 years ago

入れたリンクに飛ぶ機能ではなく、そのSourceにあるHTMLを使ってGH内で説明を表示する機能で、Docusaurus はreactなのでそのまま表示されなかった。 期待する機能ではなかったのでクローズ

hrntsm commented 2 years ago

例えば以下のように書けるようなので、リンクを張るだけでも効果があるかも

    protected override string HtmlHelp_Source()
    {
      GH_HtmlFormatter ghHtmlFormatter = new GH_HtmlFormatter((IGH_InstanceDescription) this);
      ghHtmlFormatter.Title = "title";
      ghHtmlFormatter.Description = "description";
      ghHtmlFormatter.ContactURI = "aaa@mail.com";
      ghHtmlFormatter.AddRemark("hoge");
      ghHtmlFormatter.AddRemark("fuga");
      return ghHtmlFormatter.HtmlFormat();
    }