Closed dirkjacobs closed 7 years ago
Seems like when setting the content of an empty region (with setContent), there was a check before or after to check for empty regions who is adding automatically a paragraph tag.
I think when setting the content of a region, with setContent (nono-empty), the whole content of the region should be replaced and the paragraph with ellipsis shouldn't be there no longer
Hi @dirkjacobs,
There's not a public interface for this currently but as a suggestion as to how you might resolve this here are a couple of approaches to disabling this behaviour.
If you want to disable this behaviour (e.g the prevention of empty regions) you can set a flag against the editor like so:
ContentTools.EditorApp.get()._emptyRegionsAllowed = false
Alternatively if you just want to disable it for a given set of instructions you can do the following:
ContentTools.EditorApp.get()._allowEmptyRegions () ->
# Do something here with the prevent empty regions behaviour disabled...
Editor is in edit mode and we have an empty region.
When content of this region is set by means of setContent, the content data will be prefixed by means of ellipsis ...
(see screenshot)