Skip to content

fix(169): correct creating command in menu#196

Merged
unknownproperty merged 2 commits into
mainfrom
169
Jun 21, 2026
Merged

fix(169): correct creating command in menu#196
unknownproperty merged 2 commits into
mainfrom
169

Conversation

@ElizavetaAbramova

Copy link
Copy Markdown
Contributor

В меню по клику на "Текст"б "Заголовок 1" и тд менялся тип у текущего текстового блока. Теперь создается новый с выбранным типом под текущим

@github-actions

Copy link
Copy Markdown
Name Status Preview
xi.web ✔️Success✔️ Visit Preview

@unknownproperty unknownproperty left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Всё хорошо, но стоит убрать консоли


const currentBlock = getCurrentBlock(editor, activeBlock);
console.log(activeBlock, currentBlock);
console.log(activeBlock?.node?.attrs['id']);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут что-то осталось лишнее


try {
const { doc } = editor.state;
console.log('in wrapper', id);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут консоль

const nodeId = node.attrs?.['id'] ?? node.attrs?.id;
if (nodeId === id && node.isBlock) {
found = { editor, node, pos: nodePos };
console.log(nodePos);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

И тут

@unknownproperty unknownproperty merged commit e14cc4c into main Jun 21, 2026
6 checks passed
@unknownproperty unknownproperty deleted the 169 branch June 21, 2026 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants