Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macro is not recognized when clicking it in an editor #8384

Open
ashklianko opened this issue Feb 19, 2025 · 2 comments · May be fixed by #8443
Open

Macro is not recognized when clicking it in an editor #8384

ashklianko opened this issue Feb 19, 2025 · 2 comments · May be fixed by #8443
Assignees
Labels
Bug Something isn't working
Milestone

Comments

@ashklianko
Copy link
Member

Use "factbox" macro in intro/movie app and add some html in the body, then insert it into an editor: clicking or selecting inserted macro doesn't toggle "macro" button in toolbar

@ashklianko ashklianko added the Bug Something isn't working label Feb 19, 2025
@ashklianko ashklianko self-assigned this Feb 19, 2025
@alansemenov alansemenov changed the title Macro with body is not seen as macro Double-click on a macro inside the editor won't open the Macro dialog Feb 20, 2025
@alansemenov alansemenov moved this from Backlog to Current Sprint in Customer Experience 2 Feb 20, 2025
@alansemenov alansemenov added this to the 5.3.0 milestone Feb 20, 2025
@ashklianko ashklianko moved this from Current Sprint to In Progress in Customer Experience 2 Feb 24, 2025
@ashklianko ashklianko changed the title Double-click on a macro inside the editor won't open the Macro dialog Macro is not recognized when clicking it in an edior Feb 25, 2025
@ashklianko ashklianko changed the title Macro is not recognized when clicking it in an edior Macro is not recognized when clicking it in an editor Feb 25, 2025
@ashklianko
Copy link
Member Author

Will postpone it a bit, too many details to take into account so can be error prone, going to continue after other bugs solved

@ashklianko ashklianko moved this from In Progress to Current Sprint in Customer Experience 2 Feb 25, 2025
@ashklianko ashklianko moved this from Current Sprint to In Progress in Customer Experience 2 Feb 25, 2025
@ashklianko
Copy link
Member Author

ashklianko commented Feb 26, 2025

Macros with a body can be split by editor if macro's body contains block elements, thus we get macro that is not located within one element, but now is scattered through a set of elements. Example from a fact box macro:

<p>need to say also that [factbox header="Fact Box"]</p>

<p>Macro body</p>

<ul>
	<li>still macro body, but in a list</li>
	<li>still macro body, but in a list</li>
</ul>

<p>Also macro body</p>

<p>[/factbox]</p>

Challenges:

  • identify that clicked position is within some macro, that requires traversing tree around
  • correctly extracting macro's top and bottom headers and it's body that may consist of multiple elements
  • calculating exact location of macro in editor so it can be accurately replaced after updating macro in the Insert Macro dialog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

2 participants