In Advanced rich text editor, i want to save a image, then how to save the source code of that image which is view in menu bar into a variable?
I want to save below source code into a variable:
But, When I pass a variable in richTextSaveInto, it save like below: (length of characters: 247454)
which is too long to save into DB.
So, I want to save the source code which is view in menu bar
Please anyone suggest !!
Discussion posts and replies are publicly visible
As far as I know, that rich text component does not support your use case. But, why not allow the user to upload that image separately?
Thanks for your reply,
Its a client need to use components or plugins that behave like a Word document in which we can format text, add images and tables.
change col type to longtext and try
Seems like you got your solution. I had the impression that you want to store uploaded images somewhere separately.
I have downloaded the plugins of connected system.
And used the constant of this connected system in richTextEditorField():
But it gives the error:
So, Please suggest if I missed something..
richTextEditorField( label: "Advanced Rich Text Editor ", labelPosition: "ABOVE", height: "AUTO", richTextValue: local!tableSaveData, richTextSaveInto: { local!tableSaveData }, isReadOnly: null, showMenubar: true, includeHTMLlength: false(), maxSize: 1400000, placeholder: null, enableSpellChecker: true, showUsageBar: true, allowImageUpload: true(), imageStorageConnectedSystem: cons!RTE_CONNECTEDSYSTEM_LOCATIONDOC, uploadedImagesDocIds: null, exportedPdfId: null, enableExportPdf: null ),
Upload Images as User in connected system should be valid user.. check that value.
Yes, as Anna said, the user name provided in the connected system should be a valid user. Try with an Admin username.
I have also tried with valid username but it still gives the same error.
check the folder uuid as well and if that is also correct then check the folder if your doc is in that.. I use/test your code from my side, its working fine.
Anna P said:change col type to longtext and try
have you tried this
Can you please write your steps here for this ?
ok.. 2 options,
1. You wanted to store variable big text to db and due to too many chars you did not able to store.
for that, change data type to long text in db / update cdt through xsd (columnDefinition="LONGTEXT"). it will resolve your problem.
2. if you want to store doc in Appian folder
for that use connected system. here you code is correct which I already tested. just check the uuid and if that is also correct then check the folder if your doc is in that per I suggested above in reply.
I want to store the doc in appian folder,
The UUID of the folder is also correct. But still no document is saved in it yet
Hi Anna, Now I am able to upload images but still getting the error on retrieving doc URL.
Can you please suggest what am I missing now!!
richTextEditorField( label: "Advanced Rich Text Editor ", labelPosition: "ABOVE", height: "AUTO", richTextValue: local!tableSaveData, richTextSaveInto: { local!tableSaveData }, isReadOnly: null, showMenubar: true, includeHTMLlength: false(), maxSize: 1400000, placeholder: null, enableSpellChecker: true, showUsageBar: true, allowImageUpload: true(), imageStorageConnectedSystem: cons!RTE_CONNECTEDSYSTEM_LOCATIONDOC, uploadedImagesDocIds: local!test1, exportedPdfId: null, enableExportPdf: null ),
I used your code only and tested, working perfectly fine. only changed is connected system. share your connected system configuration once.
Here is my connected system
here it is.. use Rich Text Editor Connected System (Vuram) plugin for connected system. you are using wrong one.
Thank you so much, with this plugin it's working now.
Thank you to all for the reply.