javascript tinymce 选择器仅用于 div id
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20636879/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-27 18:55:32 来源:igfitidea点击:
tinymce selector to div id only
提问by panjo
With current setup tinymce selector is set to all textarea fields on my page. How can I change this to only one field using css id property?
使用当前设置 tinymce 选择器设置为我页面上的所有 textarea 字段。如何使用 css id 属性将其更改为仅一个字段?
This is my current setup
这是我目前的设置
<script>
tinymce.init({ selector: 'textarea' });
</script>
回答by Hugo Tunius
<script>
tinymce.init({ selector: "#myid" });
</script>
回答by Bala
You can do something like this
你可以做这样的事情
<script>
tinymce.init({ selector: "div#div1" });
</script>