awt2542 / textlayer-for-framer Goto Github PK
View Code? Open in Web Editor NEWFramer.js module that simplifies the process of adding text to your prototypes.
Framer.js module that simplifies the process of adding text to your prototypes.
I think the Sketch importer has changed again, because I get the following error: TypeError: undefined is not an object (evaluating 'layer._info.metadata.css').
Error is "TypeError: undefined is not a constructor (evaluating new TextLayer)"
TextLayer.framer.zip
Hi.
I'm using your module for Framer and when I mirror my application to the browser, the text layer just doesn't work. However, it works fine on Framer Studio. It is supposed to work like that?
Thank you!
Fixed: I had to click on "Share".
I'm not sure which versions of Framer Studio are affected. I am using v50 (2681).
Fixed by editing line 1 of the module from:
class module.exports extends Layer
to:
class exports.TextLayer extends Layer
Framer v67 doesn't seem to acknowledge it at a constructor.
error
TypeError: Object is not a constructor (evaluating 'new TextLayer')
I'm using textLayer to create a convo UI. I'm wanting to use autoSize
and autoSizeHight
together, but there seems to be a default width being applied? is there a way to have the textLayer set both width and height based on the content?
I set a TextLayer with width, height,or any size come with autosize.
But when I copy the layer it didn't copy all those size as well,
all of them reset their size.
Great plugin. I was wondering if you'd ever looked at being able to fix the width of a text layer and make the adjustment in the height of the layer?
Having an issue just making one of the words bold in my layer. Any ideas?
When focusing on a contentEditable TextLayer, the blinking cursor doesn't show up, although it behaves correctly otherwise.
Interestingly, if setup is set to true, it does show up.
Example that will reproduce:
# The layer
text = new TextLayer
width: 200 # nonessential to reproduce
height: 200 # nonessential to reproduce
contentEditable: true
text: ""
# Focus and behold.... no blinking cursor :'(
text._element.focus()
See: http://share.framerjs.com/d9mz8lh9ob4b/
Weird thing is that if you set :
textLayer.ignoreEvents = false
and
myPageComponent.content.ignoreEvents = true
And "drag-up" on the page component, you're able to select the text layer to edit.
Hi!
Thanks a lot for making this extension!
I'm using this snippet:
t = new TextLayer text: "Friend's email" color: "#515254" fontSize: 12 width: 220 height: 40 y: 150 x: 40 contentEditable: true fontFamily: "HelveticaNeue"
Now I'm wanting to execute an action when I start typing, so when I start typing in the textfield another layer will show up, is this possible?
Thanks!
First off, great module, I use it extensively! I've noticed that if I convert a Sketch layer with convertToTextLayer()
, I have to do layer.color = layer.style.color
in order to prevent the text from being set to 'red'
if I copy it via layer.copy()
. Not sure if this also applies to other CSS styles, but I also noticed that a converted text layer does not keep the original layer's index in the layer list.
When autoSizeHeight = true
and contentEditable = true
the text expands the bottom for a little bit then starts pushing the text up. How can we just limit the expansion to the bottom?
When TextLayer t has t.superLayer = scroll.content
and contentEditable: true
, the content is not editable. When I remove it from the superLayer, it becomes editable again. Any idea on how to fix this?
Cheers!
it would be great if the layer would auto-resize while respecting text alignment, i.e. growing from the right side if textAlign
is set to right
.
Currently, the textLayer always grows from the left side
here is the link http://share.framerjs.com/of0gwenixhzd/
click square two times - when it goes to default state, animation is not right
it would be great to have a method that allows to replace an existing layer from sketch with a text layer:
the only thing that still has to be set manually are the font attributes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.