Editor issues
Submitted by borisvmalysh on Fri, 12/23/2016 - 14:34
Forums:
First, let me thank the team! You guyes RULE!!!
But there are a couple of cuestions I'm having lately:
1 - can I change the font size and arrange the text more freely in a fill-in or drag&drop text activity?
2 - is there a way to embed code into an activity right in the editor?
Like when in moodle you have the "<>" button which opens the html editor for the text.
Again, thank you ladies and gentlemen!
thomasmars
Tue, 12/27/2016 - 09:36
Permalink
Hi,
I'm glad you're enjoying H5P :)
1) You are restricted to only textual layout changes for "Fill in the Blanks" and "Drag Text". If you have some experience writing css you can modify the css yourself, have a look at the css guide. If you have more advanced needs the "Drag and Drop" may satisfy them, but be aware that its editor is quite a bit more complex.
2) It is not possible to embed code into an activity, this is mainly for security reasons, we don't want arbitrary code to be runnable when viewing an H5P
Thanks for the praise, let us know if you run into any other problems, and feel free to create a pull request for #1 issue or post it as a feature request in our other forum with a specification on how you would like for it to work.
- Thomas
borisvmalysh
Fri, 01/06/2017 - 02:56
Permalink
The code issue
Happy new year everybody!!! And mery christmas (both catholic and orthodox)!
By code I meant HTML. But in the HTML code you can also build in CSS and JS. And I wanted to use this.
The idea I have is timed demonstration of words to memorize and passing the words to fill-in boxes (with variables). This requieres JS code embedded.
Well... If the creators think of the code as a potential threat I can only be sorry. But still very thankful for the work done. Because even with limited functional H5V rules ))
thomasmars
Fri, 01/06/2017 - 10:00
Permalink
Hi, there might be merit to
Hi, there might be merit to allowing HTML tags, or at least a subset of HTML at some point. I don't think this is a prioritation though, but you can always make a feature request for it in the forums so a developer is more likely to pick it up.
I don't think arbitrary JS will be allowed in H5Ps, since the sharable nature of H5P has too much potential to be abused. The security implications are too high. Consider a malicious author creating an H5P on his site and shares it with multiple other sites. The H5P with the malicious script can be downloaded and re-used by author sites, and thus passed around to even more sites. The malicious script is run on all clients that opens the H5P.
If you had a specific feature in mind for a content type then pull requests for the given content type is encouraged. If you want to create an addon/script just for yourself then you can use the built-in hooks for extending H5Ps. You can learn more about this in the Drupal hooks and Wordpress hooks and the developer documentation.
Happy new year,
Thomas
papi Jo
Tue, 12/27/2016 - 11:21
Permalink
By "code" I think
By "code" I think borisvmalysh means HTML tags. It would help us understand his question if boris gave examples of which kind of HTML tags he would like to use in his texts.
hakangur
Fri, 12/30/2016 - 16:39
Permalink
"Code" issue
For example, I would love to be able to add <div style="max-height: 400px; overflow-y: scroll;">TEXT</div> for long passages in the Question Set.
thomasmars
Mon, 01/02/2017 - 10:12
Permalink
Hi,
In the editors where CKEditor is used it should be possible to paste in html code, however it might have certain tag and style restrictions.
For controlling height and styles more granularly I recommend having a look at the css hooks that you can use to extend H5P with: https://h5p.org/documentation/for-developers/visual-changes.
Do you think arbitrary HTML should be allowed inside CKEditor fields in the editor ? On one hand it gives the author more power, on the other hand it introduces additional complexity and it will increase the risk that authors make content that will work poorly in certain settings/on certain devices.
- Thomas
hakangur
Fri, 12/30/2016 - 16:41
Permalink
... before I forget
I wish all the developers and users a Happy New Year.
thomasmars
Mon, 01/02/2017 - 10:12
Permalink
Happy new year! :)
Happy new year! :)
hakangur
Sun, 01/08/2017 - 00:42
Permalink
Code - too risky
Having read the most recent posts here on adding codes to the editor field, I agree that the initial decision of h5p developers to eliminate this option from the very beginning is correct. h5p content can be edited by anyone and, as such, it calls for additional protection. The text editor toolbar might well be developed with the addition of a few more buttons (table, underline, font colour, for example), but this is not a must.
tim
Sun, 01/08/2017 - 07:37
Permalink
Yes, it is tough balance
Yes, it is tough balance between allowing authors as much control as possible and restricting potential bugs from occuring. Since the code is open source, h5p is fully customizable for the most ambitious of authors.