It's been a while that I've been reported about a problem on the software I'm on charge. I will try to explain it as much detailed as possible (Sorry if my english seems bad to you by the way ^^').
Context : The software has been developed as a Web Application (Java EE) + the framework Vaadin 6 (not 7). Since this project exists for about 4 or 5 years, the technology used isn't the newest but it's currently ok. This software is used by our internal clients so about a 70 users are using it per day. I'm on charge of this project for 9 months now.
Problem : Often, users copy some info (words, tables and so on) from others sources like a Word Document, or a PowerPoint. Then paste it into a RichTextArea. then they export all those info into an Excel (XLS) file. But sometimes, those pasted info aren't reported, or generate some HTML Tags (not understandable for most users).
What I had suggested : The RichTextArea has some tools, displayed with buttons, one of them is "Remove Formatting", if they press it, everything would be ok. But I had to agree with them, it isn't intuitive and "friendly" to use. Since they are my clients, I want to help them as much as possible.
What I want : I want that if they copy paste into the RichTextArea:
They should be invited to remove the format (with a notification on paste) by pressing the Remove Formatting Button, so I should valorize it.
Or automatically apply the remove formatting on paste.
But I couldn't achieve those solutions because I don't know how to detect the action of pasting, moreover, for the second solution, I couldn't retrieve on the code the remove formatting action.
Can you help me in order to achieve this please? Any tips that doesn't involve an other technology would be appreciated :)
Aynath
If this is still relevant:
Not sure about the first approach. But the first thing that comes to my mind is to use usual change event. When user will paste the new text, you will be notified that values were changed. Then use any tool to clean HTML and get the simple text (I suggest to use something like jsoup because it is the easiest thing). Or, if you need something specific implement your own parser/cleaner. The last thing is to simply set a new text to the current area value.
Otherwise, you can use Vaadin add-ons which may provide such information. Just look for add-ons repository for CKEditor or TinyMCE Editor
Related
I have a question about Ultimate Special Offers plugin. Has anybody used it?
The problem is that this plugin sets the table with discounts in a special place where it wants. In my case, it shows up under the "add to cart" button. But I want it to appear above the button. How can I regulate the place where the table shows up?
You have two choices. One is to dig into your theme and move the table yourself. If you right-click the element displaying the table while having your browser console open, you will spot where it is in the HTML that makes up your page. Now click the Add to cart button, and see where it is. Memorize the name of the button, and now look for that in your product.liquid page. Chances are, the plugin itself has some liquid, so you can cut it out of the page, and move it the before the add to cart button in the liquid.
If all that seems like a mountain to climb, just ask the makers of the plugin to do it for you. It is a simple task for them, and should take them a minute to do. If they choose to ignore you, I would call them out as unreliable, and try a different plugin, from a company that will help you with your simple task.
I am working on a form, for which I would rather not rely on the one fingered typists in the workshop to fill in (with the inevitable typo's). Therefore I wondered if anyone know how to speak directly into some cells in excel and have that speech turned into text?
I have searched the net and constantly find the text to speech option which is the exact opposite of what I would like to do.
Although this question might be more appropriate for a different site (e.g. https://superuser.com/), here's some information that's out there.
Windows has built-in support to speech-to-text. This article is for Windows 7, but I was able to do something similar to get it to work for Windows 10 (I'm not sure what version of Windows your shop uses). I'm sure there are other commercial products you can use.
With Windows 10, I had to enable speech services, then use the Win+H keyboard shortcut to activate dictation. With Excel open and in focus, anything I said was entered into the active cell.
I've been assigned to a software development task for a excel like editor. Basically the editor is working on 2-dimensional data, should have the basic editing features such as add/remove rows/columns, edit cells, undo redo etc.
Please point me some good design patterns for this type of job, Thanks!
Rather than trying to figure out all design patterns for a project in advance, wait until you run into a specific design issue and think about patterns that address that issue.
That being said, the features you list here do call out the likelyhood that you'll be wanting to use the Command pattern, so that each possible operation (add column, add row, remove column, edit cell, etc.) is supported by a command object, and enabling undo/redo for your commands with additional help from the Memento pattern.
Depends on context of use.
You could check out some common usage guidelines for tables here: http://www.oracle.com/webfolder/ux/middleware/richclient/index.html?/webfolder/ux/middleware/richclient/guidelines5/tblInteraction.html
Very often users want an Excel-like UX for table data manipulation, including actual export to Excel. You can provide for edit, sort, add row, enlarge, etc. If the user is editing in a table try that guideline. It's intended for enterprise users, so customize accordingly.
HTH
I am using MonoTouch.Dialog's OwnerDrawnElement, but it doesn't seem to allow the user to 'highlight' the cell when touching the screen. I've looked at the sample, but it doesn't show the highlighting. Any suggestions?
I noticed that TweetStation doesn't seem to user OwnerDrawnElement. Should I take another approach? I need to create a custom display cell much like TweetStation.
The OwnerDrawnElement was a contribution from the community, and it is not as sophisticated as it should be. I would not depend on it for anything beyond the trivially basic.
I strongly recommend that you create your own Element, if you want to reuse some of the code for OwnerDrawElement, you could copy and paste that.
A friend of mine wants to have an application where people can upload documents in Word (or text) format, and then allow people to make edits to those documents within a browser.
Is there any mechanism that would support adding text "bubbles" for adding comments? Either floating, or off to the side.
Being able to save back to Word format is a must too. Or at least, some format supported by Word, that would still be editable. Saving it as an image is not acceptable.
I was thinking about opening the Word Document in an FCK Editor window, but FCK only seems to have "normal" inline text editing capabilities (although it is great).
Is this feasible?
Yes it is feasible. Google has done that (and it does have comments). So has Adobe. I'm sure there is more.
Xopus provides a programmable platform that allows you to define editable XML within a WYSIWYG environment. You could use it to define what you want to edit (XML), against which rules you want to edit it (an XSD) and how you want it to look while you edit it (XSL). Then you tie that all together with the Javascript API.
In other words, you could pretty easily define a document that contains multiple paragraphs with optional comments and then have them displayed as bubbles exactly the way you want them; when saved, a script on the server could be executed that converts the XML to a Word document.
Take a look at the demos.
If they are Word 2007 documents, you can use Silverlight. Here's an example application that uses Silverlight to open a Word 2007 document and display it in the browser.
Since StackOverflow is a programmer site, I'll assume you're a programmer. You can use Silverlight to add the bubbles and annotations to a Word 2007 document, but you'll need to know VB.NET or C#.
Take a look at docx2web.appspot.com which is (currently) a very bare bones editor with the distinguishing feature that the browser is directly manipulating (more or less) the "flat OPC" version of the docx.
This means that there is no lossy conversion on either the way in or the way out. So for example, when you save after editing, anything which was in the original docx is round tripped back to Word.
As far as support for older .doc is concerned, POI can be used to convert them to .docx (although your mileage may vary).
Why are you trying to compete with google docs?
I know that TinyMCE provides some rich controls for in browser editing. Last time i looked at it, it had 100% of the stuff i would normally use in word, and then some. On the other hand, i probably has 1% of the features that MS word provides. It would be VERY difficult to implement it all.
As far as saving to MS word compatible format. i am sure its possible. it would probably be easier to save to a non-doc format.
As far as popups etc, those can be easy built using jquery UI or any other javascript framework.
Bottom line: yes, its possible, but why?!
It is possible. For example eyeOS has a text processing application able to open and process Microsoft Office and OpenOffice.org text documents.