This question is locked. New answers and comments are not allowed.
Hello,
When i copy/paste the following text from Word into the MVC Editor (version 2012.1.419.340)
It works fine in ie 9 (the output is a paragraphe in one line). In chrome (24.0.1312.52), the same text is in one paragraphe but in two lines (it cuts after "Utilisation" or somewhere else in the sentence).
The text from Word contains no formating (i pressed several times the clear format button). It's in calibri 12pt.
I can reproduce the problem everytime. I even created a brand new Word document with the same sentence re-typed (not pasted)
I tried with the new version of telerik mvc (Extensions for ASP.NET MVC Q2 2012) and the problem is still there.
Is it a known issue?
Any help would be appreciated.
Here's the fully code for this issue
@using (Html.BeginForm()) {
<fieldset>
<div class="editor-field">
@(Html.Telerik().EditorFor(model => model.Text)
.Encode(false)
.Tools(tools => tools
.Clear()
.Bold().Italic()
.Separator()
.InsertUnorderedList())
)
@Html.ValidationMessageFor(model => model.Text)
</div>
<p class="inputsAction">
<input type="submit" id="submitText" value="Save" />
</p>
</fieldset>
}
So once i click the save button, the saved content contains two lines instead of one.
It also occurs at http://demos.telerik.com/aspnet-mvc/editor
When you post the text, you can see that there's an unexpected line break in each sentences. If you copy-paste the same text from Notepad, the html is totally different and there's no line breaks.
When i copy/paste the following text from Word into the MVC Editor (version 2012.1.419.340)
Utilisation de languages de programmations dans de grands centres informatiquesIt works fine in ie 9 (the output is a paragraphe in one line). In chrome (24.0.1312.52), the same text is in one paragraphe but in two lines (it cuts after "Utilisation" or somewhere else in the sentence).
The text from Word contains no formating (i pressed several times the clear format button). It's in calibri 12pt.
I can reproduce the problem everytime. I even created a brand new Word document with the same sentence re-typed (not pasted)
I tried with the new version of telerik mvc (Extensions for ASP.NET MVC Q2 2012) and the problem is still there.
Is it a known issue?
Any help would be appreciated.
Here's the fully code for this issue
<fieldset>
<div class="editor-field">
@(Html.Telerik().EditorFor(model => model.Text)
.Encode(false)
.Tools(tools => tools
.Clear()
.Bold().Italic()
.Separator()
.InsertUnorderedList())
)
@Html.ValidationMessageFor(model => model.Text)
</div>
<p class="inputsAction">
<input type="submit" id="submitText" value="Save" />
</p>
</fieldset>
}
It also occurs at http://demos.telerik.com/aspnet-mvc/editor
When you post the text, you can see that there's an unexpected line break in each sentences. If you copy-paste the same text from Notepad, the html is totally different and there's no line breaks.
8 Answers, 1 is accepted
0
Pierre
Top achievements
Rank 1
answered on 14 Feb 2013, 03:49 PM
No one can answer my question?
0
Hello Pierre,
Dimiter Madjarov
the Telerik team
I tried to reproduce the issue on our side, but to no avail. I am attaching a short screen capture of my attempt. I am copying the text from Notepad++ and then from Word with formatting cleared and the text in the output paragraph is on a single line in both cases.
If the problem still exists on your side, you could send us a sample project, so we could test it locally and assist you further.
Dimiter Madjarov
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.
0
Pierre
Top achievements
Rank 1
answered on 20 Feb 2013, 04:36 PM
Hello Dimiter,
The difference between what I did and you is that you explicitly cleared the Word formatting. If you do not clear the formatting and paste the content into the editor, you'll see the text in two lines.
There's probably something different with my code than the demo because now, if i try the demo with the same text, it works, but it doesn't on my website.
I have put two screen shots of what i am able to reproduce on my website. The first one is the editor with the text in it and the html from the editor. The second one is the saved data. Before saving, i remove all the style and the tags generated from the editor and i only save the text with the paragraph. As you can see in the editor html, there's a break line after "Utilisation".
I also attached the word file that i used to do the test.
Thanks for your answers and time.
The difference between what I did and you is that you explicitly cleared the Word formatting. If you do not clear the formatting and paste the content into the editor, you'll see the text in two lines.
There's probably something different with my code than the demo because now, if i try the demo with the same text, it works, but it doesn't on my website.
I have put two screen shots of what i am able to reproduce on my website. The first one is the editor with the text in it and the html from the editor. The second one is the saved data. Before saving, i remove all the style and the tags generated from the editor and i only save the text with the paragraph. As you can see in the editor html, there's a break line after "Utilisation".
I also attached the word file that i used to do the test.
Thanks for your answers and time.
0
Hello Pierre,
I managed to reproduce the described behavior in both Chrome and IE 9 and escalated the issue to our development team. We will address it in one of our next releases.
If that is an option in the current scenario, I would suggest you to try our Kendo Editor, which does not contain this issue. I tested it with the same word document and the generated html was as expected.
Please let me know if I can assist you further.
Dimiter Madjarov
the Telerik team
I managed to reproduce the described behavior in both Chrome and IE 9 and escalated the issue to our development team. We will address it in one of our next releases.
If that is an option in the current scenario, I would suggest you to try our Kendo Editor, which does not contain this issue. I tested it with the same word document and the generated html was as expected.
Please let me know if I can assist you further.
Greetings,
Dimiter Madjarov
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.
0
Pierre
Top achievements
Rank 1
answered on 25 Feb 2013, 03:06 PM
Hello,
I have tested the same text into the kendo demo with chrome and it does the same erreur. In ie10 and ie9, it works fine.
I have attached the screenshot of the demo in chrome with the same word text.
thanks.
I have tested the same text into the kendo demo with chrome and it does the same erreur. In ie10 and ie9, it works fine.
I have attached the screenshot of the demo in chrome with the same word text.
thanks.
0
Hi Pierre,
The new line in the markup is not actually treated as such (i.e. it is not a <br> tag). This could be checked if the value of the Editor is retrieved through the API. I prepared a sample project which demonstrates this.
Dimiter Madjarov
the Telerik team
The new line in the markup is not actually treated as such (i.e. it is not a <br> tag). This could be checked if the value of the Editor is retrieved through the API. I prepared a sample project which demonstrates this.
Kind regards,
Dimiter Madjarov
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.
0
Pierre
Top achievements
Rank 1
answered on 28 Feb 2013, 03:00 PM
Thanks for your reply.
The real problem that i have is that i use what it is shown in the browser into a pdf file. So in the screenshot that i put on my last post is literally pasted into the pdf file. Since the editor is putting the text into several lines, the pdf will have several lines. I know that if i see the tag <br>, i'll do a line break in my pdf file. Same thing goes for paragraphs.
Also, i cannot open the project that you put because i am using visual studio 2010 and i can't convert the solution. Can you please make a solution for vs2010?
Thanks.
The real problem that i have is that i use what it is shown in the browser into a pdf file. So in the screenshot that i put on my last post is literally pasted into the pdf file. Since the editor is putting the text into several lines, the pdf will have several lines. I know that if i see the tag <br>, i'll do a line break in my pdf file. Same thing goes for paragraphs.
Also, i cannot open the project that you put because i am using visual studio 2010 and i can't convert the solution. Can you please make a solution for vs2010?
Thanks.
0
Hello Pierre,
I am sending you the modified solution for Visual Studio 2010. You could also check the Demo about Kendo Editor API. It demonstrates how you could retrieve the Editor's value.
If the current behavior of the Editor still does not fit the current scenario and you think that changing it will be useful for other users too, I would suggest you to submit it as a feature request in our User Voice forum. If the idea gets popular among our community we will consider implementing it in our future releases.
Dimiter Madjarov
the Telerik team
I am sending you the modified solution for Visual Studio 2010. You could also check the Demo about Kendo Editor API. It demonstrates how you could retrieve the Editor's value.
If the current behavior of the Editor still does not fit the current scenario and you think that changing it will be useful for other users too, I would suggest you to submit it as a feature request in our User Voice forum. If the idea gets popular among our community we will consider implementing it in our future releases.
Kind regards,
Dimiter Madjarov
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.