(function ( $ ) { $.fn.richText = function( options ) { // set default options // and merge them with the parameter options var settings = $.extend({ // text formatting bold: true, italic: true, underline: true, // text alignment leftAlign: true, centerAlign: true, rightAlign: true, // lists ol: true, ul: true, // title heading: true, // fonts fonts: true, fontList: ["Arial", "Arial Black", "Comic Sans MS", "Courier New", "Geneva", "Georgia", "Helvetica", "Impact", "Lucida Console", "Tahoma", "Times New Roman", "Verdana" ], fontColor: true, // uploads imageUpload: true, fileUpload: true, // media videoEmbed: true, // link urls: true, // tables table: true, // code removeStyles: true, code: true, // colors colors: [], // dropdowns fileHTML: '', imageHTML: '', // dev settings useSingleQuotes: false, height: 0, heightPercentage: 0, id: "", class: "", useParagraph: false }, options ); /* prepare toolbar */ var $inputElement = $(this); $inputElement.addClass("richText-initial"); var $editor, $toolbarList = $('