Adding the <mark> tag for text highlighting in the HTML-BBCode parser | World Anvil

Remove these ads. Join the Worldbuilders Guild

Adding the <mark> tag for text highlighting in the HTML-BBCode parser

New Feature Addition · Editor: euclid · Created by 1337spectra
completed
highlighting -text

What functionality is missing? What is unsatisfying with the current situation?

Currently, the HTML-BBCode parser in World Anvil lacks support for the <mark> tag, which limits users' ability to emphasize and draw attention to important information within their articles. This can hinder readability and the effective conveyance of significance. While users can currently create custom classes as a workaround, it is not as intuitive or user-friendly as having a dedicated highlighting feature. I do not know the specifics of the WA architecture, but implementing this feature might be less resource-demanding than the current practice of users creating their own custom classes:

  • Reduced CSS Overhead and Smaller Data Transfer: By utilizing a built-in highlighting feature such as the browser's default styling or the platform's predefined styles with the <mark> option, users can eliminate the need for custom styles, resulting in reduced CSS overhead and smaller data transfer requirements, as no additional CSS classes are required. This reduces the size of the page and decreases the bandwidth needed to transfer it.
 

How does this feature request address the current situation?

I propose a simple and lightweight solution: by adding support for the <mark> tag in World Anvil's HTML-BBCode parser, users will be able to highlight specific text sections without significant additional data overhead. From the little bit I understand of the parser, the implementation can be achieved by incorporating a replace rule, such as:

$parsed_string = preg_replace('/\[mark\](.*?)\[\/mark\]/', '<mark>\1</mark>', $parsed_string

which ensures seamless integration within the existing parser. Moreover, this approach allows client-side rendering, minimizing reliance on network bandwidth and leveraging the user's device to handle the rendering process.

 

What are other uses for this feature request?

There's not much use for text highlighting beyond well... text highlighting, but it can be used for multiple purposes within a worldbuilding context:

  • Key Terms and Definitions: Authors can mark important terms or definitions within their articles, aiding readers in quickly identifying and understanding essential concepts.
  • Storytelling and Narrative Focus: Writers can highlight key plot points, crucial events, or significant character details, thereby enhancing the narrative structure and guiding readers' attention.
  • Review and Feedback Collaboration: When collaborating on a world-building project, users can highlight sections that require specific attention or revisions, facilitating focused feedback exchanges and smoother communication.
  • Hidden Clues and Easter Eggs: Authors can hide clues or easter eggs within their articles. By highlighting certain words or phrases, they can provide subtle hints or hidden messages for readers to discover, adding an element of intrigue and engagement to the world-building experience.
  • Progress Tracking: Users can visually track the progress of their world-building projects. For example, they can mark completed sections or milestones within an article, providing a clear visual representation of their progress to themselves or collaborators.
Current score

19/300 Votes · +4103 points

Votes Cast

  • +300

    by themrbeasley
    on 2023-06-28 14:46
  • +300

    by JoellaKay
    on 2023-06-27 03:50
  • +300

    by Mikedweb
    on 2023-06-22 02:25
  • +300

    by HunterChristmas1247
    on 2023-06-17 16:28
    In favor
  • +300

    by Moonlight Bard
    on 2023-06-17 13:12
    Being out-of-practice on my CSS styling skills, I'm always in favor of additional BBCode styling options! Also, anything that makes it easier for brand new users to make their own articles look great increases the welcoming feel of WA overall.
  • +300

    by Michael Chandra
    on 2023-06-17 08:16
    Asides from the other reasons, it could also add to immersion: A document with things highlighted by 'whatever reader had the document before you the user'.
  • +100

    by Athevra
    on 2023-06-16 23:31
  • +1

    by LittleSister
    on 2023-06-16 01:23
  • +100

    by DMFW
    on 2023-06-12 15:32
  • +100

    by LoreParmenter
    on 2023-06-11 03:45
  • +1

    by veruhere
    on 2023-06-10 20:32
  • +300

    by denversg1
    on 2023-06-09 22:53
  • +300

    by DramaticDragons
    on 2023-06-09 22:04
  • +1

    by tjtrewin
    on 2023-06-09 15:11
    Yes please, I had to add my own custom css to style a section called mark in order to make use of highlighting in my world :)
  • +100

    by Slylock
    on 2023-06-09 12:01
  • +300

    by Graylion
    on 2023-06-09 10:28
  • +300

    by Dalf32
    on 2023-06-09 04:56
  • +100

    by Wordigirl
    on 2023-06-08 23:23
    lol the <mark> tag worked in my notification box XD I'm not sure how much of a hassle it would be to implement, but I'm all for more accessibility and styling options. Thanks for suggesting this. God bless
  • +300

    by SanctifiedSavage
    on 2023-06-08 20:39
  • +300

    by 1337spectra
    on 2023-06-08 20:04