Skip to content
Snippets Groups Projects

settings-wysiwyg

The snippet can be accessed without any authentication.
Authored by Jaroslav Petrusevic
settings-wysiwyg.js 2.01 KiB
{{# this is a wysiwyg-simple editor customized for the blog module (it allows images to be inserted) #}}
$('textarea#intro.wysiwyg-simple').ckeditor({
	toolbar: [
		['pyroimages'],
		['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink', 'Source']
	  ],
	extraPlugins: 'pyroimages',
	width: '99%',
	height: 100,
	dialog_backgroundCoverColor: '#000',
	defaultLanguage: '{{ helper:config item="default_language" }}',
	language: '{{ global:current_language }}'
});

{{# this is the config for all wysiwyg-simple textareas #}}
$('textarea.wysiwyg-simple').ckeditor({
	toolbar: [
		['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink', 'Source']
	  ],
	width: '99%',
	height: 150,
	dialog_backgroundCoverColor: '#000',
	defaultLanguage: '{{ helper:config item="default_language" }}',
	language: '{{ global:current_language }}'
});

{{# and this is the advanced editor #}}
$('textarea.wysiwyg-advanced').ckeditor({
	toolbar: [
		['Maximize'],
		['pyroimages', 'pyrofiles'],
		['Cut','Copy','Paste','PasteFromWord'],
		['Undo','Redo','-','Find','Replace'],
		['Link','Unlink'],
		['Table','HorizontalRule','SpecialChar'],
		['Bold','Italic','StrikeThrough'],
		['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl'],
		['Format', 'FontSize', 'Subscript','Superscript', 'NumberedList','BulletedList','Outdent','Indent','Blockquote'],
		['doksoft_templates'],
		['TransformTextToUppercase', 'TransformTextToLowercase'],
		['ShowBlocks', 'RemoveFormat', 'Source']
	],
        allowedContent: 'img[src,alt,width,height,class]',
	width: '99%',
	height: 400,
	enterMode: CKEDITOR.ENTER_P,
	shiftEnterMode: CKEDITOR.ENTER_BR,
	extraPlugins: 'pyroimages,pyrofiles,texttransform,panelbutton,floatpanel,doksoft_templates',
	extended_valid_elements : "span[!class]",
	dialog_backgroundCoverColor: '#000',
	removePlugins: 'elementspath',
	defaultLanguage: '{{ helper:config item="default_language" }}',
	language: '{{ global:current_language }}'
});
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment