TinyMCE Pop Up Showing 404 Not Found - tinymce

Currently I am developing a website, and using TinyMCE as text editor for the admin backend. Overall it works well, but for several buttons like Link, Image, Media, or any button which should showing pop-up, the pop-up keep showing 404 Not Found.
I don't know what's the problem. I am sure I have included tinyMce.js, jQuery.tinyMce.js & tinyMCe.css.
Am I missing something?
This is script I added to my page
<script type="text/javascript">
jQuery(document).ready(function(){
///// TINYMCE EDITOR /////
jQuery('textarea.tinymce').tinymce({
// Location of TinyMCE script
script_url : 'js/plugins/tinymce/tiny_mce.js',
// General options
theme : "advanced",
skin : "themepixels",
plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,advlist",
inlinepopups_skin: "themepixels",
// Theme options
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,outdent,indent,blockquote,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "pastetext,pasteword,|,bullist,numlist,undo,redo,|,link,unlink,help,code,|,preview,|,forecolor,backcolor,removeformat,|,charmap,media,|,fullscreen",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
// Example content CSS (should be your site CSS)
content_css : "assets/css/plugins/tinymce.css",
// Drop lists for link/image/media/template dialogs
template_external_list_url : "lists/template_list.js",
external_link_list_url : "lists/link_list.js",
external_image_list_url : "lists/image_list.js",
media_external_list_url : "lists/media_list.js",
// Replace values for the template plugin
template_replace_values : {
username : "Some User",
staffid : "991234"
}
});
jQuery('.editornav a').click(function(){
jQuery('.editornav li.current').removeClass('current');
jQuery(this).parent().addClass('current');
if(jQuery(this).hasClass('visual'))
jQuery('#elm1').tinymce().show();
else
jQuery('#elm1').tinymce().hide();
return false;
});
});
</script>
After I check my console, it showing this error:
Failed to load resource: the server responded with a status of 404 (Not Found) localhost:82/indocreweb/backend/business/assets/css/plugins/tinymce.css
The path should be localhost:82/indocreweb/assets/css/plugins/tinymce.css ;
localhost:82/indocreweb/backend/business is the path for the page that using tinyMCE.
Can anybody help me with this?
Thank you.

I think I figured it out~ Even though it's quite awkward to answer my own question. Well, hopefully you won't do the same stupid mistakes like I did.
So based on web console, tracked down each page that couldn't be found and made sure they all exist (in my case it happened because part of some plugins was renamed wrong). Once I made sure they all can be found, the pop up works just fine.

In my case, the upload link was wrong, I changed the server URL, but forgot to change the tincymce setting.

Related

Tinymce UI issues and version

I have just started with Tinymce and am trying to build rich text editor on my web page using self-hosted package. After integration, setting the Theme to Advanced and Plugin to autoresize, I see the editor as -
Tinymce editor on web page (UI editor options looks distorted and not properly formatted)
I was expecting it to be something similar to what I see on Tinymce docs -
Tinymce editor on docs
Is this a Tinymce version specific or browser related issue? I tried downloading the latest version 5.8.2 (Development & Production), however the Themes I see are Silver & Mobile while it should be Simple & Advanced as I see in the official Tinymce documentations.
Also if I try to add multiple Plugins or Themes to my deployment as guided here, it doesn't reflect on my web page.
These is how I have initialized my Tinymce -
<script type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script>
<script>
$(document).ready(function(){
if ($("#Test").length) {
tinyMCE.init({
// General options
mode : "exact",
elements : "Test",
theme : "advanced",
width : 800,
plugins : "autoresize",
content_style: " div, p { font-size: 14px; }"
});
}
});
</script>
It looks like you are using version 3 of TinyMCE (9+ years old). Upgrade to version 5 and it should be a lot better.

Meteor React using TinyMce with react-tinymce problems with iPad

