Smarty calls the FCKeditor method, smartyfckeditor. Smarty calls the FCKeditor method. smartyfckeditor in this article describes how Smarty calls the FCKeditor method for your reference. The specific implementation method is as follows: FCKeditor is the method that Smarty calls FCKeditor, smartyfckeditor
This article describes how to call FCKeditor in Smarty and shares it with you for your reference. The specific implementation method is as follows:
FCKeditor is currently the best online editor on the Internet.
Smarty is a PHP template engine written using PHP. It provides the separation of logic and external content. In short, it aims to separate PHP programmers from the artist, changing the logic content of a program by a programmer does not affect the page design of the artist. modifying the page by the artist does not affect the program logic. This is especially important in projects that involve multiple partners.
Files that call FCKeditor in Smarty:
The code is as follows:
Require_once ("conn. php ");
Require_once ("class/Smarty. class. php ");
$ Smarty = new Smarty ();
$ Smarty-> template_dir = "../templates ";
$ Smarty-> compile_dir = "../templates_c ";
$ Smarty-> left_delimiter = "<{";
$ Smarty-> right_delimiter = "}> ";
$ Editor = new FCKeditor ("Content ");
$ Editor-> BasePath = "../FCKeditor /";
$ Editor-> ToolbarSet = "Basic ";
$ Editor-> Value = "";
$ FCKeditor = $ editor-> CreateHtml ();
$ Smarty-> assign ('title', "Rossy is here waiting for you ");
$ Smarty-> assign ('fckeditor', $ FCKeditor );
$ Smarty-> display ('Template. tpl ');
However, FCKeditor cannot pass the value when editing the data. it only generates a null editor. Therefore, you can only use the following method:
The code is as follows:
Require_once ("conn. php ");
Require_once ("class/Smarty. class. php ");
$ Smarty = new Smarty ();
$ Smarty-> template_dir = "../templates ";
$ Smarty-> compile_dir = "../templates_c ";
$ Smarty-> left_delimiter = "<{";
$ Smarty-> right_delimiter = "}> ";
$ Editor = new FCKeditor ("Content ");
$ Editor-> BasePath = "../FCKeditor /";
$ Editor-> ToolbarSet = "Basic ";
$ Editor-> Value = "Here is a example of smarty and FCKeditor ";
$ Smarty-> assign ('title', "Rossy is here waiting for you ");
$ Smartyl-> assign_by_ref ("FCKeditor", $ editor );
$ Smarty-> display ('Template. tpl ');
Template. tpl:
The code is as follows:
Example of smarty use fckeditor
Example
Title: <{$ Title}>
Content:
<{$ FCKeditor}>
I hope this article will help you with PHP programming.
How does php use fckeditor in the smarty template?
We recommend that you use EditorPHP, and fckeditor is also used at the beginning, but some server spaces do not support msxml. I have encountered this problem before. Therefore, it is changed to the PHP version EditorPHP developed by ewebeditor. This configuration is relatively simple. Easy to understand. If you need fckeditor, you can refer to the following URL.
Reference: hi.baidu.com/..2.html
How to reference the fckeditor editor in the smarty template?
Fckeditor calls more than php outputs.
You can use js
Or directly use the generated html
Examples in this article describes how to call FCKeditor in Smarty and share it with you for your reference. The specific implementation method is as follows: FCKeditor is...