Copied to clipboard

Flag this post as spam?

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


  • Dmitriy 112 posts 423 karma points
    6 days ago
    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 11163 posts 22953 karma points MVP 5x admin c-trib
    5 days ago
    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 112 posts 423 karma points
    5 days ago
    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