I've gotten everything to work - kudos on this amazing piece of js... but there's something I can't seem to figure out.
First, nowhere in the documentation does it say how to get the output from the editor. On my own, I've managed to hack this together:
function tester() {
var xanedit = FCKeditorAPI.GetInstance('XanEditor');
alert('Editor HTML content = '+xanedit.GetHTML());
}
What I need to do, however, is to modify the Save button so that it causes the HTML content to be deposited into another js variable. What I'd really LIKE to do, is be able to create my own save routine.
Now I know about the FCKSaveCommand() object, and I could probably create my own, but would I be able to use the same code as above to get the content I need, or is there a better (standard) way of doing this? Also, is there a way I could create this command without having to modify the editor core classes, so when I upgrade, I'll only need to modify the config file instead of the fckcommands.js and both the fckeditorcode_x.js files?
First, nowhere in the documentation does it say how to get the output from the editor. On my own, I've managed to hack this together:
function tester() {
var xanedit = FCKeditorAPI.GetInstance('XanEditor');
alert('Editor HTML content = '+xanedit.GetHTML());
}
What I need to do, however, is to modify the Save button so that it causes the HTML content to be deposited into another js variable. What I'd really LIKE to do, is be able to create my own save routine.
Now I know about the FCKSaveCommand() object, and I could probably create my own, but would I be able to use the same code as above to get the content I need, or is there a better (standard) way of doing this? Also, is there a way I could create this command without having to modify the editor core classes, so when I upgrade, I'll only need to modify the config file instead of the fckcommands.js and both the fckeditorcode_x.js files?
RE: Simple Output Questions.
When it is displayed, it is not in a form and on a seperate page. To use this method, wouldn't I have to create a form and the fields again, but just not create the object? Then use what you did?
I had tried this previously but it didn't work even with variations:
function displayTextField2( formObject, fieldName )
{
document.write( "This is a test line." ) ;
var textField = new FCKeditor( fieldName ) ;
textField.Value = formObject.elements(fieldName).value ;
var api = FCKeditorAPI.GetInstance( formObject.elements(fieldName) ) ;
document.write( api.GetHTML() ) ;
}
RE: Simple Output Questions.
I can get <strong> in my output or <strong> but I can't seem to get the effect of strong on a seperate results page using velocity templating.