Was wondering if there is known bug when you place a macro within the RTE and you press enter to add some content under the macro it just keeps adding more duplicate macros.
Working with macros in RTE has historically been troublesome. Theres some great improvements in the later versions.
I have some 6.x.x sites too, were my recommendations were to add some linebreaks after the place you put your macro, before inserting the macro. That way you can still add content without getting tangled inside the macrocontainer.
This hasn't been a problem in 7.6 and upwards (maybe even before), the coming of grid, Archetype, Nested Content etc has limited my need for using macros :)
A colleague added two extra options to the RTE toolbar. One to insert an extra paragraph at the top of the content area, and another to insert an extra paragraph at the bottom, which helps if the first or last item is a macro.
The code is here
tinymce.PluginManager.add('addleadingparagraph', function (editor) {
editor.addButton('addleadingparagraph', {
icon: 'custom icon-navigation-top',
tooltip: 'Inserts empty paragraph at top',
onclick: function () {
editor.setContent('<p></p>' + editor.getContent());
}
});
});
Help on how to make amendments to the RTE are here: (note we're on version 7.5.14)
RTE Macros
Hi
Was wondering if there is known bug when you place a macro within the RTE and you press enter to add some content under the macro it just keeps adding more duplicate macros.
Cheers
Chris
Hi Chris
What version of Umbraco are you using?
/Alex
Hi Alex,
This project is in 6.1.6
Chris.
Could be that the HTML is rendered dynamically/malformed causing the RTE to duplicate instead of adding a return.
Check your Macro's HTML, see if that's the issue.
Working with macros in RTE has historically been troublesome. Theres some great improvements in the later versions.
I have some 6.x.x sites too, were my recommendations were to add some linebreaks after the place you put your macro, before inserting the macro. That way you can still add content without getting tangled inside the macrocontainer.
This hasn't been a problem in 7.6 and upwards (maybe even before), the coming of grid, Archetype, Nested Content etc has limited my need for using macros :)
yea i have heard macros have been troublesome, especially in older versions.
I will probably go with adding line breaks before inserting the macro that works a treat.
I have checked that the html hasn't malformed btw.
Cheers
Chris
A colleague added two extra options to the RTE toolbar. One to insert an extra paragraph at the top of the content area, and another to insert an extra paragraph at the bottom, which helps if the first or last item is a macro.
The code is here
Help on how to make amendments to the RTE are here: (note we're on version 7.5.14)
https://our.umbraco.org/forum/developers/extending-umbraco/53150-How-to-add-custom-button-to-RTE
is working on a reply...