Giter VIP home page Giter VIP logo

Comments (6)

afonsof avatar afonsof commented on July 22, 2024

Could you send me the html of this text area?

from jenkins-material-theme.

cobexer avatar cobexer commented on July 22, 2024

I hope that covers all different highlights for the Shell language:

    <div class="CodeMirror">
        <div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 86.6px; left: 6.60001px;">
            <textarea autocapitalize="off" autocorrect="off" style="position: absolute; padding: 0px; width: 1px; height: 1em;" wrap="off"/>
        </div>
        <div style="display: none; height: 169px;" class="CodeMirror-scrollbar">
            <div style="height: 212px;" class="CodeMirror-scrollbar-inner"/>
        </div>
        <div style="border: 1px solid black; height: 295px; opacity: 1;" draggable="true" tabindex="-1" class="CodeMirror-scroll cm-s-default">
            <div style="position: relative;">
                <div style="position: relative; top: 0px;">
                    <div style="display: none;" class="CodeMirror-gutter">
                        <div class="CodeMirror-gutter-text"/>
                    </div>
                    <div class="CodeMirror-lines">
                        <div style="position: relative; z-index: 0; outline: medium none; min-width: 237px;">
                            <div style="position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden;">
                                <pre>
                                    <span class="cm-builtin">echo</span>
                                    <span class="cm-string">"some text"</span>
                                    <span class="cm-number">2</span>&gt;&amp;1 &gt;/dev/null<span>?</span>
                                </pre>
                            </div>
                            <pre style="top: 80px; left: 0px; visibility: hidden;" class="CodeMirror-cursor">&nbsp;</pre>
                            <pre style="visibility: hidden; left: 236px;" class="CodeMirror-cursor">&nbsp;</pre>
                            <div style="position: relative; z-index: -1; display: none;">
                                <div style="position: absolute; left: 0px; top: 40px; right: 1263px; height: 20px;" class="CodeMirror-selected"/>
                            </div>
                            <div style="">
                                <pre>
                                    <span class="cm-def">SRC</span>
                                    <span class="cm-operator">=</span>/ddd<span class="cm-attribute">-aaa</span>/<span class="cm-def">$BUILD_NAME</span>
                                </pre>
                                <pre>
                                    <span class="cm-builtin">cp</span>
                                    <span class="cm-attribute">-rf</span>
                                    <span class="cm-def">$SRC</span>/BUILD_* <span class="cm-quote">`pwd`</span>
                                </pre>
                                <pre>
                                    <span class="cm-builtin">echo</span>
                                    <span class="cm-string">"some text"</span>
                                    <span class="cm-number">2</span>&gt;&amp;1 &gt;/dev/null</pre>
                                <pre>
                                    <span class="cm-comment"># some comment</span>
                                </pre>
                                <pre> </pre>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

from jenkins-material-theme.

cobexer avatar cobexer commented on July 22, 2024

Maybe there is a guide on how one writes CodeMirror themes? I couldn't find one immediately but found this instead: http://mkaminsky11.github.io/codemirror-themes/

from jenkins-material-theme.

cobexer avatar cobexer commented on July 22, 2024

