Importing from Word or HTML
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Livecode Opensource Backer
- Posts: 508
- Joined: Sun Dec 18, 2011 7:23 pm
- Location: London
- Contact:
Importing from Word or HTML
I have some text in a Word file. I want to import that into a field, keeping at least some formatting. I understand that both htmltext and rtftext are limited in LiveCode (for good reasons). But is there a way of simplifying an rtf file or an HTML file generated from Word, so that basic formatting is kept? Of course Word does not make it easy by using needlessly complex mark-up...
The closest I have got is to copy and paste the text which is not bad, but I wonder if there is a better way.
The closest I have got is to copy and paste the text which is not bad, but I wonder if there is a better way.
Kaveh
-
- VIP Livecode Opensource Backer
- Posts: 9823
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Importing from Word or HTML
Is exporting RTF from Word an option?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Livecode Opensource Backer
- Posts: 508
- Joined: Sun Dec 18, 2011 7:23 pm
- Location: London
- Contact:
Re: Importing from Word or HTML
I tried it. And I tried HTML export too. In both cases LiveCode gets stuck on some lines, e.g. HTML:
and RTF:
(truncated)
So I am looking for an HTML or RTF "simplifier", to leave just the bare essentials for LiveCode.
Code: Select all
execution error at line 474 (Chunk: error in object expression) near "<div class=WordSection1>", char 41
Code: Select all
stack "myStack": execution error at line 476 (Chunk: error in object expression) near "{\rtf1\adeflang1025\ansi\ansicpg10000\uc1\adeff31507\deff0...
So I am looking for an HTML or RTF "simplifier", to leave just the bare essentials for LiveCode.
Last edited by kaveh1000 on Sat Dec 22, 2018 9:16 am, edited 1 time in total.
Kaveh
-
- VIP Livecode Opensource Backer
- Posts: 9823
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Importing from Word or HTML
HTML is not htmlText, so the first error doesn't surprise me.
The second error may be a bug. LC may not support all RTF features, but should not throw an error. You can file a bug report here:
https://quality.livecode.com/
The second error may be a bug. LC may not support all RTF features, but should not throw an error. You can file a bug report here:
https://quality.livecode.com/
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: Importing from Word or HTML
Probably you want something like this (includes pdf.js!):
https://viewerjs.org
It is very easy to install and to use if and only if you use it from a (local) server AND all your docs to view (PDF or ODF) are on that server. If not you could try similar adjustments as I did with "pdf.js" for my PDFViewer
https://viewerjs.org
It is very easy to install and to use if and only if you use it from a (local) server AND all your docs to view (PDF or ODF) are on that server. If not you could try similar adjustments as I did with "pdf.js" for my PDFViewer
shiftLock happens
-
- Livecode Opensource Backer
- Posts: 9359
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria