How to develop a webapp which allows the user to add markup to text files? - ruby-on-rails-3

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!

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!

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

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.

Related

How To Do A Popup Context Menu Like DroneDeploys

How can I include a popup context menu in my app, just like the ones DroneDeploy use?
What's the CSS, JS lib that you use???
I know how to do this using vanilla JavaScript, but I want it to look like yours, to keep the theme in tact!
I've looked at the source and can see you are using Angular CDK's OverlayModule to provide popups.
I'm not using Angular, so I'll have to just style the popup so it looks like you themes myself.
The doc is the best way to follow up in this case. There you can see what's possible or not. Did you see this point? Here you can follow a checklist to apply in your App and build App in Drone Deploy style. You'll need to follow another way to interact with users.

How to configure PhpStorm to show API namespaces documentation panel as in phpDesigner8

I would like to change from phpDesigner8 to JetBrains PhpStorm IDE.
But I would really miss phpDesigner8's sidepanel with its fast and easy access to different API namespace documentations (for PHP, CSS, HTML, JavaScript, even WordPress and so on) with drag and drop use of code.
See this screenshot:
How should I configure PhpStorm 2016 to get similar sidepanel view?
Note: actually I open one of external library files, then look at its structure view in the sidepanel which is somehow close, but far from a optimized workflow.
Any suggestions?

Library or API for file browser view?

I would like to implement a file browser view in my application so users can open files using a side panel similar to the browsers in XCode, Text Wrangler and some other programs.
Before I go off implementing another one of those browsers from scratch, does anyone know if there are existing libraries or APIs that already does this?
Google doesn't turn up with much and most of the searches point me to NSOpenPanel which I believe doesn't do what I want.
Thanks in advance.
The Cocoa class that is used to display hierarchical lists is called NSOutlineView.
Outline views provide several configuration options to adjust the appearance.
The content can be provided by implementing a data source protocol or via Cocoa bindings.
Apple has some sample code online that should get you started (it's a file browser - so maybe you can use larger parts of that sample):
https://developer.apple.com/library/mac/#samplecode/SourceView/Introduction/Intro.html

What is the best way to display and interact with a skill tree

I am trying to create an interface that is similar to the interface on this website for the skill tree: http://www.pathofexile.com/passive-skill-tree. What is the best way to go about doing this and have the same or similar user interaction. ie. you click on a node and it activate or deactivates it. The movement of the tree and zooming on it would be nice as well. Would like to try to stay away from webView as I am thinking about features I want to add. Thanks in advance just want to see what a good way to do this is.
you can use webView and have almost a copy-paste of the presented webpage html source and load it.
However with native components you can have better performance, but it will "not a copy"
Native componets:
IIViewDeckController for iOS
iHasApp for iOS
iHasApp for iOS
There are more on that side. Consider a combination of they,

Which JavaScript framework for this drag-n-drop UI in a ROR3 website?

In a Ruby-on-Rails website, I want to create the following dialog, where a user is shown a list of colors and must choose 3 favorites and 3 least liked colors.
It works by dragging an item from the left and dropping it on the right.
What is the easiest and most maintainable library/method to implement this?
Notes: I am in the process of choosing a JavaScript framework for this website, so any proposition is fine. If that matters, the real thing is actually: among 15 work situations, choosing 5 that the user feels as most stressful, and 5 least stressful.
jQuery UI.
It has draggable and droppable. It is super easy to use, highly configurable and is the new standard javascript library in Rails 3.1.