RO-Banen

Re: Finally! Replace Textile with TinyMCE

Hello there!

Followed all the steps to remove textile with tinyMCE, it works great! Much better now!

But I have some difficulties to apply the tinyMCE editor in de admin-panel...

Can someone tell me which steps do I have to take to get the editor in the admin-panel?

Thanks!

RO-Banen

Re: Finally! Replace Textile with TinyMCE

Anyone????

Corbula

Re: Finally! Replace Textile with TinyMCE

Has anyone got this working with 1.8 yet? I followed the steps but nothing has been affected.

hobo

Re: Finally! Replace Textile with TinyMCE

For 1.9 the step number 5 is different.
It should say (for page_verify.php):
replace:

Code:

$jobInfo['description'] = str_replace(array("\r\n", "\r", "\n"), "<br />", $jobInfo['description']);

with:

Code:

$jobInfo['description'] = str_replace(array("\r\n", "\r", "\n"), "", $jobInfo['description']);

You could also use this as footer.tpl replacement code

Code:

{if $CURRENT_PAGE == 'post'}
    {literal}
    <script type="text/javascript" src="{/literal}{$BASE_URL}{literal}js/tiny_mce/tiny_mce.js"></script>
    <script language="javascript" type="text/javascript">
        tinyMCE.init({
            mode : "textareas",
            editor_selector : "mceEditor",
            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,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,fontsizeselect,separator,bullist,numlist,separator,link,unlink,separator,undo,redo",
            theme_advanced_buttons2: "",
            theme_advanced_buttons3: "",
            height: "500px",
            width: "420px"
        });
    </script>
    {/literal}
{/if}
</body>
</html>

Not tested, but should work.

jupjupp

Re: Finally! Replace Textile with TinyMCE

hi, Thank you for tutorial.

I changed step by step code. And tinyMCE worked.

But i see an error, when i try to edit and publish a post.

If i edit a post and click to verify, this code appeared.

Code:

Fatal error: Uncaught exception 'QueryException' with message 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 12' in C:\xampp\htdocs\kariyer2\_includes\class.Db.MySql.php:64 Stack trace: #0 C:\xampp\htdocs\kariyer2\_includes\class.Job.php(919): Db->query('UPDATE jobs SET...') #1 C:\xampp\htdocs\kariyer2\page_write.php(223): Job->Edit(Array) #2 C:\xampp\htdocs\kariyer2\index.php(132): require_once('C:\xampp\htdocs...') #3 {main} thrown in C:\xampp\htdocs\kariyer2\_includes\class.Db.MySql.php on line 64

I read and read the forum, over over, and i don't understand, where is the problem?
If you can help me, i can say this " Man, you are very good " God, give this man what he wants." Thank you

I really don't say anyone, that i was so stupid !! And I never forget, how stupid i am.

parlenk

Re: Finally! Replace Textile with TinyMCE

Huaaa,, finally big_smile it works.. thank you ladies and gentlement big_smile, it works it works.

parlenk

jobnavy

Re: Finally! Replace Textile with TinyMCE

Thanks all for the guidance here. It works. Check it at http://www.jobnavy.com

Meanwhile, the spacing looks some how. Please check these posts:

With TinyMCE
1. http://www.jobnavy.com/job/201/finance- … s-limited/

Without TinyMCE
2. http://www.jobnavy.com/job/199/assistan … e-studies/

How do you correct the spacing issue?

Thanks.

dynaz

Re: Finally! Replace Textile with TinyMCE

try this in footer.tpl

and you will get full option of TinyMCE

Code:
{literal}
    <script type="text/javascript" src="{/literal}{$BASE_URL}{literal}js/tiny_mce/tiny_mce.js"></script>
    <script language="javascript" type="text/javascript">
        tinyMCE.init({
            mode : "textareas",
            editor_selector : "mceEditor",
            theme: "advanced",
              plugins : "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
  theme_advanced_toolbar_align: "left",
            theme_advanced_toolbar_location: "top",
            // Theme options
        theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
        theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
        theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
        theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_statusbar_location : "bottom",
        theme_advanced_resizing : true,

 template_external_list_url : "{/literal}{$BASE_URL}{literal}js/template_list.js",
        external_link_list_url : "{/literal}{$BASE_URL}{literal}js/link_list.js",
        external_image_list_url : "{/literal}{$BASE_URL}{literal}js/image_list.js",
        media_external_list_url : "{/literal}{$BASE_URL}{literal}js/media_list.js",

            height: "500px",
            width: "420px"



        });
    </script>
    {/literal}
</body>
</html>
Looking for information travel in Phuket Thailand HiPhuket.Info Update everything aorund Phuket Thailand

www.hiphuket.info