ckeditor vue5
ckeditor5-vue (ckeditor5-vue)
CKEditor 5 rich text editor component for Vue.js.
Vue.js的CKEditor 5 RTF编辑器组件。
贡献 (Contributing)
After cloning this repository, install necessary dependencies:
克隆此存储库后,安装必要的依赖项:
npm install
执行测试 (Executing tests)
npm run tests -- [additional options]
# or
npm t -- [additional options]
The command accepts the following options:
该命令接受以下选项:
--coverage
(-c
) – Whether to generate the code coverage.--coverage
(-c
)–是否生成代码覆盖率。--source-map
(-s
) – Whether to attach the source maps.--source-map
(-s
)–是否附加源地图。--watch
(-w
) – Whether to watch test files.--watch
(-w
)–是否观看测试文件。--reporter
(-r
) – Reporter for Karma (default:mocha
, can be changed todots
).--reporter
(-r
)– Karma的报告器(默认值:mocha
,可以更改为dots
)。--browsers
(-b
) – Browsers that will be used to run tests (default:Chrome
, available:Firefox
,BrowserStack_Edge
andBrowserStack_Safari
).--browsers
(-b
)–将用于运行测试的浏览器(默认:Chrome
,可用:Firefox
,BrowserStack_Edge
和BrowserStack_Safari
)。
Note: If you would like to use the BrowserStack_*
browser, you need to specify the BROWSER_STACK_USERNAME
and BROWSER_STACK_ACCESS_KEY
as an environment variable, e.g.:
注意:如果要使用BrowserStack_*
浏览器,则需要指定BROWSER_STACK_USERNAME
和BROWSER_STACK_ACCESS_KEY
作为环境变量,例如:
BROWSER_STACK_USERNAME=[...] BROWSER_STACK_ACCESS_KEY=[...] npm t -- -b BrowserStack_Edge,BrowserStack_Safari -c
If you are going to change the component (src/ckeditor.js
) or plugin (src/plugin.js
) files, remember about rebuilding the package. You can use npm run develop
in order to do it automatically.
如果要更改组件( src/ckeditor.js
)或插件( src/plugin.js
)文件,请记住有关重建软件包的信息。 您可以使用npm run develop
来自动执行。
制作包装 (Building the package)
Build a minified version of the package that is ready to publish:
构建准备发布的软件包的缩小版本:
npm run build
变更日志生成器 (Changelog generator)
npm run changelog
使用Vue CLI测试组件 (Testing component with Vue CLI)
When symlinking the component in an application generated using Vue CLI, make sure your vue.config.js
file configures webpack in the following way:
在使用Vue CLI生成的应用程序中对组件进行符号链接时,请确保您的vue.config.js
文件以以下方式配置webpack:
module.exports = {
configureWebpack: {
resolve: {
symlinks: false
}
}
};
Otherwise, the application will fail to load the component correctly and, as a result, it will throw a build error.
否则,应用程序将无法正确加载组件,结果将引发构建错误。
发行 (Releasing)
Before starting to release the package, you need to generate the changelog.
在开始发布软件包之前,您需要生成变更日志。
npm run release
Note: Only the dist/
directory will be published.
注意:仅dist/
目录将被发布。
翻译自: https://vuejsexamples.com/an-official-ckeditor-5-rich-text-editor-component-for-vue-js/
ckeditor vue5