Skip to content

lav45/yii2-aceeditor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yii 2 widget AceEditor

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',
]);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages