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

[Feature Request] Create Plain Text Note #604

Closed
sunjam opened this issue Jun 11, 2018 · 14 comments
Closed

[Feature Request] Create Plain Text Note #604

sunjam opened this issue Jun 11, 2018 · 14 comments

Comments

@sunjam
Copy link

sunjam commented Jun 11, 2018

I'd like to request the ability to create a note as plain text, with no formatting. This could also benefit issue #316 and issue #228

@laurent22
Copy link
Owner

Markdown is already plain text though. How would this feature work exactly?

@sunjam
Copy link
Author

sunjam commented Jun 11, 2018 via email

@zblesk
Copy link
Contributor

zblesk commented Jun 12, 2018

Are you sure Joplin is the right tool for you, then? Sounds like you just want text notes in folders. Why use Joplin at all?

@sunjam
Copy link
Author

sunjam commented Jun 12, 2018 via email

@FunctionalHacker
Copy link

FunctionalHacker commented Jun 14, 2018

I think you are referring to the meta information that Joplin keeps in the files. To my knowledge, this is the very basis Joplin is able to sync and attach files, etc. To remove this, the information would need to be stored elsewhere and require a serious rework of the whole application. I can imagine the owner wouldn't be too keen to do that.

@laurent22
Copy link
Owner

Removing the metadata is indeed not possible, however in the next release there will be feature to open a note in an external editor which might do the trick.

@kcrossen
Copy link

kcrossen commented Sep 18, 2019

This fails, for example:

SELECT 
  tool.id, 
  tool.name, 
  user.name,
  CASE user.type
    WHEN /* LURKER */ 0 THEN 'Hidden (0)'
    WHEN /* MEMBER */ 1 THEN 'Member (1)'
    ELSE 'Unknown'
  END AS user_type 
FROM tools.tool AS tool 
JOIN tools.user AS `user` 
ON (tool.user_id = user.id) 

Some of the asterisks are removed and the backticks are removed from user, so the SQL fails when copied directly from note. To function correctly, must switch to edit mode before copying.

This is likely always a problem with markup, as other notation systems will overlap with the meta-expressions, e.g. XML vs nearly any technical text.

@kcrossen
Copy link

Would be great to have a method to direct copy a note entirely and have it be as entered rather than as displayed, though of course it's pretty frightening to have your entered text seem to have been massed with seemingly arbitrarily.

@kcrossen
Copy link

Possible workaround enclose code (as above) in:

code here

@laurent22
Copy link
Owner

Works for me:

image

@laurent22
Copy link
Owner

Also works:

image

@kcrossen
Copy link

On macOS 10.12.6, Joplin downloaded and installed today, appears not to work:
screenshot_191

@kcrossen
Copy link

kcrossen commented Sep 19, 2019

Moreover, if you select all, copy in right-hand pane on macOS or in view (not edit) mode on Android Pie (both downloaded and installed today, i.e. the latest posted versions), the pasted text will look like the right-hand pane. In other words missing characters such that it will error out. On Android, if the text is enclosed in triple backticks, and is then select all, copied in view mode, after the text is pasted into SQL query app, it will execute correctly. On Android, in edit mode but without triple backticks, select all, copy then paste executes correctly.

Not sure where the problem is but I've verified this issue several times on both macOS and Android.

The notebook itself was authored on macOS and is treated as readonly on Android.

@kcrossen
Copy link

Further problem: If on macOS (1.0.167, 32865f0) enclose the SQL in triple backticks, use the notebook/note on Android (1.0.305, September 10, 2019) (in view mode) select all, copy, then paste into RemoDB, the SQL will execute but all the newlines will have been removed (very hard to read).

SELECT TABLE_NAME, 
       CONCAT(CONCAT(TABLE_NAME, ':'), '\n',
              GROUP_CONCAT(COLUMN_NAME, '\t', 
                           TABLE_NAME, '.', COLUMN_NAME, '\t',
                           TABLE_NAME, '.', COLUMN_NAME, ' AS ', TABLE_NAME, '_', COLUMN_NAME, '\t',
                           ' {', COLUMN_TYPE, '}'
                           SEPARATOR '\n')) AS table_columns
FROM
(SELECT COLUMNS.TABLE_SCHEMA AS TABLE_SCHEMA, COLUMNS.TABLE_NAME AS TABLE_NAME, 
        VIEWS.TABLE_NAME AS VIEW_NAME, 
        COLUMN_NAME, DATA_TYPE, COLUMN_TYPE, COLUMN_KEY, EXTRA, 
        CASE WHEN (COLUMNS.TABLE_SCHEMA IN 
                   ('information_schema', 'mysql', 'performance_schema')) THEN 'META' 
             ELSE '' END AS SCHEMA_GROUP 
 FROM information_schema.COLUMNS AS `COLUMNS` 
 LEFT JOIN information_schema.VIEWS AS `VIEWS` 
 ON (COLUMNS.TABLE_SCHEMA = VIEWS.TABLE_SCHEMA) AND 
    (COLUMNS.TABLE_NAME = VIEWS.TABLE_NAME) 
 WHERE (COLUMNS.TABLE_SCHEMA NOT IN ('information_schema', 'mysql', 'performance_schema')) 
 ORDER BY SCHEMA_GROUP, COLUMNS.TABLE_SCHEMA, COLUMNS.TABLE_NAME) AS table_columns
GROUP BY TABLE_NAME;

becomes

SELECT TABLE_NAME, CONCAT(CONCAT(TABLE_NAME, ':'), '\n', GROUP_CONCAT(COLUMN_NAME, '\t', TABLE_NAME, '.', COLUMN_NAME, '\t', TABLE_NAME, '.', COLUMN_NAME, ' AS ', TABLE_NAME, '_', COLUMN_NAME, '\t',
...etc... arbitrarily wrapped...

On the other hand, if in edit mode on Android, I select all, manually exclude the triple backticks from the selection, copy, then the pasted text is fine (as in the top example above).

So apparently I have a choice (as my macOS/Android executables work anyway) between tedious extra work to use the SQL "cheatsheet" or wrong display of code that will copy correctly in edit mode.

@lock lock bot locked and limited conversation to collaborators Oct 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants