Importing and editing text in a field...
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Importing and editing text in a field...
What is the easiest way to import some text to a field and then be able to edit font/size/color? The field would just be text for the user to read. No action is required. I have imported via Controls but I can't edit.
Also, can I import the HTML for the text so that colors and fonts are exactly like the webpage that I am getting the text? Basically, I am creating a mobile version of a website. Maybe there is an easy way to do this. Lastly, I assume that if a website is accessed via a mobile device, the mobile device can "chose" a mobile display of the HTML. Correct?
Any guidance on these issues is much appreciated. It seems that I remember reading about using a substack to save the text for display in the stack.
Thanks in advance for your help!
Also, can I import the HTML for the text so that colors and fonts are exactly like the webpage that I am getting the text? Basically, I am creating a mobile version of a website. Maybe there is an easy way to do this. Lastly, I assume that if a website is accessed via a mobile device, the mobile device can "chose" a mobile display of the HTML. Correct?
Any guidance on these issues is much appreciated. It seems that I remember reading about using a substack to save the text for display in the stack.
Thanks in advance for your help!
Re: Creating and Editing a Text card...
Hi LndRvr,
Check out HTMLText in the dictionary for the supported tags.
For simple pages go get this, it'll help a lot
http://forums.livecode.com/viewtopic.ph ... es#p100173
Now with that you can use whatever HTML editor you like and just create the page, then copy the HTML (get rid of all the "<!DOCTYPE html PUBLIC ..." stuff) and paste it into that thing hit the button and Presto!
Oh, all that tool does is convert the quotes to work in liveCode you might not need it.
Bad <a href="http://mySite.com/index.html">
Good "<a href=""e&"http://mySite.com/index.html""e&">"
OK Found Klaus's method:
That may fit your style better
Simon
Check out HTMLText in the dictionary for the supported tags.
For simple pages go get this, it'll help a lot
http://forums.livecode.com/viewtopic.ph ... es#p100173
Code: Select all
on mouseUp
set the HTMLText of field "myField" to --pasted stuff
end mouseUp
Oh, all that tool does is convert the quotes to work in liveCode you might not need it.
Bad <a href="http://mySite.com/index.html">
Good "<a href=""e&"http://mySite.com/index.html""e&">"
OK Found Klaus's method:
Code: Select all
function q theString
return QUOTE & theString & QUOTE
end q
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Importing and editing text in a field...
ooops, please don't double post 
We can stick with this one
http://forums.livecode.com/viewtopic.php?f=4&t=23286
Simon

We can stick with this one
http://forums.livecode.com/viewtopic.php?f=4&t=23286
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Importing and editing text in a field...
yeah, I first posted in the "announcements" by accident. Sorry for the double post.
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Importing and editing text in a field...
This is the better location - threads merged here.
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
Re: Importing and editing text in a field...
Why not just use a mobile browser control? Then the webpage will be displayed just as a browser would display it.Also, can I import the HTML for the text so that colors and fonts are exactly like the webpage that I am getting the text? Basically, I am creating a mobile version of a website. Maybe there is an easy way to do this.
Yes, if the page is designed to be 'responsive'.Lastly, I assume that if a website is accessed via a mobile device, the mobile device can "chose" a mobile display of the HTML. Correct?
Jim Lambert
Re: Importing and editing text in a field...
Jim,
How would I know if a website is "responsive"?
Will (LndRvr)
How would I know if a website is "responsive"?
Will (LndRvr)
Re: Importing and editing text in a field...
Looking at a webpage on a desktop browser then on a mobile device is one way to check.
http://en.wikipedia.org/wiki/Responsive_web_design
http://en.wikipedia.org/wiki/Responsive_web_design