Generic file uploader for CKEditor 5 (ckeditor-angular) - javascript

I need to create a generic file upload plugin (pdf, docx, ...) that uploads to a server and resolves the link in the document
Is this possible? I found a bunch of 'solutions' in the last 2 weeks but whenever they use the word 'file', it ends up being images only.
Although a file browser/manager would be the best solution, it seems I can't use CKFinder since the backend must be flask and CKFinder only has certain connectors (php, coldfusion, ...)
I am sorry for the open-ended question but I am uncertain how to solve this properly.
PS: Custom builds do not seem to be supported directly as indicated by the introduction of the next link, but it looks like there could be a possible solution if CKEditor isn't implemented in a 'clean' way?
https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/frameworks/angular.html

CKEditor 4 provided some hooks to allow you to add your own custom file browser and connectors: https://ckeditor.com/docs/ckeditor4/latest/guide/dev_file_manager_configuration.html
This is what we used to roll our own file browser.
I think this is what you're looking for in CKEditor5
https://ckeditor.com/docs/ckeditor5/latest/framework/guides/deep-dive/upload-adapter.html#implementing-a-custom-upload-adapter

Related

Need ScriptReferenceProfiler.dll or alternate

I improving site performance and for that, I try to Bundle or combine ScriptResource.axd and Webresource.axd but before combine to I need to know javascript file reference name which is used by ajax control toolkit in asp.net web form
like this https://lancezhang.wordpress.com/2008/11/15/aspnet-ajax-performance/
I need ScriptReferenceProfiler.DLL to get a reference of the javascript file which is used in ajax toolkit on the web page.
do you have any idea to get this dll file
I go through this tutorial
https://channel9.msdn.com/Blogs/ASP-NET-Site-Videos/using-script-combining-to-improve-ajax-performance
Or if you have any alternate solution please let me know
The file you looking and reference from the link you add was here : http://aspnet.codeplex.com/releases/view/13356
I can not find it now so I uploaded for you here, both source code and binaries.
http://planethost.gr/so/ScriptReferenceProfiler.zip
http://planethost.gr/so/ScriptReferenceProfilerBinaries.zip

WebApp for Audio

I would like to build a webapp for audio „confoguration“. The basics are clear for me but there‘s one point I don‘t know how to accomplish it:
There will be several aufio files uploaded and included in the user dashboard. The user can see the files listed in their dashboard and should be now able to grab and drop them in a new space at the end of the site. After that they can export the whole new file. So out of 5 single audio files will be generated 1 whole file.
sorry.. do you get what I mean?
Thanks for your help!
You could use something like jQuery sortables in order to create the lists in your dashboard. Take a look here https://jqueryui.com/sortable/#connect-lists .
In case you don't want to use jQuery in your project, a search for "js sortable lists" should provide you with plenty other solutions.
In case I understood your question wrong and you are asking how to concatenate audio files, you may want to check out m4tthumphrey's ConcatAudioFilter https://gist.github.com/m4tthumphrey/a863aa64dd541cfb4472 to get an idea how this may be achieved.
(I assume you are using php serverside, as the post is tagged with php)
If you are asking about combining 5 audio files in one file. You can use ffmpeg. You can check the link, this is the node module for ffmpeg: https://github.com/fluent-ffmpeg/node-fluent-ffmpeg.

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.

Programmatically generate preview of Adobe files

I am willing to programmatically generate file previews for a large set of Adobe files. This should be done programmatically (not via user interface via recorded actions).
The idea is to generate jpg/png previews for psd files, pdf preview for indd files and so on.
Is there a library or SDK to easily do that?
I am open to every programming language that can get the job done, however I prefer a js solution since I am willing to run the script on a nodeJS server.
Is there any system requirement or program to be installed to make this thing work? Do I need an Adobe subscription to do that?
Thank you in advance.
I cannot find yet a proper solution in JavaScript. But this is a reference link I found on search engines.
https://unix.stackexchange.com/questions/11835/pdf-to-jpg-without-quality-loss-gscan2pdf
With ImageMagick on a server, it may help solve the problem.
Another reference link is on about to improve the speed and reduce the memory consumption. This may also help you integrate it on your server.
https://serverfault.com/questions/167573/fast-pdf-to-jpg-conversion-on-linux-wanted
This code snippet may help you. You may have to apply back-ends on your server instead of directly integrating it in your NodeJS server.
convert -density 300 file.pdf page.jpg

How to get the associated icon of a file in HTA (HTML/Javascript/VBScript)

I'm building an HTA application in which I need to display a list of file with their associated system icon.
I'm using FileSystemObject to list the file but there seem to have no way to get the icon...
I've found a script in VBS that can save the icon of a file into a .ico .
It read the file (PE resource file, .exe or dll) and parse the icon data.
I modified that script to return the icon's bytes, convert it to base64 and use embed base64 images in HTML.
Here's the original script: http://gilpin.us/IconSiphon/
Issue
) In most case the .ico contains multiple icons (many sizes and color depth) but there's no way I can specify which one to use (as I need 16x16 icons).
) Not all icons are displayed
) Could be slow with many file as it read exe and dll (but I'm ok with that, I can cache already fetched icon)
I've also tried some ActiveX control but none seem to work properly. Even those provided by microsoft (ShellFolderView or ListView) are very buggy.
Requirements
Must display 16x16 icon
Must allow multiple file selection
Everything must be embed in hta (if possible). No external .exe
Does anyone know a way to achieve that?
Thanks!
Use SHGetFileInfo() with the SHGFI_ICON flag.
http://msdn.microsoft.com/en-us/library/windows/desktop/bb762179(v=vs.85).aspx
The filesystemobject will provide you the necessary functions for enumerating files on the local filesystem. However to get the icon image you will need to use the win32 api per #seanchase's response or an external exe.
However you can access the win32api via javascript in the hta using the wshApiToolkit activex object - http://www.google.com/search?q=wshAPIToolkit.ucATO%2F&rls=com.microsoft:en-us&ie=UTF-8&oe=UTF-8&startIndex=&startPage=1
Find a copy of that and you're close to being done. It does require distributing the activex object with your code and shell executing the registration process from within the HTA so that might violate your third constraint. Though I believe you can base64 encode the exe into the hta in a dataurl and write that back out to the file system so it would at least be bundled into a single file. If you support that option then maybe embedding an exe that does the same would meet your requriements.
Definitely some hacky stuff that may be unstable on future OS versions - heck I'm not even sure the wshApiToolkit works on windows 7, and 8 is just around the corner. Good luck!
You indicated you're opened to installing ActiveX components and using them in your HTA.
If I had the time, I would approach this for myself by creating ActiveX components using Visual Studio to call FindResource, LoadResource and LockResource. These will enable access to the Group Icon resource for which I would then provide rich interfaces to iterate through the Icons offering the ability to extract BMPs (or PNGs).
This is "how" I would go about achieving this short of actually going off doing it.
Once I build a similar HTA interface and I faced the same problem. I solved the problem by creating a custom icon gallery and converting the images using base64. You may achieve the same by either converting or using sprite. Many UI does it, even java.swing has its own collection embbebed. As you noticed, reading from *.dll can speed down the application

Categories

Resources