samuell / contenteditor-plugin
允许您在前端页面编辑内容文件。
1.3.6
2023-09-15 14:37 UTC
Requires
- php: >=7.0
- composer/installers: ~1.0
README
从前端编辑内容。
http://octobercms.com/plugin/samuell-contenteditor
如何使用?很简单。
- 将内容编辑组件拖放到CMS页面。
- 检查您是否有
{% framework %}
和{% scripts %}
在布局中用于工作ajax请求,以及{% styles %}
用于额外的CSS。 - 将此代码放入页面代码中,并将编辑器链接到内容文件或设置名称以自动创建新文件。
简单示例
{% component 'contenteditor' file="filename_in_content.htm" %}
属性
- file - 要编辑的内容块文件名,可选。如果不存在,将自动创建。
- fixture - 内容块固定名称,对于内联文本(标题、span等)很有用。
- tools - 启用的工具列表,以逗号分隔(使用
*
或留空以获取Content Editor设置中定义的所有工具)。 - class - 元素类,主要用于fixture。
示例
{% component 'contenteditor' file="filename_in_content.htm" fixture="h3" tools="bold,italic" class="my-class" %}
工具列表
bold
=> 粗体(b)italic
=> 斜体(i)link
=> 链接(a)small
=> 小号(small)align-left
=> 左对齐align-center
=> 居中对齐align-right
=> 右对齐heading
=> 标题(h1)subheading
=> 副标题(h2)subheading3
=> 副标题3(h3)subheading4
=> 副标题4(h4)subheading5
=> 副标题5(h5)paragraph
=> 段落(p)unordered-list
=> 无序列表(ul)ordered-list
=> 有序列表(ol)table
=> 表格indent
=> 缩进unindent
=> 取消缩进line-break
=> 换行(br)image
=> 图片上传video
=> 视频preformatted
=> 预格式化(pre)
受 Editable 插件 启发,并使用 Content tools 编辑器 http://getcontenttools.com。