Example:
require 'martile'
require 'martile-plugin-rbbrs24'
s = "
<p>Hello World!</p>
<rbbr>45 + 10</rbbr>
<p>fizzer
foo bar</p>
<rbbr>
puts 'hello world'
e ='123'
</rbbr>
"
m = Martile.new(s, plugins: {Rbbrs24: {action: 'runx'}}, debug: true)
s2 = m.to_s
puts s2
Output:
<p>Hello World!</p> <div class='code'> <form action="run" method="get" target="output"> <textarea autofocus="true" name="input1">45 + 10</textarea> <input type="submit" value="run"/> </form> <iframe name="output" id="output"/> </div> <p>fizzer foo bar</p> <div class='code'> <form action="run" method="get" target="output"> <textarea autofocus="true" name="input1"> puts 'hello world' e ='123' </textarea> <input type="submit" value="run"/> </form> <iframe name="output" id="output"/> </div>
martile plugin rbbrs24