javascript - TinyMCE removes the ng-click event Angularjs -


editor.insertcontent("<a href=\"#\" ng-click=\"signup()\"> sign </a>"); 

this code line simple pluging tinymce editor. work problem. problem removes ng-click="signup()" like. in other words produce following content

<a href="#"> sign </a> 

intead of

<a href="#" ng-click="signup()"> sign </a> 

i full if me in case. want create small plugin tinymce insert above code line in correct way

you need set ng-click valid tinymce attribute of a-tags. try setting:

// valid_elements option defines elements remain in edited text when editor saves. valid_elements: "@[id|class|title|style]," + "a[name|href|target|title|alt|ng-click]," + "#p,blockquote,-ol,-ul,-li,br,img[src|height|width],-sub,-sup,-b,-i,-u," + "-span,hr", 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -