How to customize the tools inside the Upload window on Image browser from Kendo Editor

1 Answer 81 Views
Editor ImageEditor
shashank
Top achievements
Rank 1
Iron
shashank asked on 05 Jun 2023, 07:20 PM

I am using the Kendo Editor Image Browser from : https://demos.telerik.com/aspnet-mvc/editor/imagebrowser.
Where I have hidden/removed the 
1. Home icon
2.New Folder
3. Delete
4. Arrange By
5. Web Address
6. Alternate Text
using css on my local.

Is there any way to customize this without CSS?

Matthew
Top achievements
Rank 1
commented on 15 Apr 2024, 12:25 PM

Could i please ask if you could provide your code of applying the css and their values for the above?

Anton Mironov
Telerik team
commented on 18 Apr 2024, 11:52 AM

Hi Matthew,

In order to achieve the desired behavior, I would recommend using the following approach:

  1. In the "document.ready" scope, handle the click for opening the Image Browser.
  2. For the handler, use the jQuery selector for the element by using its title - "$("button[title='Insert image']")".
  3. Add a small setTimeout scope for providing time for the popup for the Image Browser to be rendered.
  4. Use the jQuery selectors for the elements that should be removed. For example, the selector for the Home icon is ".k-svg-i-home".
  5. Here is an example:
    <script>
        $(document).ready(function(){
            $("button[title='Insert image']").on("click", function(){
                setTimeout(function(){
                    $(".k-svg-i-home").css("display", "none");
                    $(".k-svg-i-folder-add").css("display", "none");
                    $(".k-icon-button").css("display", "none");
                    $(".k-tiles-arrange").css("display", "none");
                    $(".k-form-field").css("display", "none");
                })
            })
        })
    </script>

Here is a REPL example that I prepared for the case:

Give a try to the approach above and let me know if this is the desired result.

 

Kind Regards,
Anton Mironov

 

 

1 Answer, 1 is accepted

Sort by
0
Anton Mironov
Telerik team
answered on 08 Jun 2023, 12:03 PM

Hi Shashank,

Thank you for the details provided.

Yes, you are totally correct - using CSS is a perfect decision.

In order to use the built-in configurations, use the following article where they are listed:

 

Kind Regards,
Anton Mironov
Progress Telerik

As of R2 2023, the default icon type will be SVG instead of Font. See this blogpost for more information.

Tags
Editor ImageEditor
Asked by
shashank
Top achievements
Rank 1
Iron
Answers by
Anton Mironov
Telerik team
Share this question
or