Click here to Skip to main content
15,889,867 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I want to make formatting of contents in ckeditor persist even after page loaded.
If we make any change in contents of ckeditor then all changes should persists.

I am calling following function on an onkeyup event of input field. everytime when user change the value in input field then this servlet called. and contents from file displayed in ckeditor.

JavaScript
function setTextOnChange(id) {

		var inputNames = $.map($("input"), function(item) {
			return item.name;
		});

		var inputValues = $.map($("input"), function(item) {
			return item.value;
		});

		$.get('ServletName', {
			inputNames : inputNames,
			inputValues : inputValues
		}, function(responseJson) {
			$.each(responseJson, function(index, fieldvalue) {
				CKEDITOR.instances.editor1.setData(fieldvalue);
			});
		});
	}


If user makes any change in the displayed contents of file in ckeditor. then changed contents should be persist everytime when servlet calls onkeyup event of input field.

please help me?

Thanks in advance!
Posted
Updated 22-Jul-14 21:02pm
v2
Comments
Kornfeld Eliyahu Peter 23-Jul-14 2:47am    
Your question is unclear...CKEditor has 10 predefined events, none of the called 'persist' or something similar...
As CKEditor is a WSIWYG editor, content changes are persists by definition...
Niranjan Chouhan 23-Jul-14 3:03am    
i have improved my question. please check it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900