1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Desktop: Fixes #8485: Note imported from Web Clipper is broken after being saved from the Rich Text editor

This commit is contained in:
Laurent Cozic
2023-07-26 17:36:21 +01:00
parent abe479d03f
commit 637a0eac7f
5 changed files with 67 additions and 21 deletions

View File

@ -3,7 +3,7 @@ import { FormNote, defaultFormNote, ResourceInfos } from './types';
import { clearResourceCache, attachedResources } from './resourceHandling';
import AsyncActionQueue from '@joplin/lib/AsyncActionQueue';
import { handleResourceDownloadMode } from './resourceHandling';
import HtmlToHtml from '@joplin/renderer/HtmlToHtml';
import { splitHtml } from '@joplin/renderer/HtmlToHtml';
import Setting from '@joplin/lib/models/Setting';
import usePrevious from '../../hooks/usePrevious';
import ResourceEditWatcher from '@joplin/lib/services/ResourceEditWatcher/index';
@ -73,8 +73,7 @@ export default function useFormNote(dependencies: HookDependencies) {
let originalCss = '';
if (n.markup_language === MarkupToHtml.MARKUP_LANGUAGE_HTML) {
const htmlToHtml = new HtmlToHtml();
const splitted = htmlToHtml.splitHtml(n.body);
const splitted = splitHtml(n.body);
originalCss = splitted.css;
}