diff --git a/jquery.microedit.js b/jquery.microedit.js new file mode 100644 index 0000000..33b9487 --- /dev/null +++ b/jquery.microedit.js @@ -0,0 +1,298 @@ + +/* + * MicroEdit 1.0 + * Daniele Callari + * Daxtech.net + * + * Require jQuery, awesomeFont +*/ + +(function($){ + var methods = { + toggleCodeEditor : function(){ + console.log('toggled'); + }, + + init : function(options) { + var defaults = { + controls : ['undo', 'redo', '|', 'bold', 'italic', 'underline', '|', 'unlink', 'removeformat', '|', 'fontcolor', 'backcolor' , '|', 'justifyFull', 'justifyLeft', 'justifyRight', 'justifyCenter', '|' ,'code'], + height : '200px', + width : '100%', + borderColor : '1px solid #ccc', + denyLinks : false, + commandsAlign : 'left' + }; + + var settings = $.extend( {}, defaults, options ); + + return this.each(function() { + var content = $(this).html(); + + $(this).html(''); + + var cmdBar = $('
'); + var editor = $('
'); + var sourceCode = $('