mirror of
https://github.com/docmost/docmost.git
synced 2025-11-13 03:22:38 +10:00
feat: nested toggle block (#671)
* feat: nested toggle block * fix: md export * fix detailsButton icon alignment --------- Co-authored-by: Philipinho <16838612+Philipinho@users.noreply.github.com>
This commit is contained in:
@ -247,7 +247,7 @@ const CommandGroups: SlashMenuGroupedItemsType = {
|
||||
searchTerms: ["collapsible", "block", "toggle", "details", "expand"],
|
||||
icon: IconCaretRightFilled,
|
||||
command: ({ editor, range }: CommandProps) =>
|
||||
editor.chain().focus().deleteRange(range).toggleDetails().run(),
|
||||
editor.chain().focus().deleteRange(range).setDetails().run(),
|
||||
},
|
||||
{
|
||||
title: "Callout",
|
||||
|
||||
@ -53,24 +53,22 @@
|
||||
padding: 4px;
|
||||
word-break: break-word;
|
||||
overflow-wrap: break-word;
|
||||
|
||||
[data-type="detailsContent"] {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&[open] {
|
||||
[data-type="detailsButton"] {
|
||||
.ProseMirror-icon {
|
||||
transform: rotateZ(90deg);
|
||||
}
|
||||
}
|
||||
|
||||
[data-type="detailsContainer"] {
|
||||
[data-type="detailsContent"] {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[data-type="details"] > [data-type="detailsContainer"] > [data-type="detailsContent"]{
|
||||
display: none;
|
||||
}
|
||||
|
||||
[data-type="details"][open] > [data-type="detailsContainer"] > [data-type="detailsContent"]{
|
||||
display: block;
|
||||
}
|
||||
|
||||
[data-type="details"][open] > [data-type="detailsButton"] {
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
[data-type="details"][open] > [data-type="detailsButton"] .ProseMirror-icon{
|
||||
transform: rotateZ(90deg);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user