@javiert.dev/yxtus
v1.0.0
Published
A plain text to HTML processor at a higher level
Downloads
63
Maintainers
Readme
Read this in Spanish.
Do you need a faster way to write in your blogs, projects, or even in the translations of your websites?
jtYxtus is your answer.
It's your translator to HTML from plain text! Similar to Markdown, but with many, many more capabilities, just by writing in a specific format, you'll save a lot of time and can create incredible publications.
[!NOTE] This project is made with TypeScript and includes the interfaces and typing of the functions.
All set to write your ideas more efficiently? 🚀
Dive into the project Wiki. There awaits the complete guide, practical examples, and all the secrets to master jtYxtus like a true expert.
Getting started with jtYxtus is more than easy! You just need a package manager like npm, yarn, or pnpm. If you already have one installed, simply run one of the following commands in the root of your project:
npm install @javiert.dev/yxtusyarn add @javiert.dev/yxtuspnpm add @javiert.dev/yxtusAnd you already have half the work done!
Here I show you a very simple example of how to convert your notes to HTML.
import jtYxtus from '@javiert.dev/yxtus';
// Create an instance to pass some configurations.
// (You can name the instance whatever you want)
const jtYxtusInstance = new jtYxtus();
let text = '*this* /is/ a ~test~ _sample_';
let output = jtYxtusInstance.parse(text);
// ! Caution when doing innerHTML on the body, you'll delete everything else haha. Then adapt it to what you need.
document.body.innerHTML = output;TAH DAH! Now you have your notes in HTML, you can give it the style and shape you want. Remember to check the documentation for more details on each utility available in this interesting library.
| Feature | Status | Usage Example |
| :---: | :---: | --- |
| Bold | Implemented | *text* |
| Italic | Implemented | /text/ |
| Strike | Implemented | ~text~ |
| Underline | Implemented | _text_ |
| Links | Implemented | [text](url) |
| Headings | Implemented | # Title |
| Line breaks | Implemented | Text |
| Paragraphs | Implemented | Automatic text |
| Images | Implemented |  |
| Videos | Implemented | [video{1\|0\|1}](url) |
| Audio | Implemented | [audio{1\|0\|1}](url) |
| YouTube | Implemented | [yt{1\|0\|640x480}](URL or ID) |
| Inline code | Implemented | `code` |
| Code blocks | Implemented | ```code``` |
| Tables | Implemented | \| Header \| \| --- \| \| Body \| |
| Iframes | Implemented | [iframe{640x480}](url) |
| Buttons | Implemented | [button{download,file.pdf}Text](url) |
| Horizontal lines | Implemented | --- |
| Blockquotes | Implemented | > Text |
| Special blockquotes | Implemented | > [!NOTE@Title]\n> Text |
| Comments | Implemented | <!-- comment --> |
| Ordered lists | Implemented | 1. Item |
| Unordered lists | Implemented | - Item |
| Task lists | Implemented | - [ ] Item |
| Abbreviations | Implemented | {HTML}\n*[HTML]: Hyper Text Markup Language |
| Colors | Implemented | !{color}(text) |
| Highlight | Implemented | ==text== |
| Icons | Implemented | ;heart; |
| Text Align Center | Implemented | -:- text |
| Text Align Left | Implemented | :-- text |
| Text Align Right | Implemented | --: text |
| cURL | Planned | Thinking about how to do it |
| Footnotes | Planned | Text[^1] |
| Captys embed | Planned | [captys{512x512}](URL or ID) |



