定制 peda/htmleditor 二次开发

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

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

peda/htmleditor

Composer 安装命令:

composer require peda/htmleditor

包简介

Multiple HTMLEditor configurations (even on the same page)

README 文档

README

Installation

This module must be installed in a module folder called htmleditor

Usage

The following block adds a new editor configuration called reduced within _config.php

//config defintion
$reduced = HtmlEditorConfig::get('reduced');
$reduced->disablePlugins('table');
$reduced->setButtonsForLine(1, 'bold', 'italic', 'underline', 'strikethrough', 'separator', 'charmap', 'separator', 'sslink', 'unlink', 'code');
$reduced->setButtonsForLine(2);
$reduced->setButtonsForLine(3);
$reduced->setOption('force_br_newlines',true);
$reduced->setOption('force_p_newlines',false);
$reduced->setOption('convert_newlines_to_brs',false);
$reduced->setOption('invalid_elements','p');
$reduced->setOption('paste_auto_cleanup_on_paste',true);
$reduced->setOption('paste_text_sticky',true);
$reduced->setOption('paste_text_sticky_default',true);
$reduced->setOption('paste_remove_styles',true);
$reduced->setOption('paste_remove_styles_if_webkit',true);
$reduced->setOption('paste_strip_class_attributes',true);
$reduced->setOption('language', 'de');
$reduced->enablePlugins(array('ssbuttons' => "../../../framework/thirdparty/tinymce_ssbuttons/editor_plugin_src.js"));

To create a new instance of the editor just do the following:

CustomHtmlEditorConfig::withConfigName('reduced', 'Field', 'Field Lable');

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: JavaScript

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2014-12-13