Want to embed your Riddle quiz, list, or survey to your Drupal site?

It’s super easy to add any of Riddle’s 15 interactive formats to your Drupal site – no plug-in necessary.

Just use our standard embed code – your quiz will be fully responsive, resizing to any size screen from smartphone to desktop.

(IMPT: Please do not use our Drupal plug-in – we didn’t build it. It was developed by the folks over at Thunder.org back in 2017 – but is no longer supported.)

How to embed a quiz in Drupal

Right – let’s dive in.

Please follow these steps to add any of your Riddle quizzes or other content to a Drupal site:

  • Publish your Riddle content.
  • Go to ‘Embed’ and copy our standard embed code.

Two options for Drupal

In Drupal, you have two choices::

  1. Change your full HTML text format according to the screenshot below
  2. Or create a new text format (recommended method)

Option 1: Changing your HTML format

  1. Please make sure to disable all filters – this will keep our Riddle embed code in its original form.
  2. Next, switch the text editor from CKEditor to “None”.
  3. CKEditor will break the Riddle embed code. It will work fine initially but as soon as you save the page again, your Riddle won’t load.
  4. To avoid this, set the editor to “none”

Option 2: Create your own text form (recommended)

  • Add a new text format and name it “Riddle”.
  • Make the same settings as shown above and assign the proper roles who can use this format. P
  • lease note that this format will allow editors to paste Javascript and external HTML, which can be a potential security risk.
  • Make sure to only allow this format for users who are fully trained and aware of the associated risks.

Video: Using the ‘new text format’ method to add a Riddle quiz to Drupal

We whipped up this handy video to show how to create your own text format, then add a Riddle quiz to a Drupal page.

Video transcript:

(We know videos are powerful ways to help with technical ‘how-to’ posts. But we’re big on being an accessible online quiz maker – text transcripts are often easier for some of our users to access. But please excuse any typos – the transcription software we’re using isn’t perfect.)

Hey there I’m Boris. And let me show you how you can add a little content to Drupal.

The first thing you need to do obviously is go to Riddle, have a Riddle quiz published and go to the embed code section on the published screen and get your standard embed code.

So just click here and get that coat. Now, let me first show you how not to do it in Drupal. So if I add content and I’m just going to do a basic page called riddle, and let’s just say going to the source tab where I usually paste my HTML.

So I paste it in here. I click safe and you can see it just converted everything to text.

That’s not working obviously because the standard way Drupal handles HTML just doesn’t work that way. So let’s move this click on source – now paste it in here and go preview and you will see not working.

Okay. So what do you need to do? And this is the best way to do it. Just to lead to all this is go to your configuration and go to your text, formats and editors, add a text format, call it Riddle.

I’m going to limit it to administrators. Very important, set the text editor to none. Don’t use CK editor set it to none. Do not check any of these filters.

Okay. And just click save configuration.

Now, if I go back to my content, here’s my little content. I go edit, delete all this. And, and she was riddle. You’ll see the editor will disappear. I can now paste my content here.

And when I now look at this, here’s the Riddle quiz and it will auto expand and it will to fit the available screen size.

We’ll just push content down and everything will be fully responsive and working. So that’s how you add Riddle to Drupal by creating your own content type.

Now, a quick word on that when you do this, as you can see, here we go.

Configure, you can assign roles that are allowed to you. The best practice would be to create a new role – like ‘Riddle user’ or ‘Drupal editor’ and make sure to train that role.

IMPT: This method lets your team members can paste any kind of HTML and JavaScript that’s executed on your site and they should know what they’re doing. They should be trained that it’s not safe to use anything except for the Riddle embed code with this module.

All right. That’s embedding a Riddle quiz with Drupal using the ‘new text format’ method.

Have fun! Any questions? Please let us know on support – we’re super fast to reply.