Rich text editor in long text answer

Mehr
3 Jahre 8 Monate her #105015 von lordzoster
lordzoster erstellte das Thema Rich text editor in long text answer
Hallo how could I provider the user with a rich text editor (like TinyMCE) for long text answers?
My aim is that the user can answer entering graphically formatted text (bullets, lists, italic and bold).
Thanks in advance

Bitte Anmelden um an der Konversation teilzunehmen.

Mehr
3 Jahre 8 Monate her - 3 Jahre 8 Monate her #105052 von tpartner
tpartner antwortete auf das Thema: Rich text editor in long text answer
Well, LimeSurvey uses CKEditor but, in my opinion, that is bloated and a pain to set up.

The easiest solution would be to use the CDN version of TinyMCE - www.tinymce.com/index.php .

So, simply adding something like this to startpage.pstpl after the {TEMPLATEJS} tag should do the trick.

<script src="//tinymce.cachefly.net/4.0/tinymce.min.js"></script>
<script>
	tinymce.init({
		plugins: 'link, code',
		menubar : false,
		toolbar1: 'undo redo | formatselect fontselect fontsizeselect | link | code',
		toolbar2: 'bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist | outdent indent blockquote', 
		selector:'textarea'
	});
</script>



.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Anhang:
Letzte Änderung: 3 Jahre 8 Monate her von tpartner.
Folgende Benutzer bedankten sich: DenisChenu, stevelegare, lordzoster

Bitte Anmelden um an der Konversation teilzunehmen.

Mehr
3 Jahre 8 Monate her #105059 von lordzoster
lordzoster antwortete auf das Thema: Rich text editor in long text answer
Many many many thanks!

Bitte Anmelden um an der Konversation teilzunehmen.

Mehr
2 Jahre 8 Monate her #117312 von marvin06
marvin06 antwortete auf das Thema: Rich text editor in long text answer
Hi

I also wanted to implement this. Basically the WYSIWYG Editor is displayed, but the Long text and Huge text questions only store plain text. So in the print answer page again only plain text is visible.

Do you have a fix for this?

Kind regards
Thomas

Bitte Anmelden um an der Konversation teilzunehmen.

Mehr
2 Jahre 8 Monate her #117316 von tpartner
tpartner antwortete auf das Thema: Rich text editor in long text answer
I think that may be a bug in the print-answers function. The data is being stored as HTML.


Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Anhang:

Bitte Anmelden um an der Konversation teilzunehmen.

Mehr
2 Jahre 8 Monate her #117318 von marvin06
marvin06 antwortete auf das Thema: Rich text editor in long text answer
Yes you are right. in the export html is exported too. But in the printanswers page the answers are displayed without any html.
This is valid for any template, also for the ready made ones. I suppose that there is an bug in the printanswers control.

I would like to look into the control for the printanswers. Do you know where this is stored?

Kind regards, Thomas

Bitte Anmelden um an der Konversation teilzunehmen.

Jetzt loslegen!

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

Account einrichten