Tinymce plugin library files which are need - javascript

I am using the tinymce jquery plugin the version 3, there I have included the whole folder which I downloaded from their site, and linked the script in my jsp.
Here I need to link only one script file as you know. jquery.tinymce.js I have did that, but for using the advanced theme still I need to add some supported script files too.
I am not getting which are the only required files we need to add so I end up in adding the whole folder I guess which is not required.
Here is my project folder where I added the complete folder.
In the image we you can see the only file we are linking in jsp.
The question is what are the only required files I need to keep so that tinymce works fine with advanced theme and I want to remove the unwanted files and scripts which I am not making use of them.
Can anybody suggest me what are the files which are required.

You can fully remove the "examples" folder under tinymce.
I don't advice to delete any further, because normally the size of files is small and not worth the trouble. If you do want to continue deleting you can remove license.txt and start removing unnecessairy plugins :
Example give : if you don't want to use the Emoticons (found under plugins), delete the folder. All information on the plugins in TinyMCE 3.X can be found here http://www.tinymce.com/wiki.php/TinyMCE3x:Plugins

Related

How to implement plugins into Electron app?

I'm looking for a way to implement "Plugins" for my Electron tool.
Below is a pseudo example of how I'm thinking it would work
Supply .js/.zip/plugin file
File would contain name of plugin, and it's category (Global, Team centric, Misc)
File would contain HTML for the GUI, which get's placed in a div designated for tool space. This name would be added as an option to the necessary Select, as well as logic added to pull in the HTML to the same div
In the tool, select the plugin file:
page will load the JavaScript script, and add option to select along with logic to switch to the plugin
The hope is to automate my current process.
Currently I'm manually updating the index page to reference the new JavaScript script, and to add the option on the select
The JavaScript Script has logic in it looking at the Select, and looking to see if the option was selected
which then pulls in it's own HTML via a function within
Is there anything I can reference/utilize to make this work?
After 4+ months of working on this, I've managed to get this to work. I will try to outline my approach.
Each "plugin" or "tool" will need it's own .js file
the js file should contain an exports.html function that will return the html for the tool
the js file should contain an exports.Events function that adds all relevant event listeners
create a json file cataloging each tool, along with information needed i.e. a description, image path, .js file path, etc.
require the .js file when selected, load the html and the events
parse the json to figure out which tool to load along with needed info
all i need to do is update the json file and upload the .js file to add a new plugin.
I developed an electron app using vue as the front-end.
My idea was to develop plugins as vue plugins and publish via npm.
I used live-plugin-manager to install and uninstall plugins.
The dependencies were automatically removed by making use of a counter
The only problem I faced was how to load these installed plugins into my main app.
The workaround I found was posted as answer to my own question at How to use electron to load the vue plugins installed dynamically into a plugins folder
Hope it helps
I know I'm a little late to the party but I encountered the same problem. To solve it I have built a plugin framework for Electron called Pluggable Electron and it is available on npm.
The framework handles the lifecycle of plugins, provides as npm packages, like installation, activation, removal, etc. The plugins can then be called on at any time to exend the core app functionality.
The framework is still under development but you can find a 1st version here: pluggable-electron.
I expect it is too late for Marker but still answering here for anyone else that might have this question.

Editing all files & folders inside Wordpress Dashboard

I know it is possible to edit php and css file in the editor in dashboard [Appearance -> Editor].. But i was wondering why it is not possible to edit all the folders [including js files] in the editor..
I searched for this and found a plugin to make all files editable inside wordpress dashboard.. https://wordpress.org/plugins/solid-code-theme-editor/
But still is there anyway to do it by adding any javascript or shortcode or whatever??
Unfortunately there isn't a way to extend the types of files that Appearance -> Editor lets you edit (for example, adding files in subfolders, or JS files). I've tried to find a way to do this before, but - despite almost everything else being hook'able in WordPress - there is no way to hook into the file editor to change the way it works.
This could be for security reasons (having the ability to edit files like this can be a problem in the first place anyway), but in the end, the only way to add the ability to edit every file is to use an outside-of-WordPress editor, which is what the plugin you referred to does.
I usually disable the Editor entirely (by adding define('DISALLOW_FILE_EDIT',true); to wp-config.php), and use another method of editing the theme instead (usually FTP, or occasionally the file manager accessible through the web host's control panel). This way you'll have access to everything you need.

CKEditor doesn't see changes to plugin files?

I am trying to modify some basic plugins (the basic link dialog for instance), but it doesn't notice ANY of the changes I make to these files, even if I empty them. I've cleared my browser cache.
I notice ckeditor.js contains code similar to these files but as one big mess. Does it even read the plugin files, for plugins such as Link and Youtube? How can I modify these basic plugins?
Turns out ckeditor.js must be decompressed and modified.
The plugin files for built-in "plugins" are not actually used.

How to add a file library and be able to edit it

I want to use a specific file in Webstorm IDE for help with the autocomplete on other files, Im using the module pattern so one file has the main methods used for the others modules. So in Webstorm I added this file as a library as is explained here http://www.jetbrains.com/webstorm/webhelp/configuring-javascript-libraries.html .
The problem is that now that is a library I CANT edit it any more or add new code to this file. So I have to remove it from the Webstorm scope to be able to edit it. And then add it again in the scope(library) when Im working in the other files and has the ability to use the autocomplete.
So how can I add this file as a library AND tell webstorm that he should let me add and edit current content for this file?
Library files write protection was implemented by design to prevent users from making accidental modifications to them. Recommended workflow is to open library files as separate project for editing, or include them not as "library" but as a separate content root. http://youtrack.jetbrains.com/issue/WEB-1065 requires making the current behavior optional. You are welcome to vote for it

Why does dumping all JavaScript files into one giant file change their behavior?

I took a snapshot of the jquery.js file and jquery-ui files that I use and dumped them into a giant .js file with all of the other .js files that I use for my site.
When I do just this with no minfication/packing, the files stop working and I get "recursion too deep" errors on the file when I try to load it on my site instead of the usual .js files. All of the errors came from jquery and jquery-ui. Using a simple numbering scheme I made sure that the jquery.js/jquery-ui files were the first listed in the file and in the correct order (the same as includes as individual files.)
Two questions:
1) Doesn't the include tags for JavaScript have the same effect as dumping all of the files into one giant file? Is there extra isolation/insulation that JavaScript files get from being in their own script tags or in different files?
2) My goal is to make my site faster by having one huge .js file with all JavaScript I ever use in my site (which is heavy in JQuery) and minify that file. Why is this misguided? What is a better way to do it?
NOTE: Google's CDN version of the JQuery files don't work for me, all of the JQuery plugins/themes I use don't work with Google's versions (anyway who says that they can successfully use Google's CDN is lying.)
UPDATE: Thanks for the good advice in the answers, all of it helped me learn more about deploying JavaScript files on a production server. I am actually always using the latest SVN branch of the JQuery UI plugins and there were errors in the UI plugins that prevented them from being merged together with my files. I got the latest Theme Rolled plugins that are already minified in one file and that worked around the problem.
Probably your JavaScript files have some syntax errors. Browser can correct them when loading files one by one, but fail when "bad" files combined. You can try to compile your file using Rhino compiler (http://www.mozilla.org/rhino/)
java -cp build/js.jar org.mozilla.javascript.tools.jsc.Main giant.js
Also you can use JSLint validator (http://www.jslint.com/), thought likelly it will not be able to handle jQuery. But you still can combine all your files and validate them.
I'd recommend using a script manager such as this one to only register the files and plugins you need, and load them on the fly.
This keeps your requests to a minimum, and you don't have to load some huge 300k JS file one very page.
Another problem could be the load order changed. Most JavaScript files should be load order independent, but if you load jquery at the end after you have your:
$(document).ready(function() {});
you'll run into problems.

Categories

Resources