2021-01-27 19:42:58 +02:00
|
|
|
import { MarkupLanguageUtils as BaseMarkupLanguageUtils } from '@joplin/lib/markupLanguageUtils';
|
|
|
|
import { PluginStates } from '@joplin/lib/services/plugins/reducer';
|
|
|
|
import { contentScriptsToRendererRules } from '@joplin/lib/services/plugins/utils/loadContentScripts';
|
2021-05-19 15:00:16 +02:00
|
|
|
import { Options } from '@joplin/renderer/MarkupToHtml';
|
2021-01-27 19:42:58 +02:00
|
|
|
|
|
|
|
class MarkupLanguageUtils extends BaseMarkupLanguageUtils {
|
|
|
|
|
2021-05-19 15:00:16 +02:00
|
|
|
public newMarkupToHtml(plugins: PluginStates = null, options: Options = null) {
|
|
|
|
plugins = plugins || {};
|
|
|
|
|
|
|
|
return super.newMarkupToHtml(null, {
|
2021-01-27 19:42:58 +02:00
|
|
|
extraRendererRules: contentScriptsToRendererRules(plugins),
|
|
|
|
...options,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const markupLanguageUtils = new MarkupLanguageUtils();
|
|
|
|
|
|
|
|
export default markupLanguageUtils;
|