# Create note from highlighted text

**URL:** <https://discourse.joplinapp.org/t/create-note-from-highlighted-text/12511>\
**Category:** Plugins\
**Created:** [16 November 2020 07:16 UTC](https://discourse.joplinapp.org/t/create-note-from-highlighted-text/12511 "2020-11-16T07:16:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ambrt](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/ambrt/32/4428_2.png) [@ambrt](https://discourse.joplinapp.org/u/ambrt)\
**Post date:** [16 November 2020 07:16 UTC](https://discourse.joplinapp.org/t/create-note-from-highlighted-text/12511/1 "2020-11-16T07:16:08Z")

</div>

This simple plugin turns text or block of text into new note under active folder.

When a block of text is selected, first line is taken as a title of new note and the whole block goes as body.  
This can be customized with option to ask for new title (see Settings in plugin's menu).

Latest version is available in Joplin Plugins search or via download as `.jpl`:

> **[Releases · ambrt/joplin-plugin-create-note-from-text](https://github.com/ambrt/joplin-plugin-create-note-from-text/releases)**
>
> Contribute to ambrt/joplin-plugin-create-note-from-text development by creating an account on GitHub.

Works on 1.4.19 and up

Source code available:

> **[GitHub - ambrt/joplin-plugin-create-note-from-text](https://github.com/ambrt/joplin-plugin-create-note-from-text)**
>
> Contribute to ambrt/joplin-plugin-create-note-from-text development by creating an account on GitHub.

changelog:

> 02/04/2021  
> v.1.4.8
> 
> - Popup dialog autofocuses
> 
> 01/31/2021  
> v1.4.6
> 
> - Icon change
> 
> 01/24/2021  
> v1.4.5
> 
> - Added option to not include title at the top of text (as suggest by @jb261 )
> 
> 01/22/2021  
> v1.4.4
> 
> - Asking for new title is based now on settable number of words in first line. If its exact or more than set number, popup will appear.
> - Type of new note can be now "todo" as default.
> - Option to choose a text before backlink  
> 01/21/2021  
> v1.4.3
> - Ask for title via dialog box (default is off) @uxamanda
> - Auto switch to newly created note (default is on)
> 
> 12/11/2020  
> v1.2.0
> 
> - Automatically copies tags from active note to new note (suggested by @blank)
> - Backlinking and/or copying of tags can now be turned off via plugin settings - Tools\>Options\>Convert To New Note
> 
> 12/05/2020
> 
> - Github page and release file
> 
> 11/22/2020
> 
> - Added right click menu entry version (for Joplin 1.4.11)  
> 11/16/2020
> - added backlink from new note to origin note (suggested by @roman_r_m )
> - bug fix: escaped [and], to not break title (suggested by @laurent)

---

<div class="post-metadata">

**Author:** ![roman\_r\_m](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/roman_r_m/32/3297_2.png) [@roman\_r\_m](https://discourse.joplinapp.org/u/roman_r_m)\
**Post date:** [16 November 2020 07:44 UTC](https://discourse.joplinapp.org/t/create-note-from-highlighted-text/12511/2 "2020-11-16T07:44:19Z")

</div>

Nice!  
Here's an idea for improvement: in addition to clipped text also create a link to the original note

---

<div class="post-metadata">

**Author:** ![235462849350](https://avatars.discourse-cdn.com/v4/letter/2/bc8723/32.png) [@235462849350](https://discourse.joplinapp.org/u/235462849350)\
**Post date:** [16 November 2020 09:36 UTC](https://discourse.joplinapp.org/t/create-note-from-highlighted-text/12511/3 "2020-11-16T09:36:40Z")

</div>

And how can this be enabled?

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [16 November 2020 09:59 UTC](https://discourse.joplinapp.org/t/create-note-from-highlighted-text/12511/4 "2020-11-16T09:59:24Z")

</div>

That's great, and very nice touch to convert the copied text to a link to the new note.

Just so you know, this will not work if the title contains a `]`

```javascript
await joplin.commands.execute('replaceSelection', `[${title}](:/${newnote.id})`);

```

But you could escape the title like it's done in the app:

```auto
escapeTitleText(text: string) {
	return text.replace(/(\[|\])/g, '\\$1');
}

```

---

<div class="post-metadata">

**Author:** ![ambrt](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/ambrt/32/4428_2.png) [@ambrt](https://discourse.joplinapp.org/u/ambrt)\
**Post date:** [16 November 2020 13:09 UTC](https://discourse.joplinapp.org/t/create-note-from-highlighted-text/12511/5 "2020-11-16T13:09:22Z")

</div>

1. Read and apply section " Setting up your environment" from [https://joplinapp.org/api/get\_started/plugins/](https://joplinapp.org/api/get_started/plugins/)

2. Copy plugin code from first post to file `index.ts` under `src` folder (`src/index.ts`).

3. Run `npm run dist`

4. Copy path to your plugin folder and paste it at Joplin settings `Tools->Options->Plugins (Beta)`

5. Restart Joplin.

---

<div class="post-metadata">

**Author:** ![tessus](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/tessus/32/13_2.png) [@tessus](https://discourse.joplinapp.org/u/tessus)\
**Post date:** [16 November 2020 20:04 UTC](https://discourse.joplinapp.org/t/create-note-from-highlighted-text/12511/6 "2020-11-16T20:04:55Z")

</div>

Our first plugin! Congratulation and thanks for sharing!

---

<div class="post-metadata">

**Author:** ![235462849350](https://avatars.discourse-cdn.com/v4/letter/2/bc8723/32.png) [@235462849350](https://discourse.joplinapp.org/u/235462849350)\
**Post date:** [16 November 2020 20:22 UTC](https://discourse.joplinapp.org/t/create-note-from-highlighted-text/12511/7 "2020-11-16T20:22:27Z")

</div>

Unfortunately not available in the portable version...  
Why that complicated? A plug-in function, plug-ins per download as a file, place it in a specific folder, enable e.g. by a config file.

Much way easier

---

<div class="post-metadata">

**Author:** ![tessus](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/tessus/32/13_2.png) [@tessus](https://discourse.joplinapp.org/u/tessus)\
**Post date:** [16 November 2020 20:29 UTC](https://discourse.joplinapp.org/t/create-note-from-highlighted-text/12511/8 "2020-11-16T20:29:20Z")

</div>

In an upcoming release managing plugins will be a lot easier.

---

<div class="post-metadata">

**Author:** ![235462849350](https://avatars.discourse-cdn.com/v4/letter/2/bc8723/32.png) [@235462849350](https://discourse.joplinapp.org/u/235462849350)\
**Post date:** [16 November 2020 20:46 UTC](https://discourse.joplinapp.org/t/create-note-from-highlighted-text/12511/9 "2020-11-16T20:46:44Z")

</div>

that would be great... To make Joplin more know a usuable by people it needs out of the box features or functionality which can be enabled as described above. Many, including me do not have the time to proceed complex procedures...

---

<div class="post-metadata">

**Author:** ![tessus](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/tessus/32/13_2.png) [@tessus](https://discourse.joplinapp.org/u/tessus)\
**Post date:** [17 November 2020 18:23 UTC](https://discourse.joplinapp.org/t/create-note-from-highlighted-text/12511/10 "2020-11-17T18:23:13Z")

</div>

It's more important to get the foundation of the plugin system right. If this is done, we can worry about the UI. It was always planned to create a nice UI. And the people who are currently writing plugins don't care about that. They want to be able to use the API properly to fit their needs.

The above steps only look complicated, but they aren't. Also, if one distributes a plugin, it could already be compiled, so you only have to copy it in a dir and add the dir to the preferences.

Suffice it to say, there will be an ecosystem for plugins and there will be improvements to the UI.

---

<div class="post-metadata">

**Author:** ![tessus](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/tessus/32/13_2.png) [@tessus](https://discourse.joplinapp.org/u/tessus)\
**Post date:** [30 November 2020 01:06 UTC](https://discourse.joplinapp.org/t/create-note-from-highlighted-text/12511/11 "2020-11-30T01:06:12Z")

</div>

@ambrt Do you have the source hosted on github maybe?

A lot of people might not have a dev env available, so it would be great, if you had a `.jpl` file as well.

---

<div class="post-metadata">

**Author:** ![ambrt](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/ambrt/32/4428_2.png) [@ambrt](https://discourse.joplinapp.org/u/ambrt)\
**Post date:** [5 December 2020 14:01 UTC](https://discourse.joplinapp.org/t/create-note-from-highlighted-text/12511/12 "2020-12-05T14:01:54Z")

</div>

> [@tessus](#):
>
> might not have a dev env available, so it would be great, if you had a `.jpl` file as wel

Ok i will make it available in a moment

---

<div class="post-metadata">

**Author:** ![ambrt](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/ambrt/32/4428_2.png) [@ambrt](https://discourse.joplinapp.org/u/ambrt)\
**Post date:** [5 December 2020 14:27 UTC](https://discourse.joplinapp.org/t/create-note-from-highlighted-text/12511/13 "2020-12-05T14:27:52Z")

</div>

> [@tessus](#):
>
> A lot of people might not have a dev env available, so it would be great, if you had a `.jpl` file as well.

Done:)

> **[Release v1 · ambrt/joplin-plugin-create-note-from-text](https://github.com/ambrt/joplin-plugin-create-note-from-text/releases/tag/v1)**
>
> This is version for Joplin 1.4.11 and up.

---

<div class="post-metadata">

**Author:** ![blank](https://avatars.discourse-cdn.com/v4/letter/b/a4c791/32.png) [@blank](https://discourse.joplinapp.org/u/blank)\
**Post date:** [5 December 2020 17:39 UTC](https://discourse.joplinapp.org/t/create-note-from-highlighted-text/12511/14 "2020-12-05T17:39:39Z")

</div>

Quite useful plugin.  
Instead of multiple laborious cut & paste, I've been able to split easily and rapidly some very (very !) long notes.

Thanks !

Feature request : if the original note has some tags, would it be possible to transmit them automatically to the new notes during the process ?

---

<div class="post-metadata">

**Author:** ![tessus](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/tessus/32/13_2.png) [@tessus](https://discourse.joplinapp.org/u/tessus)\
**Post date:** [5 December 2020 20:14 UTC](https://discourse.joplinapp.org/t/create-note-from-highlighted-text/12511/15 "2020-12-05T20:14:27Z")

</div>

> [@ambrt](#):
>
> Done:)

Awesome, thank you!

---

<div class="post-metadata">

**Author:** ![ambrt](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/ambrt/32/4428_2.png) [@ambrt](https://discourse.joplinapp.org/u/ambrt)\
**Post date:** [8 December 2020 14:53 UTC](https://discourse.joplinapp.org/t/create-note-from-highlighted-text/12511/16 "2020-12-08T14:53:50Z")

</div>

Glad that you find it useful!

Also, interesting suggestion (and yes its possible).

I think of doing plugin settings section to turn options on and off -backlink references and for tags suggested by you and ship them in one go.  
So next release will copy the tags to new note.

---

<div class="post-metadata">

**Author:** ![ambrt](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/ambrt/32/4428_2.png) [@ambrt](https://discourse.joplinapp.org/u/ambrt)\
**Post date:** [11 December 2020 16:08 UTC](https://discourse.joplinapp.org/t/create-note-from-highlighted-text/12511/17 "2020-12-11T16:08:52Z")

</div>

> [@blank](#):
>
> would it be possible to transmit them automatically to the new notes during the process ?

Done in newest release (see first post).

---

<div class="post-metadata">

**Author:** ![blank](https://avatars.discourse-cdn.com/v4/letter/b/a4c791/32.png) [@blank](https://discourse.joplinapp.org/u/blank)\
**Post date:** [11 December 2020 19:55 UTC](https://discourse.joplinapp.org/t/create-note-from-highlighted-text/12511/18 "2020-12-11T19:55:40Z")

</div>

Thank you !  
Works perfectly well.

---

<div class="post-metadata">

**Author:** ![uxamanda](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/uxamanda/32/6786_2.png) [@uxamanda](https://discourse.joplinapp.org/u/uxamanda)\
**Post date:** [7 January 2021 19:26 UTC](https://discourse.joplinapp.org/t/create-note-from-highlighted-text/12511/19 "2021-01-07T19:26:03Z")

</div>

Thanks for sharing! This is really useful. Few ideas if you are interested in iterating on it:

- allow user to change the text that appears with the backlink (i.e. instead of "from" i could choose to say "backlink: ")
- allow the user to choose whether to default as a note or a todo (i use todo's 99% of the time)
- allow the user to choose to have the newly created note opened automatically
- allow the user to define a new title (especially useful when I copy a large amount of text)
- allow the user to assign a keyboard shortcut to the action

Also, FYI, for me I don't see this when I right click the text, I can only get it to work by clicking the star. (EDIT: I see this same issue in other plugins, so might be my problem 🙂 opened this to ask: [Right Click on Mac](https://discourse.joplinapp.org/t/right-click-on-mac/13685))

---

<div class="post-metadata">

**Author:** ![ambrt](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/ambrt/32/4428_2.png) [@ambrt](https://discourse.joplinapp.org/u/ambrt)\
**Post date:** [9 January 2021 20:37 UTC](https://discourse.joplinapp.org/t/create-note-from-highlighted-text/12511/20 "2021-01-09T20:37:31Z")

</div>

> [@uxamanda](#):
>
> Thanks for sharing! This is really useful. Few ideas if you are interested in iterating on it:
> 
> - allow user to change the text that appears with the backlink (i.e. instead of "from" i could choose to say "backlink: ")
> - allow the user to choose whether to default as a note or a todo (i use todo's 99% of the time)
> - allow the user to choose to have the newly created note opened automatically
> - allow the user to define a new title (especially useful when I copy a large amount of text)
> - allow the user to assign a keyboard shortcut to the action
> 
> Also, FYI, for me I don't see this when I right click the text, I can only get it to work by clicking the star. (EDIT: I see this same issue in other plugins, so might be my problem 🙂 opened this to ask: [Right Click on Mac](https://discourse.joplinapp.org/t/right-click-on-mac/13685))

All are valid ideas and thanks for taking the time to write them.

Give me some time, i will implement them.

> allow the user to define a new title (especially useful when I copy a large amount of text)

How would you like it to be implemented? It can be to pop up input box to ask for new title.

[Next page](https://discourse.joplinapp.org/t/create-note-from-highlighted-text/12511.md?page=2)
