KO
|
EN
gitlite — search
Search
#javascript
#python
#hacktoberfest
#react
#ai
#typescript
#llm
#go
#golang
#android
#machine-learning
#rust
#deep-learning
#linux
simple-ime
★ 12
Open GitHub ↗
A simple web pinyin input method
Download README (.md)
Explore Similar Repositories
file-preview-demo
:
基于 Vue.js 的文件预览解决方案,支持 Word、Excel、PPT、PDF 在线预览,完美适配 PC 和移动端,全部代码由 Cursor AI 助手生成。
reimagined-goggles
:
No description available.
glowing-garbanzo
:
No description available.
automatic-octo-happiness
:
No description available.
hybrid_rag_app
:
No description available.
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
simple-ime
?
Download (.md)
## Simple Ime    一个简易的web拼音输入法工具 [英文文档](./README-en.md) <img src="./public/demo.png" width="400" /> 与[Goole Input tools](https://www.google.com/inputtools/try/)相比,它携带了一个离线词库,因此不需要联网查询就可以完成拼音转换。 相应的,由于离线词库,包体积无法做到很小。此外,不支持`iframe`。 > 如果你想减小离线词库的大小,可以运行`npm run splitDict`,然后将`temp/`目录下的`dict.txt`与`packed-trie`复制到`src/data`目录下,重新构建即可 ## 快捷键 | 快捷键 | 描述 | | --- | --- | | ↑ | 向上翻页 | | ↓ | 向下翻页 | | + | 向上翻页 | | - | 向下翻页 | | ← | 向左切换候选词 | | → | 向右切换候选词 | | < | 向左切换候选词 | | > | 向左切换候选词 | | Shift | 切换英/拼 | | Enter | 直接键入转换后内容 | | [ | 左移输入法上的光标 | | ] | 右移输入法上的光标 | ## 安装 > npm install simple-ime ## 使用 ```js import { createSimpleIme } from 'simple-ime' const ime = createSimpleIme() // turn on ime ime.turnOn() // turn off ime ime.turnOff() ``` ## APIs ### createSimpleIme 创建一个SimpleIme实例 `function createSimpleIme(): SimpleImeInstance` ### SimpleImeInstance #### 属性: ##### version ime的版本 `version: string` #### Methods: ##### turnOn 打开ime `function turnOn(): void` ##### turnOff 关闭ime `function turnOff(): void` ##### toggleOnOff 开关ime `function toggleOnOff(): void` ##### dispose 销毁ime实例 `function dispose(): void` ## 开发 执行`npm run dev`,打开页面`http://localhost:xxx` ## 构建 ```shell npm run build ``` ## 感谢 - 输入框的实现参考了 [CloudInput](https://github.com/mzhangdev/CloudInput),它提供了输入法前后端的实现 - 感谢[web-pinyin-ime](https://github.com/dongyuwei/web-pinyin-ime) ,它提供了生成词典以及优化查询速度的方法