Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: WideArea – an expandable textarea (usablica.github.io)
192 points by afshinmeh on May 22, 2013 | hide | past | favorite | 66 comments



First of all, this is awesome. Great idea, can't believe it hasn't been around till now, and will definitely be using it.

The only thing I could change here is the "x" icon when expanded. Someone mentioned here that they would be unnerved hitting an "x" button with a lot of text - this is definitely valid, I felt the same thing when trying it out. A simple change to an "exit full screen" icon (like this http://findicons.com/files/icons/1667/iconic/32/fullscreen_e...), would solve the problem nicely : )


+1

"X"s are frightening. You might just give it some tooltip text.


Nice! Thanks for the nice suggestion.


I will second it. I would also move it on the bottom right, as I didn't look at it except with my peripheral vision and thought it was an X/close button. When instructions said to click it, I went from "why would I click the close button" to "oh, it's actually a fullscreen button" before I clicked it. I never would have discovered it.


Also, the "expand" button overlaps with the h-scroll bar when it's displayed.

http://i.imgur.com/4mwx7ty.png

Awesome project nevertheless.


This is a very nice implementation.

I did something similar myself django-writingfield[1], but it is Django specific.

I much prefer your UI and the switching of dark text/light background is really slick.

[1]: http://django-writingfield.obscuremetaphor.co.uk/


If I remember rightly, Github has something just like this for its pull request description textarea. :)

It is a very nice UI control.


Good point, I'd suggest using a green checkmark instead (which basically means "OK" instead of the X's "Cancel").


The fact it has no borders in "full screen mode" is really disorientating. I like the concept but wouldn't use it because of the loss of visual feedback (but full screen mode is optional which is fine).

As an aside: It is a shame this "breaks" Chrome's ability to let you re-scale the non-full-screen box. So it is an all or nothing choice, you have to give up something to get something...

It looks like you disabled Chrome's resizing on purpose too, which seems unnecessary/annoying. Why break existing functionality just to add new functionality?


>It looks like you disabled Chrome's resizing on purpose too, which seems unnecessary/annoying. Why break existing functionality just to add new functionality?

That functionality can be re-enabled by changing the "resize" CSS style[0].

[0] http://davidwalsh.name/textarea-resize


From a quick look, it looks like it's reasonably simple to add resizing back in. The CSS on the textarea has resize:none - removing that and removing the max-width should add that functionality back in, should you want it.


It should be trivial to get the resize functionality back. I think in cases like this breaking existing functionality is fine. This is obviously aimed at people with a relatively narrow use-case in mind. In a situation where the purpose of full screen mode is to remove the distractions of the surrounding document this seems fine. I personally would want my text box at a fixed size on some forms with the option to make it the only thing on the page (case in point is my own app https://writeapp.me [yes, an account is needed to see the text box]) so as to keep the design from breaking (it's a very opinionated page when it comes to design).

I think overall this is an improvement to text boxes generally which is why I can forgive the breakage of one bit of existing functionality.


Wait, what? 2kb JS? 4kb CSS? Why does this take so much?

I use a similar fullscreen textarea toggle (actually an ACE editor), that is very simple. For the Javascript, you just need to add a new class to the text area. For the CSS, you need to make the '.fullscreen' class the following:

    .fullscreen {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }
Now, this doesn't get you the little button in the upper right corner and the styling for the full screen textarea, but it is very functional, very configurable (just style with CSS), and quite small. Add a small button of your own and let the browser do all of the heavy work, by just adding a CSS class.

Oh, and this doesn't break Chrome/webkit's ability to resize the textarea when not in fullscreen mode...


Thanks, it's the first version and I'll fix this problems asap.


Very nice, going to use this in a project now, so thanks a lot for this. It would be fully featured and extra sweet for me with some kind of lightweight feature to save a local backup of entered text. :)


Jquery required, but there's http://sisyphus-js.herokuapp.com/


I also used Garlic.js (http://garlicjs.org/) in a project. Also requires jQuery or Zepto but I was really pleased with it. Pretty lightweight.


That would be a fantastic addition


+1, nice.


Somewhat broken on android for me - maximise in landscape, rotate the phone, and it goes Wrong. The text wrapping doesn't realign, and the close button is left off screen.


Thanks for report, I'm currently working on a better version for tablet/mobile devices. Could you please report it on the Github issues?


For me the expanded text area takes over my whole window, but I can't type as much text before hitting a line break as I can with the normal text area.

And when I'm typing into a browser, I'm usually replying to something. Being able to read that thing I'm replying to as I'm typing has a lot of value to me.


Was this inspired by GitHub's new distraction-free comment feature? The styling looks exactly the same.


Github uses similar editor in their comments textarea. Very cool.



Yeah, you're right.


I suggest to add key-bindings: <Control-Space> for going to wide-mode and <Escape> for getting back.


I really looking for a short-key for fullscreen mode but now you can use Escape key for exiting the fullscreen mode.


Looks cool. Not sure what i would use it for, though. Whats the use case you had in mind?


Writing with pleasure and keep focusing on writing. You can define your preferred color scheme and more...


You guys did a great job with this library. We have just added it to JotForm. http://www.jotform.com/blog/80-New-Editor-Options-for-Text-A...


Firefox and Chrome already allow you to re-size textareas. At the very least this library shouldn't shut that functionality down.


Yeah, but it stays where it is. So if there are parts that would overlap it, they do that. A particular example here is Reddit, in deeply nested threads on smaller windows you can see maybe 30-40% of the textarea. Maybe someone will make a Chrome extension out of this :)


Excellent. Nothing sucks more than having to use a tiny textbox or fiddle with a resizeable one when you are trying to write something longer than a few lines. It would be nice if it used localstorage to remember whether the user prefers dark or light.

Personally, I prefer having my browser launch an external editor for textareas. However, this is better for most people because it does not require any installation or configuration.


Love the control, but hate that the page's text is kept down to a dim 40% opacity when the mouse isn't on top. I have weird mousing habits when reading blocks of text (I move the mouse around and click random things), and it's distracting to have the text fade out when my cursor ventures off course; I practically have to squint to read what the ultralight and not-quite-opaque text says when faded out.


Ops! Thanks, I'll change it.


I've been using this all morning to write a blog post. Found it awesome!

I don't really know the better way, but when I have more than one page of text, I end up with two scroll bars.

https://dl.dropboxusercontent.com/u/37659951/WideArea%20-%20...

Non-ideal, perhaps a different style of scroll bar, or pushing it right to the edge.


This looks great! One suggestion is that in full screen mode, the textarea doesn't stretch across the screen (it's a centered column) but since there are no borders it is hard to tell where the active area is. I think that clicking on the empty space outside of the main column could give focus to the textare, and that would have made it more clear for me.


Thanks, good suggestion. It would be so better if you submit your suggestion in Github issues.


Bring back the ability to re-size the smaller box, and add a key board short cut and this will be glorious :-)

Nice work!


Sure, thanks for the feedback.


Very cool. Reminds me of http://www.ommwriter.com/. I like using minimal text editors like this when I'm brainstorming or making a first pass at something; good for simple, distraction-free writing. Cheers


This is awesome but it would be great if it also expanded as you type. Like on Facebook when you are typing a status update that is long. The box expands vertically as you type. Neat feature. If it could do that, this thing would be rock solid.


Reminds me of Hallo.js, which uses the Randy js library if I'm not mistaken. I used it to make a blog for my elderly father. The goal was to make the posts easily editable.

Edit: s/Randy/Rangy/


I like it.

I'm assuming you can style colours, width of text in the wide editor, etc? Going back to the small window with an "X" would be a bit unnerving with lots of text typed in.


Yeah you can simply create your preferred color scheme and use it. I will release more better version next days and also an small blog post to how write an color scheme for WideArea.


How does it handle multiple textboxes on the same screen?


You will have only one fullscreen-ed textarea at the same time.


Advice: Put some contrast on the page text even when not mouse-over'd. I shouldn't have to strain my eyes to read the main page text.


I could't have said it in a better way.


You guys do great work! This is the third thing from your group in probably as many months that is simple, clean, and useful. Thanks!


Heeeey :) Thanks man.


How would you go about populating the full-screened text-box if the regular text-box has no placeholder text?


Perhaps this would also be useful as a browser extension so it could be used across the Internet.


I'm agree.


Wow, what an excellent zen writing resource. Will be using for longer writing projects I'm sure!


Glad to hear.


Very nice work. Any plans of adding the ability to automatically go fullscreen on focus?


Yeah sure, for next versions.


I'd like this if the back button resized the textarea back to it's normal size.


@afshinmeh Would this work with CodeMirror?


Yes, it should work with CodeMirror also.


it also breaks if you hit tab while expanded.


Thanks for the bug report. It would be really good if you submit it on Github issues.


Awesome job!


gorgeous




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: