Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved [General] Help with mycode?
#1
Not Solved
So, I have mycode working for greentext

>it does this, makes it green if you start a sentence with >

It's like this:
Regex: (\n|^)>(.*?)(\n|$)\
Replacement: $1<span style="color: #27ae60;">&gt;$2</span>$3

I'd like to implement one more called orangetext. If you END your sentence with < it makes it orange

Like this<

Can anyone help me with the code? I tried but made a mess.
Reply
#2
Not Solved
Which bit of code makes your text green if you use > ?
[Image: sig2.jpg]
Reply
#3
Not Solved
@iAndrew see this topic => Mycode for greentext?

@bluedagger
Quote:If you END your sentence with < it makes it orange
if you change it to < at the beginning of the text then that might be easy
same as suggested earlier - by using YourCode plugin & code set to multi-line mode
Regex: (\n|^)&lt;(.*?)(\n|$)\
Replacement: $1<span style="color: orange;">&lt;$2</span>$3
Reply
#4
Not Solved
(12-15-2017, 03:31 AM).m. Wrote: @iAndrew see this topic => Mycode for greentext?

@bluedagger
Quote:If you END your sentence with < it makes it orange
if you change it to < at the beginning of the text then that might be easy
same as suggested earlier - by using YourCode plugin & code set to multi-line mode  
Regex: (\n|^)&lt;(.*?)(\n|$)\
Replacement: $1<span style="color: orange;">&lt;$2</span>$3

Yes, changing the > for < is easy, that's exactly why I was asking for help. I'd rather do it the way I said, with the < at the end of the sentence instead of at the beggining.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)