Giter Club home page Giter Club logo

rich-text-editor's Introduction

Gitter Build Status

SproutCore 2: For Native-Caliber Web Apps

Sproutcore 2 no longer support the Abbot Buildtools which has been replaced by the new Node.js Build Tools.

SproutCore is a JS-MVC framework for building blazing-fast, native-caliber web applications. SproutCore's full-stack approach to single-page application development gives you the tools you need to build rich, powerful applications... which happen to run in the browser.

Getting Started

The easiest way to get started with SproutCore is to install the Ruby gem. You can find instructions here. Once you've got SproutCore installed, checkout the Getting Started tutorial.

Next Steps

Once you're through the Getting Started tutorial:

Support

Resources for SproutCore developers include the docs for API documentation, and the Guides for a series of topical walk-throughs.

For additional SproutCore user support, join the mailing list, or stop by the #sproutcore IRC channel. For those interested in contributing to the framework itself, please join [email protected].

Acknowledgements

SproutCore includes code from a number of different open source projects including:

rich-text-editor's People

Contributors

artgon avatar dcporter avatar jameschao avatar joegaudet avatar mauritslamers avatar mysterlune avatar nelsonwong1012 avatar nicolasbadia avatar phillipweston avatar prlambert avatar publickeating avatar tobias-g avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rich-text-editor's Issues

forceLineBreaks -> lineBreakMode

I think I've got the code to a point where it's very reliable at doing <p> line-breaks, so I think it makes sense to allow the developer to choose between that and <div> since it'll be very little extra effort. I'll add <br> as a (still highly experimental) mode with in that, which will allow me to get rid of the annoyingly-named forceLineBreaks.

Any objections?

Scroll view issue when typing text

I'm having some issues with the scroll view when the scroll bar is visible. Sometime, when I type some text at the bottom of the field, the view scroll by itself. Also, when this happen, I often can't scroll to the top of the field. Here is a GIF to show the problem:

rte-issue

carriageReturnText is underused

(and kinda misnamed). The only time it's used is on initial render, when I would expect it to be used by insertNewline at the very least.

Issues with forceLineBreaks mode

To reproduce the issue, set forceLineBreaks to true and add this HTML:

<p>some text</p><br>

If you put the cursor at the end of the paragraph, enter must be press twice to add a line break.

Image loading should trigger automatic height recalc.

EditorView's value update process triggers a recurring timer which automatically recalculates the height at regular and decreasing intervals. This handles the situation where a slow-loading image pops in after a while and changes the height of things without any change registering to the value.

Instead of this blunt approach, we ought to be able to check the DOM for image elements and attach load listeners to trigger a height recalc only and automatically when the image loads.

Font sizes should be defined in em, and moved.

Font sizes are all defined in px; if they were defined in em, it would take one line of CSS to scale the size of everything.

They're also currently mixed in with "required" layout items, making it a very manual and fragile process to override them for your own app. They should be moved to a separate, theme-able set of selectors.

Enable touch.

The view doesn't currently support touch in any event.

I've got touch support enabled over in team/dcporter/touch, but I've broken resizing after image load (and probably some styles, due to an unrelated tweak in the same branch related to wrapping the contenteditable element in an outer one to facilitate height measurement).

WYSIWYGView referenced in WYSIWYGEditorView

WYSIWYGView is a convenience view – a prefab compilation of WYSIWYGEditorView and WYSIWYGToolbarView. As such, it should handle all its own stuff internally; there should be no references to WYSIWYGView in (e.g.) the editor. Similarly, all documentation should move into the component views.

Selecting a tool in toolbar doesn't give it the isSelected state until typing

When you select a tool (i.e. bold, italic etc.) via clicking it in the toolbar its element doesn't gain the "sel" classname until the user begins typing in the editor.

This is because "editorStateDidChange" functions don't get called unless the editors value changes when they should be called when the editors state changes regardless of value change.

My proposed fix is https://github.com/tobias-g/rich-text-editor/compare/toolbar_selection_fix

Many of the button icons are broken-looking.

In its previous life, this project was in the process of moving the buttons from the icons in folder 'icons2' to the icons in folder 'icons'. We should complete the move and remove 'icons2'.

Hint ("defaultValue") doesn't work.

The defaultValue is used when the value is empty, but the value is effectively never empty because a blank editor contains one line break. Possibly the hint should be implemented separately, a la TextFieldView.

Fix the namespace.

This framework involves so many classes that naming everything SC.WYSIWYGFoo is untenable. Let's figure out a better way.

My vote is RichTextEditor.Foo, shorthanded RTE.Foo (like SproutCore and SC are aliases).

WYSIWYGEditorView#lineHeight is doing it wrong.

There's an issue where if your cursor winds up off the bottom of the editable element (e.g. in the common case of hitting enter to add a new line at the end), the browser repositions the element to keep the cursor visible. A split second later, the view catches up and resizes itself, moving everything back to where it's supposed to be. This creates an ugly jump effect. My solution was to force the developer to specify a lineHeight property – this value is added to the view's height to ensure that the view has enough space at the bottom to allow the user to hit enter without triggering the jump-around.

This is a decidedly unfriendly API. Would be great to figure out another way to resolve or work around this problem.

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.