mirror of
https://github.com/ytliu74/obsidian-pseudocode.git
synced 2026-07-22 07:40:25 +00:00
feat: implement click-edit
This commit is contained in:
parent
d677e7a5d2
commit
1acc571cae
1 changed files with 4 additions and 1 deletions
5
main.ts
5
main.ts
|
|
@ -29,7 +29,10 @@ export default class PseudocodePlugin extends Plugin {
|
|||
): Promise<any> {
|
||||
const blockDiv = el.createDiv({ cls: "pseudocode-block" });
|
||||
const blockWidth = this.settings.blockSize;
|
||||
blockDiv.style.width = `${blockWidth}em`;
|
||||
blockDiv.style.width = `${blockWidth}em`;;
|
||||
blockDiv.addEventListener("click", (event) => {
|
||||
((event.target as HTMLElement).closest('.pseudocode-block')!.parentElement!.parentElement!.querySelector('.edit-block-button') as HTMLElement)!.click();
|
||||
});
|
||||
|
||||
// Extract inline macros
|
||||
const [inlineMacros, nonMacroLines] = extractInlineMacros(source);
|
||||
|
|
|
|||
Loading…
Reference in a new issue