Comments (6)
@werty77 I just stumbled upon this plugin and started tinkering around with it for this very reason. Haven't figured out a solution yet.
My js skills aren't too strong, but when I glanced at personalityQuiz.js and it seems to me that function appendPersonality
should allow for html in the body.
$description = createIf(hasDescription, '<p>', {
'html': personality.description
});
So, my guess is that it is either being escaped elsewhere or I just really suck at js.
Speaking of features, it's also really too bad this isn't LRS dependent/xAPI enabled...
from h5p-personality-quiz.
@nlile Thanks for taking the time to write. I think you're right it's probably somewhere in the main plugin https://github.com/h5p/h5p-wordpress-plugin . I have tried to look around but I don't know much about js so i don't really know where to start looking. Thanks again for taking the time to reply.
from h5p-personality-quiz.
I believe changing the description widget to 'html' instead of 'textarea' should do the trick.
The safest way to do this is probably to implement this action in your theme or a custom plugin:
https://github.com/h5p/h5pmods-wordpress-plugin/blob/master/h5pmods.php#L44
from h5p-personality-quiz.
@icc I tested that. It changes the backend editor to allow HTML, but the quiz output is still just text. (I also removed the maxLength
because it isn't supported by HTML, but nothing changed.)
from h5p-personality-quiz.
@werty77 Got it to work after checking some other H5P types. In addition to changing 'textarea' to 'html' (here thank you @icc), you need to append a list of HTML tags you want to access. For instance:
```
"widget": "html",
"tags": [
"strong",
"em",
"a",
"ul",
"ol",
"hr"
]
from h5p-personality-quiz.
@nlile
Awesome that you got it to work. I've removed maxlength and changed
"widget": "textarea"
to:
"widget": "html",
"tags": [
"strong",
"em",
"a",
"ul",
"ol",
"hr"
]
It still doesn't allow any of the tags and only outputs text.
Did you do anything else to get it to work?
from h5p-personality-quiz.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from h5p-personality-quiz.