Skip to content
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

Improve html formatter #934

Closed
mfuentesg opened this issue Jul 12, 2023 · 2 comments · Fixed by #986
Closed

Improve html formatter #934

mfuentesg opened this issue Jul 12, 2023 · 2 comments · Fixed by #986
Projects

Comments

@mfuentesg
Copy link

Hey @martijnversluis before all, thanks for this amazing library!

I'm working in a chord library app, and, I wanted to customize some parts of the HTMLFormatter, reusing some of the utilities that have built (i.e isEvaluatable, fontStyleTag), but, those functions are not exported.

I built a react component based on the templates/html_div_formatter.ts copying almost everything from your it.

I was thinking how to improve formatter API in order to make it a bit more easier to customize instead of duplicate your formatter examples.

Have a nice day/evening/night!

@martijnversluis
Copy link
Owner

Hey @mfuentesg,

Thanks for reaching out!

I think it would make sense to export these utility functions in a file like formatter/html_formatter/utilities. I'll add your request to the project board.

@martijnversluis martijnversluis added this to Backlog in Board via automation Aug 11, 2023
@martijnversluis martijnversluis moved this from Backlog to TODO in Board Aug 11, 2023
martijnversluis added a commit that referenced this issue Aug 28, 2023
Usage:

```javascript
import templateHelpers from 'chordsheetjs';

const {
  isChordLyricsPair,
  lineHasContents,
  isTag,
  isComment,
  stripHTML,
  each,
  when,
  hasTextContents,
  lineClasses,
  paragraphClasses,
  evaluate,
  fontStyleTag,
} = templateHelpers;
```

Resolves #934
martijnversluis added a commit that referenced this issue Aug 28, 2023
Usage:

```javascript
import templateHelpers from 'chordsheetjs';

const {
  isChordLyricsPair,
  lineHasContents,
  isTag,
  isComment,
  stripHTML,
  each,
  when,
  hasTextContents,
  lineClasses,
  paragraphClasses,
  evaluate,
  fontStyleTag,
} = templateHelpers;
```

Resolves #934
martijnversluis added a commit that referenced this issue Aug 31, 2023
Usage:

```javascript
import templateHelpers from 'chordsheetjs';

const {
  isChordLyricsPair,
  lineHasContents,
  isTag,
  isComment,
  stripHTML,
  each,
  when,
  hasTextContents,
  lineClasses,
  paragraphClasses,
  evaluate,
  fontStyleTag,
} = templateHelpers;
```

Resolves #934
Board automation moved this from TODO to Done Aug 31, 2023
@martijnversluis
Copy link
Owner

@mfuentesg I published v8.1.0 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Board
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants