Apr 27, 2016 Replies: 40 Hello all , A wrapper for this library https://github.com/wasabeef/richeditor-android SMMRichEditor Author: SMM Version: 0.05 SMMRichEditor Events: _textchanged (new As String) Fields: ba As BA Methods: AddToParent (Parent As ViewGroup, left As Int, top As Int, width As Int, height As Int) BringToFront DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map) Initialize (EventName As String) Invalidate Invalidate2 (arg0 As Rect) Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int) IsInitialized As Boolean RemoveView RequestFocus As Boolean SendToBack SetBackgroundImage (arg0 As Bitmap) SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int) SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int) SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int) SetVisibleAnimated (arg0 As Int, arg1 As Boolean) clearFocusEditor focusEditor insertImage (path As String, alt As String) insertLink (url As String, text As String) insertTodo loadCSS (cssFile As String) redo removeFormat setAlignCenter setAlignLeft setAlignRight setBlockquote setBold setBullets setIndent setItalic setNumbers setOutdent setPadding (left As Int, top As Int, width As Int, height As Int) setStrikeThrough setSubscript setSuperscript setUnderline undo Properties: Background As Drawable Color As Int [write only] EditorBackgroundColor As Int [write only] EditorFontColor As Int [write only] EditorFontSize As Int [write only] EditorHeight As Int [write only] Enabled As Boolean FontSize As Int [write only] Font size should have a value between 1-7 Heading As Int [write only] Height As Int Html As String Left As Int Padding()() As Int Parent As Object [read only] Placeholder As String [write only] Tag As Object TextBackgroundColor As Int [write only] TextColor As Int [write only] Top As Int Visible As Boolean Width As Int Note : You have to add files in CopytoAssetsFolder.zip to your project's Assets (Add to IDE File tab) I do not understand html images very well but to insert from Assets use this line Code: Copy re.insertImage("file:///android_asset"&"/txt.png","text") re is SMMRichEditor V 2 adds a method (re.Html) to setting or getting HTML V 0.03 adds TextColor (not tested) requested in post #25 V0.04 added loadCSS(String cssFile) , setBullets() , setNumbers(), focusEditor() , clearFocusEditor() V0.05 (I have updated library references above ) 0.16 I think I wrapped all available methods There is an ugly sample attached now Sorry for that it is just to get you started Attachments SMMRichEditor.zip SMMRichEditor.zip 13.2 KB · Views: 1,109 CopytoAssetsFolder.zip CopytoAssetsFolder.zip 5.8 KB · Views: 1,123 SMMRichEditor2.zip SMMRichEditor2.zip 13.3 KB · Views: 980 SMMRichEditor0.03.zip SMMRichEditor0.03.zip 13.7 KB · Views: 896 SMMRichEditor0.04.zip SMMRichEditor0.04.zip 13.9 KB · Views: 858 SMMRichEditor0.05.zip SMMRichEditor0.05.zip 14 KB · Views: 1,022 SMMRichEditor0.16.zip SMMRichEditor0.16.zip 16.1 KB · Views: 540 richeditorsample.zip richeditorsample.zip 9.5 KB · Views: 526 Last edited: Dec 4, 2024 Click to expand...
Hello all , A wrapper for this library https://github.com/wasabeef/richeditor-android SMMRichEditor Author: SMM Version: 0.05 SMMRichEditor Events: _textchanged (new As String) Fields: ba As BA Methods: AddToParent (Parent As ViewGroup, left As Int, top As Int, width As Int, height As Int) BringToFront DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map) Initialize (EventName As String) Invalidate Invalidate2 (arg0 As Rect) Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int) IsInitialized As Boolean RemoveView RequestFocus As Boolean SendToBack SetBackgroundImage (arg0 As Bitmap) SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int) SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int) SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int) SetVisibleAnimated (arg0 As Int, arg1 As Boolean) clearFocusEditor focusEditor insertImage (path As String, alt As String) insertLink (url As String, text As String) insertTodo loadCSS (cssFile As String) redo removeFormat setAlignCenter setAlignLeft setAlignRight setBlockquote setBold setBullets setIndent setItalic setNumbers setOutdent setPadding (left As Int, top As Int, width As Int, height As Int) setStrikeThrough setSubscript setSuperscript setUnderline undo Properties: Background As Drawable Color As Int [write only] EditorBackgroundColor As Int [write only] EditorFontColor As Int [write only] EditorFontSize As Int [write only] EditorHeight As Int [write only] Enabled As Boolean FontSize As Int [write only] Font size should have a value between 1-7 Heading As Int [write only] Height As Int Html As String Left As Int Padding()() As Int Parent As Object [read only] Placeholder As String [write only] Tag As Object TextBackgroundColor As Int [write only] TextColor As Int [write only] Top As Int Visible As Boolean Width As Int Note : You have to add files in CopytoAssetsFolder.zip to your project's Assets (Add to IDE File tab) I do not understand html images very well but to insert from Assets use this line Code: Copy re.insertImage("file:///android_asset"&"/txt.png","text") re is SMMRichEditor V 2 adds a method (re.Html) to setting or getting HTML V 0.03 adds TextColor (not tested) requested in post #25 V0.04 added loadCSS(String cssFile) , setBullets() , setNumbers(), focusEditor() , clearFocusEditor() V0.05 (I have updated library references above ) 0.16 I think I wrapped all available methods There is an ugly sample attached now Sorry for that it is just to get you started
tsteward Well-Known Member Licensed User Longtime User Nov 21, 2016 #21 Ok what about ordered or unordered lists?
tsteward Well-Known Member Licensed User Longtime User Nov 22, 2016 #22 When I run this library in debug mode I always get file not found error file:///android.asset/editor.html Is there anyway to get this to work in debug mode?
When I run this library in debug mode I always get file not found error file:///android.asset/editor.html Is there anyway to get this to work in debug mode?
moster67 Expert Licensed User Longtime User Nov 22, 2016 #23 If you search the forum, you will see that this has been discussed plenty of times, for instance here: https://www.b4x.com/android/forum/t...g-rapid-”-b4a-3-50-version.38981/#post-230988
If you search the forum, you will see that this has been discussed plenty of times, for instance here: https://www.b4x.com/android/forum/t...g-rapid-”-b4a-3-50-version.38981/#post-230988
tsteward Well-Known Member Licensed User Longtime User Nov 23, 2016 #24 Ok please how do I create a list? Set italics richEd.setItalic set header richEd.heading = 1 But how do I make an ordered(numbered) or unordered list?
Ok please how do I create a list? Set italics richEd.setItalic set header richEd.heading = 1 But how do I make an ordered(numbered) or unordered list?
M migliore150267 Member Licensed User Longtime User Jun 27, 2017 #25 Hi, This editor is fantastic but i can't find this function: re.TextColor That is present in the list of supported functions on GitHub. Can you add it ? Thanks in advance
Hi, This editor is fantastic but i can't find this function: re.TextColor That is present in the list of supported functions on GitHub. Can you add it ? Thanks in advance
somed3v3loper Well-Known Member Licensed User Longtime User Jun 28, 2017 #26 migliore150267 said: Hi, This editor is fantastic but i can't find this function: re.TextColor That is present in the list of supported functions on GitHub. Can you add it ? Thanks in advance Click to expand... Check version 0.03 in first post
migliore150267 said: Hi, This editor is fantastic but i can't find this function: re.TextColor That is present in the list of supported functions on GitHub. Can you add it ? Thanks in advance Click to expand... Check version 0.03 in first post
M migliore150267 Member Licensed User Longtime User Jun 28, 2017 #27 somed3v3loper said: Check version 0.03 in first post Click to expand... Thank you very much, it works perfectly.
somed3v3loper said: Check version 0.03 in first post Click to expand... Thank you very much, it works perfectly.
somed3v3loper Well-Known Member Licensed User Longtime User Jun 29, 2017 #28 tsteward said: Ok please how do I create a list? Set italics richEd.setItalic set header richEd.heading = 1 But how do I make an ordered(numbered) or unordered list? Click to expand... Really sorry for this long delay can you try v0.04
tsteward said: Ok please how do I create a list? Set italics richEd.setItalic set header richEd.heading = 1 But how do I make an ordered(numbered) or unordered list? Click to expand... Really sorry for this long delay can you try v0.04
M migliore150267 Member Licensed User Longtime User Jun 29, 2017 #29 Hi again, Sorry for the requests, but you could also add: re.TextFontSize ?
peacemaker Expert Licensed User Longtime User Jun 29, 2017 #30 Pardon me, but why such lib is needed, if there is CSbuilder possibility to make any "reach" text and images on any label, button....?
Pardon me, but why such lib is needed, if there is CSbuilder possibility to make any "reach" text and images on any label, button....?
somed3v3loper Well-Known Member Licensed User Longtime User Jul 1, 2017 #31 migliore150267 said: Hi again, Sorry for the requests, but you could also add: re.TextFontSize ? Click to expand... Check V0.05 on the first post , it has FontSize As Int[write only] peacemaker said: Pardon me, but why such lib is needed, if there is CSbuilder possibility to make any "reach" text and images on any label, button....? Click to expand... I do not know why it is needed but it is always great to have alternatives
migliore150267 said: Hi again, Sorry for the requests, but you could also add: re.TextFontSize ? Click to expand... Check V0.05 on the first post , it has FontSize As Int[write only] peacemaker said: Pardon me, but why such lib is needed, if there is CSbuilder possibility to make any "reach" text and images on any label, button....? Click to expand... I do not know why it is needed but it is always great to have alternatives
M migliore150267 Member Licensed User Longtime User Jul 2, 2017 #32 somed3v3loper said: Check V0.05 on the first post , it has FontSize As Int[write only] Click to expand... Thanks
somed3v3loper said: Check V0.05 on the first post , it has FontSize As Int[write only] Click to expand... Thanks
tsteward Well-Known Member Licensed User Longtime User Jul 3, 2017 #33 somed3v3loper said: Really sorry for this long delay can you try v0.04 Click to expand... Thank you!!!
somed3v3loper said: Really sorry for this long delay can you try v0.04 Click to expand... Thank you!!!
Phayao Active Member Licensed User Longtime User Oct 30, 2017 #34 Hello, thanks for this very useful library - I have an addition question: Is it possible to set the cursor programmatically inside the editor ? Maybe with the use of some javascript ? Help is very appreciated, Chris
Hello, thanks for this very useful library - I have an addition question: Is it possible to set the cursor programmatically inside the editor ? Maybe with the use of some javascript ? Help is very appreciated, Chris
somed3v3loper Well-Known Member Licensed User Longtime User Oct 31, 2017 #35 Phayao said: Hello, thanks for this very useful library - I have an addition question: Is it possible to set the cursor programmatically inside the editor ? Maybe with the use of some javascript ? Help is very appreciated, Chris Click to expand... I don't think this editor has a function to set cursor if you find it here https://github.com/wasabeef/richeditor-android , I will add it to my wrapper . And I am sorry I am not good at JavaScript
Phayao said: Hello, thanks for this very useful library - I have an addition question: Is it possible to set the cursor programmatically inside the editor ? Maybe with the use of some javascript ? Help is very appreciated, Chris Click to expand... I don't think this editor has a function to set cursor if you find it here https://github.com/wasabeef/richeditor-android , I will add it to my wrapper . And I am sorry I am not good at JavaScript
Rusty Well-Known Member Licensed User Longtime User Nov 9, 2019 #36 This would be much more friendly if a small sample project was created where it creates the editor and shows how to add/change/delete text... Rusty
This would be much more friendly if a small sample project was created where it creates the editor and shows how to add/change/delete text... Rusty
Guenter Becker Active Member Licensed User Longtime User Feb 15, 2021 #37 Hello Friend, good work done but where is the function setbullets?? I like to create ordered and unordered list.
Hello Friend, good work done but where is the function setbullets?? I like to create ordered and unordered list.
A ascot1 Member Licensed User Longtime User May 31, 2022 #38 Hello, can someone post a sample project because i can't get it to work ... thanks in advance
S S.M.R Member Dec 3, 2024 #39 Hi dear with this lib we can just set align and we cant set direction! can you add set direction feature (rtl or ltr)? this feature is very important can you do it? thx
Hi dear with this lib we can just set align and we cant set direction! can you add set direction feature (rtl or ltr)? this feature is very important can you do it? thx
somed3v3loper Well-Known Member Licensed User Longtime User Dec 4, 2024 #40 S.M.R said: Hi dear with this lib we can just set align and we cant set direction! can you add set direction feature (rtl or ltr)? this feature is very important can you do it? thx Click to expand... It has align methods but don't expect much regarding rtl support . If you are familiar with JavaScript + CSS , you might try to edit Assets files .
S.M.R said: Hi dear with this lib we can just set align and we cant set direction! can you add set direction feature (rtl or ltr)? this feature is very important can you do it? thx Click to expand... It has align methods but don't expect much regarding rtl support . If you are familiar with JavaScript + CSS , you might try to edit Assets files .