0

I need to develop a simple webapp that allows the user to highlight a couple of words in the file (text or HTML) that he can load from the screen, and then right-click and have some options show up to choose from.
When she chooses the option , the text of it is added to the file shown on the screen,right after the highlighted text, inside some parenthesis or similar.

Is Ruby on Rails a suitable platform for developing such an app?

Is Grails more suitable ? (Assuming similar level of knowledge in Groovy and Ruby)

In both cases, I'd appreciate pointers to gems/libraries I should be looking into for these tasks.

Thanks!

akapulko2020
  • 1,079
  • 2
  • 22
  • 36

3 Answers3

2

Find a language/framework you know and can work better in. Also, you're gonna need some javascript magicks so I suggest using jquery. Here's a link on how to do your right click action: How to distinguish between left and right mouse click with jQuery

Community
  • 1
  • 1
corroded
  • 21,406
  • 19
  • 83
  • 132
2

I'm not 100% sure I understand your requirements, but have you considered integrating a WYSIWYG (what-you-see-is-what-you-get) editor into your web app? Something like CKeditor is open-source, and effective.

You could load the file into the editor and setup a custom context menu like described in part 6 of this tutorial. So when the user right clicks in the editor, the custom context menu item could be configured to facilitate the insertion you are looking to accomplish.

I agree with corroded's advice to choose a language/framework you know and can work better in, as you'll be able to achieve your desired functionality through a variety of languages/frameworks.

Best of Luck!

temarsden
  • 332
  • 5
  • 16
1

I think the function you describe is more about client user-friendliness than server processing. I think it's can only be done with javascript/jQuery or similar tools.

Same as tmarsden, I think a good way to do that is integrating a WYSIWYG free editor. I have done it before with TinyMCE, by writing a custom plugin for this tool. If you choose using Grails as server technology, you can take a look at TinyMCE plugin for Grails.

Hoàng Long
  • 10,746
  • 20
  • 75
  • 124