返回介绍

Nonbreaking Space plugin

发布于 2019-05-06 06:50:36 字数 2739 浏览 1075 评论 0 收藏 0

This plugin adds a button for inserting nonbreaking space entities   at the current caret location (cursor insert point). It also adds a menu item Nonbreaking space under the Insert menu dropdown and a toolbar button.

Type: String

Example
tinymce.init({
  selector: "textarea",  // change this value according to your HTML
  plugins: "nonbreaking",
  menubar: "insert",
  toolbar: "nonbreaking"
});

Options

nonbreaking_force_tab

This option allows you to force TinyMCE to insert three   entities when the user presses the keyboard tab key.

It’s important to note that this does not change the behavior of the menu and toolbar controls, which will continue to insert a single &nbsp entity when nonbreaking_force_tab value is true.

However, the true condition does capture the tab key and contain it within the editable area, whereas when set to its default state of false a tab keypress will move the cursor to the next editable area (e.g. a browser url bar or form field on the current page).

Type: Boolean

Default Value: false

Possible Values: true, false

Example
tinymce.init({
  selector: "textarea",  // change this value according to your HTML
  plugins: "nonbreaking",
  menubar: "insert",
  toolbar: "nonbreaking",
  nonbreaking_force_tab: true
});

Usage with table plugin

When using the nonbreaking_force_tab setting together with the table plugin it will conflict with the tab navigation between table cells. You can choose which setting you want to use by changing the ordering of the plugins in the init object. If nonbreaking is before table in the plugins setting you will activate the insert   functionality, while if table is added before nonbreaking you will get tab table cell navigation. See examples:

This will activate the insert   setting:

tinymce.init({
  selector: "textarea",  // change this value according to your HTML
  plugins: "nonbreaking table",
  nonbreaking_force_tab: true
});

This will activate the tab table cell navigation:

tinymce.init({
  selector: "textarea",  // change this value according to your HTML
  plugins: "table nonbreaking",
  nonbreaking_force_tab: true
});

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文