samuell / contenteditor-plugin

允许您在前端页面编辑内容文件。

安装次数: 3,278

依赖项: 0

建议者: 0

安全: 0

星级: 39

关注者: 3

分支: 19

开放问题: 9

类型:october-plugin

1.3.6 2023-09-15 14:37 UTC

This package is auto-updated.

Last update: 2024-09-15 16:48:52 UTC


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