I have an app with Meteor React using TinyMce through react-tinymce (as per instructions at https://www.tinymce.com/docs/integrations/react/
I have a form component with TinyMCE which is called from an orderedlist to allow users to add comments. It works as expected except in the following situation:
When using either an iPad or iPhone (works fine on desktops and Android mobile).
The first instance of the form works as expected, however with subsequent attempts to add comments the cursor does not show up in TinyMCE and the user cannot enter their comments.
Without an external keyboard, when the form is opened the keyboard pops up - I have found that by manually closing the keyboard, then tapping in the textarea again it works.
With an external keyboard (on iPad), clinking the link in the menubar (I am using the link plugin) and then closing it and tapping in the textarea again it works.
I have attached code to show how TinyMCE is initiated (and removed), as well as how it is called in the form.
Any suggestions as to what I can try to get this to work properly on an iPad/iPhone would be greatly appreciated.
componentDidMount() {
tinymce.remove();
tinymce.init({
selector: '.addComments,
plugins: "autoresize link paste",
paste_as_text: true,
autoresize_bottom_margin: 10,
relative_urls: false,
link_title: false,
default_link_target: "_blank",
height: 200,
autoresize_max_height: 200,
toolbar: 'underline italic numlist link',
menubar: '',
skin: "lightgray",
statusbar: false,
content_css : '/css/content.css'
});
}
componentWillUnmount() {
tinymce.remove();
}
And it is rendered as follows:
<div className="AddComments" id={`background${this.props.meetingId}`} onChange={this.handleEditorChange}></div>
I found that others are having problems with TinyMCE on an iPad https://github.com/tinymce/tinymce/issues/2699 so I have switched to react-quill and it works fine across all platforms.

How to config writing direction from right to left in tinyMce with impresspages plugin

I try to update tinyMce plugin to be able writing from right to left (like Arabic,Urdu,Persian) .
So i found this code in tinyMce support
tinymce.init({
directionality : 'rtl',
});
The problem is that i don't found where i can add this lines ?
So what is the file to edit this issue
Wait for you answer ... Thank you
Here's the documentation about TinyMCE configuration in ImpressPages - http://www.impresspages.org/docs/tinymce
And example plugins to get you started - http://market.impresspages.org/plugins/?q=tinymce
Download any of it, check how it's built and change to your needs.
Yes its works, i turn it on to support right to left:
For the default settings it was just edit Ip/Internal/Core/assets/tinymce/default.js
and add : directionality : 'rtl', over ipTinyMceConfig = function ()
For update the pluging FullTinyMCE http://market.impresspages.org/plugins/FullTinyMCE
i edited the file Plugin/TinyMceComplete/assets/tinymcecomplete.js
and add this line : tinyMceDefault.directionality = 'rtl';

Changing the theme with jstree 3.0.0

I'm trying to change the theme as follows:
I copied the contents of the default folder and copied them into a folder called david
I used replace all in style.css to change instances of .jstree-default with .jstree-david in my editor
I linked to the david stylesheet
I added this code to the core object of the jstree config object
"themes": {
"name": "david",
"dots": true,
"icons": true
}
The tree renders with none of the usual dots and icons and click does not expand the root nodes.
How do you create a theme for this new jstree? The style.css file and associated sprites are different from the version 1 themes I used to work with.
Are there any themes available already created for jstree 3.0.0?
UPDATE:
So used to getting my information from StackOverflow, I was delighted to get help on this issue directly from jstree's author in a very timely manner.
Do your remember include your css file successfully?
I use the following code to change the theme to dark. Hope to help you.
$('#jstree_demo_div').jstree({
'core' : {
"themes": {
"name": "default-dark",
"dots": true,
"icons": true
},
...
<link rel="stylesheet" href="/media/images/jstree_themes/default-dark/style.min.css" />

fbAsyncInit is not Firing

See this Page Tab (its only a test page, just fan it :-)
http://www.facebook.com/pages/Ludwig-Test/127771653944246?sk=app_165323306883725
its working in FF. But not in IE.
You should see 2 Alert boxes, one from fbAsyncInit and one from getLoginStatus. in IE neither ist coming. but now to the funny part. Press F12 to open the DeveloperTools from IE. and click on "iPad Gewinnspiel" again. now its working.
Right klick on the icon of "iPad Gewinnspiel" to open the page in a new tab. -> not working. again with F12 and it will work.
Does anyone have any idea what i could do to fix this ?
TIA
You need to initialise the FB object inside the async function
window.fbAsyncInit = function() {
FB.init({
appId : 'YOUR_ID',
status : true,
cookie : true,
xfbml : true,
oauth: true
});
// Do stuff with FB object here
}
I should really not use console.log in the code when i want to test IE.....
as soon as this for IE unknown commands are out of the code is working as expected.
Funny enough when the developer console is open this function exists and are working. stupid IE developer who thought of such nonsense.
see What happened to console.log in IE8? for more information.