Download the PHP package moxuandi/yii2-editormd without Composer
On this page you can find all versions of the php package moxuandi/yii2-editormd. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package yii2-editormd
开源在线 Markdown 编辑器 Editor.md for Yii2
主要特性
- 支持“标准”Markdown / CommonMark和Github风格的语法,也可变身为代码编辑器;
- 支持实时预览、图片(跨域)上传、预格式文本/代码/表格插入、代码折叠、搜索替换、只读模式、自定义样式主题和多语言语法高亮等功能;
- 支持ToC(Table of Contents)、Emoji表情、Task lists、@链接等Markdown扩展语法;
- 支持TeX科学公式(基于KaTeX)、流程图 Flowchart 和 时序图 Sequence Diagram;
- 支持识别和解析HTML标签,并且支持自定义过滤标签解析,具有可靠的安全性和几乎无限的扩展性;
- 支持 AMD / CMD 模块化加载(支持 Require.js & Sea.js),并且支持自定义扩展插件;
- 兼容主流的浏览器(IE8+)和Zepto.js,且支持iPad等平板设备;
- 支持自定义主题样式;
安装:
使用 composer 下载:
使用:
在View中添加:
在Controller中添加(如果不需要图片上传功能, 可以不添加):
编辑器相关配置,请在视图view中配置,参数为editorOptions,比如定制菜单,编辑器大小等等,可用配置项如下:
| 配置项 | 类型 | 默认值 | 配置说明 |
|---|---|---|---|
| mode | string | "gfm" | |
| name | string | "" | |
| value | string | "" | |
| theme | string | "" | 主题 |
| editorTheme | string | "default" | |
| previewTheme | string | "" | |
| markdown | string | "" | |
| appendMarkdown | string | "" | |
| width | string | "100%" | |
| height | string | "100%" | |
| path | string | "./lib/" | |
| pluginPath | string | "" | |
| delay | int | 300 | 延迟解析标记为HTML, 单位:ms |
| autoLoadModules | bool | true | 自动加载相关模块文件 |
| watch | bool | true | 是否开启实时预览 |
| placeholder | string | "Enjoy Markdown! coding now..." | |
| gotoLine | bool | true | |
| codeFold | bool | false | |
| autoHeight | bool | false | |
| autoFocus | bool | true | 是否启用自动对焦编辑器左侧输入区域 |
| autoCloseTags | bool | true | |
| searchReplace | bool | true | 是否启用搜索和替换功能 |
| syncScrolling | bool | true | 同步滚动, "single"表示单向同步 |
| readOnly | bool | false | |
| tabSize | int | 4 | |
| indentUnit | int | 4 | |
| lineNumbers | bool | true | |
| lineWrapping | bool | true | |
| autoCloseBrackets | bool | true | |
| showTrailingSpace | bool | true | |
| matchBrackets | bool | true | |
| indentWithTabs | bool | true | |
| styleSelectedText | bool | true | |
| matchWordHighlight | bool | true | |
| styleActiveLine | bool | true | |
| dialogLockScreen | bool | true | |
| dialogShowMask | bool | true | |
| dialogDraggable | bool | true | |
| dialogMaskBgColor | string | "#fff" | |
| dialogMaskOpacity | float | 0.1 | |
| fontSize | string | "13px" | |
| saveHTMLToTextarea | bool | false | |
| disabledKeyMaps | array | [] | |
| onload | function | function() {} | |
| onresize | function | function() {} | |
| onchange | function | function() {} | |
| onwatch | function | null | |
| onunwatch | function | null | |
| onpreviewing | function | function() {} | |
| onpreviewed | function | function() {} | |
| onfullscreen | function | function() {} | |
| onfullscreenExit | function | function() {} | |
| onscroll | function | function() {} | |
| onpreviewscroll | function | function() {} | |
| imageUpload | bool | false | 是否启用图片上传 |
| imageFormats | array | ["jpg", "jpeg", "gif", "png", "bmp", "webp"] | 允许上传的图片格式 |
| imageUploadURL | string | "" | 后端接收图片上传的URL |
| crossDomainUpload | bool | false | 是否启用跨域上传 |
| uploadCallbackURL | string | "" | 跨域上传的回调URL |
| toc | bool | true | |
| tocm | bool | false | |
| tocTitle | string | "" | |
| tocDropdown | bool | false | |
| tocContainer | string | "" | |
| tocStartLevel | int | 1 | |
| htmlDecode | bool | false | |
| pageBreak | bool | true | |
| atLink | bool | true | |
| emailLink | bool | true | |
| taskList | bool | false | |
| emoji | bool | false | |
| tex | bool | false | |
| flowChart | bool | false | |
| sequenceDiagram | bool | false | |
| previewCodeHighlight | bool | true | |
| toolbar | bool | true | |
| toolbarAutoFixed | bool | true | |
| toolbarIcons | string | "full" | |
| toolbarTitles | object | {} | |
| toolbarHandlers | object | ||
| toolbarCustomIcons | object | ||
| toolbarIconsClass | object | {} | |
| toolbarIconTexts | object | {} | |
| lang | object |
All versions of yii2-editormd with dependencies
PHP Build Version
Package Version
Requires
moxuandi/yii2-helpers Version
~2.2.0
The package moxuandi/yii2-editormd contains the following files
Loading the files please wait ...