tinymce editor using opa
import stdlib.core.web.resource
Editor = {{
base_url = Resource.base_url?""
load = <script type="text/javascript" src="{base_url}/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
@client init()=
((%% editor.init %%)())
@client getContent(dom : string)=
((%% editor.getContent %%)(dom))
tiny_mce = @static_resource_directory("tinymce")
}}
while running this above code I'm getting below error
Error File "e开发者_StackOverflowditor.opa", line 20, characters 6-25, (20:6-20:25 | 339-358) Unable to type bypass editor_init.
can anyone help me please?
I think you had not created the bypass before.
First use :
opa-plugin-builder editor.js
With a file "editor.js" like that :
##register init: -> void
##args()
{
tinyMCE.init({
mode: "textareas",
theme: "advanced"
});
}
##register getContent: string -> string
##args(a)
{
return tinyMCE.get(a).getContent();
}
And then you must get a folder named editor.opp
And now to compile editor.opa, you must call editor.opp
ex :
opa editor.opp editor.opa
Hope it helps :)
精彩评论