Not possible to inline Macro in Rich Text Editor #13564
Replies: 5 comments 6 replies
-
Hi @jomehmet - thank you for raising this 😄 As you have already gathered, macros are considered "blocks" of content at this point, which is why you see the surrounding text being split into two paragraphs around the inserted macro. I will convert this feature request to a discussion, so we can have the community weigh in on it. In the mean time I would encourage you to have a look at macro parameters. These are meant as editorial input to the macro rendering. In your case a "Text before" and a "Text after" parameter might do the trick. |
Beta Was this translation helpful? Give feedback.
-
@kjac I created a PR for this and hope you can prioritize it as it has a big impact for the content editors in our organization, and hopefully for others as well 😊 |
Beta Was this translation helpful? Give feedback.
-
I'm coming across essentially the same need, and I think there is value in it. However with #13628 I'm wondering would a more flexible approach be to instead of having a global setting across your entire installation for every macro, instead extend the editor properties (see image) on macros with an additional option so each macro can specify whether it renders itself as inline or block within the content? |
Beta Was this translation helpful? Give feedback.
-
Hello @jomehmet , Thanks for raising this point. I see the usage of this possibility as well 😉 I had a look at your PR and I would agree with @Nysosis that changing the behavior for all macro's or none through an application settings will probably not be flexible enough to get into the core. I think it also means that, if you enable this for one specific macro, you will need to manually update the HTML to create back the necessary div's for all the other macro's that you might be using elsewhere, which could be quite tedious. If I may ask you a question; on your first screenshot on top, your initial idea seemed to be the same as @Nysosis 's, being the fact to add an extra property on the macro editor's settings. So I was wondering what made you change the implementation from your initial plan? I see this is your first contribution, so if maybe you need some tips or info on how to get this extra property in there, the documentation or the forum might be your friend 😉 Cheers! |
Beta Was this translation helpful? Give feedback.
-
This has been merged into the V11 contrib branch via #13628 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
10.3.2
Bug summary
I'm working for a bank where the use case is to have the current interest as variables in a text.
I've set up a Macro that renders a property of a selected Content node.
The problem is that we want the output rendered inside a sentence.
The macro plugin from Umbraco in tinymce inserts a placeholder for the macro in a div,
and since div is not allowed inside a p, tinymce splits the text into three elements spread on three lines.
Example Text output to the customer:
The current interest is 4.5% and will stay the whole year.
Wantet behaviour in the Rich Text Editor when inserting the macro:
The current interest is {MacoCurrentInterest} and will stay the whole year.
The current behaviour in the Rich Text Editor when the macro is inserted:
The current interest is
{MacoCurrentInterest}
and will stay the whole year.
Specifics
I propose a editor setting per. macro, as there are different need on different macros. See sketch:

Steps to reproduce
Expected result / actual result
As-is:

The sentence is now on three lines, split into
paragraph
macro
paragraph
Expected:

The sentence is on one line with just one paragraph with the macro markup inside it.
Beta Was this translation helpful? Give feedback.
All reactions