enhance(mobile): add code block icon to toolbar

pull/3678/head^2
leizhe 2022-01-04 14:42:57 +08:00 committed by Andelf
parent 75807c2689
commit 4ede1dee37
2 changed files with 13 additions and 1 deletions

View File

@ -373,6 +373,18 @@
(history/redo! e))}
(ui/icon "rotate-clockwise"
{:style {:fontSize ui/icon-size}})]]
[:div
[:button.bottom-action
{:on-mouse-down (fn [e]
(util/stop e)
(commands/simple-insert!
parent-id "<"
{:check-fn (fn [_]
(commands/block-commands-map))})
(when-let [input (gdom/getElement parent-id)]
(.focus input)))}
(ui/icon "code"
{:style {:fontSize ui/icon-size}})]]
[:div
[:button.bottom-action
{:on-mouse-down (fn [e]

View File

@ -16,7 +16,7 @@
display: flex;
left: auto;
right: 0;
margin-top: 4px;
/* margin-top: 4px; */
z-index: 9999;
}