Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

TinyMce 4

Asked Modified Viewed 2,914 times
Z
zizub
Z
zizub 10
  • Member, joined since
  • Contributed 156 posts on the community forums.
  • Started 29 threads in the forums
  • Started this discussions
asked
Member

Trying to install the new version TinyMce 4.0.20
I poorly versed in the code and I can `t get a good result.
At me editor appears in upper left corner of.
Prompt where I made a mistake. Here is my code admin_header_mce.php
<?php
if (!defined("IN_FUSION")) { die("Access Denied"); }

define("ADMIN_PANEL", true);

require_once INCLUDES."output_handling_include.php";
require_once INCLUDES."header_includes.php";
require_once THEME."theme.php";

if ($settings['maintenance'] == "1" && !iADMIN) { redirect(BASEDIR."maintenance.php"); }
if (iMEMBER) { $result = dbquery("UPDATE ".DB_USERS." SET user_lastvisit='".time()."', user_ip='".USER_IP."', user_ip_type='".USER_IP_TYPE."' WHERE user_id='".$userdata['user_id']."'"); }

echo "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\n";
echo "<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='".$locale['xml_lang']."' lang='".$locale['xml_lang']."'>\n";
echo "<head>\n<title>".$settings['sitename']."</title>\n";
echo "<meta http-equiv='Content-Type' content='text/html; charset=".$locale['charset']."' />\n";
echo "<link rel='stylesheet' href='".THEME."styles.css' type='text/css' media='screen' />\n";
if (file_exists(IMAGES."favicon.ico")) { echo "<link rel='shortcut icon' href='".IMAGES."favicon.ico' type='image/x-icon' />\n"; }
if (function_exists("get_head_tags")) { echo get_head_tags(); }
echo "<script type='text/javascript' src='".INCLUDES."jquery/jquery.js'></script>\n";
echo "<script type='text/javascript' src='".INCLUDES."jscript.js'></script>\n";
echo "<script type='text/javascript' src='".INCLUDES."jquery/admin-msg.js'></script>\n";

if ($settings['tinymce_enabled'] == 1) {
      echo "<script language='javascript' type='text/javascript' src='".INCLUDES."jscripts/tinymce/tinymce.min.js'></script>\n";
echo "<script>
tinymce.init({
    selector: 'textarea#elm1',

theme: 'modern',
language:'".$locale['tinymce']."',
    width: 300,
    height: 300,
    plugins: [
         'advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker',
         'searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking',
         'save table contextmenu directionality emoticons template paste textcolor'
   ],
   content_css: 'css/content.css',
   toolbar: 'insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage | forecolor backcolor emoticons',
   style_formats: [
        {title: 'Bold text', inline: 'b'},
        {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
        {title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
        {title: 'Example 1', inline: 'span', classes: 'example1'},
        {title: 'Example 2', inline: 'span', classes: 'example2'},
        {title: 'Table styles'},
        {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}
    ]
 });
</script>\n";

}
echo "</head>\n<body>\n";
echo "<textarea id='elm1' name='area'></textarea>\n";
require_once THEMES."templates/panels.php";

ob_start();
?>


Maybe someone has already done for himself and ready to share with the community ?
Edited by PeaceLaced on 21-03-2014 00:25,
zizub attached the following file:
tina4.jpg [No information available / 61 Downloads]
0 replies

3 posts

A
afaaro
A
afaaro 10
  • Senior Member, joined since
  • Contributed 295 posts on the community forums.
  • Started 68 threads in the forums
answered
Senior Member

Remove this line at the bottom

echo "<textarea id='elm1' name='area'></textarea>\n";


and change this line

selector: 'textarea#elm1',

to :

selector: 'textarea',
Edited by PeaceLaced on 21-03-2014 01:41,
0 replies
Z
zizub
Z
zizub 10
  • Member, joined since
  • Contributed 156 posts on the community forums.
  • Started 29 threads in the forums
  • Started this discussions
answered
Member

Thank you very much for helping, afaaro. Now everything looks good.
0 replies
— 5 months later —
M
maestroweb
M
www.fusion-ar.org
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 8 threads in the forums
answered
Junior Member

but if i want to add image.js liste images how i can add it in this new tinymce
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 3 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

A
A
afaaro 10
  • Senior Member, joined since
  • Contributed 295 posts on the community forums.
  • Started 68 threads in the forums
Z
Z
zizub 10
  • Member, joined since
  • Contributed 156 posts on the community forums.
  • Started 29 threads in the forums
  • Started this discussions
M
M
www.fusion-ar.org
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 8 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet