pleini Posted June 16, 2016 Share Posted June 16, 2016 Hello, Is it possible to add custom functionality to the existing pwimage CKEditor plugin? In the CKEditor textarea field we are trying to customize the inserted HTML source when we insert an image. The generated HTML source of the inserted image comes from insertImage() function of pwimage plugin. We want to edit this source before inserting into the textarea. Do you have any idea how can we do it? Thank you for the help! Link to comment Share on other sites More sharing options...
adrian Posted June 16, 2016 Share Posted June 16, 2016 Are either of these any use to you? http://modules.processwire.com/modules/textformatter-image-link-interceptor/ http://modules.processwire.com/modules/textformatter-image-interceptor/ 1 Link to comment Share on other sites More sharing options...
kixe Posted June 17, 2016 Share Posted June 17, 2016 Under the Input Tab of the fieldsettings of your CKEditor Field you have an option to modify 'Extra allowed Content'. As an example, put in here the string img[!src,class,alt,width,height] and save settings. Now you can modify the listet attributes of the image tag in the 'source' dialog of the CKEditor field.But you need to modify it for each input. Was it this, you have been looking for?I f you want to use a normal Textarea Input use the textformatters Adrian recommended. Additionally I recommend Diogos Image Textformatters:http://modules.processwire.com/modules/textformatter-image-tags/http://modules.processwire.com/modules/textformatter-image-field-markup/a great and highly configurable textformatter is Ryans Hanna Code Textformatterhttp://modules.processwire.com/modules/process-hanna-code/and finally mine:http://modules.processwire.com/modules/textformatter-page-images/Very simple to insert images with tags. The output markup, wrapping the image tag, is configurable in the textformatter module settings. Link to comment Share on other sites More sharing options...
pleini Posted June 30, 2016 Author Share Posted June 30, 2016 Hi, I will check these modules, but TextformatterImageInterceptor module looks promising. Thank you for the answers! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now