TinyMCE - how to with LS 3?

Plus d'informations
il y a 1 semaine 5 jours #170679 par achstil
achstil a créé le sujet : TinyMCE - how to with LS 3?
I would like to use a rich text editor with options to paste 'sensible' from word. TinyMCE is the candidate. This answer details how TinyMCE can be used - but the answer is four years old and LS3 has changed a lot. How would I do this today?

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

Plus d'informations
il y a 1 semaine 3 jours #170801 par achstil
achstil a répondu au sujet : TinyMCE - how to with LS 3?
I am the only one who is faced with "paste from word" requirement? - Or should it be trivial to integrete TinyMCE as per the instructions above?

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

Plus d'informations
il y a 1 semaine 2 jours - il y a 1 semaine 2 jours #170839 par tpartner
tpartner a répondu au sujet : TinyMCE - how to with LS 3?
TinyMCE from a CDN (what they call 'Cloud') is not free any more but if you have a plan, you can add something like this to your custom.js file:

$(document).on('ready pjax:scriptcomplete',function(){
	$.getScript('https://cloud.tinymce.com/stable/tinymce.min.js', function(data, textStatus, jqxhr) {
		tinymce.init({
			selector: '.text-item textarea',
			menubar: false,
			setup: function (editor) {
				editor.on('change', function () {
					tinymce.triggerSave();
				});
			},
			plugins: [
				'advlist autolink lists link image charmap print preview anchor textcolor',
				'searchreplace visualblocks code fullscreen',
				'insertdatetime media table contextmenu paste code help wordcount'
			],
			toolbar: 'insert | undo redo |  formatselect | bold italic backcolor forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | code paste removeformat | help',
			content_css: [
				'//fonts.googleapis.com/css?family=Lato:300,300i,400,400i',
				'//www.tinymce.com/css/codepen.min.css'
			]
		});
	});
});

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Dernière édition: il y a 1 semaine 2 jours par tpartner.

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!