This is a migrated thread and some comments may be shown as answers.

HTML Editor - incorporate a Watermark image

3 Answers 467 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Ruairi
Top achievements
Rank 1
Ruairi asked on 17 Aug 2017, 02:09 PM

We've implemented a HTML Editor and would like to be able to incorporate a Watermark image behind.  There is no tool at present to allow placing of a Watermark.  How would this be best implemented?

3 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 21 Aug 2017, 11:50 AM
Hello Tyler,

In general, the Kendo UI Editor allows a custom action item tool to be added to the toolbar. When it is clicked, a custom JavaScript function can be executed by configuring the exec attribute. You can check this Editor Custom Tools Demo.

On the following Dojo example you can find a very basic implementation of the Editor, where a custom tool is added. When clicked, it sets a background image on the Editor body (centered). This background will also be exported when using the PDF export feature of the widget. 

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Ruairi
Top achievements
Rank 1
answered on 30 Aug 2017, 02:02 PM

That worked great.

I would like to allow the user to select an image to be used as a watermark (like the insert image tool.  How straightforward would it be to implement this?

Regards

0
Dimitar
Telerik team
answered on 01 Sep 2017, 05:47 AM
Hello Tyler,

To achieve the desired scenario, I would suggest to try and create a custom tool that creates a dialog, where the user can insert the image URL, which is later used as a background for the editor. You can review and try to combine the example from this How-to article and the previously sent Dojo example.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Editor
Asked by
Ruairi
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Ruairi
Top achievements
Rank 1
Share this question
or