mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 05:50:35 +03:00
4be392ef16
refs https://github.com/TryGhost/Ghost/issues/9505 - wire up the link button in the toolbar to set a `linkRange` property on `{{koenig-editor}}` - add `{{koenig-link-input}}` that is shown when `{{koenig-editor}}` has a `linkRange` set - <kbd>Escape</kbd> will cancel the link input - clicking outside the input will cancel the link input - previously selected text will be re-selected on cancel - if an existing link was selected (or partially selected) then pre-fill the link input with the `href` - `X` is shown when there's a href value and clicking will clear the input - <kbd>Enter</kbd> *with* a href value will remove all links from text that is touched by the selection and create a new link across only the selected text - <kbd>Enter</kbd> *with no* href value will remove all links touched by the selection - fixed toolbar tick positioning that was 8px off after change to Spirit classes
25 lines
779 B
JavaScript
25 lines
779 B
JavaScript
import hbs from 'htmlbars-inline-precompile';
|
|
import {describe, it} from 'mocha';
|
|
import {expect} from 'chai';
|
|
import {setupComponentTest} from 'ember-mocha';
|
|
|
|
describe('Integration: Component: koenig-link-input', function () {
|
|
setupComponentTest('koenig-link-input', {
|
|
integration: true
|
|
});
|
|
|
|
it.skip('renders', function () {
|
|
// Set any properties with this.set('myProperty', 'value');
|
|
// Handle any actions with this.on('myAction', function(val) { ... });
|
|
// Template block usage:
|
|
// this.render(hbs`
|
|
// {{#koenig-link-input}}
|
|
// template content
|
|
// {{/koenig-link-input}}
|
|
// `);
|
|
|
|
this.render(hbs`{{koenig-link-input}}`);
|
|
expect(this.$()).to.have.length(1);
|
|
});
|
|
});
|