This is a migrated thread and some comments may be shown as answers.

Code added when Image is imported

2 Answers 38 Views
Editor
This is a migrated thread and some comments may be shown as answers.
cdikmen
Top achievements
Rank 1
cdikmen asked on 16 Sep 2016, 02:29 PM

Not sure what is causing this, but the following code is being added at the bottom of the HTML whenever I add an image to my RadEditor control and save the content (see below):

Can anyone tell me how to keep this from happenning?

<span style="border-radius: 2px; text-indent: 20px; width: auto; padding: 0px 4px 0px 0px; text-align: center; font: bold 11px/20px 'Helvetica Neue',Helvetica,sans-serif; color: #ffffff; background: #bd081c url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzBweCIgd2lkdGg9IjMwcHgiIHZpZXdCb3g9Ii0xIC0xIDMxIDMxIj48Zz48cGF0aCBkPSJNMjkuNDQ5LDE0LjY2MiBDMjkuNDQ5LDIyLjcyMiAyMi44NjgsMjkuMjU2IDE0Ljc1LDI5LjI1NiBDNi42MzIsMjkuMjU2IDAuMDUxLDIyLjcyMiAwLjA1MSwxNC42NjIgQzAuMDUxLDYuNjAxIDYuNjMyLDAuMDY3IDE0Ljc1LDAuMDY3IEMyMi44NjgsMC4wNjcgMjkuNDQ5LDYuNjAxIDI5LjQ0OSwxNC42NjIiIGZpbGw9IiNmZmYiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLXdpZHRoPSIxIj48L3BhdGg+PHBhdGggZD0iTTE0LjczMywxLjY4NiBDNy41MTYsMS42ODYgMS42NjUsNy40OTUgMS42NjUsMTQuNjYyIEMxLjY2NSwyMC4xNTkgNS4xMDksMjQuODU0IDkuOTcsMjYuNzQ0IEM5Ljg1NiwyNS43MTggOS43NTMsMjQuMTQzIDEwLjAxNiwyMy4wMjIgQzEwLjI1MywyMi4wMSAxMS41NDgsMTYuNTcyIDExLjU0OCwxNi41NzIgQzExLjU0OCwxNi41NzIgMTEuMTU3LDE1Ljc5NSAxMS4xNTcsMTQuNjQ2IEMxMS4xNTcsMT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jgyOCAyNy44MDEsMTQuNjYyIEMyNy44MDEsNy40OTUgMjEuOTUsMS42ODYgMTQuNzMzLDEuNjg2IiBmaWxsPSIjYmQwODFjIj48L3BhdGg+PC9nPjwvc3ZnPg==') no-repeat scroll 3px 50% / 14px 14px; position: absolute; opacity: 1; z-index: 8675309; display: none; cursor: pointer; border: medium none;">Save</span>

2 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 19 Sep 2016, 08:27 AM

Hi cdikmen,

It is likely that this formatting comes from the source app (e.g., MS Word) and RadEditor is not likely to cause it because it relies on the browser to get the content: http://docs.telerik.com/devtools/aspnet-ajax/controls/editor/managing-content/pasting-content/overview.

You can easily test this by pasting in a simple editable element (e.g.,: <div contentEditable="true" style="width: 300px; height: 300px; border: 1px solid red;"></div> ) and see if you get similar results.

If the content comes from MS Word, RadEditor can improve the pasted content by stripping out some formatting. You can see how to configure this in the following demo: http://demos.telerik.com/aspnet-ajax/editor/examples/cleaningwordformatting/defaultcs.aspx. It lets you experiment with different combinations so you can find the one that works best for your scenario and requirements.

Regards,

Marin Bratanov
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
cdikmen
Top achievements
Rank 1
answered on 23 May 2017, 12:27 PM

I have resolved this issue, but now I have another issue. When I paste text into RadEditor, then press ENTER (to add a new line), the editor is wiping out the text I pasted in. Sometimes it deletes the text below where I am attempting to add a new line, something above.

I have tried all configurations of the NewLineMode setting, but to no avail. Have you ever heard of this? I have looked at the HTML I have pasted in and all of the line breaks are <BR />

Any help would be appreciated.

Tags
Editor
Asked by
cdikmen
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
cdikmen
Top achievements
Rank 1
Share this question
or