Topic: How Converting \r\n in <br> instead of <p> during a copy/paste ?
Hello,
All is in the subject, I wish I could replace the CR (\r\n) from the source text by <br /> instead of <p> </p> as actually in the target text.
Thanks for your help,
Pages 1
Hello,
All is in the subject, I wish I could replace the CR (\r\n) from the source text by <br /> instead of <p> </p> as actually in the target text.
Thanks for your help,
You should do this on your server side logic.
Hello,
All is in the subject, I wish I could replace the CR (\r\n) from the source text by <br /> instead of <p> </p> as actually in the target text.
Thanks for your help,
See this: http://www.tinymce.com/wiki.php/Plugin:paste
Particularly the "paste_text_linebreaktype" option (at the bottom of the list of options).
Hello,
Thank you for your response :
> Particularly the "paste_text_linebreaktype" option (at the bottom of the list of options).
I do that but it doesn't work, here is my code, is there something wrong ?
tinyMCE.init({
language: 'fr',
mode: "textareas",
theme: "advanced",
force_br_newlines: true,
force_p_newlines: false,
forced_root_block: false,
convert_newlines_to_brs: true,
paste_text_linebreaktype : "br",
editor_selector: "taSaisie",
plugins: "style,pagebreak,layer, ...
Hello,
Thank you for your response :
> Particularly the "paste_text_linebreaktype" option (at the bottom of the list of options).
You can also "capture" the paste data and operate on it before it's pasted. Try this in your config:
'paste_preprocess' : function(pl, o) {
o.content = o.content.replace(/\r?\n/gi,'<br />');
},That regex says "take any nl or cr/nl and change it into <br />".
Hope this helps.
Hi,
I replace my old tiny MCE version 3',minorVersion : '2.0.2' files with new TinyMCE 3.5b3 version to support IE9 .
After Replacing with new version my IE9 browser issue get resolved but with Ipad device (safari browser) we are facing new issue.
When ever we type any thing on text area for eg: test and save it.
After saving we are getting on text area <P> test </P>.
could any one help me out on this issue.
Pages 1
You are not logged in. Please login or register.