Code Monkey home page Code Monkey logo

Comments (8)

tantaman avatar tantaman commented on July 19, 2024

What do you think of integrating https://github.com/xing/wysihtml5/ to take care of the text editing?

from strut.

jancborchardt avatar jancborchardt commented on July 19, 2024

Yes, I actually thought about doing that for Litewrite also. It would basically replace the current controls there are with that external tool, right?

In the next step, the controls should then be contextual, just appear when text is selected and directly next to the text (like PopClip or http://etchjs.com [which seems to have a bit of dependencies …]).
We can just do a simple JS control that gets the position of the selection and then let the controls appear there.
What do you think?

from strut.

tantaman avatar tantaman commented on July 19, 2024

It looks like wysihtml5 only supports predefined colors, one font and predefined font sizes. I feel like that may be too restrictive.. I'm not sure how much work it would be to add those items.

from strut.

tantaman avatar tantaman commented on July 19, 2024

so many wysiwygs.... http://jejacks0n.github.com/mercury/documentation/#the-story

from strut.

jancborchardt avatar jancborchardt commented on July 19, 2024

As also referenced in #34, it’s probably not good to go full-on wysiwyg. I’d say we just need bold and italic. Different fonts and sizes are very unlikely and we should not encourage that anyway. Alignment is negligible for now also. It’s mainly about highlighting individual words, so bold and italic should be enough (it can always be extended once it hurts).

(I would even go so far as to completely remove underlining from the options because it is bad typographic style.)

from strut.

tantaman avatar tantaman commented on July 19, 2024

I've integrated Etch.js into Strut. There are still a couple of issues (font color doesn't apply to the current selection, the font size readouts don't update) but it is up if you want to take a look. I'm also not a fan of how long the button bar is.

from strut.

jancborchardt avatar jancborchardt commented on July 19, 2024

Nice! Yeah, the long button bar is a bit weird.

3 ideas for that:

  1. let’s remove the text align (center, left, right) altogether or 2) make it a toggle (only left and center)
  2. remove the eraser because everything is a toggle anyway

Also, the bar should be a bit transparent to not completely obstruct the background. For example .8 opacity.

from strut.

tantaman avatar tantaman commented on July 19, 2024

Closing this as GH-68 covers the remaining problems.

from strut.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.