LS3.x change question style by theme-tylesheet not inline via question editing

Plus d'informations
il y a 11 mois 2 semaines #169436 par QuoTil
COM_KUNENA_MESSAGE_CREATED_NEW
Using LS3.x with fruity theme (extended).

The output of the question-text is handled by
{{ aQuestion.text | raw }}
in question_text_content.twig. Styles are inserted by inline-styles applied on
<span>
-tags. It is not possible to change the Twig-Filter from
raw
to
striptags
("internal server error - Filter "striptags" is not allowed.") to get rid of the
<span>
-tags.

The problem: The survey creator shall not have the option the change the style especially not the font-family OR should be able to select theme-fonts such as Noto, Lato etc. from within the question-editor.

Any ideas?

Connexion ou Créer un compte pour participer à la conversation.

LimeSurvey Partners
Plus d'informations
il y a 11 mois 2 semaines #169437 par tpartner
COM_KUNENA_MESSAGE_REPLIED_NEW
File a bug report and ask to have thestriptags() function added to the allowed list.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Les utilisateur(s) suivant ont remercié: QuoTil

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 11 mois 2 semaines #169442 par QuoTil
COM_KUNENA_MESSAGE_REPLIED_NEW
Thanks! Done as suggested: bugs.limesurvey.org/view.php?id=13732
Les utilisateur(s) suivant ont remercié: tpartner

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 11 mois 2 semaines - il y a 11 mois 2 semaines #169445 par DenisChenu
COM_KUNENA_MESSAGE_REPLIED_NEW
Since we add allowed function in internal : github.com/LimeSurvey/LimeSurvey/blob/ca...ig/internal.php#L213

strip_tags is a PHP function,

You can update [twigRenderer][functions] and [twigRenderer][sandboxConfig][filters] in you own config.php

See github.com/LimeSurvey/LimeSurvey/blob/ca...ig/internal.php#L369

Then : no need to wait for an update.

If it work : it can be great if you update our manual : manual.limesurvey.org/Optional_settings#Yii_settings

===

And maybe you can use ExpressionManager : {{ processString("{strip_tags(".aQuestion.text.")}") }}

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .
Last edit: il y a 11 mois 2 semaines by DenisChenu.
Les utilisateur(s) suivant ont remercié: QuoTil

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 11 mois 2 semaines #169448 par QuoTil
COM_KUNENA_MESSAGE_REPLIED_NEW
Nice! Updating the config.php is working.

I really appreciate your responses but one thing is interesting: Your solutions are kind of "hacks" while I think that the bigger improvement for LS would be to be able to add custom fonts to the font selector in the question-editor ui.

Please don't get me wrong. Your suggestions do really help me. But I think that the product would grow by a different approach.

Have a nice one!

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 11 mois 2 semaines - il y a 11 mois 2 semaines #169452 par DenisChenu
COM_KUNENA_MESSAGE_REPLIED_NEW
Oh, i think strip_tags is really a needed filter and function :).
Except it's not a hack : it's the way of Yii management : the way to do for Yii :).

But maybe some specific filter/function can be managed only in config :).

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .
Last edit: il y a 11 mois 2 semaines by DenisChenu.
Les utilisateur(s) suivant ont remercié: QuoTil

Connexion ou Créer un compte pour participer à la conversation.

Commencez dès maintenant !

Créez simplement un compte et commencez à utiliser LimeSurvey dès aujourd'hui.

Inscrivez-vous maintenant

Inscrivez-vous à notre Newsletter!