Telerik Forums
Community Forums Forum
9 answers
204 views

Hello,

Although Telerik is awesome I wish to delete my Telerik account, Telerik Forums account and all of the data associated with this account. Please help me out with this.

 

Thanking You,

With Regards,

Subhadeep Bhattacharyya.

1 answer
67 views
Here's my current code, where on the button clicks I'm opening a popup in which the user can type anything and insert it into the cursor position, it's working fine.

Problem:- When I save my text like this <p>I’m looking for the parsing to keep my deeply nested div structure but the deepest div allows inline content. For some reason, a new div gets injected though. Which I’m later removing. I’d rather not have that hack though. My name is&nbsp;<span contenteditable="false" class="uneditable" style="user-select: none; opacity: 0.5; background-color: red; padding: 2px;" id="12312381829919">rahul</span>.</p>
where rahul is a custom value inserted using a popup with properties like id & style 

but when I parse this value onMount from API, the editor doesn't keep my style and id properties and when inspected the text in the editor looks like 

<p>I’m looking for the parsing to keep my deeply nested div structure but the deepest div allows inline content. For some reason, a new div gets injected though, which I’m later removing. I’d rather not have that hack though. My name is&nbsp;<span contenteditable="false" class="uneditable" >rahul</span>.</p>

which Is without ID and style tag 

here's my code for reference 

import React, { useRef, useState } from "react";
import { Editor, EditorTools, EditorUtils, ProseMirror } from "@progress/kendo-react-editor";
import "@progress/kendo-theme-default/dist/all.css";
import { Button } from "@progress/kendo-react-buttons";
import { Dialog, DialogActionsBar } from "@progress/kendo-react-dialogs";
import { Input } from "components/atoms/input/Input";

export default function KendoEditor({ type, updateData, initalVal }) {
  const [isDialogVisible, setDialogVisible] = useState(false);
  const [customData, setCustomData] = useState("");
  const [value, setValue] = useState("test");
  var initialValue =
    type === "header" || type === "footer" ? initalVal?.data?.content : initalVal?.content;
  const editorRef = useRef(null);
  const {
    Bold,
    Italic,
    Underline,
    Strikethrough,
    Subscript,
    Superscript,
    ForeColor,
    BackColor,
    CleanFormatting,
    AlignLeft,
    AlignCenter,
    AlignRight,
    AlignJustify,
    Indent,
    Outdent,
    OrderedList,
    UnorderedList,
    NumberedList,
    BulletedList,
    Undo,
    Redo,
    FontSize,
    FontName,
    FormatBlock,
    Link,
    Unlink,
    InsertImage,
    ViewHtml,
    InsertTable,
    InsertFile,
    SelectAll,
    Print,
    Pdf,
    TableProperties,
    TableCellProperties,
    AddRowBefore,
    AddRowAfter,
    AddColumnBefore,
    AddColumnAfter,
    DeleteRow,
    DeleteColumn,
    DeleteTable,
    MergeCells,
    SplitCell,
  } = EditorTools;
  const { Schema, EditorView, EditorState } = ProseMirror;
  const nonEditable = {
    name: "nonEditable",
    inline: true,
    group: "inline",
    content: "inline+",
    marks: "",
    attrs: {
      contenteditable: { default: null },
      class: { default: null },
      style: { default: null },
      id: { default: null },
    },
    atom: true,
    parseDOM: [{ tag: "span.uneditable", priority: 51 }],
    toDOM: (node) => [
      "span",
      {
        contenteditable: false,
        class: "uneditable",
        style:
          "user-select: none; opacity: 0.5; background-color: red;text-weight:600;padding:2px;",
        id: node.attrs.id,
      },
      0,
    ],
  };

  const toggleSidebar = (type, props) => {
    return (
      <Button
        onClick={() => {
          setDialogVisible(true);
          //  setActiveProperties(type);
        }}
        onMouseDown={(e) => e.preventDefault()}
        onPointerDown={(e) => e.preventDefault()}
        title="Insert Custom Data"
        imageUrl="https://demos.telerik.com/kendo-ui/content/shared/icons/sports/snowboarding.png"
        imageAlt="KendoReact Buttons Snowboarding icon"
      />
    );
  };

  const handleInsertCustomData = () => {
    const { view } = editorRef.current;
    const schema = view.state.schema;

    // get the new node from the schema
    const nodeType = schema.nodes.nonEditable;

    // create a new node with the custom data
    const node = nodeType.createAndFill(
      {
        class: "uneditable", // Keep the existing classes
        style: "user-select: none; opacity: 0.5; background-color: red;", // Add red background color
        id: "nernksf", // Add unique ID using new Date()
      },
      schema.text(customData)
    );

    // Insert the new node
    EditorUtils.insertNode(view, node);
    view.focus();

    // Close the dialog
    setDialogVisible(false);
    setCustomData("");
  };
  console.log(initialValue);
  const onMount = (event) => {
    const { viewProps } = event;
    const { plugins, schema } = viewProps.state;

    let nodes = schema.spec.nodes.addToEnd("nonEditable", nonEditable);

    const mySchema = new Schema({ nodes: nodes, marks: schema.spec.marks });

    console.log(type, initialValue);
    const doc = EditorUtils.createDocument(mySchema, initialValue ? initialValue : "");

    return new EditorView(
      { mount: event.dom },
      {
        ...event.viewProps,
        state: EditorState.create({ doc, plugins }),
      }
    );
  };
  //console.log(value);
  const handleEditorChange = (event) => {
    const data = event?.html;
    //console.log(data);
    setValue(data);
    if (type === "header" || type === "footer") {
      updateData({ visible: initalVal?.visible, data: { ...initalVal?.data, data } });
    } else {
      updateData({ ...initalVal, data });
    }
  };
  return (
    <div>
      <Editor
        ref={editorRef}
        onMount={onMount}
        onChange={handleEditorChange}
        tools={[
          [Bold, Italic, Underline, Strikethrough],
          [Subscript, Superscript],
          ForeColor,
          BackColor,
          [CleanFormatting],
          [AlignLeft, AlignCenter, AlignRight, AlignJustify],
          [Indent, Outdent],
          [OrderedList, UnorderedList],
          [NumberedList, BulletedList],
          FontSize,
          FontName,
          FormatBlock,
          [SelectAll],
          [Undo, Redo],
          [Link, Unlink, InsertImage, ViewHtml],
          [InsertTable, TableProperties, TableCellProperties],
          [AddRowBefore, AddRowAfter, AddColumnBefore, AddColumnAfter],
          [DeleteRow, DeleteColumn, DeleteTable],
          [MergeCells, SplitCell],
          [
            (props) => toggleSidebar("dataSourceProperties", props),
            (props) => toggleSidebar("formulaProperties", props),
            (props) => toggleSidebar("letterProperties", props),
            (props) => toggleSidebar("conditionBuilder", props),
          ],
        ]}
        contentStyle={{
          height: 320,
        }}
        //value={initialValue}
      />
      {isDialogVisible && (
        <Dialog
          title="Insert Custom Data"
          onClose={() => setDialogVisible(false)}
          visible={isDialogVisible}
        >
          <div>
            <Input
              type="text"
              value={customData}
              onChange={(e) => setCustomData(e.target.value)}
              label="Enter name"
            />

            <DialogActionsBar>
              <button
                className="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base"
                onClick={() => setDialogVisible(false)}
              >
                No
              </button>
              <button
                className="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base"
                onClick={handleInsertCustomData}
              >
                Yes
              </button>
            </DialogActionsBar>
          </div>
        </Dialog>
      )}
    </div>
  );
}

