tinyMCE - source code editing in a textarea

前端 未结 3 2083
無奈伤痛
無奈伤痛 2021-02-19 16:22

I\'m playing around with MCE, I was wondering if there was the possibility of letting the user enter source code into a post, much like the 101010 button in this form.

3条回答
  •  闹比i
    闹比i (楼主)
    2021-02-19 16:48

    You'll need to add plugins: "code" to the initialization code as follows:

    tinymce.init({
        plugins: "code"
    });
    

    https://www.tinymce.com/docs/plugins/code/

提交回复
热议问题