angular-highlightjs
angular-highlightjs copied to clipboard
angular-highlightjs editable with binding
Hi every,
I would like to be able to edit content for that I just add property :
contentEditable="true"
However, when there is no binding with the $scope so the content update it's not catch in $scope variable...
So it's possible to edit the the text with a data-binding?
Thanks for all
Hi @GuillaumeUnice ,
Can you present a simple example of your current progress?
Yes of course,
<div hljs hljs-source="explorer.fileContent" contentEditable="true"></div>
Currently I just make that but the variable scope"explorer.fileContent " it's not update when I change the content. Because "hljs-source" it's one-way binding if I understand :D
Have you tried UI.CodeMirror? http://angular-ui.github.io/ui-codemirror/
It seems more suitable for you needs?
The problem with this module we have to define the language use it's not automatically detect like your module highlightjs.
Indeed it didn't work I have test but there is lot of problems like highlight format to be specified.
I think it's possible to change scope with watch in hljs?
Maybe with hljs-onhighlight it's possible? I don't understand what make exactly onhighlight If i could have a callback after update that's good too :D