Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Can't save headings in Dojo details #1288

Open
VanessaGreene opened this issue Dec 2, 2019 · 3 comments
Open

Can't save headings in Dojo details #1288

VanessaGreene opened this issue Dec 2, 2019 · 3 comments

Comments

@VanessaGreene
Copy link

Every time I try to add a heading whilst editing the Dojo details (tested on multiple Dojo pages) the heading appears in the text editor but when saved, saves as a paragraph.

This is also happening when any heading tag is added in the source editor of the 'edit Dojo' page.

headingnotsaving

@Wardormeur
Copy link
Contributor

I believe this is due to sanitize-html defaults tags that we use in cp-dojos-service's ´service.js´
https://github.com/CoderDojo/cp-dojos-service/blob/master/service.js#L23
https://github.com/apostrophecms/sanitize-html#what-are-the-default-options
Could you try with a h3 or lesser to confirm ?

@VanessaGreene
Copy link
Author

Okay, h3 works but only in the text editor, not the source editor.

@Wardormeur
Copy link
Contributor

I can get h3 to work in source editor; but once the editor is opened again, it reverse the h4+ to p tags. At that point, it's a configuration discrepancy between the editor and the backend.
There is a reason why h1/h2 are not allowed, it's global consistency of the dojo page; however we shouldnt let users choose that options if that's the case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants