Hi Team,
I am getting console issue with getParentElement(),this shows element value as null
which affects all other functionalaities.
function RadEditorElementDesignerModule(element) { RadEditorElementDesignerModule.initializeBase(this, [element]); }; RadEditorElementDesignerModule.prototype = { initialize: function() { RadEditorElementDesignerModule.callBaseMethod(this, 'initialize'); var selfPointer = this; this.get_editor().add_selectionChange(function() { selfPointer.doSomething(); }); this.doSomething(); }, doSomething: function() { var module = this.get_element(); Test.$('RadEditorElementDesignerModule').setInnerHTML('').hide(); var selection = this.get_editor().getSelection(); var element = selection.getParentElement(); if (element.designer) { if (designers[element.designer]) { try { designers[element.designer](element, module); BDS.$('RadEditorElementDesignerModule').show(); } catch (ex) { } } } }
Error:
Uncaught TypeError: Cannot read properties of null (reading 'designer')
at RadEditorElementDesignerModule.doSomething (Shell.aspx?
at RadEditorElementDesignerModule.initialize
at RadEditorElementDesignerModule.Sys$Component$endUpdate [as endUpdate] (VM4504 ScriptResource.axd:3685)
at $create (VM4790 bds-min.js:3)
at Telerik.Web.UI.Editor.ModulesManager.createModule (VM5225 ScriptResource.axd:391)
at Telerik.Web.UI.Editor.ModulesManager.createModules (VM5225 ScriptResource.axd:375)
at Telerik.Web.UI.Editor.ModulesManager.initialize (VM5225 ScriptResource.axd:365)
at c.RadEditor.initialize (VM5221 ScriptResource.axd:8095)
at c.RadEditor.Sys$Component$endUpdate [as endUpdate] (VM4504 ScriptResource.axd:3685)
at Sys$_Application$endCreateComponents [as endCreateComponents] (VM4504 ScriptResource.axd:4897)
doSomething @ Shell.aspx?
Can anyone please help me what should I replace.