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

Mehr
3 Wochen 2 Tage her #169436 von QuoTil
QuoTil erstellte das Thema LS3.x change question style by theme-tylesheet not inline via question editing
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?

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
3 Wochen 2 Tage her #169437 von tpartner
tpartner antwortete auf das Thema: LS3.x change question style by theme-tylesheet not inline via question editing
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.
Folgende Benutzer bedankten sich: QuoTil

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
3 Wochen 2 Tage her #169442 von QuoTil
QuoTil antwortete auf das Thema: LS3.x change question style by theme-tylesheet not inline via question editing
Thanks! Done as suggested: bugs.limesurvey.org/view.php?id=13732
Folgende Benutzer bedankten sich: tpartner

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
3 Wochen 2 Tage her - 3 Wochen 2 Tage her #169445 von DenisChenu
DenisChenu antwortete auf das Thema: LS3.x change question style by theme-tylesheet not inline via question editing
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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Letzte Änderung: 3 Wochen 2 Tage her von DenisChenu.
Folgende Benutzer bedankten sich: QuoTil

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
3 Wochen 2 Tage her #169448 von QuoTil
QuoTil antwortete auf das Thema: LS3.x change question style by theme-tylesheet not inline via question editing
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!

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
3 Wochen 2 Tage her - 3 Wochen 2 Tage her #169452 von DenisChenu
DenisChenu antwortete auf das Thema: LS3.x change question style by theme-tylesheet not inline via question editing
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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Letzte Änderung: 3 Wochen 2 Tage her von DenisChenu.
Folgende Benutzer bedankten sich: QuoTil

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha