Welcome, Guest
Username: Password: Remember me

TOPIC: Rich text editor in long text answer

Rich text editor in long text answer 6 months 6 days ago #105015

  • lordzoster
  • lordzoster's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 29
  • Thank you received: 2
  • Karma: 0
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
The administrator has disabled public write access.

Rich text editor in long text answer 6 months 6 days ago #105052

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4117
  • Thank you received: 760
  • Karma: 346
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>

Capture3_2014-02-14.png


.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 6 months 6 days ago by tpartner.
The administrator has disabled public write access.
The following user(s) said Thank You: DenisChenu, stevelegare, lordzoster

Rich text editor in long text answer 6 months 6 days ago #105059

  • lordzoster
  • lordzoster's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 29
  • Thank you received: 2
  • Karma: 0
Many many many thanks!
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.126 seconds
Donation Image