Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
FelisDiligens committed Nov 23, 2022
1 parent 215a1cb commit 2d41e5b
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 10 deletions.
65 changes: 55 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,45 @@
# Joplin CodeMirror options plugin
<table>
<tr>
<td colspan="3" align="center">
<h3>CodeMirror options plugin</h3>
</td>
</tr>
<tr>
<td rowspan="5" align="center">
<img src="./assets/joplin.svg" width="48"><br>
<p>
<strong>Joplin Plugin</strong><br>
CodeMirror options plugin
</p>
</td>
</tr>
<tr>
<td colspan="2"><strong>Adds some CodeMirror options to Joplin's settings, such as line numbers and line wrapping.</strong></td>
</tr>
<tr>
<td>Built with:</td>
<td>
<a href="https://github.com/laurent22/joplin/tree/dev/packages/generator-joplin">generator-joplin</a>
</td>
</tr>
<tr>
<td>Inspired by:</td>
<td>
<a href="https://github.com/shantanugoel/joplin-plugin-cm-linenumbers">Joplin Line Numbers Plugin</a>
</td>
</tr>
</table>

This is a simple plugin for [Joplin](https://joplinapp.org/) that exposes some CodeMirror options to the user, such as line wrapping or line numbers.

See the screenshots below:

![](screenshots/options.png)
![](screenshots/line_numbers.png)
## 📸 Screenshots

## Installation
![](assets/options.png)
![](assets/line_numbers.png)

## ⚙️ Installation

### From the repo (recommended)

Expand All @@ -24,24 +56,37 @@ See the screenshots below:
- Select the downloaded *.jpl file
- Enjoy

## Usage
## Usage

- After installation, a new section will appear in the options. (see screenshot)
- After installation, a new section will appear in the options. (see [screenshot](#-screenshots))
- Tweak to your heart's content.

---

## Development

<details>
<summary>Text from "generator-joplin"</summary>

This is a template to create a new Joplin plugin.

The main two files you will want to look at are:

- `/src/index.ts`, which contains the entry point for the plugin source code.
- `/src/manifest.json`, which is the plugin manifest. It contains information such as the plugin a name, version, etc.

### Building the plugin
## Building the plugin

The plugin is built using Webpack, which creates the compiled code in `/dist`. A JPL archive will also be created at the root, which can use to distribute the plugin.

To build the plugin, simply run `npm run dist`.

### Updating the plugin framework
The project is setup to use TypeScript, although you can change the configuration to use plain JavaScript.

## Updating the plugin framework

To update the plugin framework, run `npm run update`.

In general this command tries to do the right thing - in particular it's going to merge the changes in package.json and .gitignore instead of overwriting. It will also leave "/src" as well as README.md untouched.

The file that may cause problem is "webpack.config.js" because it's going to be overwritten. For that reason, if you want to change it, consider creating a separate JavaScript file and include it in webpack.config.js. That way, when you update, you only have to restore the line that include your file.

</details>
Binary file removed screenshots/line_numbers.png
Binary file not shown.
Binary file removed screenshots/options.png
Binary file not shown.

0 comments on commit 2d41e5b

Please sign in to comment.