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 use PHPProgramWhen the programmer is separated from the artist, changing the logic content of the program does not affect the webpage design of the artist. If the artist re-modifies the page, the program logic is not affected, this is particularly important in projects with multiple partners.
Files that call FCKeditor in smarty:
-
- // FCKeditor in smarty
-
- //Rossy.cn@gmail.com
-
- //
-
-
- 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',"Rosy is here waiting for you");
- $ Smarty->Assign('FCKeditor',$ FCKeditor);
-
- $ Smarty->Display('Template. TPL');
However, the FCKeditor cannot pass the value when editing the data, but generates a null editor. Therefore, you can only use the following method:
- // FCKeditor in smarty
-
- //Rossy.cn@gmail.com
-
- //
-
-
-
- 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',"Rosy is here waiting for you");
-
- $ Smartyl->Assign_by_ref("FCKeditor",$ Editor);
- $ Smarty->Display('Template. TPL');
Template. TPL:
-
- <Htm>
-
- <Head>
- <Title>Example Of Smarty Use FCKeditor</Title>
-
- </Head>
-
-
-
- <Body>
- <P>Example</P>
-
- <P>Title: <{$ Title}> </P>
-
- <P> </P>
- <P>Content: </P>
-
- <P> <{$ FCKeditor}> </P>
-
- </Body>
-
- </Html>