Comments (4)
Haven't had time to look into this but should be easy to determine from the rtl property on the html tag. Can you share your changes?
from nodebb-plugin-composer-redactor.
resolved by hacking in redactor.core.js and plugins.json file by adding the translation and text direction
from nodebb-plugin-composer-redactor.
hi,
These are the sources codes for the changes you can review thems
https://drive.google.com/file/d/0B4WEXAuiLIrVRUdrM3J0SGVkNWM/view?usp=sharing
composer.js
var data = { title: title, mobile: composer.bsEnvironment === 'xs' || composer.bsEnvironment === 'sm', resizable: true, allowTopicsThumbnail: allowTopicsThumbnail, isTopicOrMain: isTopic || isMain, minimumTagLength: config.minimumTagLength, maximumTagLength: config.maximumTagLength, isTopic: isTopic, isEditing: isEditing, showHandleInput: config.allowGuestHandles && (app.user.uid === 0 || (isEditing && isGuestPost && app.user.isAdmin)), handle: postData ? postData.handle || '' : undefined, formatting: composer.formatting, language: config.defaultLang.split("-")[0], tagWhitelist: ajaxify.data.tagWhitelist };
redactor.core.js
`$(window).off('action:redactor.load');
var options = {
lang: config.defaultLang.split("-")[0],
imageUploadFields: {
'cid': '#cmp-cid-' + data.post_uuid,
'_csrf': config.csrf_token
},
fileUploadFields: {
'cid': '#cmp-cid-' + data.post_uuid,
'_csrf': config.csrf_token
},
plugins: ['source', 'fontcolor', 'alignment', 'fontsize', 'textdirection']
};
options = $.extend({}, options, textarea.data());
textarea.redactor(options);`
composer.tpl
<textarea data-lang="{language}" data-direction="[[language:dir]]"></textarea>
library.js
`
plugin.addScripts = function(scripts, callback) {
scripts.push('/plugins/nodebb-plugin-composer-redactor/js/composer/languages/' + (meta.config.defaultLang || 'en-GB').split("-")[0] + '/composer-redactor.js');
callback(null, scripts);
};`
preview
from nodebb-plugin-composer-redactor.
v3.0.1
from nodebb-plugin-composer-redactor.
Related Issues (20)
- Add link button doesn't do anything HOT 3
- Composer window sizing doesn't work as expected HOT 16
- image upload not working with imgur HOT 1
- Tables / Links / Lists not shown HOT 3
- Table --> Isert row above , report an error
- Redactor-composer seems to have changed HOT 15
- Problems with NodeBB 1.6.1 (Selection Straddles to end of Previous Line) HOT 10
- Tenor GIF button not visible in the toolbar HOT 1
- Upload files not working with NodeBB 1.8.1 HOT 12
- autocomplete drop-down of @mention shown during composing HOT 4
- Error on Internet Explorer HOT 1
- File Upload Error Handler HOT 2
- Change the color of the text.
- XSS Problem HOT 2
- Mobile composer header bar broken
- Is there any hook or api for us to add a custom toolbar button?
- Mentions don't work in Safari HOT 4
- Fileupload no longer possible since NodeBB 1.13.4 HOT 1
- Incompatibility with last version of nodebb 1.16.1 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodebb-plugin-composer-redactor.