Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6305
    Stefan
    Participant

    Feature request

    Is it possible for you to paste clipboard text
    as HTML code if there is any?

    Because if i copy text from an webside
    there is HTML code also in the clip board.
    Then sometimes it is nice to paste this HTML code
    into the editor and modify them, f.ex. delete JScript
    or modify absolute links

    Maybe you could provide an “Paste as..”-Dialog
    to choose what to paste from clipboard?

    :-D What do you think?

    #6327
    Yutaka Emura
    Keymaster

    Stefan wrote:
    Feature request

    Is it possible for you to paste clipboard text
    as HTML code if there is any?

    Because if i copy text from an webside
    there is HTML code also in the clip board.
    Then sometimes it is nice to paste this HTML code
    into the editor and modify them, f.ex. delete JScript
    or modify absolute links

    Maybe you could provide an “Paste as..”-Dialog
    to choose what to paste from clipboard?

    :-D What do you think?

    I don’t want to make EmEditor core bloated adding features like this, but it might be possible using a plug-in. Perhaps, someone can create a plug-in does just that.

    #18153
    Stefan
    Participant

    For others with same interest;

    in the meantime I utilize JavaScript to paste HTML format from clipboard, seems to work fine for me.
     

    EmEditor JavaScript macro:

    // get HTML formated clipboard content:
    strOUT = clipboardData.getData("html");	
    
    // if there is no HTML formated clipboard content, get plain TEXT content:
    if( strOUT == "" ){
    	strOUT = clipboardData.getData("text");
    	status = "TextApe: No HTML format found. Will paste pure text.";
    }else{
    	status = "TextApe: HTML format found and pasted.";
    }
    
    // write to document:
    document.selection.text = strOUT ;
    

     
     
    Until I got this idea, I utilized Peters ‘Windows clipboard raw viewer’ to get the HTML format.
    http://www.peterbuettner.de/develop/tools/clipview/
    Thanks, Peter.
    .

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.