-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Implement TextHighlighter #52
Comments
Geshi proposal: yiisoft/yii#1004 |
Don't know whether it makes sense, but IMHO it makes: how about implementing client side highlighter too? There is very impressive highlight.js (1, 2). Just an abstract idea: we could create some kind of a universal highlighter with almost seamless switching between server (GeSHi) and client (highlight.js) side modes. I'm interested in your opinions about this idea. (Will do investigations on the possibility of doing that.) |
Why would someone want to highlight code on client side? |
on the other side, by using a client highlighter the content passed from server to the client is clear text i.e. smaller (faster)... and it saves server performance :D |
Server is far more powerfull than client in most cases and when using a javascript there is always a lag seen by the user until loaded dom is manipulated by highlighter. http://stackoverflow.com/questions/70169/how-to-highlight-source-code-in-html Also some comments from: http://www.hanselman.com/blog/BestCodeSyntaxHighlighterForSnippetsInYourBlog.aspx
...
|
Client side hightlighting can be usefull while creating preview. It allows to see how the message will look like without triggering the server with Ajax. |
I have used CTextHighlighter on yii 1.1 and it very good. I feel it is inconvenient because I'm not the author of those widgets and i need to use it on yii2 @qiangxue plz, review and implement those Thanks |
I've provided a list in #47 Will be great to get some opinions. |
@samdark |
https://github.com/scrivo/highlight.php is still a good solution for it. |
not sure if we really need support for it in the core... maybe better create it as an official extension? |
I was thinking about highlighting of error pages / debug and apidoc rendered pages. Not sure it can be done w/o requiring more code in the core. |
okay, makes sense. |
as can be concluded from this discussion, it can be a whole architecture on its own. Out of the cores scope. |
Should we provide it in the core?
The text was updated successfully, but these errors were encountered: