Page 1 of 1

[Added] New Object Type: WYSIWYG Editor

Posted: Thu Aug 05, 2021 7:53 am
by admin
The "Quill Rich Text Editor" has been added as nuBuilder Object.
wysiwyg editor.png
editor.png

Re: [Added] New Object Type: WYSIWYG Editor

Posted: Mon Oct 04, 2021 1:19 pm
by admin
Example to load the WYSIWYG editor with a minimal toolbar. (min. Files Version: V.4.5-2021.10.04.01)

Add in the form's Custom Code:

Code: Select all

function nuOnEditorLoad() {

	var myToolbar = [

			['bold', 'italic', 'underline', 'strike'], // toggled buttons
			[{ 'list': 'ordered' }, { 'list': 'bullet' }],
			[{ 'indent': '-1' }, { 'indent': '+1' }], // outdent/indent
			[{ 'header': [1, 2, 3, 4, 5, 6, false] }],
			[{ 'color': [] }], // dropdown with defaults from theme
			[{ 'align': [] }]

	];
	
		var options = {
		  modules: {
			toolbar: myToolbar
		  },
		  fontNames: null,
		  readOnly: false,
		  theme: 'snow'
		};	
	
	$('.nuEditor').each((index, element) => {
		nuQuill(element.id, options);
	});

}

Re: [Added] New Object Type: WYSIWYG Editor

Posted: Mon Oct 04, 2021 1:23 pm
by admin
Example to hide the toolbar and set the editor to read-only mode:

Code: Select all

function nuOnEditorLoad() {
   
      var options = {
        modules: {
         toolbar: false
        },
        fontNames: null,
        readOnly: true,
        theme: 'snow'
      };   
   
   $('.nuEditor').each((index, element) => {
      nuQuill(element.id, options);
   });

}