internal placeholder plugin (#125)
* internal placeholder plugin * fix panic on placeholder editor input * remove autofocus in placeholder example * make `Placeholder.active` private * remove placeholder on input * fix multi-byte char in placeholder * show placeholder on empty editor * add guards to placeholder add fns * fix placeholder displaying incorrectly on input * fix flash when backspacing empty placeholder also properly fix the first-char display error * hacky fix for delete key breaking placeholder * fix newline issues in placeholder * fix clippy * update changelog, bump version --------- Co-authored-by:StaffEngineer <111751109+StaffEngineer@users.noreply.github.com> Co-authored-by:
StaffEngineer <velo.app1@gmail.com>
Showing
- CHANGELOG.md 4 additions, 0 deletionsCHANGELOG.md
- Cargo.lock 1 addition, 1 deletionCargo.lock
- Cargo.toml 8 additions, 3 deletionsCargo.toml
- examples/placeholder.rs 80 additions, 0 deletionsexamples/placeholder.rs
- src/buffer.rs 0 additions, 2 deletionssrc/buffer.rs
- src/input.rs 0 additions, 3 deletionssrc/input.rs
- src/lib.rs 20 additions, 1 deletionsrc/lib.rs
- src/plugins/mod.rs 2 additions, 0 deletionssrc/plugins/mod.rs
- src/plugins/placeholder/mod.rs 199 additions, 0 deletionssrc/plugins/placeholder/mod.rs
workspace = { members = ["util"] } | ||
[package] | ||
name = "bevy_cosmic_edit" | ||
version = "0.17.0" | ||
version = "0.18.0" | ||
edition = "2021" | ||
license = "MIT OR Apache-2.0" | ||
description = "Bevy cosmic-text multiline text input" | ||
... | ... | @@ -13,6 +13,7 @@ exclude = ["assets/*"] |
[features] | ||
multicam = [] | ||
placeholder = [] | ||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
... | ... | @@ -43,8 +44,12 @@ arboard = "3.2.0" |
js-sys = "0.3.67" | ||
wasm-bindgen = "0.2.92" | ||
wasm-bindgen-futures = "0.4.42" | ||
web-sys = { version = "0.3.67", features = ["Clipboard", "Navigator", "Window"] } | ||
web-sys = { version = "0.3.67", features = [ | ||
"Clipboard", | ||
"Navigator", | ||
"Window", | ||
] } | ||
[dev-dependencies] | ||
insta = "1.29.0" | ||
util = {path="./util/"} | ||
util = { path = "./util/" } |
examples/placeholder.rs
0 → 100644
src/plugins/mod.rs
0 → 100644
src/plugins/placeholder/mod.rs
0 → 100644
Please register or sign in to comment