Version: 1.2
|
Download
|
Official Project Page
|
Report Bug
|
By DMA, Expert SEO
Other links:
Codepress Official Website
|
Form Plugin
|
Validation Plugin
|
jQuery Library
Previous versions:
1.10
To Support this project just checkout a related website:
What does it do?
Try it yourself
Download
All you really need is Codepress (DUH!), jQuery (of course) and the jQuery Codepress Plugin.
But if you want to submit your form via Ajax, then you
need to get the jQuery Form Plugin by Malsup.
Usage
-
Method 1: replacing ALL textareas in a page with THE SAME settings
<textarea name="codepress1" cols="50" rows="6"></textarea>
<textarea name="codepress2" cols="50" rows="6"></textarea>
<textarea name="codepress3" cols="50" rows="6"></textarea>
<script>
$(function(){
$('textarea').codepress({
path: '/path/to/codepress/directory/'
});
});
</script>
-
Method 2: replacing SOME textareas in a page with THE SAME settings
In this example, only textarea codepress3 will not be converted into a Codepress.
<textarea name="codepress1" class="codepress" cols="50" rows="6"></textarea>
<textarea name="codepress2" class="codepress" cols="50" rows="6"></textarea>
<textarea name="codepress3" cols="50" rows="6"></textarea>
<script>
$(function(){
$('textarea.codepress').codepress({
path: '/path/to/codepress/directory/'
});
});
</script>
-
Method 3: replacing SOME textareas in a page with DIFFERENT SETTINGS
<textarea name="codepress1" cols="50" rows="6"></textarea>
<textarea name="codepress2" cols="50" rows="6"></textarea>
<textarea name="codepress3" cols="50" rows="6"></textarea>
<script>
$(function(){
$.codepress.config = {path: '/path/to/codepress/directory/', height:300 };
$('textarea#codepress1').codepress(/* default settings */);
$('textarea#codepress2').codepress({ height:100 });
$('textarea#codepress3').codepress({ height:200 });
});
</script>
Important pointers...
-
This is a working idea that hasn't yet been fully tested.
Tested and works on Firefox 2, IE7 and IE6 (all in WinXP SP2).
Codepress is not supported on Opera/Safari (or is it?), but form submission still works.
-
The same principle can be applied to TinyMCE, FCKEditor and any other rich-text editors.
Any input regarding other rich-text editors is welcome.
-
The plugin will intercept known methods and install itself against related plugins
(currently only the jQuery Form Plugin).
Any input regarding integrating this plugin with other jQuery plugins is welcome.
To Support this project just checkout a related website:
|
|