First of all, I am aware of a similar closed issue (#180: 'Is there a way to set the default empty element for a region?'). My scenario is similar to the issue - A page title with a fixed format; I want only the text editable.
However, my approach is a little different. I patched the code to allow limited functionality on element that is given a class "edit-only". But when the content is removed it gets replaced by a default placeholder < p >. So I want to place a condition to prevent it if the element has the class. I have looked into the method '_preventEmptyRegions', but it seems the code gets run after the element got removed upon empty content, am I correct?
So I was looking for where in the code that the removal happens, but I can't seem to find the code bit.
Would my approach work in this case? Please help.
First of all, I am aware of a similar closed issue (#180: 'Is there a way to set the default empty element for a region?'). My scenario is similar to the issue - A page title with a fixed format; I want only the text editable.
However, my approach is a little different. I patched the code to allow limited functionality on element that is given a class "edit-only". But when the content is removed it gets replaced by a default placeholder < p >. So I want to place a condition to prevent it if the element has the class. I have looked into the method '_preventEmptyRegions', but it seems the code gets run after the element got removed upon empty content, am I correct?
So I was looking for where in the code that the removal happens, but I can't seem to find the code bit. Would my approach work in this case? Please help.
Cheers, Wasin