javascript - Looking for a way to render an outline around flowing text on a web page -


as far know isn't possible.

i draw outline around text flowing around floated picture on web page. css or javascript tricks appreciated.

horrible mockup: http://i.stack.imgur.com/wf7bw.png

.

edit:

this link demo aloha editor give idea of purpose of outline: http://www.aloha-editor.org/demos/wordpress-demo/

why?

in cms i'm working on, users can edit information in contenteditable divs on front end of website. in situation above having outline around entire div create confusion user cannot edit black block.

currently have been adding class create outline around content can edited. worked @ first, got little creative formatting (e.g. no margin on bottom of div, content wrapped in div outline) things started getting hacky , ugly. if there way wrap text of div nicely spaced outline , apply consistently on site make things easier. plus i'm @ impasse content structure outlined above.

i'm open other ideas besides outline convey users text can edited on page. i'm experimenting setting background color on inner <p> elements in contenteditables, doesn't seem nice having outlines.

well... can done, javascript! in case have kind of crazy solution, using jquery. works mockup , bit of tweaking can work in different cases, adapt it.

the idea use jquery insert borders around image , hide unwanted borders. width, height , position calculated dynamically based on image size.

enjoy: http://jsfiddle.net/e64w3/


Comments

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -