sachinchoolur / angular-trix

A rich WYSIWYG text editor directive for angularjs.
http://sachinchoolur.github.io/angular-trix/
MIT License
328 stars 62 forks source link

Disabled or read-only state #24

Open xzbd opened 7 years ago

xzbd commented 7 years ago

I couldn't find any information (here or at original trix documentation) about making editor disabled or read-only state. So i implemented like this: angular.element(editor.element).prop('contenteditable', false); angular.element(editor.element.toolbarElement).remove();

Any better implementation idea or any information about doing this right way?

zendu commented 7 years ago

Probably binding HTML content using ngHtmlBind is better approach so that you can avoid writing controller code. Original idea: https://github.com/basecamp/trix/issues/331