What components are absolute requirements for TinyMCE? - javascript

I am working within ExactTarget which is a SalesForce subsidiary application and using their language AMPscript to create web forms which will update a Database table for use on publicly visible web pages. I want to use a wysiwyg Text Editor to allow non-coders to have more flexibility in editing these form "textarea" components. It was suggested I use TinyMCE. The challenge is that for this project I do not have an FTP accessible area to store the full set of application folders. In other instances I've been able to include only the required components of a .js and get the required functionality.
I uploaded tinymce.min.js and placed the selector on the page. Without other components I don't see any text editing tools or a toolbar (nothing changed) on the still plain as day textarea.
Am wondering if anyone knows the core and minimal set of files from within the plugins, themes, skins and langs directory that would be required. If it's only a few components I can rebuild it and probably edit the code to locate the files within ExactTarget. Otherwise it may simply be too complex an undertaking for this project.
Any other suggestions on resolving this are welcome.

Assuming that you are building this tool in an ExactTarget microsite/landing page, is there any reason why you can't just use the CDN for TinyMCE? From TinyMCE's documentation, you would only have to include the following lines to get an editor working in a textarea:
<script src="http://tinymce.cachefly.net/4.0/tinymce.min.js"></script>
<script type="text/javascript">
tinymce.init({
selector: "textarea"
});
</script>
If for some reason this is not an option, and you have to upload TinyMCE files to ExactTarget, it actually is possible to upload files to a hierarchy by selectively uploading files to the Portfolio and/or uploading files to a microsite using personalized URLs.

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.

Attach PDF to PDF as attachment (not as a page) via Javascript in HTML (not in Acrobat)

I would like to generate a PDF portfolio using JS from an HTML/CSS page on a local machine. I would use a PDF template file which includes a PDF portfolio Navigator in SWF form. I have successfully accomplished this using C# and a command line program, but can not identify the proper Javascipt components to do this browser-side or pseuo-server with Node.js. Basically, I am looking for something which will allow me to append a PDF to a new or existing PDF via configuration choices and an 'assemble' action using a JS or HTML button. iTextSharp provides the required PDF interaction functionality, but I can not figure out to run this inside an HTML to allow configuration via the HTML/CSS DOM (i.e. checkboxes, text field desciptors, etc...). Does a library with this type of functionality exist?
So you want to create a PDF using JavaScript?
On a quick google search, I found what appears to be a javascript library for creating and manipulating PDFs call jsPDF
If you want information on how to upload files with JavaScript alone, here is an article on how to do that. It also shows you how to use the file element.
For style, I recommend using a CSS Framework is you don't know much about CSS. I personally use Twitter Bootstrap for quickly prototyping things. It's quick and easy, and has good documentation. You can also use this to see how to make a form in HTML. I haven't got any good starter tutorials for HTML off the top of my list, sorry.
If you don't know much about JavaScript, when it comes to getting the options from the form, so that you can use them as configuration options, I'd suggest using the jQuery framework. It'll help you get up and running quickly enough
Note, all of this shouldn't replace basic training in JavaScript and HTML/CSS. Frameworks make things simpler, but if you don't know how to do something without a framework, you're going to have a hard time with a lot of the more complicated things. This goes for every language

Tinymce plugin library files which are need

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

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

Categories

Resources