In-place Edit (also known as Edit In Place) allows you to edit text on web pages without going to a separate page and filling out a form.
WYSIWYG , is an acronym for 'What You See Is What You Get', used in computing to describe a system in which content displayed during editing appears very similar to the final output.
IPWEditor - In Place WYSIWYG Editor is the best of both world- it provides an easy, In-Place editing, and adds a layer of WYSIWYG visual editor over it.
DEMO 1 (FCKeditor)
Click me! I am editable and WYSIWYG!!! (FCKeditor)
Code behind:
<script type="text/javascript" src="jquery-1.3.2.js"></script>
<script type="text/javascript" src="jquery.editable.ipweditor-1.2.js"></script>
<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
<div id="editable" class="myipwe"> Click me! I am editable and WYSIWYG!!! </div>
<script type="text/javascript">
//set all the FCKeditor configuration here and pass it to the editable
var oFCKeditor = new FCKeditor( 'editor1') ;
oFCKeditor.BasePath = "/ipwe/fckeditor/" ;
$('.myipwe').editable(
{
type: 'wysiwyg',
editor: oFCKeditor,
onSubmit:function submitData(content){
alert(content.current)
},
submit:'save',
cancel:'cancel'
});
</script>
DEMO 2 (TinyMCE)
Click me! I am editable and WYSIWYG!!! (TinyMCE)
Code behind:
<script type="text/javascript" src="jquery-1.3.2.js"></script>
<script type="text/javascript" src="jquery.editable.ipweditor-1.2.js"></script>
<script type="text/javascript" src="tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<div id="editable" class="myipwe1"> Click me! I am editable and WYSIWYG!!! </div>
<script type="text/javascript">
//set all the tinyMCE configuration here and pass it to the editable
$().ready(function() {
var ed = new tinymce.Editor('myipwe1', {
some_setting : 1
});
$('.myipwe1').editable(
{
type: 'wysiwyg',
editor: ed,
onSubmit:function submitData(content){
alert(content.current)
},
submit:'save'
});
});
</script>
Download Releases 1.2 (FCKeditor & TinyMCE support)
IPWEditor with examples and DependenciesIPWEditor code only - jquery.ipweditor-1.2.js
Documentation
Getting startedDownload Older Release (1.1 FCKeditor support only)
IPWEditor with examples and DependenciesIPWEditor code only - jquery.editable.wysiwyg-1.3.3.1.js
Answer to my question
I'm not common with JavaScript. The answer is: I have to call the function after activating the class of the list-items. It's not PHP or C but JQuery. Damn it but thank you very much for the great combination-plugin!!
OT-Question, sorry.
I have a page with a List. before the user loggs in the list is not editable and after logging in I add a class to the List-items and the list should be editable:
$('li').addClass('foo');However, if I have the class added to the list items from source (
< li id="12" class="foo" >bar< /li >) it works with TinyMCE and editing but not after adding the Class. Do you maybe have any idea of where the problem is because I really don't understand this beahviour.TIA, F.
IE 8
Seem to be having a problem submitting data with IE8 get error code 12015
I am using the FCKEditor implementation
Re: IE8
Where do you get this error code (12015)? in the javascript? explorer crash code? make sure you are using the latest version (Releases 1.2) older versions had problems with IE8.
If you still have problems contact me at amir(at)spacebug(dot)com and we will sort it out.
Cheers
Amir
Div class
Was there supposed to be myipwe class somewhere in the download?
Re: Div class
No, there is no need for myipwe div class.
This is how jQuery works - the class name is just an identifier for the jQuery selector - most jQuery plug-ins work like this.
Suggestions
This is really a wonderful tool.
I have tried to add more than one div with class="myipwe"
And it work fine when I edit it one by one.
However, If one of them is in edit mode(wysiwyg mode).
The second one will not become wysiwyg editor (only textarea).
Could you add an option so that the editor can be opened in a modal window?
Thank you for you work!
Re: Suggestions
You can create as many modals as you like - Just create several divs with different class name and create a corresponding IPWEditor for each div:
$('.myipwe').editable(...
$('.myipwe2').editable(...
$('.otheripwe').editable(...
Cheers
Amir
nice!
Is it possible to use it with tinymce editor instead?
Re: nice!
This is the next major task on this project todo list. This feature will be released in 7-10 days.
jquery editable Version 1.7.1
Now there is a new jquery editable Version 1.7.1 and is not compatible.
I will be pleased if you can modify this fckeditor versión for the new one.
Thanks for your work and sorry for my english.
Re: jquery editable Version 1.7.1
Could not find the compatibility issue:
jQuery is in V 1.3.1 - http://docs.jquery.com/Downloading_jQuery
jQuery Editable is in V 1.3.3 - http://www.arashkarimzadeh.com/index.php/jquery/7-editable-jquery-plugin...
I could not find the 1.7.1 you are referring to, can you please add the URL to this thread?
1.7.1
This is the webpage
http://www.appelsiini.net/projects/jeditable
The zip with everything is here:
http://github.com/tuupola/jquery_jeditable/zipball/master
An example here;
As you can see they put the url save.php, and there the data is send with $_POST
after that I use save.php to update the BBDD.
$(document).ready(function() {
$('.edit').editable('http://www.example.com/save.php', {
indicator : 'Saving...',
tooltip : 'Click to edit...'
});
});
Re: 1.7.1
That is Jeditable, and IPWeditor uses Editable. I will look into supporting Jeditable in the next releases.
Cheers
Amir