Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Backspace clears divs from placeholder in template

Thibaut Wavreille December 4, 2013

Hi everybody,

I developed a blueprint template with placeholders. When I'm in the editor page, I hit backspace to remove the text in placeholder and if I hit backspace again that removes all the custom div around the placeholder.

eg :

<div class="fluid-row">
		<div class="fluid-column fluid-c6">
			<div class="innerCell">
				<ac:placeholder>This is an example of content</ac:placeholder>
			</div>
		</div>
		
		<div class="fluid-column fluid-c6">
			<div class="innerCell">
				<ac:placeholder>This is an example of content</ac:placeholder>
			</div>
		</div>
	</div>

How may I resolve my issue?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Thibaut Wavreille December 8, 2013

After several tests, I found the problem. Confluence adds automaticaly a div element "innerCell"...
So the content of this is editable.

I solve this issue like this using Javascript to add the attribute contentEditable="false" for each innerCell above my div element with class "fluid-row" :

jQuery(this).contents().find('.fluid-row').parent().attr('contentEditable','false');

TAGS
AUG Leaders

Atlassian Community Events