|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Black_Jack Smarty n00b
Joined: 05 Sep 2007 Posts: 2
|
Posted: Thu Sep 20, 2007 5:16 pm Post subject: TinyMCE on Smarty ( ready to work for every one ) |
|
|
Hi i use smarty 2.6.16, and i try to use TinyMCE, with no positive result.
i have done some research, and i have discovered that the smarty function {literal}{/literal} got a problem with big text, and then the text included between these tags are not finaly included, and then there are no trace in the source of the javascript or else we try to use.
So i decided to cut the TinyMCE.js in 10 pieces, but since the first part their make a document.write that make a javacripts include, and then i couldn't fullfilled to try it.
I'll contact the tinymce comunity to see how to turn off the doucment.write problem.
If you have found some time to help me i'm your man, i really need help.
Maybe my Article title, seam to be strange for you, but i feel like to be the only one not to have manage to use TinyMCE with SMARTY.
And i feel like the Ugly Ducks in the community, because each time i tried to find help, it's like if i posted a stupid question, that every one could resolve hands hight.
But i still not managed to use TinyMCE with smarty.
So if the Smarty Community could work on the port of TinyMCE it could be great for every Smarty Users.
And at the same time if it could be possible to repair the {literal}{/literal} problem int he source of smarty it could be good too.
Maybe i ask so many things, but i think it is for the goodness of Smarty Users.
Thanks for your attention wishing this post could meet a favorable end. |
|
Back to top |
|
cowboystyle Smarty Rookie
Joined: 02 Oct 2006 Posts: 5 Location: New York, NY
|
Posted: Thu Jan 03, 2008 9:13 pm Post subject: |
|
|
I wouldn't directly include the TinyMCE source within a template, why not just link the file using <script src="tinymce.js">? |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Thu Jan 03, 2008 10:50 pm Post subject: |
|
|
What's not working with {literal}{/literal} ? |
|
Back to top |
|
Antony Smarty n00b
Joined: 10 Jan 2008 Posts: 1 Location: Russian Federation
|
Posted: Thu Jan 10, 2008 7:45 pm Post subject: |
|
|
I use {rdelim} as } and {ldelim} as { instead of {literal} in tiny configuration and tiny works ok |
|
Back to top |
|
maddog39 Smarty n00b
Joined: 07 May 2008 Posts: 1
|
Posted: Wed May 07, 2008 12:54 am Post subject: |
|
|
I am using TinyMCE perfectly fine on Smary 2.6.19 and heres my code block:
Code: |
<script language="javascript" type="text/javascript" src="includes/tinymce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
{literal}
tinyMCE.init({
mode: "textareas",
theme: "advanced",
plugins: "advhr,advimage,table,emotions,media,insertdatetime,directionality",
theme_advanced_toolbar_align: "left",
theme_advanced_toolbar_location: "top",
theme_advanced_buttons1: "bold,italic,underline,strikethrough,sub,sup,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2: "bullist,numlist,outdent,indent,ltr,rtl,separator,link,unlink,anchor,image,separator,table,insertdate,inserttime,advhr,emotions,media,charmap,separator,undo,redo",
theme_advanced_buttons3: "",
height: "350px",
width: "652px"
});
{/literal}
</script>
|
|
|
Back to top |
|
anorgan Smarty n00b
Joined: 18 Oct 2008 Posts: 4
|
Posted: Sat Oct 18, 2008 11:49 pm Post subject: |
|
|
yes, literal is my choice too on this |
|
Back to top |
|
bimal Smarty Elite
Joined: 19 Apr 2007 Posts: 423
|
Posted: Wed Feb 18, 2009 5:48 pm Post subject: This should be better |
|
|
This shoud be better:
Code: | <script language="javascript" type="text/javascript" src="includes/tinymce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript" src="includes/tinymce/mytinymce_config_1.js"></script> |
and, send all your configs into mytinymce_config_1.js file.
Since {literal} tags skip parsing the template contents which is infact a javascript here, moving it to a different section is good.
Reason: Your tinymce configuration becomes reusable in other pages too.
Less scripts in a page = clean looking. |
|
Back to top |
|
kibriya Smarty n00b
Joined: 04 Sep 2010 Posts: 1
|
Posted: Sat Sep 04, 2010 7:17 pm Post subject: I m use Smarty |
|
|
I need to setup tinymce in my code any body help me ? how can I setup tinymce in my code |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|