HTML Input Droppable + Libre Office

I have a droppable input.

  • 1- When I drag and drop the html text, the drop works ...
  • 2- When I drag gedit (note linux block), drop function

  • 3- But when I want to remove selected text from LibreOffice Writer or Calc, it does not work ...

I created a fiddle if someone can help me ...: http://jsfiddle.net/CnwvC/ with code

<script src="http://code.jquery.com/jquery-1.9.1.js"></script> <input id='inputid' type='text' value="snif"> <p>html blabla to test to drop </p> 
+6
source share
2 answers

Instead of gedit, the text content of LibreOffice is not plain text . This may be one of the reasons why it does not allow dragging content into the input field.

An interesting fact is that if you drag content from a web page to a document in Writer, you’ll get the HTML content of the page (all tags), but if you do the same in Google Chrome, you’ll get rich content (like color, formatting, etc.). This has been reported by other people .

If you try to drag the contents of LibreOffice to any area in Firefox, this will be the same problem.

So, the problem is not your code, but that LibreOffice (Writer, Impress and all other applications) integrate with the browser libraries.

Hope this helps you, this is not a common problem.

thanks

+2
source

When you copy a section of a document, the program puts on the clipboard, possibly more than one version of what you copied.
Versions are marked by their format.
For example, if you paste a snippet into a text editor such as vim, it will choose the option “text only” because it does not deal with “richness of text”.
There may also be a version in HTML format and another in rich text format.

Prior to insert application to select the correct version.
If it does not indicate, then the system (my experience in Windows) selects the most generally accepted, i.e. Simple text.
This is explained in this MSDN page .

0
source

Source: https://habr.com/ru/post/953986/


All Articles