The vanishing act of the Kendo Editor Custom Tool from the DOM

I'm currently working with a standard Kendo Window that contains a Kendo Editor within a modal window. I recently added a dropdownlist to the toolbar of the Kendo Editor for a customized functionality. The purpose of this custom dropdownlist is to insert specific values into the editor. You can see an example of how it functions here: . The custom toolbar populates properly, allowing you to select a value and have it inserted into the editor. However, after insertion, the value disappears completely, even from the DOM. Here is the code snippet that I am using:

On the ASPX side with the popup window:

<div class="SearchParam">
    <label class="control-label" for="txtAlertEmailBody" style="width:200px">Email Body</label>
    <textarea id="txtAlertEmailBody" rows="10" cols="30" style="width:100%;height:400px" aria-label="editor" data-bind="value: AlertEmailBody"></textarea>
    <script type="text/x-kendo-template" id="insertSymbol-template">
        <label for="templateTool" style='vertical-align:middle;'>Insert Placeholder:</label>
        <select id="templateTool" style='width:200px'>
        <option value='[DATE]'>[DATE]</option>
        <option value='[LIMIT]'>[LIMIT]</option>
        <option value='[AMOUNT]'>[AMOUNT]</option>
        <option value='[PERCENTAGE]'>[PERCENTAGE]</option>
        <option value='[ACCOUNT NUMBER]'>[ACCOUNT NUMBER]</option>
        <option value='[CUSTOMER NAME]'>[CUSTOMER NAME]</option>
      </select>
    </script>
</div>

And on the JavaScript side with the Kendo implementation:

if (!$("#txtAlertEmailBody").data("kendoEditor")) {
    $("#txtAlertEmailBody").kendoEditor({
        encoded: false,
        tools: kendo.ui.Editor.prototype.options.tools.concat([
            {
                name: "customTemplate",
                template: $("#insertSymbol-template").html()
            }
        ]),

        resizable: {
            content: true,
            toolbar: true,
            encoded: false
        }
    });

    $("#templateTool").kendoDropDownList({
        change: function (e) {
            var inputValue = e.sender._inputValue();
            $('#txtAlertEmailBody').data('kendoEditor').exec("insertHtml", { html: inputValue });
        }
    });
}

var window = $("#emailAlert_popup").kendoWindow({
    width: "600px",
    visible: false,
    modal: true,
    actions: [
        "Maximize",
        "Close"
    ],
});

Answer №1

To solve this issue, I adjusted the width of the kendoWindow to prevent the problem from occurring in a smaller window size.

var emailWindow = $("#emailAlert_popup").kendoWindow({
    title: AlertType + " Email Edit Window",
    width: "890px",
    visible: false,
    modal: true,
    actions: [
        "Maximize",
        "Close"
    ],
});

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Troubleshooting Bootstrap 3.0: Issues with nav-tabs not toggling

I have set up my navigation tabs using Bootstrap 3 in the following way: <ul class="nav nav-tabs pull-right projects" role="tablist" style="margin-top:20px;"> <li class="active"><a role="tab" data-toggle="tab" href="#progress">In Pr ...

Align multiple elements in a responsive fixed container

I have been attempting to center multiple elements, including images and buttons, within a fixed div at the top of the screen. Despite trying various tricks I found online, none seem to be effective. My goal is to ensure that the alignment works seamlessly ...

Retrieve data from json files

After retrieving this object from my controller, I have a name, a list of beans, and a list of operations: { "name": "Charge", "beans": [ ], "operations": [ { "name": "getSize", "returnType": "java.lang.Integer", "descriptio ...

Strategies for avoiding the issue of multiple clicks on a like button while also displaying an accurate likes

My latest project involves creating a Like button component that features a button and a likes counter text field. The challenge I am facing is that each time I click on the button, it toggles between like and dislike states. However, if I rapidly press ...

Feeling overwhelmed by the potential capabilities of Angular Firestore

Seeking clarification as I am struggling to understand the usage of Angular and Firestore. Recently delved into Google Firebase and attempted CRUD operations with Firestore. What sets apart this library from others? import { Firestore } from '@angul ...

Updating the MembershipCreateUser method in MVC3

I have decided to expand the functionality of the membership provider by incorporating a new table to store additional user details. During the registration process, it is essential to populate this new table with the uniqueUserId from the membership ta ...

The importance of ensuring the security of JSON and web services

I have a unique situation where I am seeking specific advice on multiple questions related to my ASP.NET app. The application interacts with a SQL Server database through a web service, using JSON for creating JavaScript graphs and charts. Given the extens ...

Exploring the Power of Ajax with JQuery on the Django Development Server

I am currently setting up an Ajax request using JQuery (version 1.5) on a Django website running version 1.2.5. I am testing this on the Development Server as I intend to demonstrate it before deploying to production. Below is the javascript code snippet ...

Utilizing an alternative model in a partial view within ASP.NET Core MVC

As a beginner in MVC projects, I am currently working on my first project and trying to grasp how each component interacts with one another. The project involves creating a basic school system including courses, students, and enrollments. In the main view ...

Issue encountered while attempting to animate a spherical object within a confined space in Three.js

I'm fairly new to three.js and encountering issues while attempting to animate a sphere moving through a space. My approach involves creating a new sphere and using new THREE.Vector3().randomDirection() to set it in motion. The sphere is meant to mov ...

Error encountered: The property indexOf cannot be read. Possible issue with .load() function in jQuery causing this error

https://i.sstatic.net/R7zUX.png As I navigate through the page and interact with different elements, I encounter an error message. The Obj function, which is responsible for setting a property value in an object from a handlebars template input and loadi ...

What steps are needed to set up React SPA authentication using Keycloak and the PKCE flow?

This is my first time diving into the world of Keycloak. I have successfully set up a Keycloak instance on my local machine where I can create realms, clients, and more. I've come across several examples of using React with Keycloak, but none of them ...

I am looking to update the background color of the material UI helper text

In the image below, you can see that my background color is gray and my text field color is white. When an error is shown, the text field's white color extends and the password error message doesn't look good. I want the text field to remain whit ...

Utilizing Nested JSON for Stacked Highcharts Implementation

I've been researching extensively about nested json for Highcharts stacked percentage column, but I haven't been able to get the desired output. Below is the code that I have tried, but unfortunately it's not producing the expected result. ...

How to choose the option in one select box based on the selection in another, and vice versa

How can I dynamically select options in one select box based on the selection of another, and vice versa? I am using Ajax to redirect to a query page. while($result = mysql_fetch_assoc($query1)) { echo "<option value=".$result['username' ...

Deactivating controls while displaying the loading bar in AngularJS

I'm currently working on a web application using AngularJS. I want to incorporate a loading bar to signify long data load times from the server. To replicate heavy data loads, I am utilizing $timeout to trigger the loadbar when the operation begins a ...

Ways to split up array objects in an axios GET request

Hello, I recently implemented an AXIOS GET request that returns an array of objects. However, the current example I am using retrieves the entire array at once, and I need to separate the objects so that I can work with them individually. class CryptoAP ...

Can I securely hand off a JavaScript callback to an FFI function that executes it in a separate thread?

I need to use a C function that takes a callback and executes it on a separate thread: void execute_in_new_thread(void (*callback)()) { // create a new thread and run `callback` in it ... } To accomplish this from JavaScript using Node-FFI, I have to ...

What could be causing this JavaScript code to run sluggishly in Internet Explorer despite its simple task of modifying a select list?

I am currently developing a multi-select list feature where users can select items and then rearrange them within the list by clicking either an "Up" or "Down" button. Below is a basic example I have created: <html> <head> <tit ...

Progress Bars Installation

For more detailed information, visit: https://github.com/rstacruz/nprogress After linking the provided .js and .css files to my main html file, I am instructed to "Simply call start() and done() to control the progress bar." NProgress.start(); NProgress. ...