1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-18 09:35:20 +02:00

Mobile: Resolves #10609: Display html notes using white theme (#11510)

This commit is contained in:
Laurent Cozic 2024-12-13 19:21:20 +01:00 committed by GitHub
parent 7863118565
commit 1fa327f034
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,5 @@
import { MarkupLanguage, MarkupToHtml } from '@joplin/renderer';
import type { MarkupToHtmlConverter, RenderResultPluginAsset, FsDriver as RendererFsDriver } from '@joplin/renderer/types';
import type { MarkupToHtmlConverter, RenderOptions, RenderResultPluginAsset, FsDriver as RendererFsDriver } from '@joplin/renderer/types';
import makeResourceModel from './utils/makeResourceModel';
import addPluginAssets from './utils/addPluginAssets';
import { ExtraContentScriptSource } from './types';
@ -115,7 +115,7 @@ export default class Renderer {
this.lastSettings = settings;
this.lastRenderMarkup = markup;
const options = {
const options: RenderOptions = {
onResourceLoaded: settings.onResourceLoaded,
highlightedKeywords: settings.highlightedKeywords,
resources: settings.resources,
@ -140,6 +140,7 @@ export default class Renderer {
return settings.pluginSettings[settingKey];
},
whiteBackgroundNoteRendering: markup.language === MarkupLanguage.Html,
};
this.markupToHtml.clearCache(markup.language);

View File

@ -50,6 +50,11 @@ export interface RenderOptions {
resources?: Record<string, ResourceEntity>;
onResourceLoaded?: ()=> void;
editPopupFiletypes?: string[];
createEditPopupSyntax?: string;
destroyEditPopupSyntax?: string;
// HtmlToHtml only
whiteBackgroundNoteRendering?: boolean;
}