0 answers
101 views

I am writing to raise an issue regarding a problem I encountered while upgrading our Sitefinity instance. We recently initiated an upgrade process to the latest version of Sitefinity, and we've encountered an issue related to the AjaxControlToolkit path not being found.

Despite following the standard upgrade procedure and ensuring that all necessary components and dependencies were properly migrated, we consistently encounter a "Could not find a part of the path '...\AjaxControlToolkit.3.0.20820.0'" error when attempting to use the AjaxControlToolkit features. The AjaxControlToolkit Package is present in the package folder but it is unable to locate it.

    • Previous Sitefinity Version: 11.0.6701
    • Target Sitefinity Version: 14.1.7800
    • AjaxControlToolkit Version: 3.0.20820.0
  1. Error Details:

    • Error Message: "Could not find a part of the path'...\AjaxControlToolkit.3.0.20820.0"

This happens when i try to upgrade all the process happens seemlessly only this creates the issue please provide the solution.

And after the fail upgrade it's not even rollbacking the updates. 

0 answers
71 views

While uploading multiple files in Async due to the slow internet connection it gave connection errors and file uploading failed and asked to retry the file.

Is there any solution to my problem???

1 more thing can I upload multiple files synchronously???

 

0 answers
60 views

Hi Team ,

We have recently changed session state from InProc to Custom in web.config (we want to work with Custom session state only). and after that  while generating telerik reports Events like ItemDataBound  ,ItemDataBind are not getting fired . 

We are using DLL version 15.1.21.616

Can someone please help with this issue ASAP ? 

Payal
Top achievements
Rank 1
 asked on 08 Mar 2022
1 answer
112 views

Hi,

I would love if you could help me, how do I change the background of the Appointment Dialog and also the border of the dialog?

I tried to change in all sorts of places in the code without success.

Thanks
Stenly
Telerik team
 answered on 24 Dec 2021
0 answers
48 views

Hello everyone,

Telerik TV was our first initiative to provide educational and technical video content to our developer community.

It has been replaced by the more advanced Virtual Classroom, which was also recently revamped. The service is available to all licensed customers and we invite you to check it out here:

https://www.telerik.com/support/virtual-classroom

Regards,
the Progress Telerik team

Telerik Admin
Top achievements
Rank 1
Iron
 asked on 07 Nov 2018
3 answers
98 views
I have tried with 3 different computers, all with working SIlverlight installed in the browsers(both IE and Firefox).
When trying to watch any of the videos with the SIlverlight players it just shows me the Telerik intro and then IE says:

Webpage error details
  
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
Timestamp: Mon, 28 Mar 2011 22:38:40 UTC
  
  
Message: Unhandled Error in Silverlight Application [Arg_COMException]
Arguments: 
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.60129.0&File=mscorlib.dll&Key=Arg_COMException ;  at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
   at MS.Internal.XcpImports.Analytics_Start()
   at Microsoft.Expression.Encoder.AdaptiveStreaming.PlaybackInfo..ctor(MediaElement me)
   at Microsoft.Expression.Encoder.AdaptiveStreaming.AdaptiveStreamingSource.set_MediaElement(MediaElement value)
   at TelerikTv.SilverlightMediaPlayer.MainPage.<SetSmoothStreamingSource>b__4(Object s, EventArgs e)
   at Telerik.Windows.Controls.RadMediaItem.AttachStream()
   at Telerik.Windows.Controls.RadMediaItem.SelectInternal()
   at Telerik.Windows.Controls.RadMediaItem.OnSelected(RadRoutedEventArgs e)
   at Telerik.Windows.Controls.HeaderedSelector.OnIsSelectedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at Telerik.Windows.PropertyMetadata.<>c__DisplayClass1.<Create>b__0(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
   at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
   at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet)
   at Telerik.Windows.Controls.HeaderedSelector.ItemSetIsSelected(Object item, Boolean value)
   at Telerik.Windows.Controls.HeaderedSelector.SelectionChanger`1.SynchronizeInternalSelection()
   at Telerik.Windows.Controls.HeaderedSelector.SelectionChanger`1.End()
   at Telerik.Windows.Controls.HeaderedSelector.SelectionChanger`1.SelectJustThisItem(T item)
   at Telerik.Windows.Controls.HeaderedSelector.OnSelectedIndexChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at Telerik.Windows.PropertyMetadata.<>c__DisplayClass1.<Create>b__0(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
   at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
   at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet)
   at Telerik.Windows.Controls.RadMediaPlayer.Play()
   at TelerikTv.SilverlightMediaPlayer.MainPage.SetSmoothStreamingSource()
   at TelerikTv.SilverlightMediaPlayer.MainPage.ttvPlayer_MediaEnded(Object sender, RadRoutedEventArgs e)
Line: 1
Char: 1
Code: 0
  
  
Message: Unhandled Error in Silverlight Application 
Code: 4004    
Category: ManagedRuntimeError       
Message: System.Exception: [Arg_COMException]
Arguments: 
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.60129.0&File=mscorlib.dll&Key=Arg_COMException
   at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
   at MS.Internal.XcpImports.Analytics_Start()
   at Microsoft.Expression.Encoder.AdaptiveStreaming.PlaybackInfo..ctor(MediaElement me)
   at Microsoft.Expression.Encoder.AdaptiveStreaming.AdaptiveStreamingSource.set_MediaElement(MediaElement value)
   at TelerikTv.SilverlightMediaPlayer.MainPage.<SetSmoothStreamingSource>b__4(Object s, EventArgs e)
   at Telerik.Windows.Controls.RadMediaItem.AttachStream()
   at Telerik.Windows.Controls.RadMediaItem.SelectInternal()
   at Telerik.Windows.Controls.RadMediaItem.OnApplyTemplate()
   at System.Windows.FrameworkElement.OnApplyTemplate(IntPtr nativeTarget)     
  
Line: 382
Char: 1
Code: 0

What to do?
Other sites with Silverlight content works great.

Sincerely, Thomas
Iva
Telerik team
 answered on 16 Apr 2015
1 answer
74 views
I was using http://tv.telerik.com to learn about the ASP.Net tools during my trial, but now i can't access the webpage anymore.  I just get redirected back to http://www.telerik.com/videos   

Is there anywhere i can access the videos from the TV channel?
Marin Bratanov
Telerik team
 answered on 01 Apr 2015
0 answers
19 views
RadChart adds a highly requested support for secondary and multiple Y axes. The new feature is useful when the values of the displayed data series vary a lot from one another or different types of data should be presented in one chart. The scale of each added Y axis corresponds to the associated data series and auto adjusts its range.RadTreeView now features its own UI Virtualization that was reused from our RadGridView control. Now you can scroll even faster through large amount of nodes.RadScheduler supports additional  built-in resources - Category, Importance and TimeMarker
sheylasl
Top achievements
Rank 1
 asked on 17 Feb 2014
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?