mirror of
https://github.com/zadam/trilium.git
synced 2025-09-28 17:45:32 +08:00
fix(quick_edit): classic toolbar not shown
This commit is contained in:
parent
c38bf09af0
commit
8deaf22544
2 changed files with 6 additions and 2 deletions
|
@ -30,6 +30,7 @@ import NoteDetailWidget from "../widgets/note_detail.js";
|
|||
import NoteListWidget from "../widgets/note_list.js";
|
||||
import CallToActionDialog from "../widgets/dialogs/call_to_action.jsx";
|
||||
import NoteTitleWidget from "../widgets/note_title.jsx";
|
||||
import FormattingTab from "../widgets/ribbon/FormattingTab.js";
|
||||
|
||||
export function applyModals(rootContainer: RootContainer) {
|
||||
rootContainer
|
||||
|
@ -62,7 +63,7 @@ export function applyModals(rootContainer: RootContainer) {
|
|||
.cssBlock(".title-row > * { margin: 5px; }")
|
||||
.child(<NoteIconWidget />)
|
||||
.child(<NoteTitleWidget />))
|
||||
// .child(new ClassicEditorToolbar())
|
||||
.child(<FormattingTab />)
|
||||
.child(new PromotedAttributesWidget())
|
||||
.child(new NoteDetailWidget())
|
||||
.child(new NoteListWidget(true)))
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { CSSProperties } from "preact/compat";
|
||||
import { useTriliumOption } from "../react/hooks";
|
||||
|
||||
/**
|
||||
* Handles the editing toolbar when the CKEditor is in decoupled mode.
|
||||
|
@ -8,12 +9,14 @@ import { CSSProperties } from "preact/compat";
|
|||
* The ribbon item is active by default for text notes, as long as they are not in read-only mode.
|
||||
*/
|
||||
export default function FormattingTab({ hidden }) {
|
||||
const [ textNoteEditorType ] = useTriliumOption("textNoteEditorType");
|
||||
|
||||
const style: CSSProperties = {};
|
||||
if (hidden) {
|
||||
style.display = "none";
|
||||
}
|
||||
|
||||
return (
|
||||
return (textNoteEditorType === "ckeditor-classic" &&
|
||||
<div className="classic-toolbar-widget" style={style}>
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue