@aomao/plugin-line-height
行高插件
Last updated 2 years ago by aomao .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @aomao/plugin-line-height 
SYNC missed versions from official npm registry.

@aomao/plugin-line-height

行高插件

安装

$ yarn add @aomao/plugin-line-height

添加到引擎

import Engine, { EngineInterface } from '@aomao/engine';
import Lineheight from '@aomao/plugin-line-height';

new Engine(...,{ plugins:[Lineheight] })

可选项

粘贴过滤自定义行高

支持过滤不符合自定义的行高

/**
 * @param lineHeight 当前行高
 * @returns 返回 string 修改当前值,false 移除,true 保留
 * */
filter?: (lineHeight: string) => string | boolean
//配置
new Engine(...,{
    config:{
        [LineHeihgt.pluginName]: {
            //配置粘贴后需要过滤的行高
            filter: (lineHeight: string) => {
                if(lineHeight === "14px") return "1"
                if(lineHeight === "16px") return "1.15"
                if(lineHeight === "21px") return "1.5"
                if(lineHeight === "28px") return "2"
                if(lineHeight === "35px") return "2.5"
                if(lineHeight === "42px") return "3"
                return ["1","1.15","1.5","2","2.5","3"].indexOf(lineHeight) > -1
            }
        }
    }
}

快捷键

默认无快捷键

//快捷键,key 组合键,args,执行参数,[lineHeight] , lineHeight 可选,不传值删除当前光标位置的行高
hotkey?:{key:string,args:Array<string>};//默认无

//使用配置
new Engine(...,{
    config:{
        "line-height":{
            //修改快捷键
            hotkey:{
                key:"mod+b",
                args:["2"]
            }
        }
    }
 })

命令

//lineHeight:更改的行高
engine.command.execute('line-height', lineHeight);
//使用 command 执行查询当前状态,返回 Array<string> | undefined,当前光标所在处行高值集合
engine.command.queryState('line-height');

Current Tags

  • 2.10.1                                ...           latest (2 years ago)

187 Versions

  • 2.10.1                                ...           2 years ago
  • 2.10.0                                ...           2 years ago
  • 2.9.27                                ...           2 years ago
  • 2.9.26                                ...           2 years ago
  • 2.9.25                                ...           2 years ago
  • 2.9.24                                ...           2 years ago
  • 2.9.23                                ...           2 years ago
  • 2.9.22                                ...           2 years ago
  • 2.9.21                                ...           3 years ago
  • 2.9.20                                ...           3 years ago
  • 2.9.19                                ...           3 years ago
  • 2.9.18                                ...           3 years ago
  • 2.9.17                                ...           3 years ago
  • 2.9.16                                ...           3 years ago
  • 2.9.15                                ...           3 years ago
  • 2.9.14                                ...           3 years ago
  • 2.9.13                                ...           3 years ago
  • 2.9.12                                ...           3 years ago
  • 2.9.11                                ...           3 years ago
  • 2.9.10                                ...           3 years ago
  • 2.9.9                                ...           3 years ago
  • 2.9.8                                ...           3 years ago
  • 2.9.7                                ...           3 years ago
  • 2.9.6                                ...           3 years ago
  • 2.9.5                                ...           3 years ago
  • 2.9.4                                ...           3 years ago
  • 2.9.3                                ...           3 years ago
  • 2.9.2                                ...           3 years ago
  • 2.9.1                                ...           3 years ago
  • 2.9.0                                ...           3 years ago
  • 2.8.27                                ...           3 years ago
  • 2.8.26                                ...           3 years ago
  • 2.8.25                                ...           3 years ago
  • 2.8.24                                ...           3 years ago
  • 2.8.23                                ...           3 years ago
  • 2.8.22                                ...           3 years ago
  • 2.8.21                                ...           3 years ago
  • 2.8.20                                ...           3 years ago
  • 2.8.19                                ...           3 years ago
  • 2.8.18                                ...           3 years ago
  • 2.8.17                                ...           3 years ago
  • 2.8.16                                ...           3 years ago
  • 2.8.15                                ...           3 years ago
  • 2.8.14                                ...           3 years ago
  • 2.8.13                                ...           3 years ago
  • 2.8.12                                ...           3 years ago
  • 2.8.11                                ...           3 years ago
  • 2.8.10                                ...           3 years ago
  • 2.8.9                                ...           3 years ago
  • 2.8.8                                ...           3 years ago
  • 2.8.7                                ...           3 years ago
  • 2.8.6                                ...           3 years ago
  • 2.8.5                                ...           3 years ago
  • 2.8.4                                ...           3 years ago
  • 2.8.3                                ...           3 years ago
  • 2.8.2                                ...           3 years ago
  • 2.8.1                                ...           3 years ago
  • 2.8.0                                ...           3 years ago
  • 2.7.37                                ...           3 years ago
  • 2.7.36                                ...           3 years ago
  • 2.7.35                                ...           3 years ago
  • 2.7.34                                ...           3 years ago
  • 2.7.33                                ...           3 years ago
  • 2.7.32                                ...           3 years ago
  • 2.7.31                                ...           3 years ago
  • 2.7.30                                ...           3 years ago
  • 2.7.29                                ...           3 years ago
  • 2.7.28                                ...           3 years ago
  • 2.7.27                                ...           3 years ago
  • 2.7.26                                ...           3 years ago
  • 2.7.25                                ...           3 years ago
  • 2.7.24                                ...           3 years ago
  • 2.7.23                                ...           3 years ago
  • 2.7.22                                ...           3 years ago
  • 2.7.21                                ...           3 years ago
  • 2.7.20                                ...           3 years ago
  • 2.7.19                                ...           3 years ago
  • 2.7.18                                ...           3 years ago
  • 2.7.17                                ...           3 years ago
  • 2.7.16                                ...           3 years ago
  • 2.7.15                                ...           3 years ago
  • 2.7.14                                ...           3 years ago
  • 2.7.13                                ...           3 years ago
  • 2.7.12                                ...           3 years ago
  • 2.7.11                                ...           3 years ago
  • 2.7.10                                ...           3 years ago
  • 2.7.9                                ...           3 years ago
  • 2.7.8                                ...           3 years ago
  • 2.7.7                                ...           3 years ago
  • 2.7.6                                ...           3 years ago
  • 2.7.5                                ...           3 years ago
  • 2.7.4                                ...           3 years ago
  • 2.7.3                                ...           3 years ago
  • 2.7.2                                ...           3 years ago
  • 2.7.1                                ...           3 years ago
  • 2.7.0                                ...           3 years ago
  • 2.6.23                                ...           3 years ago
  • 2.6.22                                ...           3 years ago
  • 2.6.21                                ...           3 years ago
  • 2.6.20                                ...           3 years ago
  • 2.6.19                                ...           3 years ago
  • 2.6.18                                ...           3 years ago
  • 2.6.17                                ...           3 years ago
  • 2.6.16                                ...           3 years ago
  • 2.6.15                                ...           3 years ago
  • 2.6.14                                ...           3 years ago
  • 2.6.13                                ...           3 years ago
  • 2.6.12                                ...           3 years ago
  • 2.6.11                                ...           3 years ago
  • 2.6.10                                ...           3 years ago
  • 2.6.9                                ...           3 years ago
  • 2.6.8                                ...           3 years ago
  • 2.6.7                                ...           3 years ago
  • 2.6.6                                ...           3 years ago
  • 2.6.5                                ...           3 years ago
  • 2.6.4                                ...           3 years ago
  • 2.6.3                                ...           3 years ago
  • 2.6.2                                ...           3 years ago
  • 2.6.1                                ...           3 years ago
  • 2.6.0                                ...           3 years ago
  • 2.5.3                                ...           3 years ago
  • 2.5.2                                ...           3 years ago
  • 2.5.1                                ...           3 years ago
  • 2.5.0                                ...           3 years ago
  • 1.2.20                                ...           3 years ago
  • 1.2.19                                ...           3 years ago
  • 1.2.18                                ...           3 years ago
  • 1.2.17                                ...           3 years ago
  • 1.2.16                                ...           3 years ago
  • 1.2.15                                ...           3 years ago
  • 1.2.14                                ...           3 years ago
  • 1.2.13                                ...           3 years ago
  • 1.2.12                                ...           3 years ago
  • 1.2.11                                ...           3 years ago
  • 1.2.10                                ...           3 years ago
  • 1.2.9                                ...           3 years ago
  • 1.2.8                                ...           3 years ago
  • 1.2.7                                ...           3 years ago
  • 1.2.6                                ...           3 years ago
  • 1.2.5                                ...           3 years ago
  • 1.2.4                                ...           3 years ago
  • 1.2.3                                ...           3 years ago
  • 1.2.2                                ...           3 years ago
  • 1.2.1                                ...           3 years ago
  • 1.2.0                                ...           3 years ago
  • 1.1.34                                ...           3 years ago
  • 1.1.33                                ...           3 years ago
  • 1.1.32                                ...           3 years ago
  • 1.1.31                                ...           3 years ago
  • 1.1.30                                ...           3 years ago
  • 1.1.29                                ...           3 years ago
  • 1.1.28                                ...           3 years ago
  • 1.1.27                                ...           3 years ago
  • 1.1.25                                ...           3 years ago
  • 1.1.24                                ...           3 years ago
  • 1.1.23                                ...           3 years ago
  • 1.1.22                                ...           3 years ago
  • 1.1.21                                ...           3 years ago
  • 1.1.20                                ...           3 years ago
  • 1.1.19                                ...           3 years ago
  • 1.1.18                                ...           3 years ago
  • 1.1.17                                ...           3 years ago
  • 1.1.16                                ...           3 years ago
  • 1.1.15                                ...           3 years ago
  • 1.1.14                                ...           3 years ago
  • 1.1.13                                ...           3 years ago
  • 1.1.12                                ...           3 years ago
  • 1.1.11                                ...           3 years ago
  • 1.1.10                                ...           3 years ago
  • 1.1.9                                ...           3 years ago
  • 1.1.8                                ...           3 years ago
  • 1.1.7                                ...           3 years ago
  • 1.1.6                                ...           3 years ago
  • 1.1.5                                ...           3 years ago
  • 1.1.4                                ...           3 years ago
  • 1.1.3                                ...           3 years ago
  • 1.1.2                                ...           3 years ago
  • 1.1.1                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.7                                ...           3 years ago
  • 1.0.6                                ...           3 years ago
  • 1.0.5                                ...           3 years ago
  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Total 1
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE