Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

angular-highlightjs editable with binding #67

Open
GuillaumeUnice opened this issue Jun 7, 2016 · 6 comments
Open

angular-highlightjs editable with binding #67

GuillaumeUnice opened this issue Jun 7, 2016 · 6 comments

Comments

@GuillaumeUnice
Copy link

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

@pc035860
Copy link
Owner

pc035860 commented Jun 7, 2016

Hi @GuillaumeUnice ,

Can you present a simple example of your current progress?

@GuillaumeUnice
Copy link
Author

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

@pc035860
Copy link
Owner

pc035860 commented Jun 7, 2016

Have you tried UI.CodeMirror?
http://angular-ui.github.io/ui-codemirror/

It seems more suitable for you needs?

@GuillaumeUnice
Copy link
Author

The problem with this module we have to define the language use it's not automatically detect like your module highlightjs.

@GuillaumeUnice
Copy link
Author

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?

@GuillaumeUnice
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants