Copied to clipboard

Flag this post as spam?

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


  • MB 97 posts 365 karma points
    Dec 08, 2018 @ 23:30
    MB
    0

    RTE Custom Formats

    Adding to the Formats drop-down of the RTEditor using a custom stylesheet configured from the backkoffice and added to the datatype.

    The formats appear in the dropdown ok, but when selected, are applied to the entire paragraph instead of just the selected text.

    e.g. If myformats.css is configured for the rteditor and the formats drop-down, and it contains a rule: span.red {color:red;}

    When I select some text and apply a format from the drop-down, instead of getting something like:

    This is some text where we have a selected RED TEXT section in the middle

    I actually end up with:

    This is some text where we have a selected RED TEXT section in the middle

    i.e. The entire paragraph containing the selected text has the format applied to it, instead of just the selected text in the paragraph.

    Other styles such as bold, underline, italics, etc, all behave as expected and are only applied to the selected text, but formats are always applied to the entire paragraph the selection is made on.

    Not sure what I'm doing wrong, but would appreciate any suggestions.

  • 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