mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-14 20:58:51 +01:00
This commit is contained in:
parent
cec9a2520f
commit
135c80fcb2
15 changed files with 30 additions and 0 deletions
|
|
@ -380,6 +380,22 @@ const editKeydown = (app: App, event: KeyboardEvent) => {
|
|||
updateReadonly(protyle.breadcrumb.element.parentElement.querySelector('.block__icon[data-type="readonly"]'), protyle);
|
||||
return true;
|
||||
}
|
||||
if (matchHotKey(window.siyuan.config.keymap.editor.general.switchAdjust.custom, event)) {
|
||||
event.preventDefault();
|
||||
let fullWidth;
|
||||
const adjustWidth = protyle.wysiwyg.element.getAttribute(Constants.CUSTOM_SY_FULLWIDTH)
|
||||
if (!adjustWidth) {
|
||||
fullWidth = window.siyuan.config.editor.fullWidth ? "false" : "true";
|
||||
} else {
|
||||
fullWidth = adjustWidth === "true" ? "false" : "true";
|
||||
}
|
||||
fetchPost("/api/attr/setBlockAttrs", {
|
||||
id: protyle.block.rootID,
|
||||
attrs: {[Constants.CUSTOM_SY_FULLWIDTH]: fullWidth}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
if (matchHotKey(window.siyuan.config.keymap.editor.general.backlinks.custom, event)) {
|
||||
event.preventDefault();
|
||||
if (range) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue