Any MARKMIN alrenative

41 views
Skip to first unread message

Ron Chatterjee

unread,
Jun 12, 2016, 11:11:19 AM6/12/16
to web2py-users
Folks, I have a text field, in the SQLFORM, I copy and paste some texts from one site to this form for testing (Note, If I type in the texts it works fine). I was hoping that MARKMIN can render any html tag. In my view I have:

<h4>Roles: {{=MARKMIN(Roles)}}</h4>
<h4>Responsibility: {{=MARKMIN(responsibility)}}</h4>

Results after rendering I get is:


Roles:

<p><span id="TrackingJobBody">Exciting growth opportunity in Chicago, IL for an Optical Engineer to join a market leader providing innovative solutions using both conventional and solid-state technology. This role is responsible to play a prominent role in new product design and R&amp;D activities to develop products with integrated optical systems. Candidates must have a Bachelor of Science Degree in Physics, Optical Engineering or equivalent Engineering discipline with at least (3) three years of work experience designing optical systems for a electronics manufacturing organization. This is a direct hire role and relocation assistance would be provided for the ideal candidate.</span></p>

Responsibility:
<p><span id="TrackingJobBody"> <ul> <li>Bachelor of Science Degree in Physics, Optical Engineering or equivalent Engineering discipline</li> <li>Must have at least three (3) years' experience designing optical system within a manufacturing organization</li> <li>Experience within the manufacture of sheet metal, injection molded, and die cast components is preferred.</li> <li>Proficient in 3D and 2D CAD software (AutoCAD, SolidWorks and/or Pro-E)</li> <li>Design knowledge of primarily non-imaging optics, light pipes, color mixing optics and diffusers</li> </ul> </span></p>


I tried to do import re and then sub...etc. But that doesn't really work right. So, wondering if anything I can in case people want to copy and paste texts into form and it will render any html tags.


Anthony

unread,
Jun 12, 2016, 11:23:09 AM6/12/16
to web2py-users
MARKMIN() is for converting markmin syntax to HTML -- doesn't seem relevant here.

Are you saying you want someone to be able to copy text from a website and paste it into a textarea and preserve all of the formatting? I'm not sure if that's generally possible, but you would probably need to be using a special web editor like CKEditor (I know it can handle pasting rich text from Microsoft Word -- if copying from an arbitrary web page, it will probably preserve some formatting, but likely not every styling detail).

Anthony
Reply all
Reply to author
Forward
0 new messages