tinymce - how to load content in tiny mce? -


i'm loading content textarea, initialized instance of tiny mce. works perfect until textarea has paragraph. when try load paragraph image inside it, works strange. content inside original paragraph moved new paragraph , original added empty. why happening. in advance.

i'm trying load following :-

<p id="paragraph-06c073b3-6ba7-ae52-7bfe-9ca282e448dc"  class="textelementclass"><div aria-disabled="true" style="position: relative;  z-index: auto;" class="draggableitem imageelement nestedimg ui-draggable-disabled ui-state-disabled" id="element-4c4ac020-0b32-99e9-356e-ccd6470e8294"> <img style="position: relative;" src="images/file-managements.png" class="imageedit  ui-draggable ui-draggable-disabled"  id="image-4c4ac020-0b32-99e9-356e-ccd6470e8294"></div> lorem ipsum dummy text of printing , typesetting industry. lorem ipsum has been industry's standard dummy text ever since 1500s, when unknown  printer took galley of type , scrambled make type specimen book. has  survived not 5 centuries, leap electronic typesetting, remaining unchanged. popularised in 1960s release of  letraset sheets containing lorem ipsum passages, , more desktop  publishing software aldus pagemaker including versions of lorem ipsum.</p><div  style="" class="dropafter ui-droppable"></div> 

after loading gets changed :

<p id="paragraph-06c073b3-6ba7-ae52-7bfe-9ca282e448dc"  class="textelementclass">&nbsp;</p> <div id="element-4c4ac020-0b32-99e9-356e-ccd6470e8294" class="draggableitem  imageelement nestedimg ui-draggable-disabled ui-state-disabled" style="position: relative; z-index: auto;"><img id="image-4c4ac020-0b32-99e9-356e-ccd6470e8294" class="imageedit ui-draggable ui-draggable-disabled" style="position: relative;" src="images/file-managements.png" alt="" /></div>     <p>lorem ipsum dummy text of printing , typesetting industry.    lorem ipsum has been industry's standard dummy text ever since 1500s, when     unknown printer took galley of type , scrambled make type specimen book.     has survived not 5 centuries, leap electronic typesetting,    remaining unchanged. popularised in 1960s release of    letraset sheets containing lorem ipsum passages, , more desktop    publishing software aldus pagemaker including versions of lorem ipsum.</p>   <p>&nbsp;</p> 

it might because p-tag used default wrapping element tinymce leading wierd behavior.

edit: "/div>" not valid html tag. try verify html want insert.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -