承接 cacko/yii2-widget-monaco 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

cacko/yii2-widget-monaco

最新稳定版本:v0.6.3

Composer 安装命令:

composer require cacko/yii2-widget-monaco

包简介

Yii2 widget for Monaco Editor

README 文档

README

Simplifies adding Monaco Editor if you are screwed having to use Yii2 with its amazing jQuery inhericance.

Install

composer require cacko/yii2-widget-monaco

Demo

Sorta demo and playground - https://yii.cacko.net/monaco/widget.

Usage

Options

  • editorConfig - generally you can pass every option from the API which will override any crap you put before

Editor

with ActiveForm:

use Cacko\Yii2\Widgets\MonacoEditor\Widget\Editor as MonacoEditor;

<?= $form->field($model, 'script')->widget(MonacoEditor::class)->label(t('Code')) ?>

as a standalone widget

use Cacko\Yii2\Widgets\MonacoEditor\Widget\Editor as MonacoEditor;

<?= MonacoEditor::widget([
    'model' => $model,
    'attribute' => 'script',
    'language' => 'javascript',
]) ?>

or without a model

use Cacko\Yii2\Widgets\MonacoEditor\Widget\Editor as MonacoEditor;

<?= MonacoEditor::widget([
   'name' => 'script',
   'language' => 'javascript',
]) ?>

Diff Viewer

use Cacko\Yii2\Widgets\MonacoEditor\Widget\DiffEditor as MonacoDiffEditor;

<?= MonacoDiffEditor::widget([
    'model' => $model,
    'parent' => $parent,
    'attribute' => $attribute,
]) ?>

Persistance

for persisting the editor/diff options not in a cookie, inject your own implementation of Cacko\Yii2\Widgets\MonacoEditor\models\EditorSettingsInterface.

\Yii::$container->set(EditorSettingsInterface::class, MyAmazingShite::class);

there also a controller interface you may want to implement your own controller Cacko\Yii2\Widgets\MonacoEditor\controllers\ControllerInterface.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-01-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固