mirror of
https://github.com/zadam/trilium.git
synced 2025-10-19 22:58:52 +02:00
feat(client/rtl): improve alignment of the attribute editor
This commit is contained in:
parent
74d7191222
commit
f4df7c1eec
@ -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, ntxI
|
||||
const 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, ntxI
|
||||
toolbar: { items: [] },
|
||||
placeholder: t("attribute_editor.placeholder"),
|
||||
mention: { feeds: mentionSetup },
|
||||
licenseKey: "GPL"
|
||||
licenseKey: "GPL",
|
||||
language: "en"
|
||||
}}
|
||||
onChange={(currentValue) => {
|
||||
currentValueRef.current = currentValue ?? "";
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user