multiple tinymce textareas

前端 未结 5 1109
甜味超标
甜味超标 2021-02-07 14:26

I use tinymce for a webpage that dynamically generates at least 5 texts.
The configuration I use only works on the first textarea unfortunately.



        
5条回答
  •  借酒劲吻你
    2021-02-07 15:16

    According to tinymce.com/wiki.php/Configuration:selector, selector is the recommended way of selecting what elements should be editable.

    For all textarea elements, as requested:

    selector: "textarea",
    

    Or more elegantly, only those elements with a specific CSS tag:

    selector: "textarea.editme",