WYSIWYG HTML Editor
I was lately trying to find an HTML WYSIWYG editor for ABAP, but I failed. I though or this was not needed so far, or the solution was not posted anywhere. So I’ve tried several times and thanks to NICEdit and this tread on SCN I found the way to make HTML WYSIWYG editor for ABAP.
My editor use CL_GUI_HTML_VIEWER to display NICEdit in container, and then thanks to POST method I put changes back to SAP. ZCL_HTML_EDITOR class, raises an event whenever someone click on save button in the editor, so you can easily handle it and then use new HTML for your purposes. Video bellow shows the demo of usage.
NUGG with class and demo program + HTML file with editor can be found here http://abapblog.com/articles/tricks/103-wysiwyg-html-editor-in-abap
I have to admit I couldn't watch your video because of our firewall (so maybe totally stupid what I'm asking), but just curious what is the main difference compare to the BTF Editor?
( BSP Developer's Journal Part XVI - Using the BTF Editor )
I was once told, "There are not stupid questions, only stupid answers." Hopefully my answer will not be considered as stupid 🙂
My editor can be used in SAP GUI for Windows, don't know if BTF editor can, if it does then I would be glad if you could post some examples for me to try it. On my system I could not find any, but I may be looking in wrong place, as I see that BTF is linked to BSP pages?
The main purpose of my development was to allow to have editor on one screen together with other GUI elements like ALV, and to allow users to do edit of mail body which comes out of SAP.
Thanks for the info and clarification.
Now I see the point. To have the BTF Editor in SAPGUI, it would be necessary to develop a custom BSP page, call it from an HTML control. That would also work, but it overcomplicates things a little bit.
Thanks for the info! One day I will surely try BTF 🙂
you certainly mean something like IF_BTF_EDITOR / report SAPBTFEDITOR_DEMO...?
That was exactly what I was looking for few months ago...
anyway I've learnt how to use SAPEvents of HTML control 🙂
Thanks for this!
I have to admit I didn't know this program.
Thanks a lot for this info, it's very useful demo program for BTF. It seems it can be used directly in SAPGUI without BSP, which is a nice feature.
"There are not stupid questions, only stupid answers." Whereas I was told "There are no stupid questions, but there are a lot of inquisitive idiots", 😆
😀 Thanks Matthew
Can you help me with ZCL_HTML_EDITOR class? I need handle special characters like ÁáÇ, but CL_GUI_HTML_VIEWER class escape special characters with #.
ADJUST_HTML_DATA method of CL_GUI_HTML_VIEWER class, is not able to adjust NiceEdit HTML, including <meta http-equiv="content-type" content="text/html; charset=utf-8">.
Without this tag, the post event don't be able to return special characters. After edit HTML file including this tag manually, my report works as expected.
Systems non unicode works well without meta tag.
It is workout for as HTML WYSIWYG editor. But it comes as small in size, is it possible to manage the size/width of HTML Editor as size of HTML viewer – Custom Control?
as far as I remember, in the method show there was a possibility to adjust the size of the editro.
Following is code with height & width parameters are used, but still it is not effective (SAP_BASIS Rel. 754 sp0000)
iv_html = |test - <a href="http://abapblog.com">ABAPblog.com QWRQEWR QE QRWQER QWERWQER WQERQWERWEQR</a><br>test2|
iv_height = 800
iv_width = 800 )
Strange, I don't have access to 754, but I will try to check on 752
Hello maybe too late but we never know, i have same problem than you, editor was appearing very small.
The problem was in class ZCL_HTML_EDITOR, method SHOW, I added two CONDENSE statement and know it works fine.
Edit of show method
Before concatenation result in "800 px" while we want "800px" whitout space.