html = <textarea name="test" id="test" class="wysiwyg" rows="5" cols="30"> blah blah blah </textarea> <br><a href="javascript:toggleFCK('test');">toggle the editor</a>
javascript = /** * Toggle an editor on and off */ function toggleFCK(id) { var textArea = document.getElementById(id); var oEditor = FCKeditorAPI.GetInstance(id); var editor = document.getElementById(id.concat('___Frame')); if (textArea.style.display == 'none') { //switch to original textArea.style.display = 'inline'; editor.style.display = 'none'; textArea.value = oEditor.GetData(); } else { //switch to editor textArea.style.display = 'none'; editor.style.display = ''; oEditor.SetHTML(textArea.value); } }
I receive a 'FCKeditorAPI not defined' error. It appears there is missing code. When posting solutions, please assume we don't know what we are doing. If we knew what we were doing, we wouldn't be asking for help!
i totally agree with you mhawke. Like, is it a sin to not know everything and ask for help? sometimes i too wonder, if i should just keep my mouth shut. feeling embarrassed for crying out for help. sigh!
I can't speak for anyone else, but I have no problem helping by by pointing them in the right direction. I don't think it's unreasonable to expect people asking for help to do a little bit of legwork on their own. If you want a little bit of help, I'm happy to provide that. If you want me to write your entire system for you by providing you with cut-and-paste code then I'd be happy to send you an invoice for my time.
Having said that, if we need to "please assume [you] don't know what [you] are doing", then perhaps software development isn't for you.
Re: Toggling Between Plain text and Rich Text
Re: Toggling Between Plain text and Rich Text
html =
<textarea name="test" id="test" class="wysiwyg" rows="5" cols="30">
blah blah blah
</textarea>
<br><a href="javascript:toggleFCK('test');">toggle the editor</a>
javascript =
/**
* Toggle an editor on and off
*/
function toggleFCK(id) {
var textArea = document.getElementById(id);
var oEditor = FCKeditorAPI.GetInstance(id);
var editor = document.getElementById(id.concat('___Frame'));
if (textArea.style.display == 'none') {
//switch to original
textArea.style.display = 'inline';
editor.style.display = 'none';
textArea.value = oEditor.GetData();
} else {
//switch to editor
textArea.style.display = 'none';
editor.style.display = '';
oEditor.SetHTML(textArea.value);
}
}
Re: Toggling Between Plain text and Rich Text
Re: Toggling Between Plain text and Rich Text
i totally agree with you mhawke. Like, is it a sin to not know everything and ask for help? sometimes i too wonder, if i should just keep my mouth shut. feeling embarrassed for crying out for help. sigh!
-----------------------
fishing gears
Re: Toggling Between Plain text and Rich Text
Having said that, if we need to "please assume [you] don't know what [you] are doing", then perhaps software development isn't for you.