Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chris Seager 16 posts 107 karma points
    Jan 26, 2018 @ 11:10
    Chris Seager
    0

    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.

    Potentialbug

    Cheers

    Chris

  • Alex Skrypnyk 6133 posts 23952 karma points MVP 7x admin c-trib
    Jan 26, 2018 @ 11:11
    Alex Skrypnyk
    0

    Hi Chris

    What version of Umbraco are you using?

    /Alex

  • Chris Seager 16 posts 107 karma points
    Jan 26, 2018 @ 11:13
    Chris Seager
    0

    Hi Alex,

    This project is in 6.1.6

    Chris.

  • Mark 91 posts -18 karma points
    Jan 26, 2018 @ 11:15
    Mark
    0

    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.

  • Søren Kottal 702 posts 4497 karma points MVP 5x c-trib
    Jan 26, 2018 @ 11:19
    Søren Kottal
    100

    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 :)

  • Chris Seager 16 posts 107 karma points
    Jan 26, 2018 @ 11:31
    Chris Seager
    0

    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

  • MuirisOG 382 posts 1284 karma points
    Jan 26, 2018 @ 14:18
    MuirisOG
    0

    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)

    https://our.umbraco.org/forum/developers/extending-umbraco/53150-How-to-add-custom-button-to-RTE

Please Sign in or register to post replies

Write your reply to:

Draft