Notifications
Clear all

How do I update TinyMCE

5 Posts
3 Users
0 Reactions
1,382 Views
(@agentexeider)
Posts: 9
Active Member
Topic starter
 

I know this has been asked before but I couldn't find any instructions.

But how do I update TinyMCE?

 
Posted : 24/10/2017 10:35 am
(@sheepcontrol)
Posts: 332
Reputable Member
 

What you could do (-untested-) is download TinyMCE @ https://www.tinymce.com/download/ and upload the new files to the js folder in your efiction folder on the webserver (do backup!).

Considering TinyMCE bundled with eFiction is like 9 years old, I have no idea if that will go smoothly regarding the configuration/settings delivered from eFiction.

 
Posted : 25/10/2017 3:27 pm
(@agentexeider)
Posts: 9
Active Member
Topic starter
 

my buddy told me he had to make changes to a php file. Though he for the life of him can't remember what file that is. Do you happen to know what php file he might be referring to?

I think probably because the file layout might be different so some spelling changes or something. But I'm not sure.

 
Posted : 03/11/2017 12:00 am
(@agentexeider)
Posts: 9
Active Member
Topic starter
 

Ok, I have an answer for how to update TinyMCE.

Step 1) Download and update your tinyMCE folder with the new up to date version.

Step 2) Find and open your Header.php file

Locate this code:

echo _DOCTYPE."<html><head>";
if(!isset($titleinfo)) $titleinfo = "$sitename :: $slogan";
if(isset($metaDesc)) echo "<meta name='description' content='$metaDesc'>";
echo "<title>$titleinfo</title>
<meta http-equiv="Content-Type" content="text/html; charset="._CHARSET."">";
if(!isset($_GET['action']) || $_GET['action'] != "printable") {
echo "<script language="javascript" type="text/javascript" src="""._BASEDIR."includes/javascript.js"></script>"
<link rel="alternate" type="application/rss+xml" title="$sitename RSS Feed" href="""._BASEDIR."rss.php">";"
if(!empty($tinyMCE)) {
echo "<script language="javascript" type="text/javascript" src="""._BASEDIR."tinymce/js/tinymce/tinymce.min.js"></script>"
<script language="javascript" type="text/javascript"><!--";
$tinymessage = dbquery("SELECT message_text FROM ".TABLEPREFIX."fanfiction_messages WHERE message_name = 'tinyMCE' LIMIT 1");
list($tinysettings) = dbrow($tinymessage);
if(!empty($tinysettings) && $current != "adminarea") {
echo $tinysettings;
}
else {
echo "
tinymce.init({
selector: 'textarea',
width: 700,
                        height: 500,
menubar: true,
                        theme: 'modern',
plugins: 'print preview fullpage searchreplace autolink directionality visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists textcolor wordcount imagetools contextmenu colorpicker textpattern help',
  toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify  | numlist bullist outdent indent  | removeformat',
  image_advtab: true,
  templates: [
    { title: 'Test template 1', content: 'Test 1' },
    { title: 'Test template 2', content: 'Test 2' }
  ],
content_css: [
  '//fonts.googleapis.com/css?family=Lato:300,300i,400,400i',
  '//www.tinymce.com/css/codepen.min.css']
  });

Firstly, your tinymce base install directory reference needs to be changed. It will look like this

echo "<script language="javascript" type="text/javascript" src="""._BASEDIR.[b"]"tinymce/jscripts/tiny_mce/tiny_mce.js">

you need to change it to the new path that looks like this

src="""._BASEDIR."tinymce/js/tinymce/tinymce.min.js">[/code"] Note the file name is tinymce DOT min DOT js, and note the underscores in the file name and the breadcrumb trail.

secondly you're going to need to reconfigure the display for the new TinyMCE editor. There are several ways to do this, different options or plugins you can add, even some premium options. Here is a base version with the tool bar enabled with all the plugins except the premium ones of course.

look below the install path for the tinymce.init section and paste this in there, again refer to the tinymce website to find what configuration you want, there is even a skin creator if you want to get fancy.

tinymce.init({
selector: 'textarea',
height: 500,
menubar: true,
                        theme: 'modern',
plugins: 'print preview fullpage searchreplace autolink directionality visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists textcolor wordcount imagetools contextmenu colorpicker textpattern help',
  toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify  | numlist bullist outdent indent  | removeformat',
  image_advtab: true,
  templates: [
    { title: 'Test template 1', content: 'Test 1' },
    { title: 'Test template 2', content: 'Test 2' }
  ],
content_css: [
  '//fonts.googleapis.com/css?family=Lato:300,300i,400,400i',
  '//www.tinymce.com/css/codepen.min.css']
  });

past that you ight get some presentation problems, aligment errors, which I'm still working on trying to figure out how to fix.

-Agent

 
Posted : 05/11/2017 12:54 am
(@ladama)
Posts: 57
Trusted Member
 

So I've decided to take the plunge and try out updating tinyMCE as well. At my test archive, I uploaded the latest version, changed the directory URL and am now just fussing with the different plugins and buttons and such.

Few things I'm hoping someone will be able to help me figure out:

*We have the shoutbox initiated and now the input area for the SB is a tinyMCE input rather than just plain, how can I disable it in certain spots on the site?

*Right now the little "use tinyMCE" check box below story and review inputs no longer lets me toggle between a plain text field and the tinymce editor, any way to restore this? (Or does tinyMCE have a Plain Text plugin maybe?)

*Though we don't use images a ton, I like with insert image that it would give me a list of images I've uploaded, but the updated tinyMCE won't let me do that any more, any way to get this back or at least some kind of work around? (it looks like they depreciated the external_image_list_url command in 4.0)

*Kind of general but how can I get an auto-width going with tinyMCE boxes, especially getting it to autosize for mobile screens?

I'll keep looking but help is appreciated!

 
Posted : 15/03/2018 6:04 pm
Share: