question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Additional attributes

See original GitHub issue

The main objective in my case is to be able to save highlights in a database then load them later. In my design, every highlight span should have title and id attributes. Is that feasible with the current library’s implementation? if not (which is mostly the case), can you add this feature? IMHO, it should be better on occurrence level, like the each handler, the reason is for instance if I want to provide a different id for each instance, like XXXX_1, XXXX_2 (the number being the occurrence number).

BTW, i tried to modify the element passed in the each callback like this:

          element.setAttribute("id", "sohayb" + counter);
          element.setAttribute("title", "sohayb");
          var tmp = document.createElement("div");
          tmp.appendChild(element);
          console.log(tmp.innerHTML);

The log printed in the console had the expected result, but the whole spanned text is removed! If this is not the expected behaviour of the library, I can provide you with a JSFiddle link.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
julmotcommented, Feb 7, 2017

@sohayb So you’ve built some kind of adapter to highlight user selections with mark.js? If so, I’d love to see this a third-party add-on for mark.js!

I’m glad you could solve your problem yourself.

0reactions
sohaybcommented, Feb 8, 2017

Basically yes, because I needed that functionality, just highlight user selection. Will do that Add-on at some point! Thank you and thanks for your work 🥇

Read more comments on GitHub >

github_iconTop Results From Across the Web

Defining additional attributes - IBM
You can define common codes for additional attributes used when setting up a product item. This allows you to store any additional information...
Read more >
Additional Attributes | Account Administration | Solutions
Assigning additional attributes to a customer/supplier · Navigate to Sales → Customers. · Select the attribute set you want to apply from the...
Read more >
Defining Additional Attributes of Fields
The additional attributes are described in the following sections: 3GL Specification. Condition Name and Value. Field Name Synonyms.
Read more >
Definitions of additional attributes in system table records
The Additional Attributes column in the system table reference provides information about the fields that are in each system table.
Read more >
How can I define additional attributes? - Oracle Help Center
You can define additional attributes at the item structure header or component level using descriptive flexfields. Product Managers can capture the required ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found