Closed lwrbakro closed 9 years ago
You could use a custom converter if you had the ability to configure the Environment
:
ConverterInterface
)Environment
Environment
At this point you've got the Environment
configured how you need it, but no way to inject this into the HtmlConverter
. This is an oversight on my part. For now, you could use (ab)use inheritence:
class CustomHtmlConverter extends HtmlConverter
{
public function __construct(Environment $environment, array $options = array()) {
parent::__construct($options);
$this->environment = $environment;
$this->environment->getConfig()->merge($options);
}
}
I'll open a separate issue to make the Environment
injectable.
Oops, I misread my own code (I haven't had my coffee yet this morning). Turns out you can do this with the existing code:
ConverterInterface
)HtmlConverter
.$htmlConverter->addConverter(new MyCustomLinkConverter())
That third call will replace the existing link converter with yours :)
Hi,
I am about to convert HTML code to JIRA markdown.
Is it possible to use custom converter function instead the default one?