Hi,
Code snippets coming after remove table style from insert table popup in chrome,ie,ff.
I am facing a big problem in editor please give any solution.
Link: https://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx
Steps to reproduce
Step 1
Try to insert table from Insert Table from editor toolbar.
Step 2
Right click on cell then click on Table/cell properties. A table wizard popup will come.
Step 3
Click on Table Layouts tab on the table wizard popup.
Step 4
Select any value from table styles drop down.
Step 5
Now you can see TABLE>TR>TD>RemoveElement on the bottom of the editor.click on RemoveElement .
After click on RemoveElement you can see STYLE>RemoveElement again click on RemoveElement.
then you can see like below in the editor.
.telerik-reTable-2 { border-collapse: collapse; border: solid 0px; font-family: Tahoma; } .telerik-reTable-2 tr.telerik-reTableHeaderRow-2 { border-width: 1.0pt 1.0pt 3.0pt 1.0pt...........
6 Answers, 1 is accepted
Thank you for reporting this scenario.
I need a little bit of help, because I am unable to see the following part of the scenario:
After click on RemoveElement you can see STYLE>RemoveElement again click on RemoveElement.
After executing the 5th step, I get DIV -> RemoveElement or nothing in the module.
Can you please record and attached a video demonstration to see how to replicate the issue? Thank you!
Regards,
Rumen
Progress Telerik
Thanks Rumen for quick response.
PFA.
I was unable to upload .swf file extention that's why i was change it to .jpg format.
just chage it to .swf and see.
If you need any help then please let me know.
Thanks
Thank you for the video!
The problem was reproduced and logged for fixing in our backlog. Your Telerik points were also updated for the bug report.
Regards,
Rumen
Progress Telerik
Here we go:
<script>
var
$T = Telerik.Web.UI;
var
utils = $T.Editor.Utils;
var
isTag = utils.isTag;
var
dom = Sys.UI.DomElement;
var
addClass = dom.addCssClass;
var
removeClass = dom.removeCssClass;
var
hasClass = dom.containsCssClass;
var
$EditorModules = $T.Editor.Modules;
$EditorModules.RadEditorDomInspector.prototype.removeSelectedElement =
function
(elem) {
var
editor =
this
.get_editor();
var
tag =
function
(name) {
return
isTag(elem, name); };
var
cmd;
try
{
if
(tag(
"TD"
) || tag(
"TH"
)) {
editor.fire(
"DeleteCell"
);
}
else
if
(tag(
"TR"
)) {
var
cells = elem.getElementsByTagName(
"td"
);
if
(cells.length) {
this
.selectElement(cells[0]);
editor.fire(
"DeleteRow"
);
}
}
else
if
(tag(
"TABLE"
) || tag(
"TBODY"
) || tag(
"THEAD"
) || tag(
"TFOOT"
) ||
tag(
"EMBED"
) || tag(
"OBJECT"
) ||
tag(
"INPUT"
) ||
tag(
"IMG"
) ||
tag(
"HR"
) ||
tag(
"STYLE"
)) {
cmd =
new
Telerik.Web.UI.Editor.GenericCommand(
this
._removeElementString, editor.get_contentWindow(), editor);
window.setTimeout(
function
() {
elem.parentNode.removeChild(elem);
editor.setFocus();
editor.executeCommand(cmd);
editor.raiseEvent(
"selectionChange"
);
}, 0);
}
else
if
(elem !== editor.get_contentArea()) {
cmd =
new
Telerik.Web.UI.Editor.GenericCommand(
this
._removeElementString, editor.get_contentWindow(), editor);
Telerik.Web.UI.Editor.Utils.removeNode(elem);
editor.setFocus();
editor.executeCommand(cmd);
}
}
catch
(ex) { }
editor.raiseEvent(
"selectionChange"
);
}
</script>
<telerik:RadEditor ID=
"RadEditor1"
runat=
"server"
></telerik:RadEditor>
Please let me know how the fix works on your side and is there any issues or side effects after applying it.
Best regards,
Rumen
Progress Telerik
Thanks Rumen.
Now its working fine.
Thank you so much.
Regards,
Rumen
Progress Telerik