And here an example of the Groovy editor:
execute-groovy-builder

    <div class="CodeMirror">
        <div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 46.6px; left: 185.6px;">
            <textarea autocapitalize="off" autocorrect="off" style="position: absolute; padding: 0px; width: 1px; height: 1em;" wrap="off"/>
        </div>
        <div style="display: none; height: 285px;" class="CodeMirror-scrollbar">
            <div style="height: 292px;" class="CodeMirror-scrollbar-inner"/>
        </div>
        <div style="border: 1px solid black; height: 306px; opacity: 1;" draggable="true" tabindex="-1" class="CodeMirror-scroll cm-s-default">
            <div style="position: relative;">
                <div style="position: relative; top: 0px;">
                    <div style="height: 304px;" class="CodeMirror-gutter">
                        <div class="CodeMirror-gutter-text">
                            <pre>1</pre>
                            <pre>2</pre>
                            <pre>3</pre>
                            <pre>4</pre>
                            <pre>5</pre>
                            <pre>6</pre>
                            <pre>7</pre>
                            <pre>8</pre>
                            <pre>9</pre>
                            <pre>10</pre>
                            <pre>11</pre>
                            <pre>12</pre>
                            <pre>13</pre>
                            <pre>14</pre>
                        </div>
                    </div>
                    <div class="CodeMirror-lines">
                        <div style="position: relative; z-index: 0; outline: medium none; min-width: 616px; margin-left: 28px;">
                            <div style="position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden;">
                                <pre>
                                    <span class="cm-keyword">if</span> (<span class="cm-string">"Crash"</span>
                                    <span class="cm-operator">==</span>
                                    <span class="cm-variable">type</span>) {<span>?</span>
                                </pre>
                            </div>
                            <pre style="top: 40px; left: 151px; visibility: hidden;" class="CodeMirror-cursor">&nbsp;</pre>
                            <pre style="visibility: hidden; left: 615px;" class="CodeMirror-cursor">&nbsp;</pre>
                            <div style="position: relative; z-index: -1; display: none;">
                                <div style="position: absolute; left: 227px; top: 100px; right: 872px; height: 20px;" class="CodeMirror-selected"/>
                            </div>
                            <div style="">
                                <pre>
                                    <span class="cm-keyword">def</span>
                                    <span class="cm-variable">type</span>
                                    <span class="cm-operator">=</span>
                                    <span class="cm-variable">System</span>.<span class="cm-property">getenv</span>(<span class="cm-string">"type"</span>)</pre>
                                <pre> </pre>
                                <pre>
                                    <span class="cm-keyword">if</span> (<span class="cm-string">"Crash"</span>
                                    <span class="cm-operator">==</span>
                                    <span class="cm-variable">type</span>) {</pre>
                                <pre>
                                    <span class="cm-keyword">def</span>
                                    <span class="cm-variable">dumps</span>
                                    <span class="cm-operator">=</span>
                                    <span class="cm-number">0</span>
                                </pre>
                                <pre>
                                    <span class="cm-keyword">new</span>
                                    <span class="cm-variable">File</span>(<span class="cm-string">"C:\\ProgramData\\Microsoft\\Windows\\WER\\ReportQueue"</span>).<span class="cm-property">eachDir</span>() { <span class="cm-variable">dir</span> -&gt;</pre>
                                <pre>
                                    <span class="cm-keyword">if</span> (<span class="cm-variable">dir</span>.<span class="cm-property">getName</span>().<span class="cm-property">contains</span>(<span class="cm-string">"app"</span>)) {</pre>
                                <pre>
                                    <span class="cm-variable">dumps</span>
                                    <span class="cm-operator">++</span>
                                </pre>
                                <pre>
                                    <span class="cm-variable">println</span>
                                    <span class="cm-variable">dir</span>.<span class="cm-property">getName</span>()</pre>
                                <pre>    }</pre>
                                <pre>  }</pre>
                                <pre>
                                    <span class="cm-keyword">if</span> (<span class="cm-variable">dumps</span>
                                    <span class="cm-operator">&gt;</span>
                                    <span class="cm-number">0</span>) {</pre>
                                <pre>
                                    <span class="cm-variable">System</span>.<span class="cm-property">exit</span>(<span class="cm-number">1</span>)</pre>
                                <pre>  }</pre>
                                <pre>}</pre>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

from jenkins-material-theme.

afonsof avatar afonsof commented on July 22, 2024

Changing to use CodeMirror material theme (https://github.com/codemirror/CodeMirror/blob/master/theme/material.css)
image

It may solve Groovy editor too.

from jenkins-material-theme.

afonsof avatar afonsof commented on July 22, 2024

Fixed. Version 1.1.8

from jenkins-material-theme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.