description rtl support
parent
ebc70eb330
commit
18eb327345
|
@ -56,6 +56,23 @@ Medium = ($translate, $confirm, $storage, wysiwygService, animationFrame, tgLoad
|
||||||
|
|
||||||
wysiwygCodeHightlighterService.addCodeLanguageSelectors(elm)
|
wysiwygCodeHightlighterService.addCodeLanguageSelectors(elm)
|
||||||
|
|
||||||
|
|
||||||
|
AlignRightButton = MediumEditor.extensions.button.extend({
|
||||||
|
name: 'rtl',
|
||||||
|
init: () ->
|
||||||
|
this.button = this.document.createElement('button')
|
||||||
|
this.button.classList.add('medium-editor-action')
|
||||||
|
this.button.innerHTML = '<b>RTL</b>'
|
||||||
|
this.button.title = 'RTL'
|
||||||
|
this.on(this.button, 'click', this.handleClick.bind(this))
|
||||||
|
|
||||||
|
getButton: () ->
|
||||||
|
return this.button
|
||||||
|
handleClick: (event) ->
|
||||||
|
document.execCommand('justifyRight', false)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
# MediumEditor extension to add <code>
|
# MediumEditor extension to add <code>
|
||||||
CodeButton = MediumEditor.extensions.button.extend({
|
CodeButton = MediumEditor.extensions.button.extend({
|
||||||
name: 'code',
|
name: 'code',
|
||||||
|
@ -294,12 +311,14 @@ Medium = ($translate, $confirm, $storage, wysiwygService, animationFrame, tgLoad
|
||||||
'h3',
|
'h3',
|
||||||
'quote',
|
'quote',
|
||||||
'removeFormat',
|
'removeFormat',
|
||||||
|
'rtl',
|
||||||
'code'
|
'code'
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
extensions: {
|
extensions: {
|
||||||
code: new CodeButton(),
|
code: new CodeButton(),
|
||||||
autolist: new AutoList(),
|
autolist: new AutoList(),
|
||||||
|
alignright: new AlignRightButton(),
|
||||||
mediumMention: new MentionExtension({
|
mediumMention: new MentionExtension({
|
||||||
getItems: (mention, mentionCb) ->
|
getItems: (mention, mentionCb) ->
|
||||||
wysiwygMentionService.search(mention).then(mentionCb)
|
wysiwygMentionService.search(mention).then(mentionCb)
|
||||||
|
|
Loading…
Reference in New Issue