fabricjs


Adding text over images in fabricjs


developing this app in which there several images on a canvas and i am using using fabricjs.
i want to add text overlaid on an image and then be able to remove it as well.
is a way to directly write over the image or do i have to create another layer and write onto it.
there is text related like
var text = new fabric.Text('hello world', { left: 100, top: 100 });
canvas.add(text);
the problem with the above approach is that if the image moves the text will not, so is it possible that the text could be written directly above the image?
any ideas of how this could be done? i revived several discussions where it's not as clear, how it could be done.
any pointers would be most appreciated.
I am not quite clear of what exactly is your requirement.
Regardless of it, i have created a jsfiddle for you. Please visit this.
https://jsfiddle.net/xpntggdo/9/
textBox=new fabric.Textbox("Enter Text",{
fontSize: 16,
fontFamily: 'Arial',
textAlign: 'left',
width: 180, // for 20 characters
top:arrowTop,
left:arrowLeft
});
canvas.add(textBox);
canvas.renderAll();
This might be of a little help at least. Comment on this answer and I will try to help you more on it if that is possible for me. Please upvote if you like it.

Related Links

Adding fabric.js Lines to group
Constant stroke width rectangle with FabricJS
FabricJS double click new techniques?
Just show some Controls
How to disable multitouch (multiple touches)
Fabric.js _activeGroup error on sub classed images
Fabric.js animation frame by frame
Fabric JS object scaling
fabricjs set boundingrect to the new object after cropping object using clipto method
Objects cannot be selected after canvas is resized
fabricjs diagonal lines hovercursor and selectable
FabricJS delayed drawing?
fabricjs select a group child and change the position
Creating an IText from Text
fabricjs group itext and rectangle within rectangle boundaries
Can I change controlling borders of selected two or more objects in Fabric.js?

Categories

HOME
jpa
cobalt
c99
telegram
forms
phpmyadmin
google-spreadsheet
3d
flex
bitbucket-api
google-cloud-functions
parameters
iis-6
sendgrid-api-v3
android-securityexception
rtf
stellar.js
heat
package-managers
standards
mathprog
android-7.0-nougat
oledb
spring-async
babel
flask-sqlalchemy
gmock
ckfinder
dapper-extensions
surveymonkey
android-sharedpreferences
fragment-backstack
tpm
carrierwave
vex
sqsh
powershell-ise
playstation-portable
catch-unit-test
github3.py
arduino-ide
jwplayer6
lubridate
apic
nohup
node-mssql
bc
mongoose-schema
apache-stanbol
vmware-fusion
skylink
branching-and-merging
android-ibeacon
dbnull
sharp-snmp
placeholder
drupal-theming
strftime
monkey-testing
pom.xml
nanoc
geotiff
twilio-click-to-call
qtranslate
headless
libjpeg
gameplay-kit
baidu
rsa-archer-grc
polyline
pure-css
autosar
centrifuge
mapinfo
expectations
avspeechsynthesizer
simevents
shopping
dbamp
turbo-prolog
upx
jparsec
file-move
ons-api
cgi-bin
visual-sourcesafe-2005
sony-lifelog-api
viola-jones
skspritenode
osc
primitive-types
big-ip
linkedin-jsapi
strawberry-perl
android-framework
renderer
gwt-openlayers
notorm
scrypt
c++builder-xe5
away3d
gpars
cnf
cmmi
css-reset
stacky
argouml
intersect
dopostback
multiplexing
matlab-load
uipagecontrol
inline-formset
msr
vs-android
globals
aspmenu
folding
spread
escrow

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile