在18.10。我们将发布丰富的文本编辑器的新主要版本(V8),该版本是旧代码库的重写。此警告对于使用版本控制的NPM软件包用户并不重要,但是UMPKG捆绑包(http://unpkg.com/rich-text-editor/dist/rich-text-edter-bundle.js)会注意到,最新代码的最新捆绑包将不再像预期一样工作。为避免系统的破坏更改,您可以将UMPKG软件包的版本明确设置为V7的最后一个稳定版本,如下所示:http://unpkg.com/rich-text-ect-7.3.0.3.0/dist/rich-text/rich-text-ext-ext-editor-bundle.js
这将使您有时间开发系统,以适应新版本的发布。
abitti.net
使用Abitti商标政策
丰富的文本编辑器,并为芬兰入学考试委员会提供数学支持。可以在https://math-demo.abitti.fi/上找到现场演示
由于v4.0.0,仅提供带有ES模块的ES2017代码(在dist目录中)。如果您想使用此库,则可能需要一个Bundler,例如WebPack或crolup。
使用npm install rich-text-editor安装软件包。丰富的文本编辑器可以用作
import RichTextEditor from 'rich-text-editor'import { makeRichText } from 'rich-text-editor/dist/rich-text-editor'的函数大多数传递给组件或初始化函数的属性如下所述。可以在类型和/或源代码中找到更多信息。
Add a script tag to your HTML page whose source is https://unpkg.com/rich-text-editor/dist/rich-text-editor-bundle.js , eg <script type="module" src="https://unpkg.com/rich-text-editor/dist/rich-text-editor-bundle.js"></script> .
这将在窗口中添加makeRichText ,可用于初始化编辑器。
该函数将以下参数作为对象:
| 钥匙 | 默认 |
|---|---|
| 容器 | document.getElementById('Rich-Text-editor-root') |
| 语言 | 'fi' |
| baseurl | '' |
| 允许filetypes | ['image/png','image/jpeg'] |
| onvaluechange | ()=> {} |
| textareaprops | {} |
例子:
{
container: document.getElementById('rich-text-editor-root')!,
language: 'FI',
baseUrl: '',
allowedFileTypes: ['image/png', 'image/jpeg'],
onValueChange: () => {},
textAreaProps: {},
}
TextAareAprops传递给可见编辑器元素的基础DIV元素,以下是与CDN用户配置相关的元素:
| 钥匙 | 类型 | 目的 |
|---|---|---|
| Ariainvalid | 布尔 | 添加ARIA-INVALID |
| Arialabelledby | 细绳 | 添加Aria-labelledby |
| 编辑风格 | React.cssproperties | 将CSS属性直接到编辑元素 |
| className | 细绳 | 编辑元素的其他类名称 |
| ID | 细绳 | 编辑元素的ID字段 |
| 朗 | 细绳 | lang-field到编辑元素以供可访问性 |
已经开发了丰富的文本编辑器,以允许芬兰入学考试的候选人附加屏幕截图并写入方程式作为其提交的一部分。我们的目的不是为Textarea创建通用的倒入替换,而是在Abitti及其嵌入式浏览器中使用的编辑器。
在庆祝每个错误报告,功能请求和拉请请求时,我们请您记住以下内容:
我们希望您了解我们希望专注于法律规定的目标。
npm install 。npm run dev 。npm run buildnpm run dev-serverpython3 -m http.server 8080dev/index.html脚本标签指向捆绑包: <script type="module" src="/dist/rich-text-editor-bundle.js"></script> (不要提交此)。演示:http://digabi.github.io/rich-text-editor/
资料来源:https://github.com/digabi/rich-text-editor/blob/master/index.html
https://opensource.org/licenses/mit