Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(client/rtl): improve alignment of the attribute editor
Elian Doranf4df7c1eec3b
diff --git a/apps/client/src/widgets/ribbon/components/AttributeEditor.tsx b/apps/client/src/widgets/ribbon/components/AttributeEditor.tsxindex 3376362650..380241df8a 100644--- a/apps/client/src/widgets/ribbon/components/AttributeEditor.tsx+++ b/apps/client/src/widgets/ribbon/components/AttributeEditor.tsx@@ -4,7 +4,7 @@ import { t } from "../../../services/i18n";import server from "../../../services/server";import note_autocomplete, { Suggestion } from "../../../services/note_autocomplete";import CKEditor, { CKEditorApi } from "../../react/CKEditor";-import { useLegacyImperativeHandlers, useLegacyWidget, useTooltip, useTriliumEvent } from "../../react/hooks";+import { useLegacyImperativeHandlers, useLegacyWidget, useTooltip, useTriliumEvent, useTriliumOption } from "../../react/hooks";import FAttribute from "../../../entities/fattribute";import attribute_renderer from "../../../services/attribute_renderer";import FNote from "../../../entities/fnote";@@ -100,6 +100,7 @@ export default function AttributeEditor({ api, note, componentId, notePath, ntxIconst currentValueRef = useRef(currentValue);const wrapperRef = useRef<HTMLDivElement>(null);const editorRef = useRef<CKEditorApi>();+ const [ locale ] = useTriliumOption("locale");const { showTooltip, hideTooltip } = useTooltip(wrapperRef, {trigger: "focus",@@ -308,7 +309,8 @@ export default function AttributeEditor({ api, note, componentId, notePath, ntxItoolbar: { items: [] },placeholder: t("attribute_editor.placeholder"),mention: { feeds: mentionSetup },- licenseKey: "GPL"+ licenseKey: "GPL",+ language: "en"}}onChange={(currentValue) => {currentValueRef.current = currentValue ?? "";diff --git a/apps/client/src/widgets/ribbon/style.css b/apps/client/src/widgets/ribbon/style.cssindex 9adcad69ac..495032457f 100644--- a/apps/client/src/widgets/ribbon/style.css+++ b/apps/client/src/widgets/ribbon/style.css@@ -285,6 +285,11 @@transition: opacity .1s linear;}+body[dir=rtl] .attribute-list-editor {+ padding: 0 5px 0 100px !important;+ text-align: right !important;+}+.attribute-list-editor.ck-content .mention {color: var(--muted-text-color) !important;background: transparent !important;