Skip to content

Build your personal knowledge base with Trilium Notes

Merge remote-tracking branch 'origin/develop' into feature/extend-kept-html-tags

Elian Doranaa99efc36242
diff --cc src/routes/api/options.ts
index 4e8645793d,9649aff2b9..3ddcdcaf93
--- a/src/routes/api/options.ts
+++ b/src/routes/api/options.ts
@@@ -67,7 -67,7 +67,8 @@@ const ALLOWED_OPTIONS = new Set(
'locale',
'firstDayOfWeek',
'textNoteEditorType',
- 'allowedHtmlTags', // Allow configuring HTML import tags
- 'layoutOrientation'
++ 'layoutOrientation',
++ 'allowedHtmlTags' // Allow configuring HTML import tags
]);
function getOptions() {
diff --cc src/services/options_init.ts
index 4ba325c4a5,2d4efec540..cd7063274c
--- a/src/services/options_init.ts
+++ b/src/services/options_init.ts
@@@ -136,19 -136,7 +136,20 @@@ const defaultOptions: DefaultOption[]
// Text note configuration
{ name: "textNoteEditorType", value: "ckeditor-balloon", isSynced: true },
- { name: "layoutOrientation", value: "vertical", isSynced: false }
+ // HTML import configuration
++ { name: "layoutOrientation", value: "vertical", isSynced: false },
+ { name: "allowedHtmlTags", value: JSON.stringify([
+ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'p', 'a', 'ul', 'ol',
+ 'li', 'b', 'i', 'strong', 'em', 'strike', 's', 'del', 'abbr', 'code', 'hr', 'br', 'div',
+ 'table', 'thead', 'caption', 'tbody', 'tfoot', 'tr', 'th', 'td', 'pre', 'section', 'img',
+ 'figure', 'figcaption', 'span', 'label', 'input', 'details', 'summary', 'address', 'aside', 'footer',
+ 'header', 'hgroup', 'main', 'nav', 'dl', 'dt', 'menu', 'bdi', 'bdo', 'dfn', 'kbd', 'mark', 'q', 'time',
+ 'var', 'wbr', 'area', 'map', 'track', 'video', 'audio', 'picture', 'del', 'ins',
+ 'en-media',
+ 'acronym', 'article', 'big', 'button', 'cite', 'col', 'colgroup', 'data', 'dd',
+ 'fieldset', 'form', 'legend', 'meter', 'noscript', 'option', 'progress', 'rp',
+ 'samp', 'small', 'sub', 'sup', 'template', 'textarea', 'tt'
+ ]), isSynced: true },
];
/**