Enable markdown renderer for more than just help texts
The goal of this pull request is to have the markdown renderer available for question texts as it is right now for help texts.
Description
- enable markdown rendering for the following elements in questions answer section
- page titles
- question set titles
- question texts
Related issue: #441
Motivation and Context
The STAMP project needs it because they love to style their text snippets.
Remarks
There are titles which are bold by default. I did not want to have those and removed them using css.
.form_label {
font-weight: unset;
}
My fix..
How has this been tested?
Screenshots (if appropriate)
Types of Changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation content changes
- [ ] Other (please describe):
Checklist
- [ ] I have read the contributor guide.
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
I think this issue is related: https://github.com/rdmorganiser/rdmo/issues/441
yes, thanks. i added it in the description
coverage: 91.61% (+0.02%) from 91.591% when pulling aafe8948f07fedbca2f9acb00d998f5a796d21b3 on markdown into 065d195043b7ac34a7b6b3180dac69829a3974bc on main.
does this also have to do with adding (markdown) links to the text of options for example?
Currently not. This is something that will probably be added in the future. Every change should mentioned above in the description. What is not in the description is not in the code.
I could add some parts for that if it will make this PR ready for the next release. Is there still much to be done for this PR? It's not clear to me.
When I would add this for the option text, I could simply use your changes and apply them to the options right?
The markdown support for option text and help are implemeted in the interview branch. Since I want to implement markdown in catalog/section/page/questionset titles and question texts there as well I can add the corresponding code in the non angular parts already here.
Hi @triole , I opened the PR again, since I think we can add that before the new interview. Please have a look.
One open question, for questions, you need the bold text to not bold, right?
Forget it, I just add a .question-label class so you can remove the font-weight locally.
The only problem is that in the export using markdown (of project_answers) it will be bold since this will not use the css class. Is that ok for your case?
is this for in the 2.2.0 release?
Yes, the base branch was wrong.