N°3807 Fix container added for all Html components

This was causing issues for example in the setup, as any raw content is sent using \WebPage::add, which create an HTML component.
I reverted the layout update, and created a new factory method to be used when needed : \Combodo\iTop\Application\UI\Base\Component\Html\HtmlFactory::MakeHtmlContent
This commit is contained in:
Pierre Goiffon
2021-08-04 11:19:05 +02:00
parent 66720b9731
commit 11cfdb2a17
2 changed files with 13 additions and 1 deletions

View File

@@ -50,4 +50,16 @@ class HtmlFactory
{
return new Html('<p>'.$sContent.'</p>');
}
/**
* Create a container for contents having multiple HTML tags, for which we want to preserve style and don't apply minireset
*
* @param string $sContent
*
* @return \Combodo\iTop\Application\UI\Base\Component\Html\Html
*/
public static function MakeHtmlContent(string $sContent): Html
{
return new Html('<div class="ibo-is-html-content">'.$sContent.'</div>');
}
}

View File

@@ -1 +1 @@
<div class="ibo-is-html-content">{{ oUIBlock.GetHtml()|raw }}</div>
{{ oUIBlock.GetHtml()|raw }}