Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9302
    zm1234
    Member

    I’m trying to re-create the old Allaire Homesite 4 HTML coloring scheme based not on syntax (plain text, tags, attributes etc.) but rather on tag categories (text formatting tags, table tags, form tags, links, images etc.). Choosing different colors for the tags of different purposes makes HTML code look much more structured and easy to navigate.

    Unfortunately the text coloring possibilities EmEditor offers are too limited for that task, especially if a HTML code being colored contains also JavaScript and CSS definitions.

    This can be solved really easy without considerable UI redesign: just include the ability to add unlimited number of Highlights (more than 10 by default) in the ‘Specify Part’ list found on the ‘Display’ tab in the ‘Properties for Current Configuration’ dialog box. The ‘Highlight Word’ list on the ‘Highlight (1)’ tab must be changed accordingly. In macro engine a new array or a function should be introduced, somethig like eeColorHighlight[n], which will extend the functionality of the existing constants eeColorHighlight1, …, eeColorHighlight10.

    Thanks for your attention.

    #9304
    Yutaka Emura
    Keymaster

    Hello zm1234,

    Thanks for your inputs. I might consider that in future versions.

    #9348
    ZUMA-RUS
    Member

    I think many people will be happy, after the creation of such a function.

    #9463
    CrashNBurn
    Member

    When considering this, consider allowing new “Display” rules.
    E.g. many IDE’s and Editors allow for setting colors for things like:

    HTML Tag
    HTML Unknown Tag
    HTML Attribute
    HTML Unknown Attribute
    HTML Value
    HTML String
    HTML Other Inside Tag
    HTML Comment
    HTML Entity
    HTML Element Text

    PHP Default
    PHP Start Tag
    PHP Comment
    PHP Keyword
    PHP String
    PHP Simple String
    PHP Number
    PHP Operator
    PHP Variable
    PHP String Variable
    PHP Complex Variable

    If you look at the actual .esy syntax files, EmEditor basically does this, but it doesn’t allow you to name the group of words — if it did then in the GUI one could view them like:

    +HTML Tag
    a
    img
    ...
    + HTML attribute
    color
    width
    ....

    As opposed to a huge list of unrelated/unsorted words.

    Then you could likewise define:
    Words (and/or a Regex) for those Specifications.
    E.g. 1) Words, AND a fall-back Regex that doesn’t match your words(Tags/Attributes).
    E.g. 2) Only a Regex.

    It would just be really really nice, if we didn’t have to try and form a Regex to encapsulate HTML syntax properly

    <div class=“begin”>
    <?php echo“Some Text Here”;
    $testVar='<div class=“inside”>TestVar Text</div>’
    ?>
    <TAG attribute1=“Value” attribute2=“value”>Plain Text
    <span class=“test”>Some Text</span></TAG></div>

    With possibly an option to display PHP strings that contain HTML code with the normal HTML tag/attribute coloring – but allow for a modified background.

    I’m still not sure how enabling the “HTML Embedded” under [Highlight(2)] / Special Syntax really works.

    How I would think it should work, is allow you to define your HTML rules based on Tag/Attribute definitions, etc.
    And to allow CSS highlighters to be triggered:
    1) inside the where you can define in-line CSS.
    2) inside tags when style is indicated <div style=”width:100px”
    Allow your defined PHP syntax highlighters to be triggered:
    1) in between php start tags, e.g.

    Allow your defined Javascript syntax highlighters to be triggered, inside:

    <!–
    alert(document.forms[0].elements.length);
    // –>

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.