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 abr
tag.
Type: Boolean
Default Value: true
Possible Values: true
, false
Example: Using br_in_pre
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: Using custom_undo_redo_levels
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: Using end_container_on_empty_block
tinymce.init({
selector: 'textarea', // change this value according to your HTML
end_container_on_empty_block: 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
Note: The default option for this setting is different for mobile devices. For information on the default mobile setting, see: TinyMCE Mobile - Configuration settings with mobile defaults.
Example: Disable object resizing
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: Enable object resizing for images
tinymce.init({
selector: 'textarea', // change this value according to your HTML
object_resizing : 'img'
});
resize_img_proportional
When a user resizes an image in the editor, this option controls whether image is resized proportionally or freely. If set to:
true
— When users resize an image, the image will be resized proportionally (both dimensions of the image are resized by the same percentage of length). Users can freely resize images by holding theShift
key while resizing.false
— When users resize an image, the image can be resized freely. Users can proportionally resize images by holding theShift
key while resizing.
Type: Boolean
Default Value: true
Possible Values: true
, false
Example: Using resize_img_proportional
To disable proportional image resizing:
tinymce.init({
selector: 'textarea', // change this value according to your HTML
resize_img_proportional: false
});
typeahead_urls
This option allows disable the type ahead url field feature.
Type: Boolean
Default Value: true
Possible Values: true
, false
Example: Using typeahead_urls
tinymce.init({
selector: 'textarea',
typeahead_urls: false
});
Was this article helpful? Yes - No
Well, that's awkward . Would you mind opening an issue or helping us out?
Thanks for the feedback!
Can't find what you're looking for? Let us know.
Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.