定制 silverstripe-australia/frontend-editing 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

silverstripe-australia/frontend-editing

Composer 安装命令:

composer require silverstripe-australia/frontend-editing

包简介

A module that allows HTML fields to be edited via a frontend, in-place wysiwyg interface.

README 文档

README

Maintainer Contact

Marcus Nyeholt

<marcus (at) silverstripe (dot) com (dot) au>

Requirements

SilverStripe 3.0

Documentation

SilverStripe 2.4 version still available in the ss24 branch

The frontend editing module adds the ability to edit HTML based content on the frontend of your website. Developers specify in their templates the fields they want to be able to edit, add an include for buttons to help with switching between edit and standard views, and that's all there is to it.

Add the following to your project's configuration.yml file

---
Name: frontend_config
---
SiteTree:
  extensions:
    - FrontendEditableExtension

```

In the templates for the page types you would like editable, add the 
following in place of raw output fields - for example, instead of `$Content`, 
use

$EditableField(Content)


As well as single fields of the current page, you can use it on 
other objects contained in a control block (so long as those
objects have the EditableExtension)

    <% control Items %>
  • $EditableControl(Title)
  • <% end_control %>
````

Also in your template, add the following at the top. It includes some controls for initiating the editor (if you want them). You can provide your own mechanism for launching the editor, but this is simpler :)

<% include FrontendEditingControls %>

NOTE after adding the above, when navigating to a page in 'Live' mode, if you have edit access to the page, hovering your mouse over the bottom right corner of the screen will display controls for launching the edit mode. In "Stage" view, these controls should appear immediately.

API

Defining new plugins for the editor

@TODO - for now, see nicedit-image-selector.js or nicedit-url-selector.js as examples.

Troubleshooting

  • Appending ?stage=Stage&startEditing=true to the current URL will open the editor immediately; if this does not happen, check your JS error console!

silverstripe-australia/frontend-editing 适用场景与选型建议

silverstripe-australia/frontend-editing 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 409 次下载、GitHub Stars 达 23, 最近一次更新时间为 2015 年 01 月 19 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「wysiwyg」 「editor」 「silverstripe」 「frontend editing」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 silverstripe-australia/frontend-editing 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 silverstripe-australia/frontend-editing 我们能提供哪些服务?
定制开发 / 二次开发

基于 silverstripe-australia/frontend-editing 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 409
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 24
  • 点击次数: 21
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 23
  • Watchers: 4
  • Forks: 4
  • 开发语言: JavaScript

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-01-19