javascript - Retain format jquery paste -


i having trouble retain format of text when pasting text area housed tinymce. have seen similar question has been asked, has not been answered thought i'd try luck.

i have tried various variations of tmce configuration, no dice , i'm not sure if i've missed something.

tinymce working, when use drop downs paste content text area. paste text area done through code behind vb.net , files being accessed txt files have spaces , line breaks; format kept correct without tinymce's presence, not sure regarding tmce, , whether has solutions this.

if more code required please , i'll amend issue appears tmce only.

thank you.

    <script src="../scripts/tinymce/tinymce.min.js" type="text/javascript"></script> <script type="text/javascript">     $(function () {         tinymce.init({             menubar: false,             paste_retain_style_properties: true,             paste_merge_formats: true,             selector: "textarea" 

update

i getting .txt file via drop down box pastes text file using code behind, see below example, ideally want achieve programmatically without having edit source files that'll real pain.

vb.net

    dim ddl2 dropdownlist = ctype(sender, dropdownlist)     dim ctl2 textbox = directcast(ddl2.namingcontainer.findcontrol("textbox2"), textbox)          if ddl2.selectedvalue = 1         ctl2.text = my.computer.filesystem.readalltext("c:\users\dave\documents\templates\message.txt") 

i not sure doing if take txt files , want keep formatting in html editor, will, likely, need replace new lines (\n and/or \r) html <br /> tag.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -