0

ckエディター用の追加のプラグインを作成しようとしています。

ツールバーにボタンを作成し、これがクリックされたときに何かを実行する段階にあります。

CKEDITOR.plugins.add('enlarge',
{
    init: function (editor) {
        //Plugin logic goes here.
        editor.addCommand('insertenlarge',
            {
                exec: function (editor) {

            }
        });

        editor.ui.addButton('enlarge',
            {
                label: 'Insert enlarge',
                command: 'insertenlarge',
                icon: this.path + 'images/enlarge.png'
        });
    }
});

私が知らないのは、強調表示された要素を取得する方法です。基本的に、ユーザーがエディターで画像をクリックして拡大をクリックすると、新しいポップアップで画像が開きます。今のところ、画像要素にアクセスして配置できるようにする方法を見つけたいと思います。ポップアップで?

4

1 に答える 1

0

これはあなたのために働くはずです:

editor.getSelection().getSelectedElement()

于 2012-11-28T11:23:17.220 に答える