返回介绍

Advanced editing behaviors

发布于 2019-05-06 06:50:01 字数 4294 浏览 1184 评论 0 收藏 0

br_in_pre

This option allows you to disable TinyMCE’s default behavior when pressing the enter key within a pre tag. By default, pressing enter within a pre tag produces a br tag at the insertion point. For example:

<pre>This is inside <br> a pre tag.</pre>

However, when br_in_pre is set to false, rather than inserting a br tag TinyMCE will split the pre tag. For example:

<pre>This is inside </pre> <pre>a pre tag.</pre>

Note: when set to false, shift+enter will insert a br tag.

Type: Boolean

Default Value: true

Possible Values: true, false

Example
tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  br_in_pre: false
});

custom_undo_redo_levels

This option should contain the number of undo levels to keep in memory. By default, it is set to use an unlimited number of undo levels. The value of custom_undo_redo_levels should be 10 or lower for low-end systems otherwise it steals a lot of memory.

Type: Number

Default Value: unlimited

Example
tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  custom_undo_redo_levels: 10
});

end_container_on_empty_block

This option allows you to to split the current container block element if the enter key is pressed inside an empty inner block element.

Type: Boolean

Default Value: false // confirmation required

Possible Values: true, false

Example
tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  end_container_on_empty_block: true
});

nowrap

This option makes the editable area behave like a <pre> tag, and adds a horizontal scroll instead of wrapping text.

Type: Boolean

Default Value: false

Possible Values: true, false

Example
tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
	nowrap : true
});

object_resizing

This options allows you to turn on/off the resizing handles on images, tables or media objects. This option is enabled by default and allows you to resize table and images. You can also specify a CSS3 selector of what you want to enable resizing on.

Disable all resizing of images/tables

Type: Boolean, String

Default Value: true

Possible Values: true, false, img

Example
tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  object_resizing : false
});

Enable resizing on images only

Type: Boolean, String

Default Value: true

Possible Values: true, false, img

Example
tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  object_resizing : 'img'
});

typeahead_urls

This option allows disable the type ahead url field feature.

Type: Boolean

Default Value: true

Possible Values: true, false

Example
tinymce.init({
  selector: 'textarea',
  typeahead_urls: false
});

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

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

发布评论

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