Insert image to CKEditor - ckeditor

I trying to use CKEditor5 and CKEditor-react in my electron app.
And i want to paste image in editor, but i have an error
filerepository-no-upload-adapter: Upload adapter is not defined.
Docs says that I mast using cloud. But my app must working locally and without internet
Can someone help me?

The docs say, in short, this:
To handle image upload in CKEditor 5 you can use one of these:
use the built-in Easy Image adapter (cloud service),
use the built-in CKFinder adapter (can work locally if you want),
write your own adapter (in which case, please refer to the UploadAdapter interface documentation).
The last option gives you a complete freedom on how and where you want to send those files.
PS. You can find a bit more details in this question: How to enable image upload support in CKEditor 5?

Related

Java PDF Generation iText Alternative

I am brand new to pdf generation or rendering. I am working on a application to replace iText and create kind of a RESTful endpoints using any Java related PDF APIs.
The library should be able to convert images and.., others to PDF.
Read/fill the data from PDF programmatically and also merge.
Also, if we can host it ourselves that would be the best choice.
Could you please provide some insight into this?
Not exactly a "Java related PDF API" but since you want to go REST anyway:
We use a headless Chrome in a docker container for generating PDFs. A good starting point is hc-pdf-server. We use it as an internal service using REST.
Note that this way, documents need to be designed using HTML and CSS. Also, you need to use a template engine in order to insert contents into your documents. We use Mustache. It is simple and does the job.

Atlaskit Editor Core with custom mention provider

I’m trying to implement a custom mention provider to the Editor Core unsuccessful because I had not found any documentation and/or example how to do it.
Any1 has a reference or real example about it? I want to use the mention plugin on the editor core without making an api call, just want to load the list of participants that are already load before.

Upload function using forms publisher with the <browser>

What necessary steps must be taken in order to upload a file from local machine to ContentCenter using Forms Publisher to create a DCR. As far as I understand the instance only lets you browse files within the specified workarea. What I would like to do is use it to upload an image instead to a specified folder in the workarea instead.
Can anyone provide me with the steps/examples to solve this? Would be really appreciated.
Thank you.
You can do that with a custom plugin in Tiny MCE. Create a sevlet
that has a browse button with upload functionality to teamsite
workarea. Call that in Tiny MCE on click of an icon.
You can also create a CGI and call it in datacapture.cfg using callouts.
Let me know if you need more details.

Implement drag-and-drop using AJAX in CakePHP

I wish to create a drag and drop feature for adding profile picture using CakePHP. Are there any samples which I can follow or a step by step guide?
I sourced many samples online but none of them cater for CakePHP.
I basically need a simple drag n drop for users to drag their profile image and the URL of the image is reflected in the database. The user will be able to edit another profile image. What approach should I use for this?
what you want to do is mostly about front-end, the back-end is generic server handling (in this case, PHP upload handling) and has little to do with Cake. That's why you don't see a specific cake tutorial for this. So, look up jquery drag drop and ajax upload. You'll also need to understand Cake rather well (well enough to adapt those online sample code to your Cake app).
I recommend you to use jQuery UI's draggable and droppable interactions.
Integrating them in CakePHP is quite easy, just follow the manual instructions to include Javascript files in a CakePHP application.
Finally, updating the database to reflect the URL of the image can be easily done with jQuery as well, using the AJAX related methods (e.g. post).

Javascript file upload mechanism

I need for users to upload files (mostly images) without leaving the current webpage. What's the best tool, library or mechanism for doing this? I'm using the latest jQuery and Spring webmvc (with JSP), so if there's already a mechanism within them then that's ideal.
It would also be really great to have some kind of progress bar. Does that mean it requires coordination with the server to read the progress (where Spring would have to come into play)? Or is there a mechanism within JavaScript for this?
You should check out Plupload.
Plupload offers a cross-browser
JavaScript File uploading API that
handles multiple file uploads,
client-side progress meters, type
filtering and even client-side image
resizing and drag-and-drop from the
desktop. It achieves all of this by
providing backends for Flash,
Silverlight, Google Gears, HTML5 and
Browserplus and picking the most
capable available option.
Its really neat! Here's a link to some of their Demos...
http://www.plupload.com/example_jquery_ui.php
... and a screenshot of the jQuery UI queue widget (it has a progress bar!):
I hope this helps.
Hristo
I use uploadify pretty regularly: http://www.uploadify.com/
However it does use flash for the upload mechanism and as a result may create some issues if the user is authenticated.
You should use AJAX on the client side
http://www.webtoolkit.info/ajax-file-upload.html This tutorial covers all client side.
Om the server side
This tutorlal covers most of this issue:
http://www.ioncannon.net/programming/975/spring-3-file-upload-example/
Yopu can use jquery as well or any other JS framework.
But the mist important thing is the fact You need to remember that your tag on client side should have.
enctype='multipart/form-data'
property. it means that your request contains muultipart data.
Uploadify does that trick > http://www.uploadify.com/
All samples are php but you should be able to convert it to your platform.

Resources