b149fe7e98
This PR has been tested on Mac Chrome, iOS Safari, and Android Chrome. --- This PR removes 'targeted editing' from text. This affects when you're: * using the text tool * editing a text shape * editing a text label * editing an arrow label When in one of these modes, you were able to click on some other text to immediately start editing it (as long as that text is the same type). It was a bit broken with some of the newer changes, so this PR removes it. The issues included: * selected text 'flashing' * caret going to the start of the text * empty text shapes not disappearing * inconsistent behaviour when clicking near a shape VS on a shape It feels a bit simpler now too, I like it... 🤔💭 ![2023-09-28 at 15 36 15 - Beige Parrotfish](https://github.com/tldraw/tldraw/assets/15892272/955e80b7-71d4-4f5d-9647-423dde5f279b) ### Change Type - [x] `patch` — Bug fix ### Test Plan - [ ] Unit Tests - [ ] End to end tests ### Release Notes - Fixed some cases where text would get selected in the wrong place. - Changed the behaviour of text selection. Removed 'deep editing'. --------- Co-authored-by: Steve Ruiz <steveruizok@gmail.com> |
||
---|---|---|
.. | ||
scripts | ||
src | ||
api-extractor.json | ||
api-report.md | ||
CHANGELOG.md | ||
LICENSE | ||
package.json | ||
README.md | ||
setupTests.js | ||
tsconfig.json |
@tldraw/tldraw
This is the alpha version of tldraw. It is very much a work in progress.
Installation
Install the @tldraw/tldraw
package using @alpha
for the latest alpha release.
yarn add @tldraw/tldraw@alpha
# or
npm install @tldraw/tldraw@alpha
# or
pnpm i @tldraw/tldraw@alpha
Then start the local development server.
yarn dev
# or
npm run dev
# or
pnpm dev
Usage
An extremely minimal usage (without our UI) might look like this:
import { Tldraw } from '@tldraw/tldraw'
import '@tldraw/tldraw/styles-editor.css'
import '@tldraw/tldraw/styles-ui.css'
export default function () {
return <Tldraw />
}
See the examples repo for more examples.
License
The source code in this repository (as well as our 2.0+ distributions and releases) are currently licensed under Apache-2.0. These licenses are subject to change in our upcoming 2.0 release. If you are planning to use tldraw in a commercial product, please reach out at hello@tldraw.com.