-
Notifications
You must be signed in to change notification settings - Fork 369
tinymce fails to render the tinymce model in the textarea after changing the order of the list that tinymce is in #12
Comments
Can you create a standalone plunker or fiddle that reproduces this to help us debug the issue? P.S. |
I have already found a workaround. because that the textfield of tynimce is rendered in ng-include, what i did is remove the included DOM and put it back again, just by this peace of code: $scope.afterChange = (items) -> I will try to put something to play with for debugging as well. |
I believe I am running into the same issue, but really can't read this HAML. I am creating a list of TinyMCE editors: <script type="text/ng-template" id="ParagraphRenderer"> <textarea class="tinymce-container" ui-tinymce ng-model="paragraphs[element.params.id]"></textarea> </script>Please note: I am actually having a list of elements which call the paragraph renderers, but the model is used from a different place. I know this causes sceptics but it makes perfect sense in my environment. When I am deleting an element from the list and the matching pargraph model, the DOM part actually disappears. For example, in a list of 10 TinyMCEs I delete number 5, and 6 - 10 are damaged. 1- 4 work. |
Any update on this issue ?? I am also facing this issue. |
Can someone try reproducing this issue with the latest release? |
I've recreated the issue in a jsBin: http://jsbin.com/tixoyu/7/edit?js,output This is an example with ui-sortable. Some things to notice here:
If anyone is in need of a quick and dirty solution a possibility is to hook into the 'end' event of the sorting and refresh the directive, but definitely there must be a better way to handle this case, which unfortunately I am still unaware of. I will post back if I'll find any proper way to solve this issue. |
Just noting here, I have a simpler plunker that reproduces the issue here. I believe I am close to a fix that creates support for a new $scope event to programmatically trigger refreshing of the directive, and hope to have one pushed up today. |
Is this Solved?
Its still the same as mentioned from @wesleycho Is this the Solution to implement every Time we work with Manipulating the Order of the Editors
|
@atodicebear You saved my day. Worked like charm. Thanks! |
I have a list of items, one of the items can be a tinymce editor. this list can change the order of the items in it. once i change the order of the items, my tinymce stops working.
here is a demo of my code(haml):
%li{:"ng-repeat"=>"item in items | toArray | orderBy:'position'",:class=>"item",:"ng-class"=>"{in_edit:item.in_edit}"}
.edit{:"ng-show"=>"item.in_edit"}
.close_item{:"ng-click"=>"remove(item)"}
.save_item{:"ng-click"=>"save(item)"}
.include{:"ng-include"=>"",:src=>"item.type"}
%script{:type=>"text/ng-template", :id=>"text"}
%textarea{:"ui-tinymce"=>"",:"ng-model"=>"item.body"}
The text was updated successfully, but these errors were encountered: