Copied to clipboard

Flag this post as spam?

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


  • Dmitriy 168 posts 588 karma points
    Dec 05, 2018 @ 14:36
    Dmitriy
    0

    RTE (TinyMCE) styles applies to entire block

    Hello, Umbracians

    There is a problem with custom styles in RTE. Everysthing is ok, when you try to apply simple style to selected text, but if style is more complex, it applies to entire block (paragraph).

    For example, I have a simple custome style for RTE: enter image description here

    and I want to apply it to an <a> element, and that what I got: enter image description here

    But why? Why selected text just does't wraps into custom element?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Dec 05, 2018 @ 20:41
    Jan Skovgaard
    1

    Hi Dmitriy

    What does the outputted HTML look like? Can you perhaps please post a snippet?

    The RTE can be a bit tricky with custom style options sometimes but what you're trying to do should be possible.

    /Jan

  • Dmitriy 168 posts 588 karma points
    Dec 06, 2018 @ 08:38
    Dmitriy
    0

    Here:

    <p><a class="button-default">This is a button Cras consequat aliquet consectetur. </a></p>
    

    And another strange behavior - if I apply custom class like a.button-default to a link, it does't work, but if not, it transforms entire text block int a.button-default

    But style like simple .button-default (without tag) applying this way on:

    <p><a href="/123"><span class="button-default">Button</span></a> Some text</p>
    
Please Sign in or register to post replies

Write your reply to:

Draft