Copied to clipboard

Flag this post as spam?

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


  • David Hutson 48 posts 379 karma points
    Jul 26, 2016 @ 12:23
    David Hutson
    0

    TinyMCE - Duplicating previous lines content - html structure and attributes

    My first post here so apologies if I miss anything obvious. I am running v 7.4.3 OTB

    My issue is that in the RTE if I edit the html to include a custom class or nested structure when I hit return to go the next line TinyMCE includes the html and attributes from above in the next line.

    e.g. if i modify the html to include the class and text below then hit return the source code looks like this:

    <p class="hello-world">lorem ipsum</p>
    <p class="hello-world"></p>
    

    Is this the expected behaviour?

    If it is can it be turned off and how?

    My real world example is that I want to create a plugin to create links with extra classes for styling but I don't want this styling to be persisted if I hit return to write content on a new line.

    If it is the normal behaviour one way round it could be to call the remove formatting button / function beforehand but I'm not sure what this call would look like?

    Thanks for reading :)

  • David Hutson 48 posts 379 karma points
    Jul 29, 2016 @ 11:53
    David Hutson
    0

    This appears to be the expected behaviour of TinyMCE, it's not a bug but a feature.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies