The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Clipboard contents HTML, paste in WORD no mark-up
#1
When I try to process QM code (converted to HTML) and I paste it in word, nothing get's pasted.
For example, I run the code below If I then paste in WORD it pastes nothing of _s in stead of:

Macro Macro14
Code:
Copy      Help
;GREEN COMMENT TEXT

The code I run:

Macro Macro14
Code:
Copy      Help
_s=
;<style>#r368103{background-color:#FFFFFF;border:#D1D7DC;border-style:solid;border-width:1px;padding-left:2px;line-height:normal;color:black}#r368103,#r368103 *{font-family:'Courier New';font-size:100%}#r368103 .c{color:#008000}#r368103 .c2{color:#008000}#r368103 .s{color:#a07040}#r368103 .n{color:#a04000}#r368103 .o{color:#0000ff}#r368103 .p{color:#ff0000}#r368103 .fq{color:#0000ff}#r368103 .fu{color:#0080f0}#r368103 .fd{color:#8080ff}#r368103 .dir{color:#ff4040}#r368103 .t{color:#c000c0}#r368103 .d{color:#808000}#r368103 .lib{color:#808080}#r368103 .r{color:#008000;font-style:italic}#r368103 .mi{color:#ff00ff}#r368103 .i{color:#e0e0e0;text-decoration:underline}</style>
;<pre id=r368103><span class=c>;GREEN COMMENT TEXT</span></pre>

_s.setclip("HTML format") ;; After running this code, and then pasting in WORD, nothing get's pasted

I got the contents of "_s" by selecting QM code and then right clicking and selecting 'Other formats' > 'Copy HTML'
If I leave out "HTML format" in the setclip command, the actual HTML code get's pasted in stead of marked up "GREEN COMMENT TEXT".

I ran the testcode from the helpfile:

Macro Macro14
Code:
Copy      Help
int f; str s
OpenClipboard 0
rep CountClipboardFormats
,f=EnumClipboardFormats(f)
,s.fix(GetClipboardFormatName(f s s.all(100)))
,out "%i %s" f s
CloseClipboard

And the result was:
Code:
Copy      Help
49433 HTML Format


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)