javascript - How can I add text call of functions within a web application? -


i developing web app , front end build underway tie in end.

my plan in addition user clicking icons add blocks wysiwyg, can type command also. example if user wants add rectangle wysiwyg canvas can click icon rectangle click 2 opposite corners on canvas , hey presto rectangle appears. in addition, allow user type rect , hit enter , rectangle action started. user can type cartesian coords instead of first and/or second click.

i not sure of technology going used create wysiwyg canvas, can advise best technology achieve feature described above? not knowledgeable such matters.

my assumption javascript used monitor key strokes , used call functions, not sure if work.

any suggestions appreciated! bit worried start paying contractor start building in html5 find out text input idea not compatible!

it'll easy man.

your input might little this: <input type="text" onchange="check(this)"/>

you can create little functions draw shapes. didn't go detail, here sample jsfiddle: https://jsfiddle.net/gpnb9aba/1/

you can type either circle or rect box(case sensitive), hit enter, , draw it(at predetermined location). predetermined location can assigned variable , changed user input, didn't it. fiddle proof of concept.


as drawing rectangles mouse, have @ other jsfiddle: https://jsfiddle.net/lppzrngg/1/

with jsfiddle, click , draw create 2 opposite corners of rectangle, , there, automatically store , draw rectangles.


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -