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: Copy whole code block with right click or a button #1077

Closed
miltosc opened this Issue Nov 23, 2018 · 11 comments

Comments

Projects
None yet
2 participants
@miltosc

miltosc commented Nov 23, 2018

Hello, keep on the great work!

I would like to suggest a feature that i think is very useful. I would like qownnotes to have the ability to copy a whole code block with right click on it or with a small button on each code block like for example https://cloud.google.com/kubernetes-engine/docs/quickstart (at the code at the end of the page it has a button copy code)

Also i would like if you can to have the code blocks like boxes at the preview

It would help a lot !

Thank you for reading and hoping that it is something easy to do from you.

Actual behaviour

it does not copy whole code blocks

Steps to reproduce

no steps for that

Relevant log output in the Log panel

[19:11:59] [warning] OpenType support missing for "MS Shell Dlg 2", script 12
[19:11:59] [warning] OpenType support missing for "Arial", script 12
[19:11:59] [warning] OpenType support missing for "MS UI Gothic", script 12
[19:11:59] [warning] OpenType support missing for "SimSun", script 12
[19:11:59] [warning] OpenType support missing for "MS Shell Dlg 2", script 11
[19:11:59] [warning] OpenType support missing for "Arial", script 11
[19:11:59] [warning] OpenType support missing for "MS UI Gothic", script 11
[19:11:59] [warning] OpenType support missing for "SimSun", script 11
[19:27:53] [scripting] loading script file: E:/to-mirror/bak/personal/!!general notes-and-pss/!!md-notes/QOwnNotes/Data/scripts/insert-toc/insert-toc.qml
[19:28:53] [status] Stored 1 note(s) to disk
[19:30:13] [status] Stored 1 note(s) to disk
[19:30:23] [status] Stored 1 note(s) to disk

Information about the application, settings and environment

QOwnNotes Debug Information

General Info

Current Date: Fri Nov 23 19:45:12 2018
Version: 18.11.6
Build date: Nov 23 2018
Build number: 3964
Platform: windows
Operating System: Windows 10 (10.0)
Build architecture: i386
Current architecture: x86_64
Release: AppVeyor
Qt Version (build): 5.10.1
Qt Version (runtime): 5.10.1
Portable mode: yes
Settings path / key: E:/to-mirror/bak/personal/!!general notes-and-pss/!!md-notes/QOwnNotes/Data/PBE/QOwnNotes.ini
Application database path: E:\to-mirror\bak\personal\!!general notes-and-pss\!!md-notes\QOwnNotes\Data\QOwnNotes.sqlite
Application arguments: E:\to-mirror\bak\personal\!!general notes-and-pss\!!md-notes\QOwnNotes, \QOwnNotes.exe, --after-update, C:\Users\cloud\AppData\Local\Temp\QOwnNotes-isanun-updater.bat, --portable
Qt Debug: 0
Locale (system): en_US
Locale (interface): empty
Icon theme: breeze-qownnotes
Notes in current note folder: 3
Enabled scripts: 1

Server Info

serverUrl: empty
appIsValid: no
notesPathExists: empty
connectionErrorMessage: empty

Note folders

currentNoteFolderId: 1

Note folder default

id: 1
isCurrent: yes
activeTagId: 0
localPath: E:\to-mirror\bak\personal\!!general notes-and-pss\!!md-notes\QOwnNotes\Data\..\..\!!mynotes
remotePath: Notes
isShowSubfolders: no
isUseGit: no
activeNoteSubFolder name: empty
database file: E:\to-mirror\bak\personal\!!general notes-and-pss\!!md-notes\QOwnNotes\Data\..\..\!!mynotes\notes.sqlite

Enabled scripts

Script Insert Table of Contents (TOC)

id: 1
path: E:\to-mirror\bak\personal\!!general notes-and-pss\!!md-notes\QOwnNotes\Data\scripts\insert-toc\insert-toc.qml
variablesJson:

{
    "tocTitle": "Table of Contents"
}

identifier: insert-toc
version: 0.0.1
minAppVersion: 17.06.2

Settings

ActiveNoteHistoryItem (NoteHistoryItem): <binary data>
Debug/fakeOldVersionNumber (QString): false
Debug/fileLogging (QString): false
Editor/CurrentSchemaKey (QString): EditorColorSchema-6033d61b-cb96-46d5-a3a8-20d5172017eb
Editor/autoBracketClosing (QString): true
Editor/autoBracketRemoval (QString): true
Editor/editorWidthInDFMOnly (QString): true
Editor/highlightCurrentLine (QString): true
IssueAssistantDialog/geometry (QByteArray): <binary data>
LastUpdateCheck (QDateTime): 2018-11-23T19:10:14
LogWidget/criticalLog (bool): true
LogWidget/debugLog (bool): true
LogWidget/fatalLog (bool): true
LogWidget/infoLog (bool): true
LogWidget/scriptingLog (bool): true
LogWidget/statusLog (bool): true
LogWidget/warningLog (bool): true
MainWindow/geometry (QByteArray): <binary data>
MainWindow/mainToolBar.iconSize (QString): 24
MainWindow/menuBarGeometry (QByteArray): <binary data>
MainWindow/noteTextEdit.code.font (QString): Courier New,11,-1,5,50,0,0,0,0,0,Regular
MainWindow/noteTextEdit.font (QString): MS Shell Dlg 2,10,-1,5,50,0,0,0,0,0,Regular
MainWindow/noteTextView.code.font (QString): Courier New,11,-1,5,50,0,0,0,0,0,Regular
MainWindow/noteTextView.font (QString): MS Shell Dlg 2,10,-1,5,50,0,0,0,0,0,Regular
MainWindow/noteTextView.rtl (QString): false
MainWindow/showNotesFromAllNoteSubFolders (bool): true
MessageBoxOverride/update-and-restart (QString): 16384
NoteHistory-1 (QVariantList): <variant list with 3 item(s)>
NoteHistoryCurrentIndex-1 (int): 2
PiwikClientId (QString): <hidden>
ScriptRepositoryDialog/geometry (QByteArray): <binary data>
ScriptRepositoryDialog/mainSplitterState (QByteArray): <binary data>
SearchEngineId (QString): 2
SettingsDialog/geometry (QByteArray): <binary data>
SettingsDialog/mainSplitterState (QByteArray): <binary data>
ShowSystemTray (QString): false
StartHidden (QString): false
UpdateDialog/geometry (QByteArray): <binary data>
WelcomeDialog/geometry (QByteArray): <binary data>
acceptAllExternalModifications (QString): false
allowDifferentNoteFileName (QString): false
allowNoteEditing (bool): true
allowOnlyOneAppInstance (QString): true
appMetrics/disableAppHeartbeat (QString): false
appMetrics/disableTracking (QString): false
appMetrics/notificationShown (QString): true
closeTodoListAfterSave (QString): false
cryptoKey (QString): <hidden>
currentNoteFolderId (QString): 1
currentWorkspace (QString): 1995fc5b-3f2d-4f18-964b-eb77b9bb8775
cursorWidth (QString): 1
customNoteFileExtensionList: empty
darkMode (QString): false
darkModeColors (QString): false
darkModeTrayIcon (QString): false
defaultNoteFileExtension (QString): md
disableAutomaticUpdateDialog (QString): false
dockWasInitializedOnce (QString): true
externalEditorPath (QString): empty
fullyHighlightedBlockquotes (QString): false
gitCommitInterval (QString): 30
gitExecutablePath (QString): empty
gitLogCommand (QString): empty
ignoreAllExternalModifications (QString): false
ignoreAllExternalNoteFolderChanges (QString): false
imageScaleDown (QString): false
imageScaleDownMaximumHeight (QString): 1024
imageScaleDownMaximumWidth (QString): 1024
insertTimeFormat (QString): empty
interfaceLanguage (QString): empty
internalIconTheme (QString): false
itemHeight (QString): 15
localTrash/autoCleanupDays (QString): 30
localTrash/autoCleanupEnabled (QString): true
localTrash/supportEnabled (QString): true
markdownHighlightingEnabled (QString): true
networking/ignoreSSLErrors (QString): true
networking/proxyType (QString): 2
newNoteAskHeadline (QString): false
noteEditIsCentralWidget (QString): true
noteSaveIntervalTime (QString): 10
noteSubfoldersPanelDisplayAsFullTree (QString): true
noteSubfoldersPanelHideSearch (QString): false
noteSubfoldersPanelOrder (QString): 0
noteSubfoldersPanelShowFullPath (QString): false
noteSubfoldersPanelShowNotesRecursively (QString): false
noteSubfoldersPanelShowRootFolderName (QString): true
noteSubfoldersPanelSort (QString): 0
notesPanelOrder (QString): 0
notesPanelSort (QString): 1
notesPath (QString): ../../!!mynotes
notifyAllExternalModifications (QString): false
ownCloud/password (QString): <hidden>
ownCloud/serverUrl (QString): empty
ownCloud/supportEnabled (QString): false
ownCloud/todoCalendarBackend (QString): 3
ownCloud/todoCalendarCalDAVPassword (QString): <hidden>
ownCloud/todoCalendarCalDAVServerUrl (QString): empty
ownCloud/todoCalendarCalDAVUsername (QString): empty
ownCloud/todoCalendarDisplayNameList: empty
ownCloud/todoCalendarEnabledList: empty
ownCloud/todoCalendarEnabledUrlList: empty
ownCloud/todoCalendarUrlList: empty
ownCloud/userName (QString): empty
previousWorkspace (QString): 705feb0a-eb43-48f6-af28-ee157e37c57d
restoreCursorPosition (QString): true
showMenuBar (bool): true
showStatusBar (bool): true
taggingShowNotesRecursively (QString): false
tagsPanelHideSearch (QString): false
tagsPanelOrder (QString): 0
tagsPanelSort (QString): 0
toolbar/1/items (QStringList): action_New_note, action_Find_note, action_Remove_note, action_Open_note_in_external_editor, actionShow_local_trash, actionAllow_note_editing, , action_Back_in_note_history, action_Forward_in_note_history, , action_Find_text_in_note, actionReplace_in_current_note, , actionShow_versions, actionShow_trash, actionShare_note, , actionOpen_List
toolbar/1/name (QString): mainToolBar
toolbar/1/title (QString): main toolbar
toolbar/2/items (QStringList): actionFormat_text_bold, actionFormat_text_italic, actionStrike_out_text, actionInsert_code_block, actionInsert_block_quote
toolbar/2/name (QString): formattingToolbar
toolbar/2/title (QString): formatting toolbar
toolbar/3/items (QStringList): actionInsert_Link_to_note, actionInsert_image, actionInsert_current_time
toolbar/3/name (QString): insertingToolbar
toolbar/3/title (QString): inserting toolbar
toolbar/4/items (QStringList): action_Encrypt_note, actionEdit_encrypted_note, actionDecrypt_note
toolbar/4/name (QString): encryptionToolbar
toolbar/4/title (QString): encryption toolbar
toolbar/5/items (QStringList): actionWorkspaceComboBox, actionStore_as_new_workspace, actionRemove_current_workspace, actionRename_current_workspace, actionSwitch_to_previous_workspace, actionUnlock_panels, , actionToggle_distraction_free_mode, action_Increase_note_text_size, action_Decrease_note_text_size, action_Reset_note_text_size
toolbar/5/name (QString): windowToolbar
toolbar/5/title (QString): window toolbar
toolbar/6/items (QString): action_Quit
toolbar/6/name (QString): quitToolbar
toolbar/6/title (QString): quit toolbar
toolbar/size (QString): 6
useUNIXNewline (QString): false
workspace-1995fc5b-3f2d-4f18-964b-eb77b9bb8775/name (QString): full
workspace-1995fc5b-3f2d-4f18-964b-eb77b9bb8775/noteSubFolderDockWidgetVisible (QString): true
workspace-1995fc5b-3f2d-4f18-964b-eb77b9bb8775/windowState (QByteArray): <binary data>
workspace-705feb0a-eb43-48f6-af28-ee157e37c57d/name (QString): minimal
workspace-705feb0a-eb43-48f6-af28-ee157e37c57d/noteSubFolderDockWidgetVisible (QString): true
workspace-705feb0a-eb43-48f6-af28-ee157e37c57d/windowState (QByteArray): <binary data>
workspaces (QStringList): 1995fc5b-3f2d-4f18-964b-eb77b9bb8775, 705feb0a-eb43-48f6-af28-ee157e37c57d

System environment

ALLUSERSPROFILE: C:\ProgramData
APPDATA: C:\Users\cloud\AppData\Roaming
CommonProgramFiles: C:\Program Files (x86)\Common Files
CommonProgramFiles(x86): C:\Program Files (x86)\Common Files
CommonProgramW6432: C:\Program Files\Common Files
COMPUTERNAME: BEAST
ComSpec: C:\WINDOWS\system32\cmd.exe
destination: "E:\to-mirror\bak\personal\!!general notes-and-pss\!!md-notes\QOwnNotes"
DriverData: C:\Windows\System32\Drivers\DriverData
HOMEDRIVE: C:
HOMEPATH: \Users\cloud
LOCALAPPDATA: C:\Users\cloud\AppData\Local
LOGONSERVER: \\BEAST
NUMBER_OF_PROCESSORS: 12
OneDrive: C:\Users\cloud\OneDrive
OS: Windows_NT
Path: C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Users\cloud\AppData\Local\Microsoft\WindowsApps;
PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
portable: --portable
PROCESSOR_ARCHITECTURE: x86
PROCESSOR_ARCHITEW6432: AMD64
PROCESSOR_IDENTIFIER: Intel64 Family 6 Model 63 Stepping 2, GenuineIntel
PROCESSOR_LEVEL: 6
PROCESSOR_REVISION: 3f02
ProgramData: C:\ProgramData
ProgramFiles: C:\Program Files (x86)
ProgramFiles(x86): C:\Program Files (x86)
ProgramW6432: C:\Program Files
PROMPT: $P$G
PSModulePath: C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\Intel\
PUBLIC: C:\Users\Public
qownnotesCommand: "E:\to-mirror\bak\personal\!!general notes-and-pss\!!md-notes\QOwnNotes"\QOwnNotes.exe --after-update C:\Users\cloud\AppData\Local\Temp\QOwnNotes-isanun-updater.bat --portable
SESSIONNAME: Console
source: C:\Users\cloud\AppData\Local\Temp\QOwnNotes-isanun.zip
SystemDrive: C:
SystemRoot: C:\WINDOWS
TEMP: C:\Users\cloud\AppData\Local\Temp
TMP: C:\Users\cloud\AppData\Local\Temp
unzipCommand: C:\Users\cloud\AppData\Local\Temp\QOwnNotes-isanun-unzip.exe -o C:\Users\cloud\AppData\Local\Temp\QOwnNotes-isanun.zip -d "E:\to-mirror\bak\personal\!!general notes-and-pss\!!md-notes\QOwnNotes"
unzipExecutable: C:\Users\cloud\AppData\Local\Temp\QOwnNotes-isanun-unzip.exe
USERDOMAIN: BEAST
USERDOMAIN_ROAMINGPROFILE: BEAST
USERNAME: cloud
USERPROFILE: C:\Users\cloud
VBOX_MSI_INSTALL_PATH: C:\Program Files\Oracle\VirtualBox\
windir: C:\WINDOWS

@pbek

This comment has been minimized.

Owner

pbek commented Nov 23, 2018

Thank you for your kind words! Nice ideas, but I'm sorry, both can't be done right now. The QPlainTextEdit doesn't support buttons like this and the QTextBrowser doesn't support borders around code blocks.

@pbek pbek closed this Nov 23, 2018

@pbek pbek added the question label Nov 23, 2018

@miltosc

This comment has been minimized.

miltosc commented Nov 23, 2018

Hello,

it cannot be done not even with right click -> copy ? not even in the editor?

Thanks for the quick reply

@pbek

This comment has been minimized.

Owner

pbek commented Nov 24, 2018

I guess it could be done with some effort.

@pbek pbek reopened this Nov 24, 2018

@pbek pbek added enhancement and removed question labels Nov 24, 2018

pbek added a commit that referenced this issue Nov 29, 2018

@pbek

This comment has been minimized.

Owner

pbek commented Nov 29, 2018

18.12.0

  • you now can copy the text from code blocks to the clipboard by right
    clicking on it and selecting Copy code block

@pbek pbek modified the milestones: 18.11.7, 18.12.0 Nov 29, 2018

@miltosc

This comment has been minimized.

miltosc commented Nov 29, 2018

@pbek

This comment has been minimized.

Owner

pbek commented Nov 29, 2018

Thanks 😄

@pbek

This comment has been minimized.

Owner

pbek commented Nov 29, 2018

There now is a new release, could you please test it and report if it works for you?

@miltosc

This comment has been minimized.

miltosc commented Nov 29, 2018

@pbek

This comment has been minimized.

@miltosc

This comment has been minimized.

miltosc commented Nov 29, 2018

@pbek

This comment has been minimized.

Owner

pbek commented Nov 29, 2018

Great, thank you for testing!

@pbek pbek closed this Nov 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment