Yii 1.1: editme

WYSIWYG editor based on CKEditor
37 followers

editMe is a Yii Framework extension which creates a highly customizable WYSIWYG editor (based on CKEditor) with just one line of code.

Please visit the extension's wiki page for a full documentation on editMe.

You may find more help and information in the editMe forum topic.

To report a problem or see open issues visit the extension's issues page.

Total 20 comments

#18031 report it
Yatin Mistry at 2014/08/28 05:49am
Spell checker

Add this in your config to get spell checker

array('SpellChecker', 'Scayt')

Auto Spellchecker /extension/vendors/CKEditor/config.js

config.scayt_autoStartup = true;

Auto spell checker.

CKEDITOR.editorConfig = function( config ) {
    // Define changes to default configuration here. For example:
    // config.language = 'fr';
    // config.uiColor = '#AADC6E';
   ** config.scayt_autoStartup = true;**
};
#17930 report it
Yatin Mistry at 2014/08/12 06:46am
Customzie toolbar

Customzie toolbar

$editMe = $this->widget('ext.editMe.widgets.ExtEditMe', array(
            'name'  =>'Event[notes]',
            'value' => $model->notes,
            'toolbar'=>
            array(
 
 
               array(
        array(
            'Source', '-', 'Save', 'NewPage', 'Preview', 'Print', '-', 'Templates',
        ),
        array(
            'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo',
        ),
        array(
            'Find', 'Replace', '-', 'SelectAll', '-', 'Scayt'
        ),
        array(
            'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'
        ),
        '/',
        array(
            'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat',
        ),
        array(
            'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl',
        ),
        array(
            'Link', 'Unlink', 'Anchor',
        ),
        array(
            'Image', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'Iframe'
        ),
        '/',
        array(
            'Styles', 'Format', 'Font', 'FontSize',
        ),
        array(
            'TextColor', 'BGColor',
        ),
        array(
            'Maximize', 'ShowBlocks',
        ),
        array(
            'About',
        ),
)
            )
        ));
#16239 report it
coolPhp at 2014/02/02 06:18am
Update preview div

Can this editme update an preview textarea or div as the user types or edits? if so how can this be done.

#15960 report it
Dhamodharan R at 2014/01/04 02:08am
Awesome!!

Its really a great extension and very easy to install. Thanks

#15410 report it
kamankily at 2013/11/07 01:31pm
Good job

Thank you very much!

#14281 report it
logudotcom at 2013/08/01 06:32am
Good ckextension

Just installed and it worked anything like. Thanks

#13450 report it
limitless at 2013/05/29 10:05am
Re: re: editor

Hey kopecldz

I will continue this conversation in the forum, please check there...

#13449 report it
kopecldz at 2013/05/29 09:57am
re: editor

Hey! thx for reply!.

When i do :

'value' => 'some text text text'

editor is null.

I want do something that:

When i click tamplate inside editor, i can to choose some template in my DB . I can do that? THX !

#13448 report it
limitless at 2013/05/29 09:32am
Re: How set template.

Hey kopecldz

I assume you are not using the editor with a model or it would be populated automatically.

Most likely this will do it for you:

$this->widget('ext.editMe.widgets.ExtEditMe', array(
    'name'=>'example',
    'value'=>'put your template code here',
));
#13447 report it
kopecldz at 2013/05/29 09:22am
How set template.

Hello, i have question, how do that:

When i make template inside ExtEditMe editor, i saved this in db. How i can upload this saved template text again inside editor ?

#13399 report it
limitless at 2013/05/27 10:31am
Re: CKEditor 4.0.2 update & CKEditor 4.1

Hey Gevorg and Chris Backhouse

Thank you very much for this temporary workaround. Since editMe 2.1 was updated with CKEditor 4.1.1 this is not needed anymore.

#13398 report it
limitless at 2013/05/27 10:28am
Re: new ckeditor

Hi Giacomo

The new version 2.1 of editMe has been updated with CKEditor 4.1.1

#13397 report it
limitless at 2013/05/27 10:27am
Re: Thanks

Hey manoj20

thank you very much!

#12909 report it
Chris Backhouse at 2013/04/20 12:30am
CKEditor 4.1

Need to change the run function in ExtEditMe.php as follows:-

