You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
Desktop: Fixes #9304: Fix HTML resource links lost when editing notes in the rich text editor (#9435)
This commit is contained in:
@@ -857,7 +857,18 @@ const TinyMCE = (props: NoteBodyEditorProps, ref: any) => {
|
||||
const resourcesEqual = resourceInfosEqual(lastOnChangeEventInfo.current.resourceInfos, props.resourceInfos);
|
||||
|
||||
if (lastOnChangeEventInfo.current.content !== props.content || !resourcesEqual) {
|
||||
const result = await props.markupToHtml(props.contentMarkupLanguage, props.content, markupRenderOptions({ resourceInfos: props.resourceInfos }));
|
||||
const result = await props.markupToHtml(
|
||||
props.contentMarkupLanguage,
|
||||
props.content,
|
||||
markupRenderOptions({
|
||||
resourceInfos: props.resourceInfos,
|
||||
|
||||
// Allow file:// URLs that point to the resource directory.
|
||||
// This prevents HTML-style resource URLs (e.g. <a href="file://path/to/resource/.../"></a>)
|
||||
// from being discarded.
|
||||
allowedFilePrefixes: [props.resourceDirectory],
|
||||
}),
|
||||
);
|
||||
if (cancelled) return;
|
||||
|
||||
editor.setContent(awfulBrHack(result.html));
|
||||
|
||||
Reference in New Issue
Block a user