code: public function generate()
  	{
  		$this->text = StringUtil::toHtml5($this->text);
  
  		// Add the static files URL to images
  		if ($staticUrl = System::getContainer()->get('contao.assets.files_context')->getStaticUrl())
  		{
  			$path = Config::get('uploadPath') . '/';
  			$this->text = str_replace(' src="' . $path, ' src="' . $staticUrl . $path, $this->text);
  		}
  
  		return StringUtil::encodeEmail($this->text);
  	}
docs: Generate the widget and return it as string
  
  @return string The widget markup