Custom rendered class

Custom rendered class

klinglerklingler Posts: 90Questions: 42Answers: 2
edited May 2022 in Editor

Good afternoon (o;

As I was able to modify the rendered class for my purpose to nicely display 5 uploaded images in the edit dialog but now I have the problem that with a single image upload it doesn't display it nicely (o;

Can I supply somehow the editor to use a custom class instead of class="rendered" ?

thanks in advance
richard

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    What rendered class? Can you point me to an example showing that please? Most likely yes, it can be customised.

    Allan

  • klinglerklingler Posts: 90Questions: 42Answers: 2

    Hello Allan

    I had to modify the .rendered css so it would fit 5 images nicely in the dialog:

    So i added this in my CSS:

    .rendered {
    margin-left: -250px;
    margin-top: 20px;
    }

    .rendered img {
    width: 150px;
    padding-left: 10px;
    box-shadow: 5px 5px 3px 1px rgba(0, 0, 0, 0.2);
    }

    Now with a regular dialog where only one picture should be uploaded I need to reset that applied CSS styles as it looks like this:

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    Many thanks for the clarification. Unfortunately, no. That is one area where we don't have a configuration option for the class name. Targetting it using your custom CSS would be the way to do it.

    Allan

  • klinglerklingler Posts: 90Questions: 42Answers: 2

    Well I use a little php snippet in the HTMLs head section to check for a specific URI and then reset those css styles:

    <?php
        if($_GET['type'] == 'bilder')
        {
            ?>
    <style>
        .rendered {
            margin-left: 0px;
            margin-top: 0px;
        }
        .rendered img {
            width: 150px;
            padding-left: 10px;
            box-shadow: 5px 5px 3px 1px rgba(0, 0, 0, 0.2);
        }
    </style>
            <?php
        }
    ?>
    
Sign In or Register to comment.