kensam94 / joplin-plugin-simple-highlighter Goto Github PK
View Code? Open in Web Editor NEWJoplin plugin to highlight / dehighlight the selected text
Joplin plugin to highlight / dehighlight the selected text
When we select a highlighted section like so (start and end of selection indicated with (|
)):
|Test of a ==highlighted selection== and more|
and the highlight button is clicked I would expext to expand the highlighted section. Two more equal signs are added around the selection but the "nested" highlight equal signs are not removed. This breaks the highlight markdown.
When we select a highlighted section like so (start and end of selection indicated with (|
)):
|Test of a ==highlighted selection== and more|
clicking the highlight button results in:
==Test of a ==highlighted selection== and more==|
When we select a highlighted section like so (start and end of selection indicated with (|
)):
|Test of a ==highlighted selection== and more|
clicking the highlight button should result in:
==Test of a highlighted selection and more==|
or as an intermediate step should remove all equal signs that are in pair of two inside of the selection:
Test of a highlighted selection and more|
={2}\b|\b={2}
)When the cursor (|
) is behing a highlighted selection like so:
Test of a ==highlighted selection==|
and the highlight button is clicked the last two equal signs are removed. This removes the highlight but leaves the starting equal signs incorrectly. I guess this feature is by design.
If we have the following line with | indicating the cursor position:
Test of a ==highlighted selection==|
clicking the highlight button results in:
Test of a ==highlighted selection|
If we have the following line with | indicating the cursor position:
Test of a ==highlighted selection==|
clicking the highlight button results in:
Test of a highlighted selection|
I like your plugin a lot!
To simplify highlighting even more I would like to highlight a complete row by simply clicking once.
If we have the following line with |
indicating the cursor position:
Test of a |sentence
clicking the highlight button results in:
Test of a ====|sentence
If we have the following line with |
indicating the cursor position:
- Test of a |bullet point
clicking the highlight button should result in:
==Test of a |sentence==
In order to implement this we would probably do sth along the following lines:
Adding highlight:
Removing highlight:
In order to remove the highlight correctly, the equal signs must can be part of the selection, so it's nearly the same as adding highlight:
To prevent the breaking of markdown syntax highlight ==
must be positioned behind the #
, -
etc. of headings, bullet points etc.
To do so it should be enough to start the selection at the first letter of the line for adding of highlight or at the first equal sign for removal of highlight:
- Test of a |bullet point
clicking the highlight button should result in:
- ==Test of a |bullet point==
clicking the highlight button again results in:
- Test of a |bullet point
would be cool to have a keyboard shortcut for the highlighter
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.