• Resolved amdark

    (@amdark)


    Hi, I’m loving the plugin, congratulations on the great job.
    I would like to insert images right after the question text, this is necessary for educational questions where there is a graphic or image that is part of the question. How could you proceed to insert the image right after the text and before the answers?

Viewing 15 replies - 1 through 15 (of 23 total)
  • Plugin Author Harmonic Design

    (@harmonic_design)

    Hi Amdark,
    you cannot add an image right after the question text, but you can add an image just before by setting a question featured image (can be found on the “extra” tab when editing a question).

    If however, you absolutely need the image to be below the question text, then I have some good news for you. This version of HD Quiz was converted over to CSS grid, which allows us to do some pretty cool things!

    You can add the following CSS to your theme’s style.css file to change the order of the question text and featured image.

    
    .hdq_question[data-type="multiple_choice_text"] {
        display: grid;    
        grid-template-columns: 1fr;
    }
    
    .hdq_question[data-type="multiple_choice_text"] h3.hdq_question_heading {
        order: 1
    }
    
    .hdq_question[data-type="multiple_choice_text"] .hdq_question_featured_image {
        order: 2;
    }
    
    .hdq_question[data-type="multiple_choice_text"] .hdq_row {
        order: 3;
    }
    
    .hdq_question[data-type="multiple_choice_text"] .hdq_question_after_text {
        order: 4
    }
    

    Just please note that this code will only work with the default multiple choice question type.

    Thread Starter amdark

    (@amdark)

    Hello,
    Thank you very much for your help, I’ll take the test and as soon as possible I’ll comment. But there is a suggestion for further implementation in the plugin.

    Thread Starter amdark

    (@amdark)

    Hello,
    I inserted the css code and it worked. The image is now displayed below the text and before the answer alternatives.

    It ended up being enlarged to a very large size, how could you proceed to have it displayed in its original size?

    Plugin Author Harmonic Design

    (@harmonic_design)

    Please send a link to a quiz and I’ll take a look. Featured image size is handled by your theme, so I’ll need to see a live example in order to write some CSS that will work specifically for you

    Thread Starter amdark

    (@amdark)

    Thank you for your attention.
    https://focanosestudos.com.br/uncategorized/hello-world/

    This site is for testing only, but the main one on which I will implement the Quiz uses the same theme.

    Plugin Author Harmonic Design

    (@harmonic_design)

    Thanks for sending. The issue is that your chosen image is super small. This version of HD Quiz makes the image fit the width of the quiz, which looks better for most users.

    If you add the following CSS to your stylesheet again, it will make is to that the image keeps its original size.

    
    .hdq_quiz .hdq_featured_image {
        width: inherit;
        margin: 0 auto;
    }
    
    Thread Starter amdark

    (@amdark)

    It worked super sure.
    Thank you very much for your attention and congratulations on this excellent plugin.

    Thread Starter amdark

    (@amdark)

    I noticed another little problem.
    I have an educational website. To help people who want to get into college. I provide lists with simulations of various subjects. These mockups are selected from previous evaluations of some universities.
    I always made them available in text format, now I’d like to increase the quizzes.

    Some questions are asked in the order of:
    Text
    Image
    Text
    Answers

    The changes made yesterday helped in some issues but in others I still can’t insert them because there is text after the image too.
    You will not be able to create the text field of the issue more complete as the field:
    Text that appears if the user got the question wrong

    It would be excellent because it would allow me to create the issues in the way I like.

    Plugin Author Harmonic Design

    (@harmonic_design)

    Hi amdark,
    sorry, but you lost me here. What is the issue?

    Thread Starter amdark

    (@amdark)

    Sorry for my English.
    I need to create questions with text, images and text again. It would be possible for an editor to write the most complete questions. Like what is present in “extra” and “Text that appears if the user got the question wrong”? So it is possible to put bold, italic and more images in the description of the question.

    Plugin Author Harmonic Design

    (@harmonic_design)

    Oooh. You mean for the question title, you want to add extra formatting?

    If so then yes; but with some limitations.

    For both the question and the answers, you can add some basic HTML markup to do some basic stuff. I am still sanitizing most HTML for security – so no adding images to question titles. I doubt I will ever allow these fields to be full editors because of loading that many editors on a single page would cause a lot of problems – far more than it’s worth.

    The following tags are allowed to be used.

    • strong – bold text
    • em – italics
    • code
    • sup – superscript
    • sub – subscript

    let me know if a formatting element you need is not listed and I can see about adding it.

    In case you’ve never done basic HTML before, here is an example of how to use it.

    What you type into the question title:
    This is a question with <strong>bold text</strong> that stands out.
    How it will look:
    This is a question with bold text that stands out.

    Also, just in case you didn’t know, but there is also a different question type called “Multiple Choice: Image” that will allow you to use Images as well for the answers (note: if you decide to use this question type, let me know. I’ll need to send you some more CSS to change the title/featured image order for this question type as well).

    Thread Starter amdark

    (@amdark)

    Here’s an example of what I want to sign up for:

    View post on imgur.com

    wouldn’t it be possible to bring this text editing box to the creation part of the questions? It would be more useful there because it would allow greater editing freedom, as well as allowing you to insert images and texts in any way you like

    View post on imgur.com

    Plugin Author Harmonic Design

    (@harmonic_design)

    Thanks for the example. I now fully understand the goal here.

    So first, yes – it IS possible to make the question title a full editor, but this is a change I will likely never make as in most cases it would cause more harm than good for most users. For users that do need to add some extra formatting to the question title, they can use the basic HTML tags to bold or italic text and more.

    However, you need something that from what I’ve seen with 6000+ active users – is actually pretty unique! You want to be able to add images to the question title itself with the featured image option not being good enough for you in some cases.

    If this is something that you absolutely can’t do without, please let me know. There IS a way to get what you want, but it requires some workarounds. It won’t be the most intuitive solution in the world, but it should work for your needs.

    Thread Starter amdark

    (@amdark)

    I believe that I will not be able to include some questions without the full editor. But I will try to edit as many questions as possible.

    I thank you very much for your attention to my case. Congratulations on the great work

    Plugin Author Harmonic Design

    (@harmonic_design)

    No problem.

    and please let me know if you end up still needing this and I can send instructions. It’s just better to not need it if possible since it involves making a small edit to the plugin directly.

Viewing 15 replies - 1 through 15 (of 23 total)

The topic ‘Image below the question text’ is closed to new replies.