Pedro Chagas
asked on
Javascript Regular Expressions - jQuery highlightTextarea
Hi E's, I'm developing a kind of html editor in a textarea (WYSIWYG), and adapted a plugin for highlight, this one: jQuery highlightTextArea, and I need help to create some regular expressions for javascript, like this: example from plugin website.
I can Insert two tags in my WYSIWYG, one for insert image, and other to insert youtube videos:
How I do that?
The best regards, JC
I can Insert two tags in my WYSIWYG, one for insert image, and other to insert youtube videos:
<img src="the_image.jpg" style="display: block; margin-left: 0px; margin-right: auto; padding: 15px 15px 15px 15px;" class="img-responsive" alt="the alt tag" width="640" height="480">
<div class="video-container"><iframe src="http://www.youtube.com/embed/m-ijfwr4SzI" frameborder="0" width="560" height="315"></iframe></div>
To get the tags highlight, I need a regular expression for highlight that two lines (image and video).How I do that?
The best regards, JC
Why not just use the industry standard that millions of WordPress web sites have already debugged for us? Have a look at TinyMCE. It's amazingly easy to use. You can have it configured and running in minutes.
ASKER
Thank you @Ray.
Before I begin the adventure of construct my own editor, I explore lots of alternatives, and none of these html editors served for my very specific needs, for this reason I had to do my own editor, and the editor in order to complete and proceed with my project, I just need to know a part of the regular expressions.
I confess I did not know TinyMCE, sure it will be an excellent alternative for future projects.
~JC
Before I begin the adventure of construct my own editor, I explore lots of alternatives, and none of these html editors served for my very specific needs, for this reason I had to do my own editor, and the editor in order to complete and proceed with my project, I just need to know a part of the regular expressions.
I confess I did not know TinyMCE, sure it will be an excellent alternative for future projects.
~JC
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.