mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 02:52:27 +08:00
style(ckeditor5/codeblock): limit language selector height
This commit is contained in:
parent
622d026efc
commit
4752db6bc5
@ -1,4 +1,5 @@
|
|||||||
import "ckeditor5/ckeditor5.css";
|
import "ckeditor5/ckeditor5.css";
|
||||||
|
import "./theme/code_block_toolbar.css";
|
||||||
import { COMMON_PLUGINS, CORE_PLUGINS, POPUP_EDITOR_PLUGINS } from "./plugins";
|
import { COMMON_PLUGINS, CORE_PLUGINS, POPUP_EDITOR_PLUGINS } from "./plugins";
|
||||||
import { BalloonEditor, DecoupledEditor, FindAndReplaceEditing, FindCommand } from "ckeditor5";
|
import { BalloonEditor, DecoupledEditor, FindAndReplaceEditing, FindCommand } from "ckeditor5";
|
||||||
export { EditorWatchdog } from "ckeditor5";
|
export { EditorWatchdog } from "ckeditor5";
|
||||||
|
@ -18,6 +18,7 @@ export default class CodeBlockToolbar extends Plugin {
|
|||||||
"|",
|
"|",
|
||||||
"copyToClipboard"
|
"copyToClipboard"
|
||||||
],
|
],
|
||||||
|
balloonClassName: "ck-toolbar-container codeblock-language-list",
|
||||||
getRelatedElement(selection) {
|
getRelatedElement(selection) {
|
||||||
const selectionPosition = selection.getFirstPosition();
|
const selectionPosition = selection.getFirstPosition();
|
||||||
if (!selectionPosition) {
|
if (!selectionPosition) {
|
||||||
|
4
packages/ckeditor5/src/theme/code_block_toolbar.css
Normal file
4
packages/ckeditor5/src/theme/code_block_toolbar.css
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
.ck.ck-balloon-panel.codeblock-language-list .ck-dropdown__panel {
|
||||||
|
max-height: 300px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user