mirror of
https://github.com/zadam/trilium.git
synced 2025-11-09 13:21:33 +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 NoteListWidget from "../widgets/note_list.js";
|
||||||
import CallToActionDialog from "../widgets/dialogs/call_to_action.jsx";
|
import CallToActionDialog from "../widgets/dialogs/call_to_action.jsx";
|
||||||
import NoteTitleWidget from "../widgets/note_title.jsx";
|
import NoteTitleWidget from "../widgets/note_title.jsx";
|
||||||
|
import FormattingTab from "../widgets/ribbon/FormattingTab.js";
|
||||||
|
|
||||||
export function applyModals(rootContainer: RootContainer) {
|
export function applyModals(rootContainer: RootContainer) {
|
||||||
rootContainer
|
rootContainer
|
||||||
|
|
@ -62,7 +63,7 @@ export function applyModals(rootContainer: RootContainer) {
|
||||||
.cssBlock(".title-row > * { margin: 5px; }")
|
.cssBlock(".title-row > * { margin: 5px; }")
|
||||||
.child(<NoteIconWidget />)
|
.child(<NoteIconWidget />)
|
||||||
.child(<NoteTitleWidget />))
|
.child(<NoteTitleWidget />))
|
||||||
// .child(new ClassicEditorToolbar())
|
.child(<FormattingTab />)
|
||||||
.child(new PromotedAttributesWidget())
|
.child(new PromotedAttributesWidget())
|
||||||
.child(new NoteDetailWidget())
|
.child(new NoteDetailWidget())
|
||||||
.child(new NoteListWidget(true)))
|
.child(new NoteListWidget(true)))
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { CSSProperties } from "preact/compat";
|
import { CSSProperties } from "preact/compat";
|
||||||
|
import { useTriliumOption } from "../react/hooks";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the editing toolbar when the CKEditor is in decoupled mode.
|
* 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.
|
* 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 }) {
|
export default function FormattingTab({ hidden }) {
|
||||||
|
const [ textNoteEditorType ] = useTriliumOption("textNoteEditorType");
|
||||||
|
|
||||||
const style: CSSProperties = {};
|
const style: CSSProperties = {};
|
||||||
if (hidden) {
|
if (hidden) {
|
||||||
style.display = "none";
|
style.display = "none";
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (textNoteEditorType === "ckeditor-classic" &&
|
||||||
<div className="classic-toolbar-widget" style={style}>
|
<div className="classic-toolbar-widget" style={style}>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue