distal-attribute
distal-attribute
distal-attribute
distal-attribute

Color-formatted into RTF

User, date Message
Written by Philips10
3 months ago
Category: General
13 posts since Sat, 18 Jan 14
Hi

I am learning MySQL and save what I was taught into RTF
RICH TEXT Formatted files.

I would like to enter the code into Heidisql its
Query-control.
Then, mark it as color-formatted as HEIDISQL
formats rge text for me and past it the same
color-coded as HEIDISQL shows me the script
into RTF-files.

However, the text it pasted as black text as
'normal' text.

Next to SQL with eg SELECT * FROM people,
I also would like to have that with e.g.
creating Database and Tavkes,

See the code below.
Inside the Edit-control of HEIDISQL it is
color-coded. I want this too to be copied and pasted
color-coded into RTF. Thanks in advance.

CREATE DATABASE swingtest;

USE swingtest;

CREATE TABLE people (
id SMALLINT NOT NULL AUTO_INCREMENT,
name varchar(45) NOT NULL,
age enum('child','adult','senior') NOT NULL,
employment_status varchar(45) NOT NULL,
tax_id varchar(45) NULL ,
us_citizen bool NOT NULL,
gender enum('male','female') NOT NULL,
occupation varchar(45),
PRIMARY KEY (id)
);

DESCRIBE people;
Written by justpusherMoney, Euro
3 months ago
24 posts since Wed, 31 Mar 10
Excuse me... Why do you need colored code in RTF?

I don't know if this is possible in HeidiSQL, but you can copy-paste SQL code to any online code colorizer (e.g. http://hilite.me/ ) and then copy-paste to your RTF editor.
Written by adrien
3 months ago
12 posts since Mon, 27 Jan 14
What do you use to edit rtf file ?

I think copy/paste is working only with Microsoft Office.

But it's possible to export to rtf file.

I will see that.
Written by kalvaro
3 months ago
564 posts since Thu, 29 Nov 07
It's actually a pretty good feature request. It's technically possible to copy clipboard contents in several formats, including plain text and formatted text, and the target application where you paste the clipboard can choose a format it supports. It's handy when you need to send some SQL through e-mail or you're writing documentation in a word processor.

Of course, it can get on your way when you don't want syntax highlighting and that's something to take into account. And I imagine that copying huge buffers can eat a lot of memory. So it'd be worth some further analysis.
Written by adrien
3 months ago
12 posts since Mon, 27 Jan 14
I Checked source code and there is already functionality to copy formatted text as HTML that's why it's working to Microsoft office.

I'll try to see how it could be work into rtf editor.
Written by kalvaro
3 months ago
564 posts since Thu, 29 Nov 07
Adrien, you're absolutely right, the HTML feature already exists since May 2010. I had completely forgotten it.
Written by Philips10
3 months ago
13 posts since Sat, 18 Jan 14
Thanks.

Could you tell me how to use it?

Regards
Written by kalvaro
3 months ago
564 posts since Thu, 29 Nov 07
What currently exists is the feature to copy as HTML, not RTF as you request. If your word processor supports HTML, it happens automatically when pasting.
Written by Philips10
3 months ago
13 posts since Sat, 18 Jan 14
OK,

Thank you.
Will try OpenOffice tomorrow.

But, as someone having programmed with Delphi 7,
I wonder, could the developer not use the RTF-CPOMPONENT
I found at Torry (I think it was an add-up for the
RXRichEdit and JEDIRTX-control) with which the text could be
encoded as SQL, JAVA, PASCAL instead of the SYNEDIT?

Thanks
Written by jfalchMoney, Euro
3 months ago
354 posts since Sat, 17 Oct 09
of course. exchange a major core component of the program, days, possibly weeks of work, with the result to be able to do what exactly that did not work before ?
Written by adrien
3 months ago
12 posts since Mon, 27 Jan 14
Why see another component ?

With Synedit you can export to html or rtf.

I think the better solution is to find how to copy into the clipboard with synedit export (rtf/html) for this to work for many editor
Written by Philips10
3 months ago
13 posts since Sat, 18 Jan 14
I use
-- EditorDemo, the compiled exe-bin file of the JRichText-component
-- ActionTwxtUni, the exe-bin file of thw RichView package
-- TrwwDBNotes, the freeware version which also uses the
the RichView-package, I thing the DBAware-version

I would like to past in esp into the last one as color-coded
rtf-text.

Could you work on this?

Thanks and Regards
Written by jfalchMoney, Euro
3 months ago
354 posts since Sat, 17 Oct 09
make a feature request.
Written by Philips10
3 months ago
13 posts since Sat, 18 Jan 14
You must know

http://heidisql.googlecode.com/svn-history/r2/components/SynEdit1.1/Demos/ExportDemo/frmExportMain.pas

Written by Philips10
3 months ago
13 posts since Sat, 18 Jan 14
Feature request:

You could either add Tbuttons under the Query-control:
Captions: Copy as plain Text
Copy as RichText
Copy as HTML
or add a TPopupmenu to the uery-control being a TSynEdit
with three popupmnu-items with the sane captions.

Look, I know I kewp on bothering you, but I really want to
keep on using HeidiSQL with the two tutorials I follow:
MySQL
Java Swing with JDBC-MySQL
each with creating database, tables and Fields and actual data
and using SQL we know.

What bothers me: later on, the multible-table queries are
explained with JOIN. For that, I could do with a Visual
Query Builder. I could use MySQL Workbench but would have
to go to and through between Workbench and HeidiSQL to get
the SQL as RTF or maybe HTML.

Thanks and Regards
Schon mal herzlichen Dank fuer deine Muehe!
Written by jfalchMoney, Euro
3 months ago
354 posts since Sat, 17 Oct 09
a feature request does not mean prefixing your posts her with "feature request". it means logging in to http://code.google.com/p/heidisql/issues and creating a new entry there.

Visual Query Bulider is not going to happen; much too complicated, and there exist alternativ solutions (eg Mysql Workbench)
Written by adrien
3 months ago
12 posts since Mon, 27 Jan 14
I sent a patch to Ansgar.

I wait his answer, if he's ok, i will submit the modification and it will work for all rtf editor / word processor that can read rtf from clipboard.
Written by adrien
2 months ago
12 posts since Mon, 27 Jan 14
OK It's done in r4699.
You keep now highlight text when you past on rtf editor
Written by Philips10
2 months ago
13 posts since Sat, 18 Jan 14
Thanks, great!
Now I can continue with my both tutorials.

De: Richtig toll, Danke dir fuer die Muehe!
Written by fbachofner
2 months ago
20 posts since Sun, 11 Aug 13
Thanks for the new feature adrien. This is cool, but SQL is, realistically, plain text.

The simple (and arguably appropriate) solution for Philips10 would have been to paste the SQL code into a TEXT EDITOR which colorizes based on syntax.

Take a look at Notepad++, for example ( http://notepad-plus-plus.org/ )

Any file will be analyzed for the programming language it uses and colored accordingly. Such syntax highlighting is so important in a programmer's editor, it is usually listed as one of the first features! http://notepad-plus-plus.org/features/

SQL is, of course, one of the syntaxes it understands.
Written by kalvaro
2 months ago
564 posts since Thu, 29 Nov 07

fbachofner wrote: Thanks for the new feature adrien. This is cool, but SQL is, realistically, plain text.

The simple (and arguably appropriate) solution for Philips10 would have been to paste the SQL code into a TEXT EDITOR which colorizes based on syntax.



There's some confusion here. The feature is not strictly new, it's been here for more than 3 years. The r4699 recent change only switches one of the internal clipboard formats from HTML to Rich Text. We could discuss whether HTML should be kept as well but nobody's going to remove a well established feature that's practical for those who need it and unobtrusive for those who don't.

Notepad++ is a text editor, not a word processor. Its syntax highlighting isn't saved in the output file.
Written by fbachofner
2 months ago
20 posts since Sun, 11 Aug 13
Hi Kalvaro:

I know Notepad++ doesn't save the syntax highlighting in any outputted file. Thank God. That's the point! SQL is plaintext and Notepad++ deals with plaintext files.

The point I was trying to make is that if you need to see (or print) with syntax highlighting outside of HeidiSQL, then put the SQL in a programmer's editor.

The only use case I can see for RTF or HTML output for SQL might be to create help files or other documentation.

On that note, if I copy SQL statements from HeidiSQL (where the syntax highlighting is working) and paste into LibreOffice Writer (using edit/paste special/html format) I get no syntax highlighting. (HeidiSQL 8.3 r4698) Seems like the "old" feature is broken -- I'll try newest rev and report back.
Written by adrien
2 months ago
12 posts since Mon, 27 Jan 14

adrien wrote: What do you use to edit rtf file ?

I think copy/paste is working only with Microsoft Office.

But it's possible to export to rtf file.

I will see that.



It's what I said before r4699
Now it's work with openoffice and libreoffice
Written by fbachofner
2 months ago
20 posts since Sun, 11 Aug 13
Adrien and Kalvaro:


Yes, confirmed: in r4701 copied SQL code pasted into LibreOffice comes across with syntax highlighting.

However, HTML format is no longer one of the edit/paste special clipboard options. Now it is only RTF. Was that intended?
 

Please login to leave a reply, or register at first.