Hello,
I've recently implemented FCKEditor into a project which uses a template engine system that requires me to capture the editor instance as a variable. No big deal. I was able to modify the source to capture instead of instantly echoing the editor as the instance is declared (via PHP).
I do realize template engines like Smarty can parse PHP contained within smarty templates so this really isn't an issue with advanced templating engines. However, I don't need this type of advanced templating power therefore I don't use it. Again, it's not really an issue as the source is really easy to change (one line) but it would be nice if there were a core option (echo or capture instance).
Is this worth even discussing?
Thanks for lending an ear.
Juan
I've recently implemented FCKEditor into a project which uses a template engine system that requires me to capture the editor instance as a variable. No big deal. I was able to modify the source to capture instead of instantly echoing the editor as the instance is declared (via PHP).
I do realize template engines like Smarty can parse PHP contained within smarty templates so this really isn't an issue with advanced templating engines. However, I don't need this type of advanced templating power therefore I don't use it. Again, it's not really an issue as the source is really easy to change (one line) but it would be nice if there were a core option (echo or capture instance).
Is this worth even discussing?
Thanks for lending an ear.
Juan
Re: Echo instance or capture as variable...
I am having a problem because I want to control when it echoes to screen.
thanks
John
Re: Echo instance or capture as variable...
I'm using PHP 5 so in my case, I modified fckeditor_php5.php in the fckeditor root.
Find line:148 -> echo $this->CreateHtml() ;
and change it to: return $this->CreateHtml() ;
This line is contained within:
At this point, it will just return the instance instead of printing it to screen immediately. In other words, you can capture the instance in a variable for later output.
Re: Echo instance or capture as variable...
what's the difference between using your modified function or calling CreateHtml() instead of Create()
Re: Echo instance or capture as variable...
It just didn't feel right to modify createHtml (I guess I just didn't want to over-modify the source).