Hi Livecode!
We are looking to enhance the experience of our Livecode desktop Proposal Management system application for users when they need to edit text in a field. i.e change colour of text, make bold, increase text size, bullet points etc etc. I understand this can be coded but I don't want to reinvent the wheel if there is a solution already out there.
Could anyone point me in the right direction or if they know any 3rd party add-on?
Many thanks
Daniel
Text formatting
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 9842
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Text formatting
I keep threatening to make a nice drop-in text style toolbar, but alas other work keeps getting in the way.
No worries, though - not hard to roll your own.
In the Dictionary see the textStyle property. Esp. useful for menu items is the array form, which allows you to toggle specific style attributes without affecting others, e.g.:
Note that this example is off-the-cuff and untested. If you find anything amiss working with it as a starting point post back here and we'll help sort it out.
Bonus points: we're still in the process of updating the text handling portion of the User Guide (big job; the field object is awesomely rich), but you may find the notes here in the section "New Field Features" beginning on p12 very helpful - wonderful additions for paragraph-level fotmatting, so many you'll probably never use them all but good to learn about them in case you ever do:
http://downloads.livecode.com/livecode/ ... -5_5_4.pdf
No worries, though - not hard to roll your own.
In the Dictionary see the textStyle property. Esp. useful for menu items is the array form, which allows you to toggle specific style attributes without affecting others, e.g.:
Code: Select all
on menuPick pItem
switch pItem
case "bold"
case "italic"
case "underline"
set the textStyle[pItem] of the selection to (not the textStyle[pItem] of the selection)
break
case "My Custom Style"
-- put any custom handling beyond the built in styles here
break
end switch
end menuPick
Bonus points: we're still in the process of updating the text handling portion of the User Guide (big job; the field object is awesomely rich), but you may find the notes here in the section "New Field Features" beginning on p12 very helpful - wonderful additions for paragraph-level fotmatting, so many you'll probably never use them all but good to learn about them in case you ever do:
http://downloads.livecode.com/livecode/ ... -5_5_4.pdf
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