lav45/yii2-aceeditor

Yii2 ajax.org Ace Editor widget

Installs: 4 209

Dependents: 1

Suggesters: 0

Security: 0

Stars: 2

Watchers: 3

Forks: 3

Open Issues: 0

Type:yii2-extension

1.2.0 2018-08-23 22:23 UTC

This package is auto-updated.

Last update: 2024-03-26 00:53:59 UTC


README

This extension allows you to install and use the code editor Ace

DEMO

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist lav45/yii2-aceeditor "1.2.*"

or add

"lav45/yii2-aceeditor": "1.2.*"

Usage

How to call?

use lav45\aceEditor\AceEditorWidget;

echo $form->field($model, 'content')->widget(AceEditorWidget::className(), [
    'theme' => 'xcode',
    'mode' => 'html',
    'showPrintMargin' => false,
    'fontSize' => 14,
    'height' => 300,
    'options' => [
        'style' => 'border: 1px solid #ccc; border-radius: 4px;'
    ]
]);

// Ace editor without model
echo AceEditorWidget::widget([
    'name' => 'description',
    'value' => 'same text',
]);