Make preferHTML configurable

This commit is contained in:
Oliver Blanthorn 2025-06-10 17:03:37 +02:00
parent 193e2eb090
commit a6caa97352
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3
2 changed files with 9 additions and 1 deletions

View file

@ -356,8 +356,9 @@ export async function editor() {
window.addEventListener("beforeunload", beforeUnloadListener)
let ans
const useHtml = await config.getAsync("editorusehtml") == "true"
try {
const editor = getEditor(elem, { preferHTML: false })
const editor = getEditor(elem, { preferHTML: useHtml })
const text = await editor.getContent()
const pos = await editor.getCursor()

View file

@ -1007,6 +1007,13 @@ export class default_config {
*/
editorcmd = "auto"
/**
* Try to preserve HTML tags when using an external editor.
*
* Defaults to false. Some sites work better with it set to true, see https://github.com/tridactyl/tridactyl/issues/3900
*/
editorusehtml = "false"
/**
* Command that should be run by the [[rssexec]] ex command. Has the
* following format: