angular-trix
angular-trix copied to clipboard
Disabled or read-only state
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?
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