Added wysiwyg support to title field.

pull/2/head
Frode Petterson 2015-09-25 11:13:05 +02:00
parent 439f850729
commit b00490bbe6
3 changed files with 11 additions and 10 deletions

View File

@ -61,16 +61,21 @@
line-height: 2em;
font-weight: bold;
text-align: center;
margin-top: 0.5em;
}
.intro-page .title > span {
.intro-page .title > div {
display: inline-block;
padding: 0.125em 0.5em;
border-radius: 0.125em;
background: rgb(255,255,255); /* Fallback for browsers not supporting rgba */
background: rgba(255,255,255,0.8); /* Gives WCAG contrast ratio of 5.6:1 with the current font color */
}
.intro-page .title > div p {
margin: 0;
}
.intro-page .introduction {
font-size: 1.25em;
margin: 0 1em;
margin: 0.5em 1em 0;
border-radius: 0.25em;
background: rgb(255,255,255); /* Fallback for browsers not supporting rgba */
background: rgba(255,255,255,0.8); /* Gives WCAG contrast ratio of 5.6:1 with the current font color */

View File

@ -23,7 +23,7 @@ H5P.QuestionSet = function (options, contentId) {
'<% if (introPage.showIntroPage) { %>' +
'<div class="intro-page">' +
' <% if (introPage.title) { %>' +
' <div class="title"><span><%= introPage.title %></span></div>' +
' <div class="title"><div><%= introPage.title %></div></div>' +
' <% } %>' +
' <% if (introPage.introduction) { %>' +
' <div class="introduction"><%= introPage.introduction %></div>' +

View File

@ -12,15 +12,11 @@
{
"name": "title",
"type": "text",
"widget": "html",
"tags": ["p", "br", "strong", "em"],
"label": "Title",
"optional": true,
"description": "This title will be displayed above the introduction text.",
"tags": [
"sub",
"sup",
"strong",
"em"
]
"description": "This title will be displayed above the introduction text."
},
{
"name": "introduction",