1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

jsで追加したtextareaにtinymceを有効にする

Last updated at Posted at 2016-06-10

id='textarea_box';
tinyMCE.execCommand('mceAddControl', false, id);
上記記述をtextarea追加後に実行することで有効にすることが可能。

$('#textarea_box').click(function(){
  html = '<textarea id="textarea_box"></textarea>';
  $('#xxx').html(html);
  id='textarea_box';
  tinyMCE.execCommand('mceAddControl', false, id);
});

無効にする場合は下記のようにmceAddControlをmceRemoveControlに変更します。
id='textarea_box';
tinyMCE.execCommand('mceRemoveControl', false, id);

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?