public function run() {
        // Register JavaScript files
        Yii::app() -> clientScript -> registerCoreScript('jquery');
        Yii::app() -> clientScript -> registerScriptFile(self::$_ckeAssetUrl . '/' . md5(self::$_ckeAssetUrl) . '.js');
        Yii::app() -> clientScript -> registerScriptFile(self::$_ckeAssetUrl . '/ckeditor.js');
        // REMOVED for 4.1 Yii::app() -> clientScript -> registerScriptFile(self::$_ckeAssetUrl . '/adapters/jquery.js');
        // Generate textarea
        $nameId = $this -> resolveNameID();
        $this -> htmlOptions['id'] = $nameId[1];
            // ADD for 4.1 Class='ckeditor'
        $this -> htmlOptions['class'] = 'ckeditor';
        if ($this -> hasModel()) {
            echo CHtml::activeTextArea($this -> model, $this -> attribute, $this -> htmlOptions);
        } else {
            echo CHtml::textArea($this -> name, $this -> value, $this -> htmlOptions);
        }
        // Load CKEditor
        $jquerySelector = CJavaScript::encode('#' . $this -> htmlOptions['id']);
        $ckeConfig = CJavaScript::encode($this -> _ckeGenerateConfig());
        Yii::app() -> clientScript -> registerScript('editMe_' . $this -> htmlOptions['id'], 'jQuery(' . $jquerySelector . ').ckeditor(' . $ckeConfig . ');', 2);
    }
#12306 report it
Gevorg at 2013/03/12 04:14pm
CKEditor 4.0.2 update

Works perfect with CKEditor 4.0.2. Just rename old folder in "vendors" folder from "CKEditor" to "_CKEditor" and paste new CKEditor in there with name "CKEditor". After copy "adapters" folder from "_CKEditor" and paste it in new "CKEditor" folder. Clean assets and refresh:)

#11115 report it
Giacomo at 2012/12/18 05:03am
new ckeditor

Hi, new ckeditor 4.0 is released. Are you plan to update editme with it? Thanks!

#11073 report it
Manoj M at 2012/12/14 07:35am
Thanks

works flawlessly.... good extension keep up the good work

#10896 report it
Giacomo at 2012/11/30 11:17am
Default cellpadding, cellspacing, border for a table

Hi, thanks for your previous advices.

I've another question to ask. Where and how can I set up configuration like these?

Thank you very much

EDIT: I've solved placing the code

CKEDITOR.on('dialogDefinition', function( ev ) {
  var dialogName = ev.data.name;
  var dialogDefinition = ev.data.definition;
 
  if(dialogName === 'table') {
    var infoTab = dialogDefinition.getContents('info');
    var cellSpacing = infoTab.get('txtCellSpace');
    cellSpacing['default'] = "5";
    var cellPadding = infoTab.get('txtCellPad');
    cellPadding['default'] = "5";
    var border = infoTab.get('txtBorder');
    border['default'] = "0";
  }
});

directly inside the page

#10571 report it
limitless at 2012/11/05 12:12pm
Re: How to get textarea value?

Hey Giacomo

Unfortunately CKEditor doesn't offer a classic onChange event.

To accomplish something like that, you will need to implement something yourself.

There is a plugin which implements an onChange event for CKEditor: http://alfonsoml.blogspot.ch/2011/03/onchange-event-for-ckeditor.html Please understand that i can't offer support for this plugin since i myself never used it.

you might be able to find a possible solution here as well: http://stackoverflow.com/questions/5143516/detecting-onchange-events-from-a-ckeditor-using-jquery

Since some of the solutions require you to access to CKEditor instance, here's an example of how to do that:

<?php
$editMe = $this->widget('ext.editMe.widgets.ExtEditMe', array(
    'name'=>'example',
    'value'=>'',
));
?>
<script type="text/javascript">
    jQuery(document).ready(function() {
        var ckeInstance = jQuery("#<?php echo $editMe->htmlOptions['id']; ?>").ckeditorGet();
        alert(ckeInstance.getData());
    });
</script>

hope this helps

#10570 report it
limitless at 2012/11/05 11:04am
Re: New skin

Hey Giacomo

ozone is part of CKEditor 4 which is still beta. editMe 2.0 uses CKEditor 3.6.4, therefore you can only use the skins which are inside the extension. As soon as the final version of CKEditor 4 is released it will be included in editMe.

Leave a comment

Please to leave your comment.

Create extension
Downloads
  • Yii Version: 1.1
  • License: Other Open Source License
  • Developed by: limitless
  • Category: User Interface
  • Votes: +48 / -2
  • Downloaded: 6,790 times
  • Created on: Aug 2, 2011
  • Last updated: Jul 16, 2013
  • Tags: wysiwyg, editor, ckeditor